Commit Graph
1347 Commits
Author SHA1 Message Date
jischeng c3893bf314 feat(spark): add Apache Spark database driver with catalog support
* feat(spark): add Apache Spark database driver

Spark Thrift Server speaks the HiveServer2 protocol, so the Spark driver
reuses the hive-jdbc agent runtime. Registers spark (agentKey=spark,
defaultPort=10015) across the manifest, DatabaseType enum, agent catalog,
SQL dialects, connection dialog, and a SparkAgent built on AbstractJdbcAgent.

* feat(spark): add catalog support and official logo

SparkAgent now supports Spark 3.4+ multi-catalog (Paimon, Lance, Iceberg)
via catalog=<name> in url_params, mirroring the StarRocks catalog flow:
- afterConnect switches to the configured catalog via USE <catalog>
- listDatabases returns the catalog name when SHOW DATABASES is empty
  (catalogs like Lance expose tables at the catalog root with no databases)
- listTables uses SHOW TABLES IN <catalog>[.<schema>] uniformly, working
  for both catalog-root tables (Lance) and catalog.schema tables (Paimon)
- setSchemaSQL qualifies USE with the catalog to prevent resetting to
  spark_catalog on schema switches
- buildJdbcUrl omits database from the URL path

Also replaces the placeholder lightning icon with the official Apache Spark
logo (spark-logo.png from spark.apache.org).

* fix(spark): use catalog-qualified DESCRIBE for column retrieval

getColumnsFromDescribe used USE <schema> + DESCRIBE <table>, which
generated USE `catalog`.`catalog` when the sidebar passed the catalog
name as the schema (Lance case where the catalog is the only node).
This failed and fell back to JDBC metadata which also returned nothing,
resulting in an empty DDL (CREATE TABLE ... ()).

Now uses DESCRIBE `catalog`.`table` directly when a catalog is
configured, bypassing USE entirely. Also fixes setSchemaSQL to treat
schema == catalog as catalog-only (no .schema suffix).

* fix(ci): add spark to metadata coverage matrix and BRIDGE_REQUIRED_TYPES

- agents/metadata-constraint-coverage.tsv: register spark as
  intentional-fallback (SHOW TABLES/SHOW DATABASES, like Hive/TDengine)
- packages/node-core/src/diagnostics.ts: add spark to
  BRIDGE_REQUIRED_TYPES (mcpMode=bridge, matches manifest)

* fix(ci): add spark to DBX_CONNECTION_TYPE_DESCRIPTION in mcp-server

The driver-manifest test asserts every manifest dbType appears in the
MCP server's connection type description string.
2026-07-07 14:36:22 +08:00
t8y2 586faf28c8 feat(diagram): open table data from graph cards 2026-07-07 14:26:52 +08:00
一颗红心 c60b23ffe7 fix: swap upload and download icons in various components for consistency 2026-07-07 14:17:33 +08:00
52835f1eb0 fix: show timeout action for SQL execution timeouts
* fix: show timeout action for SQL execution timeouts

* fix: detect agent RPC timeout in query error action

---------

Co-authored-by: zipg <4047349+zipg@users.noreply.github.com>
Co-authored-by: t8y2 <1156263951@qq.com>
2026-07-07 13:50:29 +08:00
Abeautifulsnow 09f9e44661 fix(ai): make reasoning expand/collapse consistent across messages
fix(ai): make reasoning expand/collapse consistent across messages

Replace per-message expandedReasoning Set with a global reasoningExpanded
boolean ref so all messages share the same toggle state. Default to collapsed.
This avoids the flip-flop where reasoning auto-expands during streaming and
collapses afterward, requiring repeated manual toggles.

