Skip to content

Conversation

@zabetak
Copy link
Member

@zabetak zabetak commented Dec 18, 2025

What changes were proposed in this pull request?

  1. Drop synthetic indicator from HiveProject and refactor callers using it
  2. Replace HiveFilterProjectTSTransposeRule with appropriate instantiations of HiveFilterProjectTransposeRule
  3. Move isRewritablePKFKJoin check from HiveFilterProjectTransposeRule#matches

Why are the changes needed?

  1. Reduce code maintenance and tech-debt
  2. Facilitate handling of equivalent expressions/plans
  3. Generalize HiveFilterProjectTransposeRule to work fine with more than two operands and not strictly with joins

Does this PR introduce any user-facing change?

No

How was this patch tested?

mvn test -Dtest=TestMiniLlapLocalCliDriver -Dqfile_regex=.*join.*

@sonarqubecloud
Copy link

RelMetadataQuery mq = join.getCluster().getMetadataQuery();
return HiveRelOptUtil.isRewritablePKFKJoin(join, join.getLeft(), join.getRight(), mq).rewritable;
};
return operandJ(Join.class, null, isRewritable, any());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's not too much of an effort, it could be good idea to not use deprecated APIs like operandJ. Although, this is not the only place where it is used, so this is not a strict requirement. I will leave it up to you.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried getting rid of the deprecations but it requires a significant refactoring of the rule so for keeping the scope of the JIRA more focused I decided not to do it as part of this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants