Skip to content

feat: Allow local arithmetic execution in hybrid engine #1906

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

Merged
merged 4 commits into from
Jul 17, 2025

Conversation

TrevorBergeron
Copy link
Contributor

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> 🦕

@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. labels Jul 11, 2025
@product-auto-label product-auto-label bot added size: l Pull request size is large. and removed size: m Pull request size is medium. labels Jul 16, 2025
@TrevorBergeron TrevorBergeron marked this pull request as ready for review July 16, 2025 21:42
@TrevorBergeron TrevorBergeron requested review from a team as code owners July 16, 2025 21:42
@TrevorBergeron TrevorBergeron requested a review from jialuoo July 16, 2025 21:42
@TrevorBergeron TrevorBergeron requested review from chelsea-lin and removed request for jialuoo July 16, 2025 21:42
):
rarg = ops.AsTypeOp(to_type=dtypes.DATETIME_DTYPE).as_expr(rarg)

return expr.op.as_expr(larg, rarg)
Copy link
Contributor

Choose a reason for hiding this comment

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

Will the function throw an error if an argument has an invalid type? Or you just let Polar throws errors?

@@ -140,7 +140,8 @@ class AddOp(base_ops.BinaryOp):
def output_type(self, *input_types):
left_type = input_types[0]
right_type = input_types[1]
if all(map(dtypes.is_string_like, input_types)) and len(set(input_types)) == 1:
# TODO: Binary/bytes addition requires impl
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you please create a bug for this TODO? It can be part of pandas top-100 hostlist?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

created issue 432495312

@@ -37,26 +37,259 @@ def lower(self, expr: expression.OpExpression) -> expression.Expression:
return expr.op.as_expr(larg, rarg)


class LowerAddRule(op_lowering.OpLoweringRule):
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you help me understand why it's calling "lower" here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@GarrettWu GarrettWu removed their assignment Jul 17, 2025
@TrevorBergeron TrevorBergeron merged commit ebdcd02 into main Jul 17, 2025
24 of 25 checks passed
@TrevorBergeron TrevorBergeron deleted the hybrid_math branch July 17, 2025 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. size: l Pull request size is large.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants