dataease / dataease/SQLBot

[BUG]Hive DESCRIBE 返回列数与 ColumnSchema 构造函数不匹配

オープン
#1,210 コメント 0 件 リアクション 0 件 担当者 2 名 GitHub で見る

@xuwei-fit2cloud がすでに取り組んでいます。

2026年6月22日 から。

bug Scheduled
主要言語
JavaScript
スター
6.8k
フォーク
882
平均マージ
4時間 37分
マージ済み PR(30日)
32

説明

SQLBot Version
1.9.0
Run Mode
Is it running in a Docker container or running from source code?
running in a Docker container
Describe the bug
A clear and concise description of what the bug is.
连接 Hive(ArgoDB)数据源成功后,尝试获取数据表的字段信息时,后端报错:ColumnSchema.init() takes 4 positional arguments but 7 were given,导致无法查看和使用表结构。
To Reproduce
Steps to reproduce the behavior:
1.成功连接 Hive 数据源(通过额外配置传入密码参数后)
2.在数据源列表中点击该数据源
3.尝试展开数据表或同步表结构
4.页面报 ColumnSchema.init() takes 4 positional arguments but 7 were given

Expected behavior
A clear and concise description of what you expected to happen.
连接成功后,获取 Hive 数据源的表字段信息应能正常返回,不应因 DESCRIBE 命令返回额外的列而中断。
Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

Python backend will use DESCRIBE {table_name} SQL command to get Hive table fields(backend/apps/db/db_sql.py 第 320 行)
ArgoDB(Transwarp TDH)的 DESCRIBE 命令返回 7 列(包含分区信息等额外元数据)
ColumnSchema.init(backend/apps/datasource/models/datasource.py 第 160 行)只接受 3 个参数 (attr1, attr2, attr3)
backend/apps/db/db.py 第 508 行使用 ColumnSchema(*item) 解包整行传入,导致参数数量不匹配抛出异常
仅 Hive 数据源受影响,其他数据库类型的字段获取逻辑正常

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。