python -m ql.utest "select * from my_index where a = 10 limit 10;"
(TOK_QUERY
(TOK_SELECT
(TOK_SELEXPR
(TOK_VALUE
*
)
)
)
(TOK_FROM
(TOK_TABLE_NAME
(TOK_VALUE
my_index
)
)
)
(TOK_WHERE
(TOK_COMPARE
=
(TOK_EXPRESSION_LEFT
(TOK_VALUE
a
)
)
(TOK_EXPRESSION_RIGHT
(TOK_VALUE
10
)
)
)
)
(TOK_LIMIT
(TOK_VALUE
10
)
)
)
-----------------------华丽分割----------------------------------
{
"query": {
"bool": {
"must": [
{
"query_string": {
"query": "10",
"default_operator": "AND",
"fields": [
"a"
]
}
}
]
}
},
"from": 0,
"size": "10"
}
Git开源地址
https://g地址ithub.com/unimassystem/EsqlParser