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

Pipeline Expressions Refactor #1946

Open
wants to merge 2 commits into
base: wuandy/JavaPplPP
Choose a base branch
from

Conversation

tom-andersen
Copy link
Contributor

@tom-andersen tom-andersen commented Dec 6, 2024

  • Make NULL_VALUE constant as an optimization against create the same object over and over again.
  • Make Expr polymorphic with toProto() method. This eliminates large condition structure. To toProto() is package-private for internal use. Package-private is only possible on classes (not interfaces), so I converted the Expr to an abstract class with package-private constructor to avoid customer extending it.
  • Remove type parameters and use ? instead.
  • Fix operators that take Object as parameter. Object might be of type Expr which cannot be passed through Constant.of(..) method. Instead we need to short circuit conversion, and simply return Object since it is already an Expr.

@tom-andersen tom-andersen requested a review from a team as a code owner December 6, 2024 18:14
@product-auto-label product-auto-label bot added size: l Pull request size is large. api: firestore Issues related to the googleapis/java-firestore API. labels Dec 6, 2024
@tom-andersen tom-andersen changed the title Refactor Pipeline Expressions Refactor Dec 6, 2024
@tom-andersen tom-andersen requested a review from wu-hui December 6, 2024 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: firestore Issues related to the googleapis/java-firestore API. size: l Pull request size is large.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants