fix: add missing expression predicate to impala parser(#225)

* fix(impala): add select supprt is true/false/unknown and support more SEMICOLON

* fix(impala): not use emptyStatement replace SEMICOLON

* test(impala): add select unit test sql and test splitSQLByStatement
This commit is contained in:
霜序
2023-11-30 19:56:07 +08:00
committed by GitHub
parent f93ffb93bf
commit 484c881583
14 changed files with 6957 additions and 6245 deletions

View File

@ -188,4 +188,29 @@ select appx_median(x) from million_numbers;
select count(x) as higher from million_numbers where x > (select appx_median(x) from million_numbers);
select avg(length(s)) from t1;
select avg(length(s)) from t1;
select 'fooBar' ilike 'FOOBAR';
select 'ABCXYZ' not ilike 'ab_xyz';
select 1 not in (1,null,2,3);
SELECT c1 AS "starts with vowel" FROM t2 WHERE upper(substr(c1,1,1)) IN ('A','E','I','O','U');
select 'abcABCaabbcc' iregexp '^[a-c]+$';
select null is distinct from null, null != null;
select
'x' is distinct from 'x ' as string_with_trailing_spaces,
cast('x' as char(5)) is distinct from cast('x ' as char(5)) as char_with_trailing_spaces;
select assertion, b, b is true, b is false, b is unknown
from boolean_test;
select true and null;
select c_first_name, c_last_name from customer where lower(trim(c_last_name)) regexp '^de.*';
select c_first_name, c_last_name from customer where lower(trim(c_last_name)) rlike '^de.*';