[
https://issues.apache.org/jira/browse/FLINK-7923?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16349454#comment-16349454
]
ASF GitHub Bot commented on FLINK-7923:
---------------------------------------
Github user suez1224 commented on a diff in the pull request:
https://github.com/apache/flink/pull/5367#discussion_r165515039
--- Diff:
flink-libraries/flink-table/src/test/scala/org/apache/flink/table/runtime/stream/sql/SqlITCase.scala
---
@@ -469,6 +473,148 @@ class SqlITCase extends StreamingWithStateTestBase {
assertEquals(expected.sorted, StreamITCase.testResults.sorted)
}
+ @Test
+ def testArrayElementAtFromTableForTuple(): Unit = {
+
+ val env = StreamExecutionEnvironment.getExecutionEnvironment
+ val tEnv = TableEnvironment.getTableEnvironment(env)
+ StreamITCase.clear
+
+ val data = List(
+ (1, Array((12, 45), (2, 5))),
--- End diff --
Added null check.
for nested tuple input, it wont work for now due to
https://issues.apache.org/jira/browse/CALCITE-2162. I've submitted a fix to it,
should be available in Calcite 1.16.
> SQL parser exception when accessing subfields of a Composite element in an
> Object Array type column
> ---------------------------------------------------------------------------------------------------
>
> Key: FLINK-7923
> URL: https://issues.apache.org/jira/browse/FLINK-7923
> Project: Flink
> Issue Type: Bug
> Components: Table API & SQL
> Affects Versions: 1.4.0
> Reporter: Rong Rong
> Assignee: Shuyi Chen
> Priority: Major
>
> Access type such as:
> {code:SQL}
> SELECT
> a[1].f0
> FROM
> MyTable
> {code}
> will cause problem.
> See following test sample for more details:
> https://github.com/walterddr/flink/commit/03c93bcb0fb30bd2d327e35b5e244322d449b06a
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)