alamb opened a new pull request, #9897: URL: https://github.com/apache/arrow-datafusion/pull/9897
## Which issue does this PR close? Closes https://github.com/apache/arrow-datafusion/issues/9839 ## Rationale for this change The names of the columns created by callling `struct` changed in https://github.com/apache/arrow-datafusion/pull/9743 ### Before https://github.com/apache/arrow-datafusion/pull/9743 ```sql select struct(a, b) from t; +-----------------+ | struct(t.a,t.b) | +-----------------+ | {c0: 1, c1: 2} | | {c0: 3, c1: 4} | +-----------------+ ``` ### After https://github.com/apache/arrow-datafusion/pull/9743 (note how the column name is different) ```sql select struct(a as field_a, b) from t; +--------------------------------------------------+ | named_struct(Utf8("field_a"),t.a,Utf8("c1"),t.b) | +--------------------------------------------------+ | {field_a: 1, c1: 2} | | {field_a: 3, c1: 4} | +--------------------------------------------------+ ``` This change caused https://github.com/apache/arrow-datafusion/issues/9891 as well as removed test coverage for `struct` ## What changes are included in this PR? 1. Use `struct` when there are no named fields 2. reverts the test change in https://github.com/apache/arrow-datafusion/pull/9894 ## Are these changes tested? Yes, by existing tests ## Are there any user-facing changes? The column names are now the same as they were prior to https://github.com/apache/arrow-datafusion/pull/9894 -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