- Replace expandedReasoning (Set<number>) with reasoningExpanded (boolean)
- Remove per-index toggleReasoning; use global flip instead
- Template uses reasoningExpanded instead of expandedReasoning.has(i) || msg.isThinking
@
2026-07-07 13:36:53 +08:00
t8y2 e67e7730d1 refactor(data-grid): drop unused gridRef/scrollbarGutter options from useDataGridColumnResize 2026-07-07 13:24:05 +08:00
t8y2 6e7f0578b6 fix(saphana): keep DO blocks together 2026-07-07 13:23:53 +08:00
LRcodingandzero f41c7dd6a0 fix(toolbar): sync SQL file tree visibility setting
Co-authored-by: zero <zero@zeroMacmini.local>
2026-07-07 13:18:42 +08:00
二丫讲梵 2cbce44628 feat(data-grid): 优化查询结果展示宽度 2026-07-07 13:00:59 +08:00
LSD a7be9eed13 fix(gridfs): support bulk download and paged browsing (#2743) 2026-07-07 12:43:07 +08:00
t8y2 65af804099 feat(editor): allow disabling SQL snippets 2026-07-07 12:36:51 +08:00
zipgandzipg 705bacba04 feat(editor): add ExPaste paste-as-IN-condition helper (#2746)
* feat: add ExPaste SQL IN condition helper

* fix: restrict ExPaste to SQL-like editors

---------

Co-authored-by: zipg <4047349+zipg@users.noreply.github.com>
2026-07-07 12:33:49 +08:00
t8y2 29495a7220 fix(sqlfile): align panel header style 2026-07-07 12:29:39 +08:00
t8y2 86d3973eae fix(sidebar): flatten tree selection highlight 2026-07-07 12:19:56 +08:00
t8y2 a5b3409985 fix(sidebar): reduce connection selection repaint cost 2026-07-07 12:09:25 +08:00
t8y2 1db11ea145 feat(postgres): support batch table cascade actions 2026-07-07 11:57:44 +08:00
t8y2 a893f0e478 fix(grid): colorize Oracle/Dameng column types (varchar2, number, etc.) 2026-07-07 11:13:38 +08:00
t8y2 338a2635a6 feat(toolbar): replace driver update count badge with a dot 2026-07-07 10:58:40 +08:00
zipgandzipg 6efe1797a3 fix(editor): show gutter run button for statements with leading whitespace (#2729)
Co-authored-by: zipg <4047349+zipg@users.noreply.github.com>
2026-07-07 10:53:27 +08:00
dde8d4584f feat(sqlfile): add refresh, locate, and context menu to SQL Files panel (#2715)
* feat(sqlfile): add refresh, locate, and context menu to SQL Files panel

- Add per-folder Refresh and Reveal-in-file-manager buttons on each opened
  folder header, plus a Refresh-all button on the panel toolbar. Re-scan
  prunes expand state for paths that no longer exist after refresh.
- Add right-click context menus (via CustomContextMenu) for files, folders,
  folder headers, and the panel background: open, execute SQL file, reveal
  in file manager, copy path, expand/collapse all, refresh, remove folder.
- Highlight the selected tree row on click/right-click; clicking empty space
  clears the selection.
- Wire "Execute SQL file" from the panel into the App-level
  SqlFileExecutionDialog via connectionStore.sqlFileSource.filePath + a new
  prefillFilePath prop, so the dialog opens with the file preview preloaded.
- Add zh-CN/en strings under sqlFileTree.

* chore(i18n): autofill new translations

* fix(sqlfile): clear prefillFilePath on close, dedupe i18n keys

---------

Co-authored-by: wanqinghua <wanqhua@gmail.com>
Co-authored-by: dbx-i18n-bot <github-actions[bot]@users.noreply.github.com>
Co-authored-by: t8y2 <1156263951@qq.com>
2026-07-07 10:34:32 +08:00
haipengno1 d101abe74b fix(sidebar): pin schema row for Dameng/Oracle-style trees 2026-07-07 02:05:34 +08:00
t8y2 7155992e04 feat(import): create table during data import 2026-07-07 02:01:02 +08:00
zipg 668919a7c9 fix(gbase8s): make view source saves safer 2026-07-07 01:50:53 +08:00
t8y2 15b86ad6c9 fix(grid): highlight and locate Ctrl+F matches in transpose view 2026-07-07 01:49:41 +08:00
t8y2 9ee6de9ea6 style(driver-store): tighten agent driver list row height 2026-07-07 01:34:40 +08:00
t8y2 c27fee19d6 fix(desktop): align import and tab bar chrome 2026-07-07 01:31:27 +08:00
t8y2 9cbe857a2a feat(update): 应用内更新提示支持英文 release notes 2026-07-07 00:26:56 +08:00
Guoyu Su d7e2eac307 fix(mongodb): honor current command execution mode (#2702) 2026-07-07 00:02:34 +08:00
二丫讲梵 18e5df6f5e feat(query-editor): enhance current statement framing 2026-07-06 23:09:21 +08:00
t8y2 23c36343b0 fix(grid): isolate table info drawer state 2026-07-06 22:25:32 +08:00
t8y2 d3b978ccba feat(results): add query result auto refresh menu 2026-07-06 22:14:22 +08:00
t8y2 9ad9261a6d feat(editor): support dragging selected SQL text 2026-07-06 22:01:26 +08:00
jischengandt8y2 5db0fc4fb1 fix(grid): reuse local result rows for csv/xlsx export instead of re-running query
* fix(grid): reuse local result rows for csv/xlsx export instead of re-running query

Exporting the full result set ("导出当前结果集全部数据 CSV") previously
re-executed the source SQL on the database via the backend streaming path
(exportQueryResultViaBackend -> start_query_result_export), and the frontend
fallback (fullExportResult/fetchTabResultForExport) did the same. For a slow
query this means running it a second time just to export rows already on
screen, which can hang or crash (e.g. a 2-minute paimon query returning 30
rows).

When the in-memory result already holds the complete set (no server-side
pagination, not truncated, no further pages), skip both re-executing paths and
write the displayed rows directly. Large/truncated/paginated results keep the
original streaming behavior unchanged.

* fix(grid): export raw in-memory result for complete local result set

---------

Co-authored-by: t8y2 <1156263951@qq.com>
2026-07-06 20:06:57 +08:00
Guoyu Su 2b5aaa2a54 fix(desktop): clear connection error after successful test 2026-07-06 19:37:00 +08:00
hhzorgand朱豪豪 95b7b8b9a3 fix(milvus): list all databases and their collections in sidebar
Milvus supports multiple databases, but the sidebar only ever showed
collections under the hardcoded "default" database. The backend returned
["default"] for every vector store and the frontend loaded collections
for a single database and flattened them under the connection node.

- Backend (vector_driver): add list_databases() that calls Milvus
  /v2/vectordb/databases/list (falling back to "default" for older Milvus
  and for non-Milvus vector stores), and thread a database parameter
  through find_documents() instead of hardcoding "default".
- document_ops: list_databases_core delegates VectorDb to list_databases();
  find_documents_core forwards the selected database.
- Frontend: add a "vector-database" tree node type. For Milvus, connections
  expand into database nodes, which expand into their own collections.
  Collection node ids are namespaced by database to avoid collisions
  across databases, and the collection id is stored in meta so activation
  no longer parses the node id.

Fixes #2693

Co-authored-by: 朱豪豪 <zhu.hh.sz@belle.com.cn>
2026-07-06 19:24:55 +08:00
t8y2 b6b510d632 feat(sql): support MySQL routine blocks 2026-07-06 19:06:34 +08:00
ahua 7ff4d9f804 fix(sqlfile): make folder list update reactively 2026-07-06 18:47:45 +08:00
二丫讲梵 ff8e53d47b feat(query): 优化多条查询语句结果展示与语句匹配问题 (#2697) 2026-07-06 18:39:36 +08:00
LSD 095cb867a5 fix(mongodb): remove duplicate refresh button in document browser (#2696) 2026-07-06 18:28:42 +08:00
ce096ca21f fix(completion): scoped table lookup, preserve casing, lower Oracle table-function boost
* fix: improve schema-qualified SQL completion

* fix(completion): preserve casing in completion table cache key and relaxed filter

---------

Co-authored-by: zipg <4047349+zipg@users.noreply.github.com>
Co-authored-by: t8y2 <1156263951@qq.com>
2026-07-06 18:28:23 +08:00
gggaiitx 2fd2b0e770 fix: allow default database for tree-schema databases
TREE_SCHEMA mode databases (saphana, jdbc, postgres, etc.) use an empty string to represent the default database selection. The previous check treated empty string as no database selected and incorrectly blocked query execution.
2026-07-06 18:22:56 +08:00
Hiep LeandClaude Opus 4.8 78019c44e2 fix(mongo): support ISODate() and new Date() in MongoDB queries
* fix(mongo): hỗ trợ ISODate() và new Date() trong query MongoDB

Parser shell MongoDB ở frontend chỉ chuyển ObjectId(...) sang extended JSON,
nên filter chứa ISODate("...")/new Date("...") không parse được: câu lệnh rơi
xuống SQL executor và báo lỗi "Use MongoDB-specific commands".

Bổ sung rewrite ISODate(x)/new Date(x) -> {"$date":x} trong normalizeJsonArgument,
khớp với json_value_to_bson của backend (đã hiểu $date/$oid). Thêm test cho
filter dùng ISODate và new Date.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(mongo): decode $date extended JSON trong filter query

json_filter_value_to_bson chỉ chuyển {"$oid":...} nên filter chứa {"$date":...}
bị gửi thẳng lên server: { field: {"$date":...} } lỗi "unknown operator: $date",
còn { field: {"$gte": {"$date":...}} } so sánh với sub-document nên không khớp gì
(trả về rỗng).

Thêm nhánh parse_extended_json_date vào json_filter_value_to_bson, đồng bộ với
json_value_to_bson (vốn đã hiểu $date/$oid). Thêm test cho cả equality và $gte.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-06 18:21:15 +08:00
zipgandzipg a212ccbfa7 fix(kafka): support cluster address separators
Co-authored-by: zipg <4047349+zipg@users.noreply.github.com>
2026-07-06 18:11:10 +08:00
Moe. 51693bf296 fix(connection): allow immediate reconnect after canceling high-latency connection
* Fix: Scope Disconnects To Connection Attempts

- Allow reconnecting while a scoped disconnect is still pending
- Track successful local connection attempts for scoped backend disconnects
- Prevent older disconnect completions from clearing newer reconnect errors
- Update disconnect state immediately while preserving revision-safe cleanup
- Add regression tests for reconnect and pending disconnect race cases

* Fix: Clear Root Metadata Load On Connection Cancel

* Test: Mock Installed Agents In Connection Store Timeout Spec

* Test: Mock listInstalledAgents in connection store timeout tests
2026-07-06 18:06:05 +08:00
二丫讲梵 6d0a59a913 feat(editor): SQL editor execution button config toggle & optimization
- 在 SQL 编辑器的左侧添加每条语句的执行按钮
- 支持通过快捷键和右键菜单执行语句
- 增加多语言支持的相关文本描述
2026-07-06 18:01:31 +08:00
二丫讲梵 35d5e90378 feat(settings): improve sidebar search
- 新增设置选项以启用/禁用数据库内的表搜索
- 更新相关组件以支持表搜索功能
- 添加多语言支持的描述信息
2026-07-06 17:24:56 +08:00
zipgandzipg 7ccc632ce8 fix(sql): improve completion triggers
Co-authored-by: zipg <4047349+zipg@users.noreply.github.com>
2026-07-06 17:22:24 +08:00
t8y2 90bdacfd12 fix(grid): support multiline bulk edit values 2026-07-06 17:18:38 +08:00
LSD fa5e55a376 feat(mongodb): improve GridFS manager filtering and sorting
* docs: add GridFS manager filter and sort design

* feat: improve GridFS manager filtering and sorting
2026-07-06 17:17:33 +08:00
zipgandzipg 26647ff755 fix(ddl-viewer): fix selection style visibility
Co-authored-by: zipg <4047349+zipg@users.noreply.github.com>
2026-07-06 17:10:50 +08:00