add left function

This commit is contained in:
HSunboy 2019-12-27 19:30:37 +08:00
parent a486270ab1
commit 6eda025e39
3 changed files with 479 additions and 473 deletions

File diff suppressed because one or more lines are too long

View File

@ -3312,6 +3312,7 @@ ArbitraryFunctionName
| 'MAP'
| '<impala>REPLACE'
| 'TRUNCATE'
| 'LEFT'
;
OptionalFunctionSquareBracket

View File

@ -53,6 +53,11 @@ describe('syntax test', () => {
const result = parser.parseSyntax([sql, ''], dtSqlParser.parser.sqlType.Impala);
expect(result).toBe(false);
})
test('left function', () => {
const sql = `select left(a) from sa;`
const result = parser.parseSyntax([sql, ''], dtSqlParser.parser.sqlType.Impala);
expect(result).toBe(false);
})
});
describe('hive', () => {
test('no error', () => {