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

When MAP and ARRAY are next to each other, changing the field name inside the nested field will cause an ERROR #11872

Open
3 tasks
madeirak opened this issue Dec 25, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@madeirak
Copy link

Apache Iceberg version

1.4.3

Query engine

Spark

Please describe the bug 🐞

CREATE TABLE xxx.table1 (
  name1 STRING COMMENT '',
  sb_col STRUCT<id: STRING, ss_col: ARRAY<MAP<STRING, STRUCT<c: INT, d: STRING>>>>)
USING iceberg

alter table xxx.tbale1 RENAME COLUMN sb_col.ss_col.element.value.d to d_1;

Error in query: Field name sb_col.ss_col.element.value.d is invalid: sb_col.ss_col.element is not a struct.; line 1 pos 0

Willingness to contribute

  • I can contribute a fix for this bug independently
  • I would be willing to contribute a fix for this bug with guidance from the Iceberg community
  • I cannot contribute a fix for this bug at this time
@madeirak madeirak added the bug Something isn't working label Dec 25, 2024
@madeirak
Copy link
Author

madeirak commented Dec 25, 2024

After trying, error is reported when the ARRAY and MAP of the nested fields are directly next to each other.
For example, ARRAY<MAP<STRING, STRUCT<x: INT>>> or MAP<STRING, ARRAY<STRUCT<x: INT>>> , changing the name of field x will result in an error: Error in query: Field name xxx is not a struct

If the ARRAY and MAP of the nested fields are not directly next to each other, like ARRAY<STRUCT<a: MAP<STRING, STRUCT<x: INT>>>> , changing the name of field x will not result in the error above.

@madeirak madeirak changed the title The nested type identification is incorrect STRUCT<a: ARRAY<MAP<STRUCT<b: string>>>> When MAP and ARRAY are next to each other, changing the field name inside the nested field will cause an ERROR Dec 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant