DDL Statement vs Select statement identical results
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- sql, typescript
调研方向
从报告中展示的 DBSQLClient session.executeStatement 流程以及 query.fetchChunk()、query.hasMoreRows() 和 query.metadata.schema API 入手。比较 CREATE TABLE 和空 SELECT 操作的暴露方式,然后确定元数据是否能够区分它们,或者是否适合更改结果行。完成的标准是调用方无需解析 SQL 即可可靠地识别该操作。
由索引模型根据 Issue 内容生成。
描述
Hello,
After testing, it appears that the results of the following 2 queries are indistinguishable when looking at the result sets:
CREATE TABLE example (
col1 INT
);
and
SELECT 'sample' as Result
WHERE 1 = 0;
This is because when iterating over the rows, both return 0 rows:
import { DBSQLClient } from '@databricks/sql';
const connectionOptions = {...};
let results = [];
const client = new DBSQLClient();
const session = await client.connect(connectOptions);
const query = await session.executeStatement(query, options);
do {
results = results.concat(await query.fetchChunk());
} while (await query.hasMoreRows());
console.log(results);
And the schema is exactly the same:
... code above
console.log(query.metadata.schema)
Do you have any advice for differentiating the operations without requiring in a SQL parser to determine the query? Would it be possible to add the operation type to the query.metadata, or a result row for DDL operations?
- 主要语言
- TypeScript
- 星标
- 36
- 派生
- 50
- 平均合并
- 13 小时 46 分钟
- 30 天内合并 PR
- 9
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
databricks/databricks-sql-nodejs 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
-
engineer-bot
难度 2/5 1-3 小时 新手友好度 64/100
databricks/databricks-sql-nodejs#274 · 1 条评论 · 1 个 reaction ·
-
难度 3/5 1-2 天 新手友好度 68/100
-
难度 4/5 3-5 天 新手友好度 35/100
-
难度 4/5 3-5 天 新手友好度 48/100
查看 databricks/databricks-sql-nodejs 的全部 Issue
相似的 Issue
-
comp/desktop P3 type/bug
难度 1/5 1 小时以内 新手友好度 92/100
NousResearch/hermes-agent#118866 ·
-
Browser Waiting for: Product Owner
难度 2/5 1-3 小时 新手友好度 85/100
getsentry/sentry-javascript#24577 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
agilepathway/label-checker#640 ·
-
Plugin stuck at "loading" on DSH 0.1.6-alpha.2 — turnTail list slot registration missing options.id 未关闭
难度 2/5 1-3 小时 新手友好度 88/100
-
难度 2/5 1-3 小时 新手友好度 68/100
chrisparsons83/flexspotff#153 ·