[ https://issues.apache.org/jira/browse/FLINK-8865?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16640794#comment-16640794 ]
ASF GitHub Bot commented on FLINK-8865: --------------------------------------- xueyumusic commented on a change in pull request #6791: [FLINK-8865][sql-client] Add CLI query code completion in SQL Client URL: https://github.com/apache/flink/pull/6791#discussion_r223188362 ########## File path: flink-libraries/flink-sql-client/src/main/java/org/apache/flink/table/client/cli/CliClient.java ########## @@ -97,10 +97,12 @@ public CliClient(SessionContext context, Executor executor) { .terminal(terminal) .appName(CliStrings.CLI_NAME) .parser(new SqlMultiLineParser()) + .completer(new SqlCompleter(context, executor)) .build(); // this option is disabled for now for correct backslash escaping // a "SELECT '\'" query should return a string with a backslash lineReader.option(LineReader.Option.DISABLE_EVENT_EXPANSION, true); + lineReader.setVariable("errors", 1); Review comment: This variable is words distance in `typoMatcher` when do complete in LineReader. Default value is 2 which is a little loose when matching words treats the words which have distance < 2 as the same, so set 1 here ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Add CLI query code completion in SQL Client > ------------------------------------------- > > Key: FLINK-8865 > URL: https://issues.apache.org/jira/browse/FLINK-8865 > Project: Flink > Issue Type: Sub-task > Components: Table API & SQL > Reporter: Timo Walther > Assignee: xueyu > Priority: Major > Labels: pull-request-available > > This issue is a subtask of part two "Full Embedded SQL Client" of the > implementation plan mentioned inĀ > [FLIP-24|https://cwiki.apache.org/confluence/display/FLINK/FLIP-24+-+SQL+Client]. > Calcite already offers a code completion functionality. It would be great if > we could expose this feature also through the SQL CLI Client. -- This message was sent by Atlassian JIRA (v7.6.3#76005)