flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Koltsov (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-5750) Incorrect parse of brackets inside VALUES subquery
Date Mon, 28 May 2018 10:00:00 GMT

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

Alexander Koltsov commented on FLINK-5750:
------------------------------------------

Hello! I would like to help with task FLINK-5750. Please assign it to me, my jira account
is Alexander_Koltsov.

Thank you!

> Incorrect parse of brackets inside VALUES subquery
> --------------------------------------------------
>
>                 Key: FLINK-5750
>                 URL: https://issues.apache.org/jira/browse/FLINK-5750
>             Project: Flink
>          Issue Type: Bug
>          Components: Table API &amp; SQL
>    Affects Versions: 1.2.0
>            Reporter: Anton Mushin
>            Priority: Minor
>
> {code:java}
> @Test
> 	public void testValuesWithCast() throws Exception {
> 		ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
> 		BatchTableEnvironment tableEnv = TableEnvironment.getTableEnvironment(env, config());
> 		String sqlQuery = "VALUES (1, cast(1 as BIGINT) )," +
> 			"(2, cast(2 as BIGINT))," +
> 			"(3, cast(3 as BIGINT))";
> 		String sqlQuery2 = "VALUES (1,1)," +
> 			"(2, 2)," +
> 			"(3, 3)";
> 		Table result = tableEnv.sql(sqlQuery);
> 		DataSet<Row> resultSet = tableEnv.toDataSet(result, Row.class);
> 		List<Row> results = resultSet.collect();
> 		Table result2 = tableEnv.sql(sqlQuery2);
> 		DataSet<Row> resultSet2 = tableEnv.toDataSet(result2, Row.class);
> 		List<Row> results2 = resultSet2.collect();
> 		String expected = "1,1\n2,2\n3,3";
> 		compareResultAsText(results2, expected);
> 		compareResultAsText(results, expected);
> 	}
> {code}
> AR for {{results}} variable
> {noformat}
> java.lang.AssertionError: Different elements in arrays: expected 3 elements and received
2
>  expected: [1,1, 2,2, 3,3]
>  received: [1,1, 2,2] 
> Expected :3
> Actual   :2
> {noformat}



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

Mime
View raw message