File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 561561 "exist" : false
562562 },
563563 {
564- "key" : " description" ,
565- "exist" : true
564+ "type" : " or" ,
565+ "values" : [
566+ {
567+ "key" : " description" ,
568+ "exist" : true
569+ },
570+ {
571+ "key" : " refDescription" ,
572+ "exist" : true
573+ }
574+ ]
566575 }
567576 ]
568577 },
569578 "defaultValue" : {
570- "description" : " "
579+ "description" : " " ,
580+ "refDescription" : " "
571581 },
572582 "applyToValue" : " ignore"
573583 },
593603 "exist" : false
594604 },
595605 {
596- "key" : " description" ,
597- "exist" : true
606+ "type" : " or" ,
607+ "values" : [
608+ {
609+ "key" : " description" ,
610+ "exist" : true
611+ },
612+ {
613+ "key" : " refDescription" ,
614+ "exist" : true
615+ }
616+ ]
598617 },
599618 {
600619 "type" : " not" ,
609628 ]
610629 },
611630 "defaultValue" : {
612- "description" : " "
631+ "description" : " " ,
632+ "refDescription" : " "
613633 },
614634 "applyToValue" : " separate"
615635 }
Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ function getDefaultColumnList(properties) {
101101 . reduce ( ( columnList , [ name , property ] ) => {
102102 columnList . push ( {
103103 name : `${ prepareName ( name ) } ` ,
104- comment : property . description ,
104+ comment : property . refDescription || property . description ,
105105 isActivated : property . isActivated ,
106106 } ) ;
107107
Original file line number Diff line number Diff line change @@ -396,9 +396,6 @@ class Visitor extends HiveParserVisitor {
396396 const { table } = this . visitWhenExists ( ctx , 'selectStatementWithCTE' , { } ) ;
397397 const columns = this . visitWhenExists ( ctx , 'columnNameCommentList' , [ ] ) ;
398398 const jsonSchema = convertColumnsToJsonSchema ( columns ) ;
399- const columnList = columns
400- . map ( column => column . name + ( column . comment ? ` COMMENT '${ column . comment } '` : '' ) )
401- . join ( ', ' ) ;
402399 const columnNames = columns . map ( column => column . name ) . join ( ', ' ) ;
403400 const tableProperties = this . visitWhenExists ( ctx , 'tablePropertiesPrefixed' ) ;
404401
@@ -413,7 +410,7 @@ class Visitor extends HiveParserVisitor {
413410 data : {
414411 description,
415412 tableProperties,
416- columnList,
413+ columnList : '' ,
417414 } ,
418415 } ;
419416 }
You can’t perform that action at this time.
0 commit comments