test: hivesql describe syntax unit tests
This commit is contained in:
parent
5f0a0851a6
commit
c6f6599126
16
test/parser/hive/syntax/describeStatement.test.ts
Normal file
16
test/parser/hive/syntax/describeStatement.test.ts
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
import HiveSQL from '../../../../src/parser/hive';
|
||||||
|
import { readSQL } from '../../../helper';
|
||||||
|
|
||||||
|
const parser = new HiveSQL();
|
||||||
|
|
||||||
|
const features = {
|
||||||
|
desc: readSQL(__dirname, 'describe.sql'),
|
||||||
|
};
|
||||||
|
|
||||||
|
describe('Hive Describe Syntax Tests', () => {
|
||||||
|
features.desc.forEach((des) => {
|
||||||
|
it(des, () => {
|
||||||
|
expect(parser.validate(des).length).toBe(0);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
3
test/parser/hive/syntax/fixtures/describe.sql
Normal file
3
test/parser/hive/syntax/fixtures/describe.sql
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
DESCRIBE FORMATTED default.src_table PARTITION (part_col = 100) columnA;
|
||||||
|
|
||||||
|
DESCRIBE default.src_thrift lintString.$elem$.myint;
|
Loading…
Reference in New Issue
Block a user