[GitHub] [calcite] twdsilva commented on pull request #2876: [CALCITE-5240] Enhance MaterializedViewRule so that it applies to rol…

2022-12-02 Thread GitBox
twdsilva commented on PR #2876: URL: https://github.com/apache/calcite/pull/2876#issuecomment-1336037626 > @twdsilva thanks for the PR, I think it's a very useful feature, I still share the doubts that @julianhyde raised in a [jira

[GitHub] [calcite] twdsilva commented on a diff in pull request #2876: [CALCITE-5240] Enhance MaterializedViewRule so that it applies to rol…

2022-12-02 Thread GitBox
twdsilva commented on code in PR #2876: URL: https://github.com/apache/calcite/pull/2876#discussion_r1038666780 ## core/src/test/java/org/apache/calcite/test/MaterializedViewRelOptRulesTest.java: ## @@ -338,6 +341,104 @@ protected final MaterializedViewFixture sql(String

[GitHub] [calcite] twdsilva commented on a diff in pull request #2876: [CALCITE-5240] Enhance MaterializedViewRule so that it applies to rol…

2022-12-02 Thread GitBox
twdsilva commented on code in PR #2876: URL: https://github.com/apache/calcite/pull/2876#discussion_r103869 ## core/src/test/java/org/apache/calcite/test/TestMetadataHandlers.java: ## @@ -0,0 +1,108 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or

[GitHub] [calcite] twdsilva commented on a diff in pull request #2876: [CALCITE-5240] Enhance MaterializedViewRule so that it applies to rol…

2022-12-02 Thread GitBox
twdsilva commented on code in PR #2876: URL: https://github.com/apache/calcite/pull/2876#discussion_r103851 ## core/src/test/java/org/apache/calcite/test/MaterializedViewRelOptRulesTest.java: ## @@ -338,6 +341,104 @@ protected final MaterializedViewFixture sql(String

[GitHub] [calcite] twdsilva commented on a diff in pull request #2876: [CALCITE-5240] Enhance MaterializedViewRule so that it applies to rol…

2022-12-02 Thread GitBox
twdsilva commented on code in PR #2876: URL: https://github.com/apache/calcite/pull/2876#discussion_r1038666586 ## core/src/test/java/org/apache/calcite/test/MaterializedViewRelOptRulesTest.java: ## @@ -338,6 +341,104 @@ protected final MaterializedViewFixture sql(String

[GitHub] [calcite] twdsilva commented on a diff in pull request #2876: [CALCITE-5240] Enhance MaterializedViewRule so that it applies to rol…

2022-12-02 Thread GitBox
twdsilva commented on code in PR #2876: URL: https://github.com/apache/calcite/pull/2876#discussion_r1038666571 ## core/src/test/java/org/apache/calcite/rex/RexProgramTest.java: ## @@ -3027,6 +3028,43 @@ private void checkSarg(String message, Sarg sarg, is(false));

[GitHub] [calcite] twdsilva commented on a diff in pull request #2876: [CALCITE-5240] Enhance MaterializedViewRule so that it applies to rol…

2022-12-02 Thread GitBox
twdsilva commented on code in PR #2876: URL: https://github.com/apache/calcite/pull/2876#discussion_r1038666387 ## core/src/test/java/org/apache/calcite/rex/RexProgramTest.java: ## @@ -3027,6 +3028,43 @@ private void checkSarg(String message, Sarg sarg, is(false));

[GitHub] [calcite] twdsilva commented on a diff in pull request #2876: [CALCITE-5240] Enhance MaterializedViewRule so that it applies to rol…

2022-12-02 Thread GitBox
twdsilva commented on code in PR #2876: URL: https://github.com/apache/calcite/pull/2876#discussion_r1038666309 ## core/src/test/java/org/apache/calcite/rex/RexProgramTest.java: ## @@ -3027,6 +3028,43 @@ private void checkSarg(String message, Sarg sarg, is(false));

[GitHub] [calcite] twdsilva commented on a diff in pull request #2876: [CALCITE-5240] Enhance MaterializedViewRule so that it applies to rol…

2022-12-02 Thread GitBox
twdsilva commented on code in PR #2876: URL: https://github.com/apache/calcite/pull/2876#discussion_r1038666170 ## core/src/test/java/org/apache/calcite/rex/RexProgramTest.java: ## @@ -3027,6 +3028,43 @@ private void checkSarg(String message, Sarg sarg, is(false));

[GitHub] [calcite] twdsilva commented on a diff in pull request #2876: [CALCITE-5240] Enhance MaterializedViewRule so that it applies to rol…

2022-12-02 Thread GitBox
twdsilva commented on code in PR #2876: URL: https://github.com/apache/calcite/pull/2876#discussion_r1038666155 ## core/src/main/java/org/apache/calcite/rex/RexInterpreter.java: ## @@ -342,22 +346,15 @@ private static Comparable ceil(RexCall call, List values) { default:

[GitHub] [calcite] twdsilva commented on a diff in pull request #2876: [CALCITE-5240] Enhance MaterializedViewRule so that it applies to rol…

2022-12-02 Thread GitBox
twdsilva commented on code in PR #2876: URL: https://github.com/apache/calcite/pull/2876#discussion_r1038666134 ## core/src/main/java/org/apache/calcite/rel/rules/materialize/MaterializedViewRule.java: ## @@ -1252,6 +1285,193 @@ protected RexNode

[GitHub] [calcite] twdsilva commented on a diff in pull request #2876: [CALCITE-5240] Enhance MaterializedViewRule so that it applies to rol…

2022-12-02 Thread GitBox
twdsilva commented on code in PR #2876: URL: https://github.com/apache/calcite/pull/2876#discussion_r1038665983 ## core/src/main/java/org/apache/calcite/rel/rules/materialize/MaterializedViewRule.java: ## @@ -1252,6 +1285,193 @@ protected RexNode

[GitHub] [calcite] twdsilva commented on a diff in pull request #2876: [CALCITE-5240] Enhance MaterializedViewRule so that it applies to rol…

2022-12-02 Thread GitBox
twdsilva commented on code in PR #2876: URL: https://github.com/apache/calcite/pull/2876#discussion_r1038665246 ## core/src/main/java/org/apache/calcite/rel/rules/materialize/MaterializedViewRule.java: ## @@ -1252,6 +1285,193 @@ protected RexNode

[GitHub] [calcite] twdsilva commented on a diff in pull request #2876: [CALCITE-5240] Enhance MaterializedViewRule so that it applies to rol…

2022-12-02 Thread GitBox
twdsilva commented on code in PR #2876: URL: https://github.com/apache/calcite/pull/2876#discussion_r1038665518 ## core/src/main/java/org/apache/calcite/rel/rules/materialize/MaterializedViewRule.java: ## @@ -1252,6 +1285,193 @@ protected RexNode

[GitHub] [calcite] twdsilva commented on a diff in pull request #2876: [CALCITE-5240] Enhance MaterializedViewRule so that it applies to rol…

2022-12-02 Thread GitBox
twdsilva commented on code in PR #2876: URL: https://github.com/apache/calcite/pull/2876#discussion_r1038665617 ## core/src/test/java/org/apache/calcite/test/MaterializedViewRelOptRulesTest.java: ## @@ -338,6 +341,104 @@ protected final MaterializedViewFixture sql(String

[GitHub] [calcite] twdsilva commented on a diff in pull request #2876: [CALCITE-5240] Enhance MaterializedViewRule so that it applies to rol…

2022-12-02 Thread GitBox
twdsilva commented on code in PR #2876: URL: https://github.com/apache/calcite/pull/2876#discussion_r1038665587 ## core/src/main/java/org/apache/calcite/rel/rules/materialize/MaterializedViewRule.java: ## @@ -1252,6 +1285,193 @@ protected RexNode

[GitHub] [calcite] twdsilva commented on a diff in pull request #2876: [CALCITE-5240] Enhance MaterializedViewRule so that it applies to rol…

2022-12-02 Thread GitBox
twdsilva commented on code in PR #2876: URL: https://github.com/apache/calcite/pull/2876#discussion_r1038665549 ## core/src/main/java/org/apache/calcite/rel/rules/materialize/MaterializedViewRule.java: ## @@ -1252,6 +1285,193 @@ protected RexNode

[GitHub] [calcite] twdsilva commented on a diff in pull request #2876: [CALCITE-5240] Enhance MaterializedViewRule so that it applies to rol…

2022-12-02 Thread GitBox
twdsilva commented on code in PR #2876: URL: https://github.com/apache/calcite/pull/2876#discussion_r1038665518 ## core/src/main/java/org/apache/calcite/rel/rules/materialize/MaterializedViewRule.java: ## @@ -1252,6 +1285,193 @@ protected RexNode

[GitHub] [calcite] twdsilva commented on a diff in pull request #2876: [CALCITE-5240] Enhance MaterializedViewRule so that it applies to rol…

2022-12-02 Thread GitBox
twdsilva commented on code in PR #2876: URL: https://github.com/apache/calcite/pull/2876#discussion_r1038665274 ## core/src/main/java/org/apache/calcite/rel/rules/materialize/MaterializedViewRule.java: ## @@ -1252,6 +1285,193 @@ protected RexNode

[GitHub] [calcite] twdsilva commented on a diff in pull request #2876: [CALCITE-5240] Enhance MaterializedViewRule so that it applies to rol…

2022-12-02 Thread GitBox
twdsilva commented on code in PR #2876: URL: https://github.com/apache/calcite/pull/2876#discussion_r1038665246 ## core/src/main/java/org/apache/calcite/rel/rules/materialize/MaterializedViewRule.java: ## @@ -1252,6 +1285,193 @@ protected RexNode

[GitHub] [calcite] twdsilva commented on a diff in pull request #2876: [CALCITE-5240] Enhance MaterializedViewRule so that it applies to rol…

2022-12-02 Thread GitBox
twdsilva commented on code in PR #2876: URL: https://github.com/apache/calcite/pull/2876#discussion_r1038665187 ## core/src/main/java/org/apache/calcite/rel/rules/materialize/MaterializedViewRule.java: ## @@ -1252,6 +1285,193 @@ protected RexNode

[GitHub] [calcite] twdsilva commented on a diff in pull request #2876: [CALCITE-5240] Enhance MaterializedViewRule so that it applies to rol…

2022-12-02 Thread GitBox
twdsilva commented on code in PR #2876: URL: https://github.com/apache/calcite/pull/2876#discussion_r1038665131 ## core/src/main/java/org/apache/calcite/rel/rules/materialize/MaterializedViewRule.java: ## @@ -1252,6 +1285,193 @@ protected RexNode

[GitHub] [calcite] twdsilva commented on a diff in pull request #2876: [CALCITE-5240] Enhance MaterializedViewRule so that it applies to rol…

2022-12-02 Thread GitBox
twdsilva commented on code in PR #2876: URL: https://github.com/apache/calcite/pull/2876#discussion_r1038665019 ## core/src/main/java/org/apache/calcite/rel/rules/materialize/MaterializedViewAggregateRule.java: ## @@ -910,6 +942,53 @@ protected SqlFunction

[GitHub] [calcite] twdsilva commented on a diff in pull request #2876: [CALCITE-5240] Enhance MaterializedViewRule so that it applies to rol…

2022-12-02 Thread GitBox
twdsilva commented on code in PR #2876: URL: https://github.com/apache/calcite/pull/2876#discussion_r1038664898 ## core/src/main/java/org/apache/calcite/rel/rules/materialize/MaterializedViewAggregateRule.java: ## @@ -910,6 +942,53 @@ protected SqlFunction

[GitHub] [calcite] twdsilva commented on a diff in pull request #2876: [CALCITE-5240] Enhance MaterializedViewRule so that it applies to rol…

2022-12-02 Thread GitBox
twdsilva commented on code in PR #2876: URL: https://github.com/apache/calcite/pull/2876#discussion_r1038664727 ## core/src/main/java/org/apache/calcite/rel/rules/materialize/MaterializedViewAggregateRule.java: ## @@ -910,6 +942,53 @@ protected SqlFunction

[GitHub] [calcite] twdsilva commented on a diff in pull request #2876: [CALCITE-5240] Enhance MaterializedViewRule so that it applies to rol…

2022-12-02 Thread GitBox
twdsilva commented on code in PR #2876: URL: https://github.com/apache/calcite/pull/2876#discussion_r1038664620 ## core/src/main/java/org/apache/calcite/rel/rules/materialize/MaterializedViewAggregateRule.java: ## @@ -910,6 +942,53 @@ protected SqlFunction

[GitHub] [calcite] twdsilva commented on a diff in pull request #2876: [CALCITE-5240] Enhance MaterializedViewRule so that it applies to rol…

2022-12-02 Thread GitBox
twdsilva commented on code in PR #2876: URL: https://github.com/apache/calcite/pull/2876#discussion_r1038664589 ## core/src/main/java/org/apache/calcite/rel/rules/materialize/MaterializedViewAggregateRule.java: ## @@ -910,6 +942,53 @@ protected SqlFunction

[GitHub] [calcite] twdsilva commented on a diff in pull request #2876: [CALCITE-5240] Enhance MaterializedViewRule so that it applies to rol…

2022-12-02 Thread GitBox
twdsilva commented on code in PR #2876: URL: https://github.com/apache/calcite/pull/2876#discussion_r1038664537 ## core/src/main/java/org/apache/calcite/rel/rules/materialize/MaterializedViewAggregateRule.java: ## @@ -292,10 +298,36 @@ otherCompensationPred)));

[GitHub] [calcite] twdsilva commented on a diff in pull request #2876: [CALCITE-5240] Enhance MaterializedViewRule so that it applies to rol…

2022-12-02 Thread GitBox
twdsilva commented on code in PR #2876: URL: https://github.com/apache/calcite/pull/2876#discussion_r1038664497 ## core/src/main/java/org/apache/calcite/rel/rules/materialize/MaterializedViewAggregateRule.java: ## @@ -292,10 +298,36 @@ otherCompensationPred)));

[GitHub] [calcite] jamesstarr opened a new pull request, #2996: [CALCITE-5418] Fixing Nested Correlated Subquery Expansion

2022-12-02 Thread GitBox
jamesstarr opened a new pull request, #2996: URL: https://github.com/apache/calcite/pull/2996 Check projects and filters correlate id to make sure the scope of the correlation is correct. Join's correlate id is not populated correctly in SqlToRel, so join's may still be improperly

[GitHub] [calcite] bchapuis commented on a diff in pull request #2962: [CALCITE-5362] Geometry measurement functions

2022-12-02 Thread GitBox
bchapuis commented on code in PR #2962: URL: https://github.com/apache/calcite/pull/2962#discussion_r1038610731 ## core/src/main/java/org/apache/calcite/runtime/SpatialTypeFunctions.java: ## @@ -1318,6 +1322,195 @@ public static Geometry ST_Translate(Geometry geom, BigDecimal

[GitHub] [calcite] bchapuis commented on a diff in pull request #2962: [CALCITE-5362] Geometry measurement functions

2022-12-02 Thread GitBox
bchapuis commented on code in PR #2962: URL: https://github.com/apache/calcite/pull/2962#discussion_r1038614126 ## core/src/main/java/org/apache/calcite/runtime/SpatialTypeFunctions.java: ## @@ -1318,6 +1322,195 @@ public static Geometry ST_Translate(Geometry geom, BigDecimal

[GitHub] [calcite] bchapuis commented on a diff in pull request #2962: [CALCITE-5362] Geometry measurement functions

2022-12-02 Thread GitBox
bchapuis commented on code in PR #2962: URL: https://github.com/apache/calcite/pull/2962#discussion_r1038610731 ## core/src/main/java/org/apache/calcite/runtime/SpatialTypeFunctions.java: ## @@ -1318,6 +1322,195 @@ public static Geometry ST_Translate(Geometry geom, BigDecimal

[GitHub] [calcite] bchapuis commented on a diff in pull request #2962: [CALCITE-5362] Geometry measurement functions

2022-12-02 Thread GitBox
bchapuis commented on code in PR #2962: URL: https://github.com/apache/calcite/pull/2962#discussion_r1038610731 ## core/src/main/java/org/apache/calcite/runtime/SpatialTypeFunctions.java: ## @@ -1318,6 +1322,195 @@ public static Geometry ST_Translate(Geometry geom, BigDecimal

[GitHub] [calcite] bchapuis commented on a diff in pull request #2962: [CALCITE-5362] Geometry measurement functions

2022-12-02 Thread GitBox
bchapuis commented on code in PR #2962: URL: https://github.com/apache/calcite/pull/2962#discussion_r1038610731 ## core/src/main/java/org/apache/calcite/runtime/SpatialTypeFunctions.java: ## @@ -1318,6 +1322,195 @@ public static Geometry ST_Translate(Geometry geom, BigDecimal

[GitHub] [calcite] bchapuis commented on a diff in pull request #2962: [CALCITE-5362] Geometry measurement functions

2022-12-02 Thread GitBox
bchapuis commented on code in PR #2962: URL: https://github.com/apache/calcite/pull/2962#discussion_r1038610731 ## core/src/main/java/org/apache/calcite/runtime/SpatialTypeFunctions.java: ## @@ -1318,6 +1322,195 @@ public static Geometry ST_Translate(Geometry geom, BigDecimal

[GitHub] [calcite] bchapuis commented on a diff in pull request #2962: [CALCITE-5362] Geometry measurement functions

2022-12-02 Thread GitBox
bchapuis commented on code in PR #2962: URL: https://github.com/apache/calcite/pull/2962#discussion_r1038610731 ## core/src/main/java/org/apache/calcite/runtime/SpatialTypeFunctions.java: ## @@ -1318,6 +1322,195 @@ public static Geometry ST_Translate(Geometry geom, BigDecimal

[GitHub] [calcite] asolimando commented on pull request #2995: [CALCITE-5414] Use DateTimeUtils to correctly convert between java.sql types and unix timestamps

2022-12-02 Thread GitBox
asolimando commented on PR #2995: URL: https://github.com/apache/calcite/pull/2995#issuecomment-1335424889 I just noticed that we are relying here on another PR from Avatica which is not yet in (https://github.com/apache/calcite-avatica/pull/197), which incidentally fails when run on a

[GitHub] [calcite-avatica] asolimando commented on pull request #197: [CALCITE-2989] Use ISO calendar system when accessing Date/Time/Timestamp from a number

2022-12-02 Thread GitBox
asolimando commented on PR #197: URL: https://github.com/apache/calcite-avatica/pull/197#issuecomment-1335420683 @freastro, tests should pass in all TZs, you cannot assume a specific one so you can't hardcode your expected values, you need to derive them dynamically, see if

[GitHub] [calcite] dssysolyatin commented on a diff in pull request #2977: [CALCITE-5388] No result when using ROW_NUMBER in two common table expressions

2022-12-02 Thread GitBox
dssysolyatin commented on code in PR #2977: URL: https://github.com/apache/calcite/pull/2977#discussion_r1038245590 ## core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableWindow.java: ## @@ -693,7 +696,7 @@ private static Pair getPartitionIterator( }

[GitHub] [calcite] rubenada commented on a diff in pull request #2977: [CALCITE-5388] No result when using ROW_NUMBER in two common table expressions

2022-12-02 Thread GitBox
rubenada commented on code in PR #2977: URL: https://github.com/apache/calcite/pull/2977#discussion_r1038240351 ## core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableWindow.java: ## @@ -693,7 +696,7 @@ private static Pair getPartitionIterator( }

[GitHub] [calcite] asolimando commented on a diff in pull request #2995: [CALCITE-5414] Use DateTimeUtils to correctly convert between java.sql types and unix timestamps

2022-12-02 Thread GitBox
asolimando commented on code in PR #2995: URL: https://github.com/apache/calcite/pull/2995#discussion_r1038191382 ## core/src/main/java/org/apache/calcite/runtime/SqlFunctions.java: ## @@ -2006,15 +1997,11 @@ public static long toLong(Timestamp v) { return toLong(v,

[GitHub] [calcite] dssysolyatin commented on a diff in pull request #2977: [CALCITE-5388] No result when using ROW_NUMBER in two common table expressions

2022-12-02 Thread GitBox
dssysolyatin commented on code in PR #2977: URL: https://github.com/apache/calcite/pull/2977#discussion_r1038206955 ## core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableWindow.java: ## @@ -693,7 +696,7 @@ private static Pair getPartitionIterator( }

[GitHub] [calcite] dssysolyatin commented on a diff in pull request #2977: [CALCITE-5388] No result when using ROW_NUMBER in two common table expressions

2022-12-02 Thread GitBox
dssysolyatin commented on code in PR #2977: URL: https://github.com/apache/calcite/pull/2977#discussion_r1038206955 ## core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableWindow.java: ## @@ -693,7 +696,7 @@ private static Pair getPartitionIterator( }

[GitHub] [calcite] rubenada commented on a diff in pull request #2977: [CALCITE-5388] No result when using ROW_NUMBER in two common table expressions

2022-12-02 Thread GitBox
rubenada commented on code in PR #2977: URL: https://github.com/apache/calcite/pull/2977#discussion_r1038180423 ## core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableWindow.java: ## @@ -693,7 +696,7 @@ private static Pair getPartitionIterator( }

[GitHub] [calcite] rubenada commented on a diff in pull request #2962: [CALCITE-5362] Geometry measurement functions

2022-12-02 Thread GitBox
rubenada commented on code in PR #2962: URL: https://github.com/apache/calcite/pull/2962#discussion_r1037942435 ## core/src/main/java/org/apache/calcite/runtime/SpatialTypeFunctions.java: ## @@ -1318,6 +1322,195 @@ public static Geometry ST_Translate(Geometry geom, BigDecimal

[GitHub] [calcite] rubenada commented on a diff in pull request #2962: [CALCITE-5362] Geometry measurement functions

2022-12-02 Thread GitBox
rubenada commented on code in PR #2962: URL: https://github.com/apache/calcite/pull/2962#discussion_r1037941963 ## core/src/main/java/org/apache/calcite/runtime/SpatialTypeFunctions.java: ## @@ -1318,6 +1322,195 @@ public static Geometry ST_Translate(Geometry geom, BigDecimal