浏览代码

[editor] SELECT 1 will fail with the auto LIMIT with Impala

sreenaths 4 年之前
父节点
当前提交
2197384ca3
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      desktop/core/src/desktop/js/apps/notebook2/execution/sqlExecutable.ts

+ 1 - 0
desktop/core/src/desktop/js/apps/notebook2/execution/sqlExecutable.ts

@@ -56,6 +56,7 @@ export default class SqlExecutable extends Executable {
       this.executor.defaultLimit &&
       !isNaN(this.executor.defaultLimit()) &&
       this.executor.defaultLimit() > 0 &&
+      /\sfrom\s/i.test(statement) &&
       !/\slimit\s[0-9]/i.test(statement)
     ) {
       const endMatch = statement.match(SELECT_END_REGEX);