[ 
https://issues.apache.org/jira/browse/FLINK-11924?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Flink Jira Bot updated FLINK-11924:
-----------------------------------
      Labels: auto-deprioritized-major auto-deprioritized-minor  (was: 
auto-deprioritized-major stale-minor)
    Priority: Not a Priority  (was: Minor)

This issue was labeled "stale-minor" 7 days ago and has not received any 
updates so it is being deprioritized. If this ticket is actually Minor, please 
raise the priority and ask a committer to assign you the issue or revive the 
public discussion.


> Exception in thread "main" org.apache.flink.table.api.SqlParserException: SQL 
> parse failed. Encountered "EXISTS" at line 1, column 40.
> --------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-11924
>                 URL: https://issues.apache.org/jira/browse/FLINK-11924
>             Project: Flink
>          Issue Type: Bug
>          Components: Table SQL / API
>    Affects Versions: 1.7.2
>         Environment: ).os mac 10.14.3 
> ).java  1.8.0_191
> ).2.11.12
> ).flink 1.7.2
> -----------------------------------------------------------------------------------------------------
> EXISTS is error,but i replace in is ok
>  
> -----------------------------------------------------------------------------------------------------
>  
>  
>  
> package 
> com.opensourceteams.module.bigdata.flink.example.sql.dataset.operations.setOperations.exists
> import org.apache.flink.api.scala.\{ExecutionEnvironment, _}
> import org.apache.flink.table.api.TableEnvironment
> import org.apache.flink.table.api.scala._
> object Run {
>  def main(args: Array[String]): Unit = {
>  //得到批环境
>  val env = ExecutionEnvironment.getExecutionEnvironment
>  val dataSet = 
> env.fromElements((1,"小明",15,"男",1500),(2,"小王",45,"男",4000),(3,"小李",25,"女",800),(4,"小慧",35,"女",500))
>  val dataSet2 = 
> env.fromElements((1,"小明",15,"男",1500),(2,"小王",45,"男",4000),(30,"小李",25,"女",800),(40,"小慧",35,"女",500))
>  //得到Table环境
>  val tableEnv = TableEnvironment.getTableEnvironment(env)
>  //注册table
>  tableEnv.registerDataSet("user",dataSet,'id,'name,'age,'sex,'salary)
>  tableEnv.registerDataSet("t2",dataSet2,'id,'name,'age,'sex,'salary)
>  /**
>  * in ,子查询
>  */
>  tableEnv.sqlQuery(
>  "select t1.* FROM `user`as t1 where id EXISTS " +
>  " (select id from t2) "
>  )
>  .first(100).print()
>  
>  }
> }
>            Reporter: thinktothings
>            Priority: Not a Priority
>              Labels: auto-deprioritized-major, auto-deprioritized-minor
>
> Exception in thread "main" org.apache.flink.table.api.SqlParserException: SQL 
> parse failed. Encountered "EXISTS" at line 1, column 40.
> Was expecting one of:
>  <EOF> 
>  "ORDER" ...
>  "LIMIT" ...
>  "OFFSET" ...
>  "FETCH" ...
>  "GROUP" ...
>  "HAVING" ...
>  "WINDOW" ...
>  "UNION" ...
>  "INTERSECT" ...
>  "EXCEPT" ...
>  "MINUS" ...
>  "NOT" ...
>  "IN" ...
>  "<" ...
>  "<=" ...
>  ">" ...
>  ">=" ...
>  "=" ...
>  "<>" ...
>  "!=" ...
>  "BETWEEN" ...
>  "LIKE" ...
>  "SIMILAR" ...
>  "+" ...
>  "-" ...
>  "*" ...
>  "/" ...
>  "%" ...
>  "||" ...
>  "AND" ...
>  "OR" ...
>  "IS" ...
>  "MEMBER" ...
>  "SUBMULTISET" ...
>  "CONTAINS" ...
>  "OVERLAPS" ...
>  "EQUALS" ...
>  "PRECEDES" ...
>  "SUCCEEDS" ...
>  "IMMEDIATELY" ...
>  "MULTISET" ...
>  "[" ...
>  "." ...
>  "(" ...
>  
>  at 
> org.apache.flink.table.calcite.FlinkPlannerImpl.parse(FlinkPlannerImpl.scala:94)
>  at 
> org.apache.flink.table.api.TableEnvironment.sqlQuery(TableEnvironment.scala:743)
>  at 
> com.opensourceteams.module.bigdata.flink.example.sql.dataset.operations.setOperations.exists.Run$.main(Run.scala:31)
>  at 
> com.opensourceteams.module.bigdata.flink.example.sql.dataset.operations.setOperations.exists.Run.main(Run.scala)
> Caused by: org.apache.calcite.sql.parser.SqlParseException: Encountered 
> "EXISTS" at line 1, column 40.
> Was expecting one of:
>  <EOF> 
>  "ORDER" ...
>  "LIMIT" ...
>  "OFFSET" ...
>  "FETCH" ...
>  "GROUP" ...
>  "HAVING" ...
>  "WINDOW" ...
>  "UNION" ...
>  "INTERSECT" ...
>  "EXCEPT" ...
>  "MINUS" ...
>  "NOT" ...
>  "IN" ...
>  "<" ...
>  "<=" ...
>  ">" ...
>  ">=" ...
>  "=" ...
>  "<>" ...
>  "!=" ...
>  "BETWEEN" ...
>  "LIKE" ...
>  "SIMILAR" ...
>  "+" ...
>  "-" ...
>  "*" ...
>  "/" ...
>  "%" ...
>  "||" ...
>  "AND" ...
>  "OR" ...
>  "IS" ...
>  "MEMBER" ...
>  "SUBMULTISET" ...
>  "CONTAINS" ...
>  "OVERLAPS" ...
>  "EQUALS" ...
>  "PRECEDES" ...
>  "SUCCEEDS" ...
>  "IMMEDIATELY" ...
>  "MULTISET" ...
>  "[" ...
>  "." ...
>  "(" ...
>  
>  at 
> org.apache.calcite.sql.parser.impl.SqlParserImpl.convertException(SqlParserImpl.java:347)
>  at 
> org.apache.calcite.sql.parser.impl.SqlParserImpl.normalizeException(SqlParserImpl.java:128)
>  at org.apache.calcite.sql.parser.SqlParser.parseQuery(SqlParser.java:137)
>  at org.apache.calcite.sql.parser.SqlParser.parseStmt(SqlParser.java:162)
>  at 
> org.apache.flink.table.calcite.FlinkPlannerImpl.parse(FlinkPlannerImpl.scala:90)



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to