[
https://issues.apache.org/jira/browse/BEAM-7918?focusedWorklogId=290779&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-290779
]
ASF GitHub Bot logged work on BEAM-7918:
----------------------------------------
Author: ASF GitHub Bot
Created on: 07/Aug/19 21:15
Start Date: 07/Aug/19 21:15
Worklog Time Spent: 10m
Work Description: snallapa commented on pull request #9288: [BEAM-7918]
adding nested row implementation for unnest and uncollect
URL: https://github.com/apache/beam/pull/9288#discussion_r311766376
##########
File path:
sdks/java/extensions/sql/src/test/java/org/apache/beam/sdk/extensions/sql/impl/rel/BeamUncollectRelTest.java
##########
@@ -44,4 +57,56 @@ public void testNodeStats() {
Assert.assertEquals(4d, estimate.getWindow(), 0.001);
Assert.assertEquals(0., estimate.getRate(), 0.001);
}
+
+ @Test
+ public void testUncollectPrimitive() {
+ registerTable(
+ "PRIMITIVE",
+ TestBoundedTable.of(
+ Schema.FieldType.STRING,
+ "user_id",
+ Schema.FieldType.array(Schema.FieldType.INT32),
+ "ints")
+ .addRows("1", Arrays.asList(1, 2, 3)));
+
+ String sql = "SELECT * FROM unnest(SELECT ints from PRIMITIVE)";
Review comment:
yup thats better thank you
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 290779)
Time Spent: 40m (was: 0.5h)
> UNNEST does not work with nested records
> ----------------------------------------
>
> Key: BEAM-7918
> URL: https://issues.apache.org/jira/browse/BEAM-7918
> Project: Beam
> Issue Type: Bug
> Components: dsl-sql
> Affects Versions: 2.15.0, 2.16.0
> Reporter: Sahith Nallapareddy
> Assignee: Sahith Nallapareddy
> Priority: Major
> Time Spent: 40m
> Remaining Estimate: 0h
>
> UNNEST seems to have problems with nested rows. It assumes that the values
> will be primitives and adds it to the resulting row, but for a nested row it
> must go one level deeper and add the row values.
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)