Skip to content

Conversation

@snuyanzin
Copy link
Contributor

What is the purpose of the change

It should reuse result of functions as input for other functions

Brief change log

projections rules

Verifying this change

There are tests in CalcTest

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 Dec 8, 2025

CI report:

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

RexNode project = bottomProjectList.get(i);
if (project instanceof RexCall
&& SqlKind.FUNCTION.contains(((RexCall) project).op.getKind())
&& ((RexCall) project).op.isDeterministic()) {
Copy link
Contributor

@davidradl davidradl Dec 8, 2025

Choose a reason for hiding this comment

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

I do not know this area very well, just to check my understanding

  • why are we calling the rexNodes projects and not rexNodes?
  • I assume that isDeterministic implies that for a given input you get the same output. If there are non deterministic functions in the list of projects, this could imply we cannot use the output for those. Is it safe to reuse the results if there are non deterministic projects? What would it mean to re-use the results when there is a mix of deterministic and non-deterministic projects? Maybe have a test with the mix to ensure is works as you intend.

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 still a kind of PoC

regarding deterministic: further in stack there is a dedicated check for deterministic/non-deterministic, so do not care much about this here

@github-actions github-actions bot added the community-reviewed PR has been reviewed by the community. label Dec 8, 2025
@snuyanzin snuyanzin marked this pull request as draft December 8, 2025 22:58
Remove commented-out code for clarity.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-reviewed PR has been reviewed by the community.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants