[
https://issues.apache.org/jira/browse/FLINK-8104?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16262871#comment-16262871
]
ASF GitHub Bot commented on FLINK-8104:
---------------------------------------
Github user twalthr commented on a diff in the pull request:
https://github.com/apache/flink/pull/5040#discussion_r152614003
--- Diff:
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/calcite/FlinkTypeFactory.scala
---
@@ -417,6 +417,10 @@ object FlinkTypeFactory {
val compositeRelDataType =
relDataType.asInstanceOf[CompositeRelDataType]
compositeRelDataType.compositeType
+ case ROW if relDataType.isInstanceOf[RelRecordType] =>
+ val relRecordType = relDataType.asInstanceOf[RelRecordType]
+ new RowSchema(relRecordType).typeInfo
+
// ROW and CURSOR for UDTF case, whose type info will never be used,
just a placeholder
case ROW | CURSOR => new NothingTypeInfo
--- End diff --
Maybe we can remove the `ROW` here if it has no impact on the existing
tests.
> Fix Row value constructor
> -------------------------
>
> Key: FLINK-8104
> URL: https://issues.apache.org/jira/browse/FLINK-8104
> Project: Flink
> Issue Type: Sub-task
> Components: Table API & SQL
> Reporter: Rong Rong
> Assignee: Rong Rong
>
> Support Row value constructor which is currently broken.
> See
> {code:java}
> //
> flink-libraries/flink-table/src/test/scala/org/apache/flink/table/expressions/SqlExpressionTest.scala
> @Test
> def testValueConstructorFunctions(): Unit = {
> // TODO we need a special code path that flattens ROW types
> // testSqlApi("ROW('hello world', 12)", "hello world") // test base only
> returns field 0
> // testSqlApi("('hello world', 12)", "hello world") // test base only
> returns field 0
> // ...
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)