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

[Rust][DataFusion] Add coercion support for NULL literals #27698

Closed
asfimport opened this issue Mar 3, 2021 · 3 comments
Closed

[Rust][DataFusion] Add coercion support for NULL literals #27698

asfimport opened this issue Mar 3, 2021 · 3 comments

Comments

@asfimport
Copy link
Collaborator

As we observed in #9565 (comment) datafusion won't coerce null literals, forcing strange syntax such as:

rpad('hi', CAST(NULL AS INT), 'xy')

We should add automatic coercion logic from the null literal to any type and this expression should work just fine (produce a NULL output)

rpad('hi', NULL, 'xy')


**Reporter**: [Andrew Lamb](https://issues.apache.org/jira/browse/ARROW-11851) / @alamb

<sub>**Note**: *This issue was originally created as [ARROW-11851](https://issues.apache.org/jira/browse/ARROW-11851). Please see the [migration documentation](https://github.com/apache/arrow/issues/14542) for further details.*</sub>
@asfimport
Copy link
Collaborator Author

Mike Seddon / @seddonm1:
@alamb Previously I implemented the Null=UTF8 type based on the behavior of Postgres not Spark - because the Spark implementation comes with a lot of side effects like the fact that Parquet does not support the NullType. We can revisit.

@asfimport
Copy link
Collaborator Author

Andrew Lamb / @alamb:
Makes sense to me

@asfimport
Copy link
Collaborator Author

Andrew Lamb / @alamb:
Migrated to github: apache/datafusion#185

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant