Skip to content

Commit

Permalink
HCK-9128: Handle indexes without name in Hive (#104)
Browse files Browse the repository at this point in the history
* HCK-9128: Handle indexes without name

* HCK-9128: Handle indexes without name
  • Loading branch information
Nightlngale authored Dec 16, 2024
1 parent b4d7ffb commit 5f4cdc0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
4 changes: 4 additions & 0 deletions forward_engineering/helpers/indexHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ const getIndexStatement = ({
inTable,
isActivated,
}) => {
if (!name.trim() || !columns) {
return '';
}

return buildStatement(
`CREATE INDEX ${name} ON TABLE ${dbName}.${tableName} (${columns}) AS '${indexHandler}'`,
isActivated,
Expand Down
11 changes: 9 additions & 2 deletions properties_pane/entity_level/entityLevelConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,10 @@ making sure that you maintain a proper JSON format.
"propertyKeyword": "name",
"propertyTooltip": "",
"propertyType": "text",
"defaultValue": "New Secondary Index"
"defaultValue": "",
"validation": {
"required": true
}
},
{
"propertyName": "Activated",
Expand All @@ -598,7 +601,11 @@ making sure that you maintain a proper JSON format.
"propertyName": "Key",
"propertyKeyword": "SecIndxKey",
"propertyType": "fieldList",
"template": "orderedList"
"template": "orderedList",
"validation": {
"minLength": 1,
"required": true
}
},
{
"propertyName": "Id",
Expand Down

0 comments on commit 5f4cdc0

Please sign in to comment.