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

Standardize the separator in name #10364

Open
jayzhan211 opened this issue May 3, 2024 · 1 comment
Open

Standardize the separator in name #10364

jayzhan211 opened this issue May 3, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@jayzhan211
Copy link
Contributor

jayzhan211 commented May 3, 2024

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 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.

Since the change is quite large, I would like to wait for more comment.

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Additional context

No response

You can find the error here with cargo test --test sqllogictests -- expr. Although, it is not on the main branch, but I think most of the changes are unrelated to the name checking issue.

@jayzhan211 jayzhan211 added the enhancement New feature or request label May 3, 2024
@alamb
Copy link
Contributor

alamb commented May 3, 2024

I agree this makes sense. Thank you

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

Successfully merging a pull request may close this issue.

2 participants