Skip to content

Commit aef0b66

Browse files
committed
fix(suggestion): move SQL to fixtures
1 parent 608e7e5 commit aef0b66

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
SELECT * FROM aa.bb;
22

3-
USE
3+
USE
44
;
55
CREATE
66
;
7-
SHOW
7+
SHOW
8+
9+
CREATE TABLE tmp_table (col INT) WITH ('connector'='kafka');

test/parser/flink/suggestion/tokenSuggestion.test.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,18 +69,17 @@ describe('Flink SQL Token Suggestion', () => {
6969
});
7070

7171
test('Create Statement table properties', () => {
72-
const tokenSql = `CREATE TABLE tmp_table (col INT) WITH ('connector'='kafka');`;
7372
const scenarios = [
7473
{
7574
caretPosition: {
76-
lineNumber: 1,
75+
lineNumber: 9,
7776
column: 45,
7877
},
7978
entityContextType: EntityContextType.TABLE_PROPERTY_KEY,
8079
},
8180
{
8281
caretPosition: {
83-
lineNumber: 1,
82+
lineNumber: 9,
8483
column: 55,
8584
},
8685
entityContextType: EntityContextType.TABLE_PROPERTY_VALUE,
@@ -89,7 +88,7 @@ describe('Flink SQL Token Suggestion', () => {
8988

9089
scenarios.forEach((scenario) => {
9190
const suggestion = flink.getSuggestionAtCaretPosition(
92-
tokenSql,
91+
commentOtherLine(tokenSql, scenario.caretPosition.lineNumber),
9392
scenario.caretPosition
9493
)?.syntax;
9594

0 commit comments

Comments
 (0)