Skip to content

Commit

Permalink
[Improve]: sql auto complete improve (#541)
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfboys authored Dec 21, 2021
1 parent e5e9838 commit e506293
Show file tree
Hide file tree
Showing 8 changed files with 344 additions and 360 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@
**/*.yml,
**/*.yaml,
**/*.xml,
**/*.txt
**/*.dict
</resourceIncludes>
<resourceExcludes>
**/.asf.yaml,
Expand Down
3 changes: 0 additions & 3 deletions streamx-console/streamx-console-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -668,9 +668,6 @@
</execution>
</executions>
</plugin>



</plugins>
</build>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import com.streamxhub.streamx.console.core.entity.Application;
import com.streamxhub.streamx.console.core.entity.FlinkSql;
import com.streamxhub.streamx.console.core.service.FlinkSqlService;
import com.streamxhub.streamx.console.core.service.SqlComplete;
import com.streamxhub.streamx.console.core.service.SqlCompleteService;
import com.streamxhub.streamx.flink.core.SqlError;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
Expand All @@ -50,7 +50,7 @@ public class FlinkSqlController {
private FlinkSqlService flinkSqlService;

@Autowired
private SqlComplete sqlComplete;
private SqlCompleteService sqlComplete;

@PostMapping("verify")
public RestResponse verify(String sql, Long versionId) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* @author Whojohn
* @time 2021.12.20
*/
public interface SqlComplete {
public interface SqlCompleteService {
/**
* 功能:
* 1. 请传入一个完整 sql 语句,只对最后一词联想。(传入完整 sql ,是为了后续解析上下文的关键字使用。该版本暂无实现)
Expand All @@ -34,5 +34,11 @@ public interface SqlComplete {
* @param sql 输入一个需要联想的 sql
* @return 返回一个潜在词列表
*/

/**
*
* @param sql
* @return
*/
public List<String> getComplete(String sql);
}
Loading

0 comments on commit e506293

Please sign in to comment.