Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.1.0
-
None
Description
The following Table API query does not fail but produces an empty result:
val env = ExecutionEnvironment.getExecutionEnvironment val ds = CollectionDataSets.get3TupleDataSet(env).as('a, 'b, 'c) // must fail. Field 'a is not a string. ds.filter( 'a === "nope" ).collect()
The generated flatMap code looks like this:
@Override public void flatMap(Object _in1, org.apache.flink.util.Collector c) throws Exception { org.apache.flink.api.table.Row in1 = (org.apache.flink.api.table.Row) _in1; java.lang.String result$17 = (java.lang.String) in1.productElement(2); int result$11 = (java.lang.Integer) in1.productElement(0); long result$14 = (java.lang.Long) in1.productElement(1); java.lang.String result$19 = "nope"; boolean result$21 = result$19.equals(result$11); if (result$21) { out.setField(0, result$11); out.setField(1, result$14); out.setField(2, result$17); c.collect(out); } }
I would expect the query to fail due to a Integer/String type conflict.