Comments (3)
@davidkhala Thanks for your feedback
from dt-sql-parser.
CommonTokenStream 返回的 Token 对象只包含了 token
的类型和位置信息,而没有文本信息。如果需要获取 token 的文本信息,可以通过 Token.getText()
使用
Java
示例,其他语言自己转一下
for (Token token : tokens.getTokens()) {
String text = token.getText();
// do something with the text
}
SQLLexer.token文件内容
RETURN=131
REVOKE=132
RIGHT=133
RLIKE=134
SCHEMA=135
SCHEMAS=136
SELECT=137
SET=138
SEPARATOR=139
SHOW=140
SIGNAL=141
SPATIAL=142
SQL=143
只有类型信息
from dt-sql-parser.
done
from dt-sql-parser.
Related Issues (20)
- [Bug]: hive not support set configuration properties
- [Bug]: webpack mode=production模式下,文件访问报错 HOT 1
- [Bug]: pgsql truncate table suggestion
- [Bug]: ctxToWord is a bad function HOT 1
- [Feature Request]: 收集实体时需要更加丰富的信息
- [Feature Request]: TSQL (MS SQL) Support would be nice
- Cannot use schema "public" cause it is considered as a keyword
- [Feature Request]: Support ClickHouse HOT 1
- [Bug]: "ALTER TABLE" can collect entities but entities don't have belongStmt
- [Bug]: 使用基准测试,报错 no such file or directory, open '..../dt-sql-parser/benchmark/reports/flink.benchmark.md' HOT 1
- [Feature Request]: How to add a new language HOT 1
- [Feature Request]: whereClause can complete with column name HOT 1
- [Feature Request]: 支持其他SQL的 alter 收集实体 HOT 1
- 正确的FlinkSQL函数语句会标红色的错误 HOT 1
- Impala正确语法也会标红 HOT 1
- [Doc]: toMatchUnorderedArrary rename to toMatchUnorderedArray
- [Feature Request]: 基准测试优化
- [Bug]: postgreSQL syntax error
- [Feature Request]: 支持所有SQL的所有实体属性收集
- [Bug]: 这段SQL有问题
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dt-sql-parser.