[ 
https://issues.apache.org/jira/browse/FLINK-4542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16525031#comment-16525031
 ] 

Sergey Nuyanzin commented on FLINK-4542:
----------------------------------------

Hello [~twalthr]. Thank you for your comment
yes Calcite support parsing and validation but not more if we are talking about 
1.16.0. At the same time in Calcite 1.17.0 there will be added some more 
multiset operations which also could be supported in Flink (I will create a sub 
task for it)

thank you for pointing to {{SqlStdOperatorTable}}. However I faced with other 
issues after implementation of MultisetConstructor
# In case of running for {{StreamExecutionEnvironment}} the same test fails 
with {noformat}org.apache.flink.table.api.TableException: Unsupported logical 
operator: Collect{noformat}. I was able to cope with it by adding case collect 
inside {{org.apache.flink.table.calcite.RelTimeIndicatorConverter#visit}}
#  After resolution of previous bullet in both cases: running for 
{{StreamExecutionEnvironment}} and {{TableEnvironment}} it fails like 
{noformat}org.apache.flink.table.api.TableException: Cannot generate a valid 
execution plan for the given query: 

LogicalProject(EXPR$0=[$SLICE($1)])
  LogicalJoin(condition=[true], joinType=[inner])
    LogicalValues(tuples=[[{ 0 }]])
    Collect(field=[EXPR$0])
      LogicalValues(tuples=[[{ 1 }, { 2 }]])

This exception indicates that the query uses an unsupported SQL feature.
Please check the documentation for the set of currently supported SQL features.

        at 
org.apache.flink.table.api.TableEnvironment.runVolcanoPlanner(TableEnvironment.scala:274)
        at 
org.apache.flink.table.api.StreamTableEnvironment.optimize(StreamTableEnvironment.scala:722)
        at 
org.apache.flink.table.api.StreamTableEnvironment.translate(StreamTableEnvironment.scala:778)
        at 
org.apache.flink.table.api.scala.StreamTableEnvironment.toRetractStream(StreamTableEnvironment.scala:254)
        at 
org.apache.flink.table.api.scala.StreamTableEnvironment.toRetractStream(StreamTableEnvironment.scala:234)
        at 
org.apache.flink.table.api.scala.TableConversions.toRetractStream(TableConversions.scala:189)
        at 
org.apache.flink.table.runtime.stream.table.AggregateITCase.testUnboundedElement1(AggregateITCase.scala:62)
{noformat}

please share your knowledge if you aware of such issue otherwise I will try to 
debug (I guess the problem is somewhere between Flink and Calcite's Volcano)
P.S. full scope of changes related to this ticket could be found here 
https://github.com/apache/flink/compare/master...snuyanzin:FLINK_4542


> Add MULTISET operations
> -----------------------
>
>                 Key: FLINK-4542
>                 URL: https://issues.apache.org/jira/browse/FLINK-4542
>             Project: Flink
>          Issue Type: Improvement
>          Components: Table API & SQL
>            Reporter: Timo Walther
>            Assignee: Sergey Nuyanzin
>            Priority: Minor
>
> Umbrella issue for MULTISET operations like:
> MULTISET UNION, MULTISET UNION ALL, MULTISET EXCEPT, MULTISET EXCEPT ALL, 
> MULTISET INTERSECT, MULTISET INTERSECT ALL, CARDINALITY, ELEMENT, MEMBER OF, 
> SUBMULTISET OF, IS A SET, FUSION
> At the moment we only support COLLECT.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to