dataease / dataease/SQLBot

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

未关闭
#1,210 0 条评论 0 个 reaction 已指派 2 人 在 GitHub 查看

@xuwei-fit2cloud 已经在做这个了。

开始于 2026年6月22日。

bug Scheduled
主要语言
JavaScript
星标
6.8k
派生
882
平均合并
4 小时 37 分钟
30 天内合并 PR
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. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。