test: hivesql describe syntax unit tests

This commit is contained in:
hayden 2023-07-10 10:19:30 +08:00
parent 5f0a0851a6
commit c6f6599126
2 changed files with 19 additions and 0 deletions

View 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);
});
});
});

View File

@ -0,0 +1,3 @@
DESCRIBE FORMATTED default.src_table PARTITION (part_col = 100) columnA;
DESCRIBE default.src_thrift lintString.$elem$.myint;