You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by "suibianwanwank (via GitHub)" <gi...@apache.org> on 2024/12/28 18:20:47 UTC
[PR] [CALCITE-6748] RelToSqlConverter returns the wrong result when Aggregate is on Sort [calcite]
suibianwanwank opened a new pull request, #4117:
URL: https://github.com/apache/calcite/pull/4117
(no comment)
--
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.
To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CALCITE-6748] RelToSqlConverter returns the wrong result when Aggregate is on Sort [calcite]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #4117:
URL: https://github.com/apache/calcite/pull/4117#issuecomment-2566930901
## [](https://sonarcloud.io/dashboard?id=apache_calcite&pullRequest=4117) **Quality Gate passed**
Issues
 [1 New issue](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=4117&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=4117&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_calcite&pullRequest=4117&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [84.6% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_calcite&pullRequest=4117&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_calcite&pullRequest=4117&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_calcite&pullRequest=4117)
--
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.
To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CALCITE-6748] RelToSqlConverter returns the wrong result when Aggregate is on Sort [calcite]
Posted by "suibianwanwank (via GitHub)" <gi...@apache.org>.
suibianwanwank commented on code in PR #4117:
URL: https://github.com/apache/calcite/pull/4117#discussion_r1900819521
##########
core/src/test/java/org/apache/calcite/rel/rel2sql/RelToSqlConverterTest.java:
##########
@@ -8620,14 +8620,22 @@ private void checkLiteral2(String expression, String expected) {
* <a href="https://issues.apache.org/jira/browse/CALCITE-6748">[CALCITE-6748]
* RelToSqlConverter returns the wrong result when Aggregate is on Sort</a>. */
@Test void testAggregateOnSort() {
- final String query = "select max(\"product_class_id\") "
+ final String query0 = "select max(\"product_class_id\") "
+ "from (select * from \"product\" order by \"brand_name\" asc limit 10) t";
- final String expected = "SELECT MAX(\"product_class_id\")\n"
+ final String expected0 = "SELECT MAX(\"product_class_id\")\n"
+ "FROM (SELECT \"product_class_id\"\n"
+ "FROM \"foodmart\".\"product\"\n"
+ "ORDER BY \"brand_name\"\n"
+ "FETCH NEXT 10 ROWS ONLY) AS \"t1\"";
- sql(query).ok(expected);
+ sql(query0).ok(expected0);
+
+ final String query1 = "select max(\"product_class_id\") "
+ + "from (select * from \"product\" offset 10 ) t";
+ final String expected1 = "SELECT MAX(\"product_class_id\")\n"
+ + "FROM (SELECT \"product_class_id\"\n"
+ + "FROM \"foodmart\".\"product\"\n"
+ + "OFFSET 10 ROWS) AS \"t1\"";
Review Comment:
Adding an order by here would cause the problem described in [CALCITE-6579]. So I didn't add it and it doesn't conflict with this PR.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CALCITE-6748] RelToSqlConverter returns the wrong result when Aggregate is on Sort [calcite]
Posted by "mihaibudiu (via GitHub)" <gi...@apache.org>.
mihaibudiu merged PR #4117:
URL: https://github.com/apache/calcite/pull/4117
--
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.
To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CALCITE-6748] RelToSqlConverter returns the wrong result when Aggregate is on Sort [calcite]
Posted by "NobiGo (via GitHub)" <gi...@apache.org>.
NobiGo commented on code in PR #4117:
URL: https://github.com/apache/calcite/pull/4117#discussion_r1900052583
##########
core/src/test/java/org/apache/calcite/rel/rel2sql/RelToSqlConverterTest.java:
##########
@@ -8616,6 +8616,20 @@ private void checkLiteral2(String expression, String expected) {
.withSpark().ok(sparkExpected);
}
+ /** Test case for
+ * <a href="https://issues.apache.org/jira/browse/CALCITE-6748">[CALCITE-6748]
+ * RelToSqlConverter returns the wrong result when Aggregate is on Sort</a>. */
+ @Test void testAggregateOnSort() {
+ final String query = "select max(\"product_class_id\") "
+ + "from (select * from \"product\" order by \"brand_name\" asc limit 10) t";
Review Comment:
The unit test didn't cover `offset`.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CALCITE-6748] RelToSqlConverter returns the wrong result when Aggregate is on Sort [calcite]
Posted by "suibianwanwank (via GitHub)" <gi...@apache.org>.
suibianwanwank commented on code in PR #4117:
URL: https://github.com/apache/calcite/pull/4117#discussion_r1900362427
##########
core/src/test/java/org/apache/calcite/rel/rel2sql/RelToSqlConverterTest.java:
##########
@@ -8616,6 +8616,20 @@ private void checkLiteral2(String expression, String expected) {
.withSpark().ok(sparkExpected);
}
+ /** Test case for
+ * <a href="https://issues.apache.org/jira/browse/CALCITE-6748">[CALCITE-6748]
+ * RelToSqlConverter returns the wrong result when Aggregate is on Sort</a>. */
+ @Test void testAggregateOnSort() {
+ final String query = "select max(\"product_class_id\") "
+ + "from (select * from \"product\" order by \"brand_name\" asc limit 10) t";
Review Comment:
Done, I add a test.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CALCITE-6748] RelToSqlConverter returns the wrong result when Aggregate is on Sort [calcite]
Posted by "suibianwanwank (via GitHub)" <gi...@apache.org>.
suibianwanwank commented on code in PR #4117:
URL: https://github.com/apache/calcite/pull/4117#discussion_r1900843327
##########
core/src/test/java/org/apache/calcite/rel/rel2sql/RelToSqlConverterTest.java:
##########
@@ -8620,14 +8620,22 @@ private void checkLiteral2(String expression, String expected) {
* <a href="https://issues.apache.org/jira/browse/CALCITE-6748">[CALCITE-6748]
* RelToSqlConverter returns the wrong result when Aggregate is on Sort</a>. */
@Test void testAggregateOnSort() {
- final String query = "select max(\"product_class_id\") "
+ final String query0 = "select max(\"product_class_id\") "
+ "from (select * from \"product\" order by \"brand_name\" asc limit 10) t";
- final String expected = "SELECT MAX(\"product_class_id\")\n"
+ final String expected0 = "SELECT MAX(\"product_class_id\")\n"
+ "FROM (SELECT \"product_class_id\"\n"
+ "FROM \"foodmart\".\"product\"\n"
+ "ORDER BY \"brand_name\"\n"
+ "FETCH NEXT 10 ROWS ONLY) AS \"t1\"";
- sql(query).ok(expected);
+ sql(query0).ok(expected0);
+
+ final String query1 = "select max(\"product_class_id\") "
+ + "from (select * from \"product\" offset 10 ) t";
+ final String expected1 = "SELECT MAX(\"product_class_id\")\n"
+ + "FROM (SELECT \"product_class_id\"\n"
+ + "FROM \"foodmart\".\"product\"\n"
+ + "OFFSET 10 ROWS) AS \"t1\"";
Review Comment:
There is a problem with both `COUNT` and `MAX`. When there is an emp table in PG with 200 rows. The query `select * from emp offset 10` will returns 190 rows.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CALCITE-6748] RelToSqlConverter returns the wrong result when Aggregate is on Sort [calcite]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #4117:
URL: https://github.com/apache/calcite/pull/4117#issuecomment-2564398236
## [](https://sonarcloud.io/dashboard?id=apache_calcite&pullRequest=4117) **Quality Gate passed**
Issues
 [3 New issues](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=4117&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=4117&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_calcite&pullRequest=4117&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [84.6% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_calcite&pullRequest=4117&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_calcite&pullRequest=4117&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_calcite&pullRequest=4117)
--
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.
To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CALCITE-6748] RelToSqlConverter returns the wrong result when Aggregate is on Sort [calcite]
Posted by "suibianwanwank (via GitHub)" <gi...@apache.org>.
suibianwanwank commented on code in PR #4117:
URL: https://github.com/apache/calcite/pull/4117#discussion_r1899103382
##########
core/src/main/java/org/apache/calcite/rel/rel2sql/SqlImplementor.java:
##########
@@ -1965,6 +1965,13 @@ private boolean needNewSubQuery(
return true;
}
+ if (rel instanceof Aggregate
Review Comment:
Done, the wrong reference object was used here.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CALCITE-6748] RelToSqlConverter returns the wrong result when Aggregate is on Sort [calcite]
Posted by "ILuffZhe (via GitHub)" <gi...@apache.org>.
ILuffZhe commented on code in PR #4117:
URL: https://github.com/apache/calcite/pull/4117#discussion_r1900487778
##########
core/src/test/java/org/apache/calcite/rel/rel2sql/RelToSqlConverterTest.java:
##########
@@ -8620,14 +8620,22 @@ private void checkLiteral2(String expression, String expected) {
* <a href="https://issues.apache.org/jira/browse/CALCITE-6748">[CALCITE-6748]
* RelToSqlConverter returns the wrong result when Aggregate is on Sort</a>. */
@Test void testAggregateOnSort() {
- final String query = "select max(\"product_class_id\") "
+ final String query0 = "select max(\"product_class_id\") "
+ "from (select * from \"product\" order by \"brand_name\" asc limit 10) t";
- final String expected = "SELECT MAX(\"product_class_id\")\n"
+ final String expected0 = "SELECT MAX(\"product_class_id\")\n"
+ "FROM (SELECT \"product_class_id\"\n"
+ "FROM \"foodmart\".\"product\"\n"
+ "ORDER BY \"brand_name\"\n"
+ "FETCH NEXT 10 ROWS ONLY) AS \"t1\"";
- sql(query).ok(expected);
+ sql(query0).ok(expected0);
+
+ final String query1 = "select max(\"product_class_id\") "
+ + "from (select * from \"product\" offset 10 ) t";
+ final String expected1 = "SELECT MAX(\"product_class_id\")\n"
+ + "FROM (SELECT \"product_class_id\"\n"
+ + "FROM \"foodmart\".\"product\"\n"
+ + "OFFSET 10 ROWS) AS \"t1\"";
Review Comment:
order by expression `ORDER BY \"brand_name\"` is missing.Shall we add it?
--
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.
To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CALCITE-6748] RelToSqlConverter returns the wrong result when Aggregate is on Sort [calcite]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #4117:
URL: https://github.com/apache/calcite/pull/4117#issuecomment-2574322491
## [](https://sonarcloud.io/dashboard?id=apache_calcite&pullRequest=4117) **Quality Gate passed**
Issues
 [0 New issues](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=4117&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=4117&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_calcite&pullRequest=4117&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [84.6% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_calcite&pullRequest=4117&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_calcite&pullRequest=4117&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_calcite&pullRequest=4117)
--
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.
To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CALCITE-6748] RelToSqlConverter returns the wrong result when Aggregate is on Sort [calcite]
Posted by "ILuffZhe (via GitHub)" <gi...@apache.org>.
ILuffZhe commented on code in PR #4117:
URL: https://github.com/apache/calcite/pull/4117#discussion_r1900836575
##########
core/src/test/java/org/apache/calcite/rel/rel2sql/RelToSqlConverterTest.java:
##########
@@ -8620,14 +8620,22 @@ private void checkLiteral2(String expression, String expected) {
* <a href="https://issues.apache.org/jira/browse/CALCITE-6748">[CALCITE-6748]
* RelToSqlConverter returns the wrong result when Aggregate is on Sort</a>. */
@Test void testAggregateOnSort() {
- final String query = "select max(\"product_class_id\") "
+ final String query0 = "select max(\"product_class_id\") "
+ "from (select * from \"product\" order by \"brand_name\" asc limit 10) t";
- final String expected = "SELECT MAX(\"product_class_id\")\n"
+ final String expected0 = "SELECT MAX(\"product_class_id\")\n"
+ "FROM (SELECT \"product_class_id\"\n"
+ "FROM \"foodmart\".\"product\"\n"
+ "ORDER BY \"brand_name\"\n"
+ "FETCH NEXT 10 ROWS ONLY) AS \"t1\"";
- sql(query).ok(expected);
+ sql(query0).ok(expected0);
+
+ final String query1 = "select max(\"product_class_id\") "
+ + "from (select * from \"product\" offset 10 ) t";
+ final String expected1 = "SELECT MAX(\"product_class_id\")\n"
+ + "FROM (SELECT \"product_class_id\"\n"
+ + "FROM \"foodmart\".\"product\"\n"
+ + "OFFSET 10 ROWS) AS \"t1\"";
Review Comment:
I'm not sure if it's the expected plan as you described in CALCITE-6759. The result of `COUNT` seems ok if there is no `order by`, do you try `MAX(\"product_class_id\")` when `order by product_class_id asc`? If the later loses `order by`, I think there might be some problem.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CALCITE-6748] RelToSqlConverter returns the wrong result when Aggregate is on Sort [calcite]
Posted by "ILuffZhe (via GitHub)" <gi...@apache.org>.
ILuffZhe commented on code in PR #4117:
URL: https://github.com/apache/calcite/pull/4117#discussion_r1900856685
##########
core/src/test/java/org/apache/calcite/rel/rel2sql/RelToSqlConverterTest.java:
##########
@@ -8620,14 +8620,22 @@ private void checkLiteral2(String expression, String expected) {
* <a href="https://issues.apache.org/jira/browse/CALCITE-6748">[CALCITE-6748]
* RelToSqlConverter returns the wrong result when Aggregate is on Sort</a>. */
@Test void testAggregateOnSort() {
- final String query = "select max(\"product_class_id\") "
+ final String query0 = "select max(\"product_class_id\") "
+ "from (select * from \"product\" order by \"brand_name\" asc limit 10) t";
- final String expected = "SELECT MAX(\"product_class_id\")\n"
+ final String expected0 = "SELECT MAX(\"product_class_id\")\n"
+ "FROM (SELECT \"product_class_id\"\n"
+ "FROM \"foodmart\".\"product\"\n"
+ "ORDER BY \"brand_name\"\n"
+ "FETCH NEXT 10 ROWS ONLY) AS \"t1\"";
- sql(query).ok(expected);
+ sql(query0).ok(expected0);
+
+ final String query1 = "select max(\"product_class_id\") "
+ + "from (select * from \"product\" offset 10 ) t";
+ final String expected1 = "SELECT MAX(\"product_class_id\")\n"
+ + "FROM (SELECT \"product_class_id\"\n"
+ + "FROM \"foodmart\".\"product\"\n"
+ + "OFFSET 10 ROWS) AS \"t1\"";
Review Comment:
OK, I get it. I thought only `order by` is missing at first.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CALCITE-6748] RelToSqlConverter returns the wrong result when Aggregate is on Sort [calcite]
Posted by "mihaibudiu (via GitHub)" <gi...@apache.org>.
mihaibudiu commented on code in PR #4117:
URL: https://github.com/apache/calcite/pull/4117#discussion_r1898974255
##########
core/src/main/java/org/apache/calcite/rel/rel2sql/SqlImplementor.java:
##########
@@ -1965,6 +1965,13 @@ private boolean needNewSubQuery(
return true;
}
+ if (rel instanceof Aggregate
Review Comment:
seems you need an extra check for null here
--
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.
To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CALCITE-6748] RelToSqlConverter returns the wrong result when Aggregate is on Sort [calcite]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #4117:
URL: https://github.com/apache/calcite/pull/4117#issuecomment-2564497232
## [](https://sonarcloud.io/dashboard?id=apache_calcite&pullRequest=4117) **Quality Gate passed**
Issues
 [3 New issues](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=4117&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_calcite&pullRequest=4117&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_calcite&pullRequest=4117&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [84.6% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_calcite&pullRequest=4117&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_calcite&pullRequest=4117&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_calcite&pullRequest=4117)
--
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.
To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CALCITE-6748] RelToSqlConverter returns the wrong result when Aggregate is on Sort [calcite]
Posted by "suibianwanwank (via GitHub)" <gi...@apache.org>.
suibianwanwank commented on code in PR #4117:
URL: https://github.com/apache/calcite/pull/4117#discussion_r1900819521
##########
core/src/test/java/org/apache/calcite/rel/rel2sql/RelToSqlConverterTest.java:
##########
@@ -8620,14 +8620,22 @@ private void checkLiteral2(String expression, String expected) {
* <a href="https://issues.apache.org/jira/browse/CALCITE-6748">[CALCITE-6748]
* RelToSqlConverter returns the wrong result when Aggregate is on Sort</a>. */
@Test void testAggregateOnSort() {
- final String query = "select max(\"product_class_id\") "
+ final String query0 = "select max(\"product_class_id\") "
+ "from (select * from \"product\" order by \"brand_name\" asc limit 10) t";
- final String expected = "SELECT MAX(\"product_class_id\")\n"
+ final String expected0 = "SELECT MAX(\"product_class_id\")\n"
+ "FROM (SELECT \"product_class_id\"\n"
+ "FROM \"foodmart\".\"product\"\n"
+ "ORDER BY \"brand_name\"\n"
+ "FETCH NEXT 10 ROWS ONLY) AS \"t1\"";
- sql(query).ok(expected);
+ sql(query0).ok(expected0);
+
+ final String query1 = "select max(\"product_class_id\") "
+ + "from (select * from \"product\" offset 10 ) t";
+ final String expected1 = "SELECT MAX(\"product_class_id\")\n"
+ + "FROM (SELECT \"product_class_id\"\n"
+ + "FROM \"foodmart\".\"product\"\n"
+ + "OFFSET 10 ROWS) AS \"t1\"";
Review Comment:
Adding an order by here would cause the problem described in [CALCITE-6759]. So I didn't add it and it doesn't conflict with this PR.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org