[
https://issues.apache.org/jira/browse/BEAM-7051?focusedWorklogId=226922&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-226922
]
ASF GitHub Bot logged work on BEAM-7051:
----------------------------------------
Author: ASF GitHub Bot
Created on: 12/Apr/19 20:48
Start Date: 12/Apr/19 20:48
Worklog Time Spent: 10m
Work Description: amaliujia commented on pull request #8290: [BEAM-7051]
Support LIMIT OFFSET
URL: https://github.com/apache/beam/pull/8290#discussion_r275059366
##########
File path:
sdks/java/extensions/sql/src/test/java/org/apache/beam/sdk/extensions/sql/impl/rel/BeamSortRelTest.java
##########
@@ -212,6 +217,20 @@ public void testOrderBy_nullsLast() throws Exception {
pipeline.run().waitUntilFinish();
}
+ @Test
+ public void testOrderBy_with_offset2() throws Exception {
+ Schema schema = Schema.builder().addField("count_star",
Schema.FieldType.INT64).build();
+
+ String sql =
+ "INSERT INTO COUNT_TABLE(count_star) "
+ + "SELECT COUNT(*) FROM (SELECT * FROM "
+ + "(SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3) LIMIT 3 OFFSET
1)";
+
+ PCollection<Row> rows = compilePipeline(sql, pipeline);
+
PAssert.that(rows).containsInAnyOrder(TestUtils.RowsBuilder.of(schema).addRows(2L).getRows());
Review comment:
Yes. 2L here is COUNT(*)'s result, which is two rows.
I should have made the test case more clear by using STRING in SELECT.
----------------------------------------------------------------
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: 226922)
Time Spent: 2.5h (was: 2h 20m)
> Support LIMIT OFFSET
> --------------------
>
> Key: BEAM-7051
> URL: https://issues.apache.org/jira/browse/BEAM-7051
> Project: Beam
> Issue Type: Bug
> Components: dsl-sql
> Reporter: Rui Wang
> Assignee: Rui Wang
> Priority: Major
> Time Spent: 2.5h
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)