Skip to content

feat(generic): entity collector with empty column - #476

Merged
Cythia828 merged 2 commits into
DTStack:nextfrom
liuxy0551:feat_genericSql_emptyColumn
Oct 30, 2026
Merged

Cythia828 merged 2 commits into
DTStack:nextfrom
liuxy0551:feat_genericSql_emptyColumn

Conversation

@liuxy0551

@liuxy0551 liuxy0551 commented May 20, 2026 •

Copy link
Copy Markdown
Collaborator

对 GenericSQL 的实体收集功能做了统一增强,核心目的是:在语法不完整时,通过语义谓词 shouldMatchEmpty() 匹配空列,保证语法树完整性,使实体收集能正常工作。

关联:

预览地址:https://liuxy0551.github.io/monaco-sql-languages/

create table a2 (id2 int, name varchar);
SELECT | from a2;
image
create table orders ( id BIGINT, age int, name VARCHAR ); 
create table t1 ( id1 BIGINT, age1 int, name1 VARCHAR ); 
SELECT o.age, u.age1 FROM orders o JOIN t1 u ON o.| = u.|;
image image
create table orders ( id BIGINT, age int, name VARCHAR );
create table t1 ( id1 BIGINT, age1 int, name1 VARCHAR );
SELECT age FROM orders o where order by |;
image

@liuxy0551
liuxy0551 force-pushed the feat_genericSql_emptyColumn branch from 805dbfc to a9a3674 Compare October 29, 2026 11:36
@Cythia828

Copy link
Copy Markdown
Collaborator

点号后空列缺少显式规则
Spark/MySQL 有 multipartIdentifier DOT emptyColumn / uid DOT emptyColumn;Generic 的 columnRef 只有 identifier | emptyColumn,columnName 仍是完整 qualifiedName。
单测覆盖了 SELECT a. FROM tb1 a,说明补全路径多半能通,但 JOIN ... ON o.| 这类更依赖错误恢复,不如显式 identifier '.' emptyColumn 稳。
建议:为 select / ON / WHERE 等列路径补上 DOT emptyColumn(或 qualifiedName 的 AllowEmpty 变体),并加与 PR 截图一致的单测。

Comment thread src/grammar/generic/GenericSql.g4 Resolved
@Cythia828
Cythia828 merged commit d86454c into DTStack:next Oct 30, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants