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

Why use the expr types before coercion to get the result type? #1358

Closed
liukun4515 opened this issue Nov 25, 2021 · 5 comments
Closed

Why use the expr types before coercion to get the result type? #1358

liukun4515 opened this issue Nov 25, 2021 · 5 comments

Comments

@liukun4515
Copy link
Contributor

liukun4515 commented Nov 25, 2021

https://github.com/apache/arrow-datafusion/blob/15db29153aefc9b759ec03e6eeab8cb9ebf87781/datafusion/src/physical_plan/functions.rs#L1144

In order to get agg phy expr, we need to coerce the input exprs(may need to add try_cast to wrap the expr), so the types of
coerced exprs is diff with the types of input exprs.

In the below code, we also need to use the coerced exprs and coerced types to generate the agg expr.

@liukun4515
Copy link
Contributor Author

cc @jorgecarleitao

@alamb
Copy link
Contributor

alamb commented Nov 28, 2021

if the question is "should we use the argument types after coercion" that seems to make sense to me, but I haven't thought about it all that much

@liukun4515
Copy link
Contributor Author

This an invalid issue, this line is my intention.
The return data type should get from the input expr types and not from coerced expr types

@alamb
Copy link
Contributor

alamb commented Nov 29, 2021

This an invalid issue, this line is my intention.

@liukun4515 are you suggesting we close this issue?

@liukun4515
Copy link
Contributor Author

This an invalid issue, this line is my intention.

@liukun4515 are you suggesting we close this issue?

Yes, i will close it.

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

No branches or pull requests

2 participants