lava-oushudb-dt-sql-parser/test/parser/flinksql/syntax.test.ts

20 lines
540 B
TypeScript
Raw Normal View History

2020-10-22 19:57:13 +08:00
import SQLParser from '../../../src/parser/flinksql';
describe('FlinkSQL Syntax Tests', () => {
const parser = new SQLParser();
test('Test simple CreateTable Statement', () => {
const sql = `
CREATE TABLE Orders (
2020-10-23 17:52:43 +08:00
user BIGINT
2020-10-22 19:57:13 +08:00
) WITH (
"connector" = "kafka",
"scan.startup.mode" = "earliest-offset"
);
`;
const result = parser.validate(sql);
2020-10-23 17:52:43 +08:00
console.log(result);
2020-10-22 19:57:13 +08:00
expect(result.length).toBe(0);
});
});