[
https://issues.apache.org/jira/browse/BEAM-7051?focusedWorklogId=226759&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-226759
]
ASF GitHub Bot logged work on BEAM-7051:
----------------------------------------
Author: ASF GitHub Bot
Created on: 12/Apr/19 16:30
Start Date: 12/Apr/19 16:30
Worklog Time Spent: 10m
Work Description: Ardagan commented on pull request #8290: [BEAM-7051]
Support LIMIT OFFSET
URL: https://github.com/apache/beam/pull/8290#discussion_r274978471
##########
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:
With offset of 1 there should be 2 rows in query result.
----------------------------------------------------------------
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: 226759)
Time Spent: 1h 40m (was: 1.5h)
> 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: 1h 40m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)