feat(flinksql): collect comment, type attribute for entity#319
Merged
HaydenOrz merged 11 commits intoDTStack:nextfrom Jul 5, 2024
Merged
feat(flinksql): collect comment, type attribute for entity#319HaydenOrz merged 11 commits intoDTStack:nextfrom
HaydenOrz merged 11 commits intoDTStack:nextfrom
Conversation
2c3cbd4 to
cb9a37a
Compare
liuxy0551
reviewed
Jul 1, 2024
HaydenOrz
reviewed
Jul 1, 2024
| this.pushEntity(ctx, EntityContextType.DATABASE_CREATE, { | ||
| needCollectAttr: true, | ||
| attrList: [attrName.comment], | ||
| endContext: 'CreateDatabaseContext', |
Collaborator
There was a problem hiding this comment.
可以用 CreateDatabaseContext.constructor.name 代替吗
Collaborator
Author
There was a problem hiding this comment.
不可以哦,在这里CreateDatabaseContext.constructor.name 是Function
Collaborator
There was a problem hiding this comment.
CreateDatabaseContext.name
LuckyFBB
reviewed
Jul 1, 2024
Collaborator
Author
|
@liuxy0551 @HaydenOrz 关于你们的comment,已经提交了新的commit,可以再次review一下 |
HaydenOrz
reviewed
Jul 4, 2024
src/parser/common/entityCollector.ts
Outdated
| return 'line' in value; | ||
| } | ||
|
|
||
| export function isColumnEntityContext(value: EntityContext): value is ColumnEntityContext { |
src/parser/common/entityCollector.ts
Outdated
| return 'params' in value && 'returns' in value && 'relatedEntities' in value; | ||
| } | ||
|
|
||
| export function isWordRange(value: any): value is WordRange { |
Collaborator
There was a problem hiding this comment.
同上,且参数类型应该是 TextSlice | WordRange
| this.pushEntity(ctx, EntityContextType.DATABASE_CREATE, { | ||
| needCollectAttr: true, | ||
| attrList: [attrName.comment], | ||
| endContext: 'CreateDatabaseContext', |
Collaborator
There was a problem hiding this comment.
CreateDatabaseContext.name
Collaborator
Author
|
@HaydenOrz 优化的commit已提交,可再次review |
Cythia828
added a commit
to Cythia828/dt-sql-parser
that referenced
this pull request
Aug 2, 2024
* feat(flinksql): collect comment, type attribute for entity * feat(flinksql): delete console log * fix(DTStack#305): delete function ctxToWord,using ctxToText instead of ctxToWord * feat: update attribute's type * feat(flinksql): update flinksql's entitycollect unit test * feat: optimize interface and update unit test * feat: update collect attr detail * feat: optimize interface and some function's arguments * feat: add comment and update params' name * feat: collect alias in select statement * feat: update collect attribute function and update unit test --------- Co-authored-by: zhaoge <>
HaydenOrz
pushed a commit
that referenced
this pull request
Aug 2, 2024
* feat(flinksql): collect comment, type attribute for entity * feat(flinksql): delete console log * fix(#305): delete function ctxToWord,using ctxToText instead of ctxToWord * feat: update attribute's type * feat(flinksql): update flinksql's entitycollect unit test * feat: optimize interface and update unit test * feat: update collect attr detail * feat: optimize interface and some function's arguments * feat: add comment and update params' name * feat: collect alias in select statement * feat: update collect attribute function and update unit test --------- Co-authored-by: zhaoge <>
Cythia828
added a commit
to Cythia828/dt-sql-parser
that referenced
this pull request
Aug 2, 2024
* feat(flinksql): collect comment, type attribute for entity * feat(flinksql): delete console log * fix(DTStack#305): delete function ctxToWord,using ctxToText instead of ctxToWord * feat: update attribute's type * feat(flinksql): update flinksql's entitycollect unit test * feat: optimize interface and update unit test * feat: update collect attr detail * feat: optimize interface and some function's arguments * feat: add comment and update params' name * feat: collect alias in select statement * feat: update collect attribute function and update unit test --------- Co-authored-by: zhaoge <>
HaydenOrz
pushed a commit
to HaydenOrz/dt-sql-parser
that referenced
this pull request
Aug 27, 2024
* feat(flinksql): collect comment, type attribute for entity * feat(flinksql): delete console log * fix(DTStack#305): delete function ctxToWord,using ctxToText instead of ctxToWord * feat: update attribute's type * feat(flinksql): update flinksql's entitycollect unit test * feat: optimize interface and update unit test * feat: update collect attr detail * feat: optimize interface and some function's arguments * feat: add comment and update params' name * feat: collect alias in select statement * feat: update collect attribute function and update unit test --------- Co-authored-by: zhaoge <>
HaydenOrz
pushed a commit
that referenced
this pull request
Oct 17, 2024
* feat(flinksql): collect comment, type attribute for entity * feat(flinksql): delete console log * fix(#305): delete function ctxToWord,using ctxToText instead of ctxToWord * feat: update attribute's type * feat(flinksql): update flinksql's entitycollect unit test * feat: optimize interface and update unit test * feat: update collect attr detail * feat: optimize interface and some function's arguments * feat: add comment and update params' name * feat: collect alias in select statement * feat: update collect attribute function and update unit test --------- Co-authored-by: zhaoge <>
liuxy0551
pushed a commit
to liuxy0551/dt-sql-parser
that referenced
this pull request
Nov 14, 2024
* feat(flinksql): collect comment, type attribute for entity * feat(flinksql): delete console log * fix(DTStack#305): delete function ctxToWord,using ctxToText instead of ctxToWord * feat: update attribute's type * feat(flinksql): update flinksql's entitycollect unit test * feat: optimize interface and update unit test * feat: update collect attr detail * feat: optimize interface and some function's arguments * feat: add comment and update params' name * feat: collect alias in select statement * feat: update collect attribute function and update unit test --------- Co-authored-by: zhaoge <>
liuxy0551
pushed a commit
that referenced
this pull request
Nov 14, 2024
* feat(flinksql): collect comment, type attribute for entity * feat(flinksql): delete console log * fix(#305): delete function ctxToWord,using ctxToText instead of ctxToWord * feat: update attribute's type * feat(flinksql): update flinksql's entitycollect unit test * feat: optimize interface and update unit test * feat: update collect attr detail * feat: optimize interface and some function's arguments * feat: add comment and update params' name * feat: collect alias in select statement * feat: update collect attribute function and update unit test --------- Co-authored-by: zhaoge <>
mumiao
pushed a commit
that referenced
this pull request
Feb 13, 2025
* feat: improve errorListener msg (#281) * feat: add mysql errorListener and commonErrorListener * feat: improve other sql error msg * feat: support i18n for error msg * feat: add all sql errorMsg unit test * feat: update locale file and change i18n funtion name * test: upate error unit test * feat(flinksql): collect comment, type attribute for entity (#319) * feat(flinksql): collect comment, type attribute for entity * feat(flinksql): delete console log * fix(#305): delete function ctxToWord,using ctxToText instead of ctxToWord * feat: update attribute's type * feat(flinksql): update flinksql's entitycollect unit test * feat: optimize interface and update unit test * feat: update collect attr detail * feat: optimize interface and some function's arguments * feat: add comment and update params' name * feat: collect alias in select statement * feat: update collect attribute function and update unit test --------- Co-authored-by: zhaoge <> * fix: spell check (#337) Co-authored-by: liuyi <[email protected]> * ci: check-types and test unit update * feat: collect entity's attribute(#333) * feat(trinosql): collect trino sql's attribute(comment,alias,colType) * feat(hivesql): collect hive sql's attribute(comment,alias,colType) * feat(impalasql): collect attribute(comment, colType, alias) * feat(sparksql): collect entity's attribute (comment,alias, colType) * feat: update endContextList of collect attribute * feat(postgresql): collect hive sql's attribute(alias,colType) * feat: update interface of attrInfo and alter entitycollect ts file * feat(mysql): collect entity's attribute(comment,colType,alias) * ci: fix check-types problem --------- Co-authored-by: zhaoge <> * chore(release): 4.1.0-beta.0 * fix: #362 set hiveVar value (#369) * fix: #371 export EntityContext types (#372) * fix: minimum collect candidates boundary to fix parse performance (#378) * fix: minimum collect candidates boundary to fix parse performance * fix: fix check-types * fix: remove debugger code * fix(flink): fix flinksql syntax error about ROW and function using (#383) Co-authored-by: zhaoge <> * build: pnpm antlr4 --lang all --------- Co-authored-by: 霜序 <[email protected]> Co-authored-by: XCynthia <[email protected]> Co-authored-by: 琉易 <[email protected]> Co-authored-by: liuyi <[email protected]> Co-authored-by: zhaoge <> Co-authored-by: Hayden <[email protected]> Co-authored-by: JackWang032 <[email protected]>
mumiao
pushed a commit
that referenced
this pull request
May 8, 2025
* feat: improve errorListener msg (#281) * feat: add mysql errorListener and commonErrorListener * feat: improve other sql error msg * feat: support i18n for error msg * feat: add all sql errorMsg unit test * feat: update locale file and change i18n funtion name * test: upate error unit test * feat(flinksql): collect comment, type attribute for entity (#319) * feat(flinksql): collect comment, type attribute for entity * feat(flinksql): delete console log * fix(#305): delete function ctxToWord,using ctxToText instead of ctxToWord * feat: update attribute's type * feat(flinksql): update flinksql's entitycollect unit test * feat: optimize interface and update unit test * feat: update collect attr detail * feat: optimize interface and some function's arguments * feat: add comment and update params' name * feat: collect alias in select statement * feat: update collect attribute function and update unit test --------- Co-authored-by: zhaoge <> * fix: spell check (#337) Co-authored-by: liuyi <[email protected]> * ci: check-types and test unit update * feat: collect entity's attribute(#333) * feat(trinosql): collect trino sql's attribute(comment,alias,colType) * feat(hivesql): collect hive sql's attribute(comment,alias,colType) * feat(impalasql): collect attribute(comment, colType, alias) * feat(sparksql): collect entity's attribute (comment,alias, colType) * feat: update endContextList of collect attribute * feat(postgresql): collect hive sql's attribute(alias,colType) * feat: update interface of attrInfo and alter entitycollect ts file * feat(mysql): collect entity's attribute(comment,colType,alias) * ci: fix check-types problem --------- Co-authored-by: zhaoge <> * chore(release): 4.1.0-beta.0 * fix: #362 set hiveVar value (#369) * fix: #371 export EntityContext types (#372) * fix: minimum collect candidates boundary to fix parse performance (#378) * fix: minimum collect candidates boundary to fix parse performance * fix: fix check-types * fix: remove debugger code * fix(flink): fix flinksql syntax error about ROW and function using (#383) Co-authored-by: zhaoge <> * build: pnpm antlr4 --lang all * Feat/follow keywords (#407) * feat: provide follow keywords when get suggestions * chore: add watch script * refactor: optimize spark grammar (#360) * feat: support semantic context of isNewStatement (#361) * feat: support semantic context of isStatamentBeginning * docs: add docs for semantic context * feat: unify variables in lexer (#366) * feat: unify variables in lexer * fix: all sql use WHITE_SPACE * feat: complete after error syntax (#334) * refactor: split getMinimumParserInfo to slice input and parser again * test: complete after error syntax * feat: complete after error syntax * feat: use createParser to get parserIns and remove parserWithNewInput * feat(all sql): add all sql expression column (#358) * feat(impala): add impala expression column * feat(trino): add expression column * feat(hive): add hive expression column * feat(spark): add spark expression column * feat(mysql): add mysql expression column unit test * feat(flink): add flink expression column * feat(postgresql): add pg expression column * feat: #410 optimize processCandidates tokenIndexOffset (#411) * test: test suggestion wordRanges with range when processCandidates without tokenIndexOffset * feat: #410 optimize processCandidates tokenIndexOffset --------- Co-authored-by: 霜序 <[email protected]> Co-authored-by: XCynthia <[email protected]> Co-authored-by: 琉易 <[email protected]> Co-authored-by: liuyi <[email protected]> Co-authored-by: zhaoge <> Co-authored-by: Hayden <[email protected]> Co-authored-by: JackWang032 <[email protected]> Co-authored-by: JackWang032 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Feature
Fix
Description
_取属性名,antlr4ng目前解析出来属性名都是带_,是公有的。甚至以type命名前后都有下划线,应该是以防重名,无关私有公有findAttributeChildren方法里的child类型,因为antlr4ng 的ParserRuleContext里,children并未重申类型,导致children类型为ParseTree[],需要和三方提PR修改isAlias属性和alias、reference、comment几个可选属性,alias为别名,reference为被引用的实体。