You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2020/09/24 10:51:42 UTC
[GitHub] [calcite] rubenada opened a new pull request #2168: [CALCITE-4275] EnumerableMergeJoin#create does not set EnumerableConvention in the trait set
rubenada opened a new pull request #2168:
URL: https://github.com/apache/calcite/pull/2168
[CALCITE-4275] EnumerableMergeJoin#create does not set EnumerableConvention in the trait set
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [calcite] rubenada commented on pull request #2168: [CALCITE-4275] EnumerableMergeJoin#create does not set EnumerableConvention in the trait set
Posted by GitBox <gi...@apache.org>.
rubenada commented on pull request #2168:
URL: https://github.com/apache/calcite/pull/2168#issuecomment-698389070
Thanks for your reviews @thomasrebele , @vlsi
I will merge the PR as soon as the checks complete
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [calcite] rubenada commented on a change in pull request #2168: [CALCITE-4275] EnumerableMergeJoin#create does not set EnumerableConvention in the trait set
Posted by GitBox <gi...@apache.org>.
rubenada commented on a change in pull request #2168:
URL: https://github.com/apache/calcite/pull/2168#discussion_r494363849
##########
File path: core/src/test/java/org/apache/calcite/test/RelMetadataTest.java
##########
@@ -1618,20 +1619,23 @@ private void checkCollation(RelOptCluster cluster, RelOptTable empTable,
final EnumerableMergeJoin join;
join = EnumerableMergeJoin.create(project, deptSort,
rexBuilder.makeLiteral(true), leftKeys, rightKeys, JoinRelType.INNER);
+ assertThat(join.getTraitSet().getConvention(), equalTo(EnumerableConvention.INSTANCE));
Review comment:
Ok, I don't mind removing the check from the test. I just want this fix merged before next release.
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [calcite] rubenada commented on a change in pull request #2168: [CALCITE-4275] EnumerableMergeJoin#create does not set EnumerableConvention in the trait set
Posted by GitBox <gi...@apache.org>.
rubenada commented on a change in pull request #2168:
URL: https://github.com/apache/calcite/pull/2168#discussion_r494306848
##########
File path: core/src/test/java/org/apache/calcite/test/RelMetadataTest.java
##########
@@ -1618,20 +1619,23 @@ private void checkCollation(RelOptCluster cluster, RelOptTable empTable,
final EnumerableMergeJoin join;
join = EnumerableMergeJoin.create(project, deptSort,
rexBuilder.makeLiteral(true), leftKeys, rightKeys, JoinRelType.INNER);
+ assertThat(join.getTraitSet().getConvention(), equalTo(EnumerableConvention.INSTANCE));
Review comment:
I'd prefer to keep it in the unit test, so that we can detect any potential regression in the future.
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [calcite] rubenada commented on a change in pull request #2168: [CALCITE-4275] EnumerableMergeJoin#create does not set EnumerableConvention in the trait set
Posted by GitBox <gi...@apache.org>.
rubenada commented on a change in pull request #2168:
URL: https://github.com/apache/calcite/pull/2168#discussion_r494287567
##########
File path: core/src/test/java/org/apache/calcite/test/RelMetadataTest.java
##########
@@ -1618,20 +1619,23 @@ private void checkCollation(RelOptCluster cluster, RelOptTable empTable,
final EnumerableMergeJoin join;
join = EnumerableMergeJoin.create(project, deptSort,
rexBuilder.makeLiteral(true), leftKeys, rightKeys, JoinRelType.INNER);
+ assertThat(join.getTraitSet().getConvention(), equalTo(EnumerableConvention.INSTANCE));
Review comment:
Other similar operators (e.g. `EnumerableHashJoin`, `EnumerableNestedLoopJoin`, `EnumerableBatchNestedLoopJoin`) don't have this check in their constructors. In fact, it is not recommended to call these constructors directly (unless you know what you are doing) and they are not public, so I am ok with their current behavior of "trusting" the `RelTraitSet` parameter.
On the contrary, `EnumerableMergeJoin#create` method is public (as the other `create` methods in the other join operators), so it is its responsibility to create a valid `traitSet` bafore calling `EnumerableMergeJoin`'s constructor.
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [calcite] thomasrebele commented on pull request #2168: [CALCITE-4275] EnumerableMergeJoin#create does not set EnumerableConvention in the trait set
Posted by GitBox <gi...@apache.org>.
thomasrebele commented on pull request #2168:
URL: https://github.com/apache/calcite/pull/2168#issuecomment-698314328
Looks 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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [calcite] vlsi commented on a change in pull request #2168: [CALCITE-4275] EnumerableMergeJoin#create does not set EnumerableConvention in the trait set
Posted by GitBox <gi...@apache.org>.
vlsi commented on a change in pull request #2168:
URL: https://github.com/apache/calcite/pull/2168#discussion_r494304885
##########
File path: core/src/test/java/org/apache/calcite/test/RelMetadataTest.java
##########
@@ -1618,20 +1619,23 @@ private void checkCollation(RelOptCluster cluster, RelOptTable empTable,
final EnumerableMergeJoin join;
join = EnumerableMergeJoin.create(project, deptSort,
rexBuilder.makeLiteral(true), leftKeys, rightKeys, JoinRelType.INNER);
+ assertThat(join.getTraitSet().getConvention(), equalTo(EnumerableConvention.INSTANCE));
Review comment:
Great. Then the assertion in the test won't be needed
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [calcite] vlsi commented on a change in pull request #2168: [CALCITE-4275] EnumerableMergeJoin#create does not set EnumerableConvention in the trait set
Posted by GitBox <gi...@apache.org>.
vlsi commented on a change in pull request #2168:
URL: https://github.com/apache/calcite/pull/2168#discussion_r494349591
##########
File path: core/src/test/java/org/apache/calcite/test/RelMetadataTest.java
##########
@@ -1618,20 +1619,23 @@ private void checkCollation(RelOptCluster cluster, RelOptTable empTable,
final EnumerableMergeJoin join;
join = EnumerableMergeJoin.create(project, deptSort,
rexBuilder.makeLiteral(true), leftKeys, rightKeys, JoinRelType.INNER);
+ assertThat(join.getTraitSet().getConvention(), equalTo(EnumerableConvention.INSTANCE));
Review comment:
I think we do not need to duplicate logic though.
For instance, if the method receives `String`, then we don't need to add a test that tries to pass `Integer` there.
The assertion in the constructor covers all the possible ways to create `EnumerableMergeJoin`, so it is more-or-less enough from my point of view.
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [calcite] vlsi commented on pull request #2168: [CALCITE-4275] EnumerableMergeJoin#create does not set EnumerableConvention in the trait set
Posted by GitBox <gi...@apache.org>.
vlsi commented on pull request #2168:
URL: https://github.com/apache/calcite/pull/2168#issuecomment-698385214
LGTM, thanks
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [calcite] rubenada merged pull request #2168: [CALCITE-4275] EnumerableMergeJoin#create does not set EnumerableConvention in the trait set
Posted by GitBox <gi...@apache.org>.
rubenada merged pull request #2168:
URL: https://github.com/apache/calcite/pull/2168
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [calcite] rubenada commented on pull request #2168: [CALCITE-4275] EnumerableMergeJoin#create does not set EnumerableConvention in the trait set
Posted by GitBox <gi...@apache.org>.
rubenada commented on pull request #2168:
URL: https://github.com/apache/calcite/pull/2168#issuecomment-698389070
Thanks for your reviews @thomasrebele , @vlsi
I will merge the PR as soon as the checks complete
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [calcite] rubenada commented on a change in pull request #2168: [CALCITE-4275] EnumerableMergeJoin#create does not set EnumerableConvention in the trait set
Posted by GitBox <gi...@apache.org>.
rubenada commented on a change in pull request #2168:
URL: https://github.com/apache/calcite/pull/2168#discussion_r494319070
##########
File path: core/src/test/java/org/apache/calcite/test/RelMetadataTest.java
##########
@@ -1618,20 +1619,23 @@ private void checkCollation(RelOptCluster cluster, RelOptTable empTable,
final EnumerableMergeJoin join;
join = EnumerableMergeJoin.create(project, deptSort,
rexBuilder.makeLiteral(true), leftKeys, rightKeys, JoinRelType.INNER);
+ assertThat(join.getTraitSet().getConvention(), equalTo(EnumerableConvention.INSTANCE));
Review comment:
Assertion added to `EnumerableMergeJoin`'s constructor.
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [calcite] rubenada merged pull request #2168: [CALCITE-4275] EnumerableMergeJoin#create does not set EnumerableConvention in the trait set
Posted by GitBox <gi...@apache.org>.
rubenada merged pull request #2168:
URL: https://github.com/apache/calcite/pull/2168
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [calcite] rubenada commented on a change in pull request #2168: [CALCITE-4275] EnumerableMergeJoin#create does not set EnumerableConvention in the trait set
Posted by GitBox <gi...@apache.org>.
rubenada commented on a change in pull request #2168:
URL: https://github.com/apache/calcite/pull/2168#discussion_r494303503
##########
File path: core/src/test/java/org/apache/calcite/test/RelMetadataTest.java
##########
@@ -1618,20 +1619,23 @@ private void checkCollation(RelOptCluster cluster, RelOptTable empTable,
final EnumerableMergeJoin join;
join = EnumerableMergeJoin.create(project, deptSort,
rexBuilder.makeLiteral(true), leftKeys, rightKeys, JoinRelType.INNER);
+ assertThat(join.getTraitSet().getConvention(), equalTo(EnumerableConvention.INSTANCE));
Review comment:
Ok, I'm not against having the assertion in the constructor. I'll 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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [calcite] vlsi commented on pull request #2168: [CALCITE-4275] EnumerableMergeJoin#create does not set EnumerableConvention in the trait set
Posted by GitBox <gi...@apache.org>.
vlsi commented on pull request #2168:
URL: https://github.com/apache/calcite/pull/2168#issuecomment-698385214
LGTM, thanks
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [calcite] vlsi commented on a change in pull request #2168: [CALCITE-4275] EnumerableMergeJoin#create does not set EnumerableConvention in the trait set
Posted by GitBox <gi...@apache.org>.
vlsi commented on a change in pull request #2168:
URL: https://github.com/apache/calcite/pull/2168#discussion_r494282536
##########
File path: core/src/test/java/org/apache/calcite/test/RelMetadataTest.java
##########
@@ -1618,20 +1619,23 @@ private void checkCollation(RelOptCluster cluster, RelOptTable empTable,
final EnumerableMergeJoin join;
join = EnumerableMergeJoin.create(project, deptSort,
rexBuilder.makeLiteral(true), leftKeys, rightKeys, JoinRelType.INNER);
+ assertThat(join.getTraitSet().getConvention(), equalTo(EnumerableConvention.INSTANCE));
Review comment:
Should this check be moved to `EnumerableMergeJoin` constructor?
##########
File path: core/src/test/java/org/apache/calcite/test/RelMetadataTest.java
##########
@@ -1618,20 +1619,23 @@ private void checkCollation(RelOptCluster cluster, RelOptTable empTable,
final EnumerableMergeJoin join;
join = EnumerableMergeJoin.create(project, deptSort,
rexBuilder.makeLiteral(true), leftKeys, rightKeys, JoinRelType.INNER);
+ assertThat(join.getTraitSet().getConvention(), equalTo(EnumerableConvention.INSTANCE));
Review comment:
See https://github.com/apache/calcite/blob/978bb7ea44969351468d1b5e240e8f57af7e5770/core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableCalc.java#L77 and other assertions of that kind: https://github.com/apache/calcite/search?q=%22getConvention%28%29+instanceof+EnumerableConvention%22
##########
File path: core/src/test/java/org/apache/calcite/test/RelMetadataTest.java
##########
@@ -1618,20 +1619,23 @@ private void checkCollation(RelOptCluster cluster, RelOptTable empTable,
final EnumerableMergeJoin join;
join = EnumerableMergeJoin.create(project, deptSort,
rexBuilder.makeLiteral(true), leftKeys, rightKeys, JoinRelType.INNER);
+ assertThat(join.getTraitSet().getConvention(), equalTo(EnumerableConvention.INSTANCE));
Review comment:
Great. Then the assertion in the test won't be needed
##########
File path: core/src/test/java/org/apache/calcite/test/RelMetadataTest.java
##########
@@ -1618,20 +1619,23 @@ private void checkCollation(RelOptCluster cluster, RelOptTable empTable,
final EnumerableMergeJoin join;
join = EnumerableMergeJoin.create(project, deptSort,
rexBuilder.makeLiteral(true), leftKeys, rightKeys, JoinRelType.INNER);
+ assertThat(join.getTraitSet().getConvention(), equalTo(EnumerableConvention.INSTANCE));
Review comment:
I think we do not need to duplicate logic though.
For instance, if the method receives `String`, then we don't need to add a test that tries to pass `Integer` there.
The assertion in the constructor covers all the possible ways to create `EnumerableMergeJoin`, so it is more-or-less enough from my point of view.
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [calcite] vlsi commented on a change in pull request #2168: [CALCITE-4275] EnumerableMergeJoin#create does not set EnumerableConvention in the trait set
Posted by GitBox <gi...@apache.org>.
vlsi commented on a change in pull request #2168:
URL: https://github.com/apache/calcite/pull/2168#discussion_r494282536
##########
File path: core/src/test/java/org/apache/calcite/test/RelMetadataTest.java
##########
@@ -1618,20 +1619,23 @@ private void checkCollation(RelOptCluster cluster, RelOptTable empTable,
final EnumerableMergeJoin join;
join = EnumerableMergeJoin.create(project, deptSort,
rexBuilder.makeLiteral(true), leftKeys, rightKeys, JoinRelType.INNER);
+ assertThat(join.getTraitSet().getConvention(), equalTo(EnumerableConvention.INSTANCE));
Review comment:
Should this check be moved to `EnumerableMergeJoin` constructor?
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [calcite] rubenada commented on a change in pull request #2168: [CALCITE-4275] EnumerableMergeJoin#create does not set EnumerableConvention in the trait set
Posted by GitBox <gi...@apache.org>.
rubenada commented on a change in pull request #2168:
URL: https://github.com/apache/calcite/pull/2168#discussion_r494306848
##########
File path: core/src/test/java/org/apache/calcite/test/RelMetadataTest.java
##########
@@ -1618,20 +1619,23 @@ private void checkCollation(RelOptCluster cluster, RelOptTable empTable,
final EnumerableMergeJoin join;
join = EnumerableMergeJoin.create(project, deptSort,
rexBuilder.makeLiteral(true), leftKeys, rightKeys, JoinRelType.INNER);
+ assertThat(join.getTraitSet().getConvention(), equalTo(EnumerableConvention.INSTANCE));
Review comment:
I'd prefer to keep it in the unit test, so that we can detect any potential regression in the future.
Also, I like the idea of systematically adding a new test scenario every time we encounter an issue.
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [calcite] thomasrebele commented on pull request #2168: [CALCITE-4275] EnumerableMergeJoin#create does not set EnumerableConvention in the trait set
Posted by GitBox <gi...@apache.org>.
thomasrebele commented on pull request #2168:
URL: https://github.com/apache/calcite/pull/2168#issuecomment-698314328
Looks 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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [calcite] rubenada commented on a change in pull request #2168: [CALCITE-4275] EnumerableMergeJoin#create does not set EnumerableConvention in the trait set
Posted by GitBox <gi...@apache.org>.
rubenada commented on a change in pull request #2168:
URL: https://github.com/apache/calcite/pull/2168#discussion_r494287567
##########
File path: core/src/test/java/org/apache/calcite/test/RelMetadataTest.java
##########
@@ -1618,20 +1619,23 @@ private void checkCollation(RelOptCluster cluster, RelOptTable empTable,
final EnumerableMergeJoin join;
join = EnumerableMergeJoin.create(project, deptSort,
rexBuilder.makeLiteral(true), leftKeys, rightKeys, JoinRelType.INNER);
+ assertThat(join.getTraitSet().getConvention(), equalTo(EnumerableConvention.INSTANCE));
Review comment:
Other similar operators (e.g. `EnumerableHashJoin`, `EnumerableNestedLoopJoin`, `EnumerableBatchNestedLoopJoin`) don't have this check in their constructors. In fact, it is not recommended to call these constructors directly (unless you know what you are doing) and they are not public, so I am ok with their current behavior of "trusting" the `RelTraitSet` parameter.
On the contrary, `EnumerableMergeJoin#create` method is public (as the other `create` methods in the other join operators), so it is its responsibility to create a valid `traitSet` bafore calling `EnumerableMergeJoin`'s constructor.
##########
File path: core/src/test/java/org/apache/calcite/test/RelMetadataTest.java
##########
@@ -1618,20 +1619,23 @@ private void checkCollation(RelOptCluster cluster, RelOptTable empTable,
final EnumerableMergeJoin join;
join = EnumerableMergeJoin.create(project, deptSort,
rexBuilder.makeLiteral(true), leftKeys, rightKeys, JoinRelType.INNER);
+ assertThat(join.getTraitSet().getConvention(), equalTo(EnumerableConvention.INSTANCE));
Review comment:
Ok, I'm not against having the assertion in the constructor. I'll add it.
##########
File path: core/src/test/java/org/apache/calcite/test/RelMetadataTest.java
##########
@@ -1618,20 +1619,23 @@ private void checkCollation(RelOptCluster cluster, RelOptTable empTable,
final EnumerableMergeJoin join;
join = EnumerableMergeJoin.create(project, deptSort,
rexBuilder.makeLiteral(true), leftKeys, rightKeys, JoinRelType.INNER);
+ assertThat(join.getTraitSet().getConvention(), equalTo(EnumerableConvention.INSTANCE));
Review comment:
I'd prefer to keep it in the unit test, so that we can detect any potential regression in the future.
##########
File path: core/src/test/java/org/apache/calcite/test/RelMetadataTest.java
##########
@@ -1618,20 +1619,23 @@ private void checkCollation(RelOptCluster cluster, RelOptTable empTable,
final EnumerableMergeJoin join;
join = EnumerableMergeJoin.create(project, deptSort,
rexBuilder.makeLiteral(true), leftKeys, rightKeys, JoinRelType.INNER);
+ assertThat(join.getTraitSet().getConvention(), equalTo(EnumerableConvention.INSTANCE));
Review comment:
I'd prefer to keep it in the unit test, so that we can detect any potential regression in the future.
Also, I like the idea of systematically adding a new test scenario every time we encounter an issue.
##########
File path: core/src/test/java/org/apache/calcite/test/RelMetadataTest.java
##########
@@ -1618,20 +1619,23 @@ private void checkCollation(RelOptCluster cluster, RelOptTable empTable,
final EnumerableMergeJoin join;
join = EnumerableMergeJoin.create(project, deptSort,
rexBuilder.makeLiteral(true), leftKeys, rightKeys, JoinRelType.INNER);
+ assertThat(join.getTraitSet().getConvention(), equalTo(EnumerableConvention.INSTANCE));
Review comment:
Assertion added to `EnumerableMergeJoin`'s constructor.
##########
File path: core/src/test/java/org/apache/calcite/test/RelMetadataTest.java
##########
@@ -1618,20 +1619,23 @@ private void checkCollation(RelOptCluster cluster, RelOptTable empTable,
final EnumerableMergeJoin join;
join = EnumerableMergeJoin.create(project, deptSort,
rexBuilder.makeLiteral(true), leftKeys, rightKeys, JoinRelType.INNER);
+ assertThat(join.getTraitSet().getConvention(), equalTo(EnumerableConvention.INSTANCE));
Review comment:
Ok, I don't mind removing the check from the test. I just want this fix merged before next release.
##########
File path: core/src/test/java/org/apache/calcite/test/RelMetadataTest.java
##########
@@ -1618,20 +1619,23 @@ private void checkCollation(RelOptCluster cluster, RelOptTable empTable,
final EnumerableMergeJoin join;
join = EnumerableMergeJoin.create(project, deptSort,
rexBuilder.makeLiteral(true), leftKeys, rightKeys, JoinRelType.INNER);
+ assertThat(join.getTraitSet().getConvention(), equalTo(EnumerableConvention.INSTANCE));
Review comment:
Done.
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [calcite] rubenada commented on a change in pull request #2168: [CALCITE-4275] EnumerableMergeJoin#create does not set EnumerableConvention in the trait set
Posted by GitBox <gi...@apache.org>.
rubenada commented on a change in pull request #2168:
URL: https://github.com/apache/calcite/pull/2168#discussion_r494369812
##########
File path: core/src/test/java/org/apache/calcite/test/RelMetadataTest.java
##########
@@ -1618,20 +1619,23 @@ private void checkCollation(RelOptCluster cluster, RelOptTable empTable,
final EnumerableMergeJoin join;
join = EnumerableMergeJoin.create(project, deptSort,
rexBuilder.makeLiteral(true), leftKeys, rightKeys, JoinRelType.INNER);
+ assertThat(join.getTraitSet().getConvention(), equalTo(EnumerableConvention.INSTANCE));
Review comment:
Done.
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [calcite] vlsi commented on a change in pull request #2168: [CALCITE-4275] EnumerableMergeJoin#create does not set EnumerableConvention in the trait set
Posted by GitBox <gi...@apache.org>.
vlsi commented on a change in pull request #2168:
URL: https://github.com/apache/calcite/pull/2168#discussion_r494289069
##########
File path: core/src/test/java/org/apache/calcite/test/RelMetadataTest.java
##########
@@ -1618,20 +1619,23 @@ private void checkCollation(RelOptCluster cluster, RelOptTable empTable,
final EnumerableMergeJoin join;
join = EnumerableMergeJoin.create(project, deptSort,
rexBuilder.makeLiteral(true), leftKeys, rightKeys, JoinRelType.INNER);
+ assertThat(join.getTraitSet().getConvention(), equalTo(EnumerableConvention.INSTANCE));
Review comment:
See https://github.com/apache/calcite/blob/978bb7ea44969351468d1b5e240e8f57af7e5770/core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableCalc.java#L77 and other assertions of that kind: https://github.com/apache/calcite/search?q=%22getConvention%28%29+instanceof+EnumerableConvention%22
----------------------------------------------------------------
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:
users@infra.apache.org