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

Partially support adding Date32 and integer #12352

Closed
wants to merge 3 commits into from

Conversation

ashrafshaik09
Copy link

Which issue does this PR close?

Closes #12342.

Rationale for this change

The current implementation of DataFusion doesn't support adding an integer directly to a Date32 type, which is a common operation in SQL databases. This limitation causes unexpected errors for users trying to perform date arithmetic, particularly when migrating queries from other SQL databases like PostgreSQL. Implementing this feature will improve compatibility and user experience.

What changes are included in this PR?

  1. Modify the type coercion rules to allow Date32 + Int64 operations.
  2. Implement the actual addition logic for Date32 + Int64 in the physical expression evaluation.
  3. Add appropriate test cases to ensure the new functionality works as expected

Are these changes tested?

Are there any user-facing changes?

@github-actions github-actions bot added logical-expr Logical plan and expressions physical-expr Physical Expressions labels Sep 6, 2024
@alamb alamb changed the title issue #12342 partially solved Partially support adding Date32 and integer Sep 6, 2024
Copy link

github-actions bot commented Nov 6, 2024

Thank you for your contribution. Unfortunately, this pull request is stale because it has been open 60 days with no activity. Please remove the stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale PR has not had any activity for some time label Nov 6, 2024
@github-actions github-actions bot closed this Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
logical-expr Logical plan and expressions physical-expr Physical Expressions Stale PR has not had any activity for some time
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Error when adding Date32 and Int64
1 participant