You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "jayzhan211 (via GitHub)" <gi...@apache.org> on 2024/05/03 09:47:28 UTC
[I] Standardize the separator in name [datafusion]
jayzhan211 opened a new issue, #10364:
URL: https://github.com/apache/datafusion/issues/10364
### Is your feature request related to a problem or challenge?
While working on replacing GetFieldAccess with `get_field` function, I got the [name checking error](https://github.com/apache/datafusion/blob/b21bf9e8527de82e901c3a61127d63779f230163/datafusion/physical-expr/src/equivalence/projection.rs#L70-L73) that due to the mismatch of separator in creating name. I found that most of the name built with single comma and space, so I think we should switch others to this format `.join(", ")`.
Error is like
```
External error: query failed: DataFusion error: Internal error: Input field name SUM(get_field(CASE WHEN get_field(t2.struct(t1.time,t1.load1,t1.load2,t1.host), Utf8("c3")) IS NOT NULL THEN t2.struct(t1.time,t1.load1,t1.load2,t1.host) END,Utf8("c2"))) does not match with the projection expression SUM(get_field(CASE WHEN get_field(t2.struct(t1.time,t1.load1,t1.load2,t1.host),Utf8("c3")) IS NOT NULL THEN t2.struct(t1.time,t1.load1,t1.load2,t1.host) END,Utf8("c2"))).
This was likely caused by a bug in DataFusion's code and we would welcome that you file an bug report in our issue tracker
[SQL] select t2."struct(t1.time,t1.load1,t1.load2,t1.host)"['c3'] as host, sum((case when t2."struct(t1.time,t1.load1,t1.load2,t1.host)"['c3'] is not null then t2."struct(t1.time,t1.load1,t1.load2,t1.host)" end)['c2']) from (select struct(time,load1,load2,host) from t1) t2 where t2."struct(t1.time,t1.load1,t1.load2,t1.host)"['c3'] IS NOT NULL group by t2."struct(t1.time,t1.load1,t1.load2,t1.host)"['c3'] order by host;
```
I got one with `t2.struct(t1.time,t1.load1,t1.load2,t1.host), Utf8("c3")` and another `t2.struct(t1.time,t1.load1,t1.load2,t1.host),Utf8("c3")`. That is why I think we should fix the separator.
### Describe the solution you'd like
_No response_
### Describe alternatives you've considered
_No response_
### Additional context
_No response_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [I] Standardize the separator in name [datafusion]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on issue #10364:
URL: https://github.com/apache/datafusion/issues/10364#issuecomment-2093720057
I agree this makes sense. Thank you
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [I] Standardize the separator in name [datafusion]
Posted by "joroKr21 (via GitHub)" <gi...@apache.org>.
joroKr21 commented on issue #10364:
URL: https://github.com/apache/datafusion/issues/10364#issuecomment-2288257503
Also why do we have all of these which are slightly different? It's really unmanageable:
* `Expr::schema_name`
* `Expr::canonical_name`
* `physical_name`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [I] Standardize the separator in name [datafusion]
Posted by "jayzhan211 (via GitHub)" <gi...@apache.org>.
jayzhan211 commented on issue #10364:
URL: https://github.com/apache/datafusion/issues/10364#issuecomment-2288890948
> Also why do we have all of these which are slightly different? It's really unmanageable:
>
> * `Expr::schema_name`
> * `Expr::canonical_name`
> * `physical_name`
I'm working on this #11782
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [I] Standardize the separator in name [datafusion]
Posted by "joroKr21 (via GitHub)" <gi...@apache.org>.
joroKr21 commented on issue #10364:
URL: https://github.com/apache/datafusion/issues/10364#issuecomment-2288965983
Maybe we can just use the `schema_name` for `physical_name`? It sounds like a bug if they are different: https://github.com/apache/datafusion/pull/11977
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org