fix: add partitioned by sql unit test and compile impala (#221)
This commit is contained in:
@ -42,4 +42,6 @@ CREATE TABLE census_data (last_name STRING);
|
||||
|
||||
ALTER TABLE my_table ADD COLUMN age INT COMMENT 'Updated Age';
|
||||
|
||||
CREATE TABLE kudu_no_partition_by_clause (id bigint PRIMARY KEY, s STRING, b BOOLEAN ) STORED AS KUDU;
|
||||
CREATE TABLE kudu_no_partition_by_clause (id bigint PRIMARY KEY, s STRING, b BOOLEAN ) STORED AS KUDU;
|
||||
|
||||
CREATE TABLE PARTITIONS_YES PARTITIONED BY (YEAR, MONTH);
|
@ -346,4 +346,18 @@ describe('Impala SQL Syntax Suggestion', () => {
|
||||
expect(suggestion).not.toBeUndefined();
|
||||
expect(suggestion?.wordRanges.map((token) => token.text)).toEqual(['id']);
|
||||
});
|
||||
|
||||
test('Create Table partitions', () => {
|
||||
const pos: CaretPosition = {
|
||||
lineNumber: 47,
|
||||
column: 49,
|
||||
};
|
||||
const syntaxes = parser.getSuggestionAtCaretPosition(syntaxSql, pos)?.syntax;
|
||||
const suggestion = syntaxes?.find(
|
||||
(syn) => syn.syntaxContextType === SyntaxContextType.COLUMN_CREATE
|
||||
);
|
||||
|
||||
expect(suggestion).not.toBeUndefined();
|
||||
expect(suggestion?.wordRanges.map((token) => token.text)).toEqual(['YEAR']);
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user