flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-4270) 'as' in front of join does not work
Date Thu, 11 Aug 2016 08:06:20 GMT

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

ASF GitHub Bot commented on FLINK-4270:
---------------------------------------

Github user wuchong commented on the issue:

    https://github.com/apache/flink/pull/2306
  
    Hi @twalthr would be great if you could have a quick look at it. This issue has been pending
for two weeks.


> 'as' in front of join does not work
> -----------------------------------
>
>                 Key: FLINK-4270
>                 URL: https://issues.apache.org/jira/browse/FLINK-4270
>             Project: Flink
>          Issue Type: Bug
>          Components: Table API & SQL
>            Reporter: Timo Walther
>            Assignee: Jark Wu
>
> The following example passes the validation but fails during toRexNode phase:
> {code}
>     val customers = getCustomerDataSet(env).toTable(tEnv)
>       .as('id, 'mktSegment)
>     val orders = getOrdersDataSet(env).toTable(tEnv)
>       .as('orderId, 'custId, 'orderDate, 'shipPrio)
>     val items =
>       orders.join(customers)
>         .where('custId === 'id)
>     items.printOnTaskManager("ok")
> {code}
> Leads to
> {code}
> Exception in thread "main" java.lang.IllegalArgumentException: field [custId] not found;
input fields are: [id, mktSegment, id0, mktSegment0]
> 	at org.apache.calcite.tools.RelBuilder.field(RelBuilder.java:299)
> 	at org.apache.calcite.tools.RelBuilder.field(RelBuilder.java:284)
> 	at org.apache.flink.api.table.expressions.ResolvedFieldReference.toRexNode(fieldExpression.scala:59)
> 	at org.apache.flink.api.table.expressions.BinaryComparison$$anonfun$toRexNode$1.apply(comparison.scala:34)
> 	at org.apache.flink.api.table.expressions.BinaryComparison$$anonfun$toRexNode$1.apply(comparison.scala:34)
> 	at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
> 	at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
> 	at scala.collection.immutable.List.foreach(List.scala:318)
> 	at scala.collection.TraversableLike$class.map(TraversableLike.scala:244)
> 	at scala.collection.AbstractTraversable.map(Traversable.scala:105)
> 	at org.apache.flink.api.table.expressions.BinaryComparison.toRexNode(comparison.scala:34)
> 	at org.apache.flink.api.table.plan.logical.Filter.construct(operators.scala:158)
> 	at org.apache.flink.api.table.plan.logical.LogicalNode.toRelNode(LogicalNode.scala:78)
> 	at org.apache.flink.api.table.Table.getRelNode(table.scala:66)
> 	at org.apache.flink.api.table.BatchTableEnvironment.translate(BatchTableEnvironment.scala:243)
> 	at org.apache.flink.api.scala.table.BatchTableEnvironment.toDataSet(BatchTableEnvironment.scala:139)
> 	at org.apache.flink.api.scala.table.package$.table2RowDataSet(package.scala:77)
> 	at org.apache.flink.examples.scala.TPCHQuery3Table$.main(TPCHQuery3Table.scala:119)
> 	at org.apache.flink.examples.scala.TPCHQuery3Table.main(TPCHQuery3Table.scala)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message