Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion reverse_engineering/grammars/HiveLexer.g4
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ lexer grammar HiveLexer;
KW_TRUE : T R U E;
KW_FALSE : F A L S E;
KW_ALL : A L L;
KW_AUTO : A U T O;
KW_NONE: N O N E;
KW_AND : A N D;
KW_OR : O R;
Expand Down Expand Up @@ -521,9 +522,10 @@ An Identifier can be:
- macro name
- hint name
- window name
- _metadata
*/
Identifier
: (Letter | Digit) (Letter | Digit | '_')*
: (Letter | Digit | '_')+
| QuotedIdentifier /* though at the language level we allow all Identifiers to be QuotedIdentifiers;
at the API level only columns are allowed to be of this form */
| '`' RegexComponent+ '`'
Expand Down
2 changes: 1 addition & 1 deletion reverse_engineering/grammars/IdentifiersParser.g4
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ orderByClause
;

clusterByClause
: KW_CLUSTER KW_BY LPAREN columnNameList RPAREN
: KW_CLUSTER KW_BY (LPAREN columnNameList RPAREN) | KW_AUTO | KW_NONE
;

partitionByClause
Expand Down
9 changes: 9 additions & 0 deletions reverse_engineering/grammars/SqlBase.g4
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,7 @@ createTableClauses
: (
tableOptions
| (PARTITIONED BY partitioning = partitionFieldList)
| clusterBySpec
| skewSpec
| bucketSpec
| rowFormat
Expand All @@ -397,6 +398,10 @@ createTableClauses
)*
;

clusterBySpec
: CLUSTER BY ( '(' keyNameList ')' ) | AUTO | NONE
;

tableProperties
: (TBLPROPERTIES tableProps=tablePropertyList)
;
Expand Down Expand Up @@ -1340,6 +1345,7 @@ nonReserved
| AS
| ASC
| AT
| AUTO
| AUTHORIZATION
| BETWEEN
| BOTH
Expand Down Expand Up @@ -1461,6 +1467,7 @@ nonReserved
| NAMESPACES
| NO
| NOT
| NONE
| NULL
| NULLS
| OF
Expand Down Expand Up @@ -1592,6 +1599,7 @@ ARRAY: A R R A Y;
AS: A S;
ASC: A S C;
AT: A T;
AUTO: A U T O;
AUTHORIZATION: A U T H O R I Z A T I O N;
BETWEEN: B E T W E E N;
BINDING: B I N D I N G;
Expand Down Expand Up @@ -1727,6 +1735,7 @@ NAMESPACE: N A M E S P A C E;
NAMESPACES: N A M E S P A C E S;
NATURAL: N A T U R A L;
NO: N O;
NONE: N O N E;
NOT: N O T | '!';
NULL: N U L L;
NULLS: N U L L S;
Expand Down
7 changes: 1 addition & 6 deletions reverse_engineering/helpers/tableDDLHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,7 @@ const getTableData = async (table, data, logger) => {
tableData = getTableDataFromDDl(ddl);
tableData = applyUnityTagsToTable(data.unityTags?.tableTags, tableData);
} catch (e) {
logger.log(
'info',
data,
`Error parsing ddl statement below. Falling back on alternate method. \n${ddl}\n`,
data.hiddenKeys,
);
logger.log('info', ddl, 'Error parsing ddl statement below. Falling back on alternate method.');
return {};
}
const BloomIndxs = convertIndexes(indexes);
Expand Down
5 changes: 4 additions & 1 deletion reverse_engineering/parser/Hive/HiveLexer.interp

Large diffs are not rendered by default.

5,741 changes: 2,873 additions & 2,868 deletions reverse_engineering/parser/Hive/HiveLexer.js

Large diffs are not rendered by default.

Loading