Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FLINK-34161][table] Migration of RewriteMinusAllRule to java #24143

Merged
merged 4 commits into from
Apr 8, 2024

Conversation

snuyanzin
Copy link
Contributor

What is the purpose of the change

The PR migrates RewriteMinusAllRule to java
it doesn't touch RewriteMinusAllRuleTest to be sure that java version continues passing it

Verifying this change

This change is already covered by existing tests

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): ( no)
  • The public API, i.e., is any changed class annotated with @Public(Evolving): ( no)
  • The serializers: ( no)
  • The runtime per-record code paths (performance sensitive): ( no)
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: ( no)
  • The S3 file system connector: ( no)

Documentation

  • Does this pull request introduce a new feature? ( no)
  • If yes, how is the feature documented? (not applicable)

@flinkbot
Copy link
Collaborator

flinkbot commented Jan 18, 2024

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

* Replaces logical {@link Minus} operator using a combination of union all, aggregate and table
* function.
*
* <p>Original Query : {@code SELECT c1 FROM ut1 EXCEPT ALL SELECT c1 FROM ut2 }
Copy link
Contributor

Choose a reason for hiding this comment

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

It's not a big deal, but you might want to consider using a <pre> block to keep the readable formatting from the original scaladoc. Of course, you might have to escape > to &gt; :/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done, thanks

Copy link
Contributor

@RyanSkraba RyanSkraba left a comment

Choose a reason for hiding this comment

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

LGTM: that one issue is really only an internal consistency nitpick.

A quick question for the Immutable config -- is there a reason or a preference for using the withDescription(...) builders versus description(...) ? See https://github.com/apache/flink/pull/24141/files#diff-f3f8695553bb95921fa9346ecd8595e349d5ad5a182ff2681b6286a990f66727R111 for the other way to write these.

List<Integer> fields = Util.range(minus.getRowType().getFieldCount());

// 1. add vcol_marker to left rel node
RelBuilder leftBuilder = call.builder().push(left);
Copy link
Contributor

Choose a reason for hiding this comment

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

You've slightly changed the variable assignment here from the scala version (the left builder originally didn't include the .push(left)). This is fine since the push method returns the same instance, but it should probably be consistent below with the right side.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is actually a good catch, thanks, fixed

@snuyanzin
Copy link
Contributor Author

A quick question for the Immutable config -- is there a reason or a preference for using the withDescription(...) builders versus description(...)

the main benefit is that with use of description we do not need to create an extra object which is created while using withDescription, changed to use description

@snuyanzin snuyanzin merged commit 97a6727 into apache:master Apr 8, 2024
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.

4 participants