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

21 lines
544 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 (
user BIGINT,
product STRING
) WITH (
"connector" = "kafka",
"scan.startup.mode" = "earliest-offset"
);
`;
const result = parser.validate(sql);
expect(result.length).toBe(0);
});
});