fafacao86 commented on code in PR #4210:
URL: https://github.com/apache/calcite/pull/4210#discussion_r1969542280
##########
core/src/test/java/org/apache/calcite/test/SqlToRelConverterTest.java:
##########
@@ -5388,6 +5390,23 @@ void checkUserDefinedOrderByOver(NullCollation
nullCollation) {
.ok();
}
+ @Test void testNestedWindowAggWithIdentifierExpansionDisabled() {
+ String sql = "select sum(sum(sal)) over() from emp";
+ sql(sql)
+ .withFactory(f ->
+ f.withValidator((opTab, catalogReader, typeFactory, config) -> {
+ if (config.conformance().allowGeometry()) {
Review Comment:
Well, I copy this _withFactory_ from
org.apache.calcite.test.SqlToRelFixture#DEFAULT, line 49, to make sure that
only the identifierExpansion default option gets over-written to **false**, and
the _geometry_ remains the same with the default.
When I was trying to write a test for this bug, I couldn't find a relatively
elegant way to only overwrite the identifierExpansion option. I was trying to
use the way in org.apache.calcite.test#testFunctionExprInOver() function to
overwrite the identifierExpansion option to false, but you can check out the
code, it's actually **incorrect to do it that way**, the identifierExpansion
will get set to true again by the _withFactory
atorg.apache.calcite.test.SqlToRelFixture#DEFAULT line 49_. So I have to
overwrite the _withFactory_ transformation function.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]