Comments (4)
BTW this is a really nicely written ticket
from arrow-datafusion.
If possible, I think we should follow the model of existing implementations here (rather than invent DataFusion specific semants)
Specifically if we are going to change the semantics of coalsce I think we should follow either postgres or spark's behavior -- I haven't done the research to know how close/far what DataFusion does compared to those systems
from arrow-datafusion.
Alright, so I think we should remove casting logic for coalesce, which follows what Postgres and DuckDB do. Returns error if there are mixed types for different columns.
It seems Postgres has casting for some of the types too.
from arrow-datafusion.
Plan:
- I think we should change
coerced_from
tocan_cast_types
here, pre-computed reasonable valid types with TypeSignature inget_valid_types
.
datafusion/datafusion/expr/src/type_coercion/functions.rs
Lines 67 to 71 in ed14682
datafusion/datafusion/expr/src/type_coercion/functions.rs
Lines 82 to 261 in ed14682
- Non-comparison coercion: type resolution coercion for Coalesce, MakeArray, and so on.
https://www.postgresql.org/docs/current/typeconv-union-case.html
- Deprecate/Remove
coerced_from
at the end!
from arrow-datafusion.
Related Issues (20)
- Extract parquet statistics from `Time32` and `Time64` columns HOT 1
- Extract parquet statistics from `Interval` columns HOT 2
- Extract parquet statistics from `LargeBinary` columns
- Extract parquet statistics from `Duration` columns HOT 2
- Extract parquet statistics from `Decimal256` columns
- Extract parquet statistics from `LargeUtf8` columns HOT 2
- Extract parquet statistics from `f16` columns HOT 1
- Extract parquet statistics from timestamps with timezones HOT 1
- Repeat scalar function panics on negative repeat counts.
- Update split_part to support negative indexes vs failing
- Error `NamedStructField should be rewritten in OperatorToFunction with subquery` if query is wrapped in view HOT 1
- Adopt temporalio/snipsync for documentation
- `array_sort` fails if input batch is empty
- Merge `ScalarUDFImpl`'s `invoke_no_args` and `invoke` into one method HOT 2
- Misaligned datapoints when specifying projections in reverse on custom table provider HOT 1
- DataFusion weekly project plan (Andrew Lamb) - June 3, 2024
- Regression in `first_value` and `last_value` coercion HOT 3
- [Epic] Extract catalog functionality from the core to make it more modular HOT 2
- Circular relationship when determining state fields for AggregateUDF
- Support join filter in NestedLoopJoin in fizz join test cases
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arrow-datafusion.