Closed xubuild closed 2 years ago
It also got error in a simple case
select a,b,c
-- comments
d,e,f
from ddd.ttt
It also got error in a simple case
select a,b,c -- comments d,e,f from ddd.ttt
In this case,you miss the comma between c and d, so it got an error
It also got error in a simple case
select a,b,c -- comments d,e,f from ddd.ttt
In this case,you miss the comma between c and d, so it got an error
sorry, mistype, I got error even with the comma
select a,b,c,
-- comments
d,e,f
from ddd.ttt
become
SELECT a
,b
,c
,
-- comments d
,e
,f
FROM ddd.ttt
Thanks for this useful tool!
I got some error when dealing with complex hive sql. The comments are not handled correctly in the sql below:
SELECT aaa ,CAST(get_json_object(json_obj,'$.uid') AS BIGINT) AS uid ,CASE WHEN get_json_object(json_obj,'$.app') = 'app1' THEN id -- comments ELSE get_json_object(json_obj,'$.start_id') -- comments END AS id ,CASE WHEN ( array_contains(split(regexp_replace(regexp_replace(event_attribute['items'],'^\\[', ''), '\\]$', ''), ','), get_json_object(json_obj,'$.id')) -- comments OR event_attribute['id'] = get_json_object(json_obj,'$.id') -- comments ) THEN 1 -- comments ELSE 0 END AS has_item FROM ddd.ttt
Thanks for this complex case! I will try to fix it ASAP.
select a,b,c -- comments d,e,f from ddd.ttt
This case has been fixed.
Thanks for this useful tool!
I got some error when dealing with complex hive sql. The comments are not handled correctly in the sql below: