[GitHub] [calcite] libenchao commented on a diff in pull request #2977: [CALCITE-5388] No result when using ROW_NUMBER in two common table expressions
libenchao commented on code in PR #2977: URL: https://github.com/apache/calcite/pull/2977#discussion_r1045031294 ## core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableWindow.java: ## @@ -693,7 +696,7 @@ private static Pair getPartitionIterator( } Expression multiMap_ = builder.append( -"multiMap", Expressions.new_(SortedMultiMap.class)); +"multiMap", Expressions.new_(SortedMultiMap.class), false); Review Comment: > Although I started to think, that I should revert changes for "multiMap" and create separate ticket for improving optimizer. I saw that CALCITE-5426 has been created. And reverting changes for "multiMap" would make this PR more clean and self-contained, it would look good to me. -- 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-unsubscr...@calcite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [calcite] libenchao commented on a diff in pull request #2977: [CALCITE-5388] No result when using ROW_NUMBER in two common table expressions
libenchao commented on code in PR #2977: URL: https://github.com/apache/calcite/pull/2977#discussion_r1038754777 ## core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableWindow.java: ## @@ -693,7 +696,7 @@ private static Pair getPartitionIterator( } Expression multiMap_ = builder.append( -"multiMap", Expressions.new_(SortedMultiMap.class)); +"multiMap", Expressions.new_(SortedMultiMap.class), false); Review Comment: With the newly added test, I would approve this PR. (Although we are fixing a non-exist problem). How about we add a comment in the commit message about this, to avoid leaving a false impression that maintainers will assume that there is a problem currently and this change fix that? -- 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-unsubscr...@calcite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [calcite] libenchao commented on a diff in pull request #2977: [CALCITE-5388] No result when using ROW_NUMBER in two common table expressions
libenchao commented on code in PR #2977: URL: https://github.com/apache/calcite/pull/2977#discussion_r1033044521 ## core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableWindow.java: ## @@ -693,7 +696,7 @@ private static Pair getPartitionIterator( } Expression multiMap_ = builder.append( -"multiMap", Expressions.new_(SortedMultiMap.class)); +"multiMap", Expressions.new_(SortedMultiMap.class), false); Review Comment: Thanks for your detailed explanation. I knew it's unsafe, what I propose it to have a test case to reproduce it and cover it if we can. -- 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-unsubscr...@calcite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [calcite] libenchao commented on a diff in pull request #2977: [CALCITE-5388] No result when using ROW_NUMBER in two common table expressions
libenchao commented on code in PR #2977: URL: https://github.com/apache/calcite/pull/2977#discussion_r1032795142 ## core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableWindow.java: ## @@ -693,7 +696,7 @@ private static Pair getPartitionIterator( } Expression multiMap_ = builder.append( -"multiMap", Expressions.new_(SortedMultiMap.class)); +"multiMap", Expressions.new_(SortedMultiMap.class), false); Review Comment: Current test case would success without this change, it would be good to have a test to cover this change. -- 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-unsubscr...@calcite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org