Skip to content

[Feat] Sql autocomplete (I can apply my code solution ) #504

@Whojohn

Description

@Whojohn

Feature Request

您的功能诉求是否是跟某个问题相关的?
We need Sql autocomplete in StreamX.

StreamX 中没有Sql autocomplete ,使用不友好。

你希望的新功能诉求是怎么样的?
We are human, we always depends on autocompelete or hits to development. We need auto parser to notice user their sql grammar is not right before running.
开发的时候有自动提示,启动前提示用户 sql 语法哪里错了,可能的值。

您为此有过什么替代方案?
Sql client notic and so on . However Sql client notice is not perfect.(ps: I can apply my solution ).

Sql client 的实现(很烂)。HueZeppeline 的挺好用。

辅助文档
我的实现方案(分阶段实现):

  • 方案1
  1. 移植HueZeppline的实现(可能存在许可问题)。
  • 方案2
  1. 移植 Flink sql client实现。
  • 方案3(我们内部的实现方案)
  1. 第一阶段: 利用Fst树+词频统计实现。(我们是基于 ES suggestion做的。我可以写一个Java Fst 树实现)
  2. 第二阶段: 利用 Apache Calcite 解析上下文,提供上下提示,字段自动填充。

第三阶段(not only suggestion)
ps: 更大胆一点,把Flink sql 做成数仓。平台封装Sql connector信息,通过特定语法或者是特定条件复用连接(我们的内部实现,这样还能屏蔽掉用户知道物理底层的连接信息,!!!让用户知道连接是一样很丑陋,且不安全的事情!!!)。
比如: show table 显示所有可用的连接信息等等这些特性,并且提示可用表等。

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestThis is a feature requests on the product

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions