From e5d8ec8ebfef04709f0610b17298fcec2a5767d3 Mon Sep 17 00:00:00 2001 From: Taras Dubyk Date: Thu, 9 Apr 2026 13:29:07 +0300 Subject: [PATCH 1/3] use refDescription if present for view column references --- forward_engineering/helpers/viewHelper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forward_engineering/helpers/viewHelper.js b/forward_engineering/helpers/viewHelper.js index 2aa5634..8e98d5e 100644 --- a/forward_engineering/helpers/viewHelper.js +++ b/forward_engineering/helpers/viewHelper.js @@ -101,7 +101,7 @@ function getDefaultColumnList(properties) { .reduce((columnList, [name, property]) => { columnList.push({ name: `${prepareName(name)}`, - comment: property.description, + comment: property.refDescription || property.description, isActivated: property.isActivated, }); From d7b37113a7e0ae543aa1a5d94f082690b147c68e Mon Sep 17 00:00:00 2001 From: Taras Dubyk Date: Thu, 9 Apr 2026 13:30:02 +0300 Subject: [PATCH 2/3] add refDescription for script generation options --- forward_engineering/config.json | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/forward_engineering/config.json b/forward_engineering/config.json index d36d6df..8a96797 100644 --- a/forward_engineering/config.json +++ b/forward_engineering/config.json @@ -561,13 +561,23 @@ "exist": false }, { - "key": "description", - "exist": true + "type": "or", + "values": [ + { + "key": "description", + "exist": true + }, + { + "key": "refDescription", + "exist": true + } + ] } ] }, "defaultValue": { - "description": "" + "description": "", + "refDescription": "" }, "applyToValue": "ignore" }, @@ -593,8 +603,17 @@ "exist": false }, { - "key": "description", - "exist": true + "type": "or", + "values": [ + { + "key": "description", + "exist": true + }, + { + "key": "refDescription", + "exist": true + } + ] }, { "type": "not", @@ -609,7 +628,8 @@ ] }, "defaultValue": { - "description": "" + "description": "", + "refDescription": "" }, "applyToValue": "separate" } From f5afd0fc687ace7f27df4e04a15062d7aafb4be0 Mon Sep 17 00:00:00 2001 From: Taras Dubyk Date: Thu, 9 Apr 2026 13:30:27 +0300 Subject: [PATCH 3/3] do not populate columnList for basic use-cases --- reverse_engineering/hqlToCollectionsVisitor.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/reverse_engineering/hqlToCollectionsVisitor.js b/reverse_engineering/hqlToCollectionsVisitor.js index bda801c..2c95c31 100644 --- a/reverse_engineering/hqlToCollectionsVisitor.js +++ b/reverse_engineering/hqlToCollectionsVisitor.js @@ -396,9 +396,6 @@ class Visitor extends HiveParserVisitor { const { table } = this.visitWhenExists(ctx, 'selectStatementWithCTE', {}); const columns = this.visitWhenExists(ctx, 'columnNameCommentList', []); const jsonSchema = convertColumnsToJsonSchema(columns); - const columnList = columns - .map(column => column.name + (column.comment ? ` COMMENT '${column.comment}'` : '')) - .join(', '); const columnNames = columns.map(column => column.name).join(', '); const tableProperties = this.visitWhenExists(ctx, 'tablePropertiesPrefixed'); @@ -413,7 +410,7 @@ class Visitor extends HiveParserVisitor { data: { description, tableProperties, - columnList, + columnList: '', }, }; }