You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for reporting. There are a few different problems here.
One is that the expression inside the first pair of parenthesis (the columns list) is pretty short, so it gets formatted on a single line. Though if one would just increase it by one character, it would get formatted as:
CREATETABLEk8s_demos.dd_dd_dd (
id string COMMENT 'id',
name string COMMENT 'name'
) using paimon COMMENT '122' TBLPROPERTIES (
'compression'='ZSTD',
'bizOwner'='huaixin',
'dataLevel'='P3',
'dwClassification'='',
'subject1'='',
'subject2'='',
'primary-key'='id'
) lifeCycle 122;
The second is that the formatter doesn't recognize USING, COMMENT and TBLPROPERTIES as entities to be formatted on separate lines. With USING and TBLPROPERTIES that should be easily achievable. However, with COMMENT it's tricky as the formatter won't be able to distinguish between column comment and table comment. So if one is to be formatted on a separate line, all of them would be, which is probably not what you want.
Activity
nene commentedon Nov 6, 2024
Thanks for reporting. There are a few different problems here.
One is that the expression inside the first pair of parenthesis (the columns list) is pretty short, so it gets formatted on a single line. Though if one would just increase it by one character, it would get formatted as:
The second is that the formatter doesn't recognize
USING,COMMENTandTBLPROPERTIESas entities to be formatted on separate lines. WithUSINGandTBLPROPERTIESthat should be easily achievable. However, withCOMMENTit's tricky as the formatter won't be able to distinguish between column comment and table comment. So if one is to be formatted on a separate line, all of them would be, which is probably not what you want.[-][FORMATTING] Hive create table sql[/-][+]Formatter doesn't recognize Hive CREATE TABLE modifiers[/+]melin commentedon Nov 6, 2024
The solution possible?
Judge in ‘create table (...)’ comment in parentheses does not need to add a new line, other comment add a new line.
nene commentedon Nov 6, 2024
Sorry, but I don't quite understand what you are trying to say.