You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "Fokko (via GitHub)" <gi...@apache.org> on 2024/07/31 20:21:18 UTC

[I] A move after a rename fails [iceberg]

Fokko opened a new issue, #10830:
URL: https://github.com/apache/iceberg/issues/10830

   ### Apache Iceberg version
   
   1.6.0 (latest release)
   
   ### Query engine
   
   Other
   
   ### Please describe the bug 🐞
   
   When you try to move a renamed column, this fails:
   ```java
     @Test
     public void testMoveAfterRename() {
       Schema schema =
         new Schema(
                 required(1, "b", Types.IntegerType.get()),
                 required(2, "c", Types.IntegerType.get()));
   
       Schema actual = new SchemaUpdate(schema, 4)
               .renameColumn("c", "a")
               .moveBefore("a", "b")
               .apply();
   
       Schema expected =
               new Schema(
                       required(2, "a", Types.IntegerType.get()),
                       required(1, "b", Types.IntegerType.get()));
       assertThat(actual.asStruct()).isEqualTo(expected.asStruct());
     }
   ```
   
   It cannot find the column:
   ```
   Cannot move missing column: a
   java.lang.IllegalArgumentException: Cannot move missing column: a
   	at org.apache.iceberg.relocated.com.google.common.base.Preconditions.checkArgument(Preconditions.java:220)
   ```
   
   Should we allow this?
   
   ### Willingness to contribute
   
   - [X] 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


-- 
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: issues-unsubscribe@iceberg.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] A move after a rename fails [iceberg]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #10830:
URL: https://github.com/apache/iceberg/issues/10830#issuecomment-2655136097

   This issue has been closed because it has not received any activity in the last 14 days since being marked as 'stale'


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] A move after a rename fails [iceberg]

Posted by "Fokko (via GitHub)" <gi...@apache.org>.
Fokko commented on issue #10830:
URL: https://github.com/apache/iceberg/issues/10830#issuecomment-2262159795

   I ran into it when you evolve an existing schema, the move operation is different when you add new fields or evolve existing fields (you can move newly added fields). But you're right, it's probably something nice to have.


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] A move after a rename fails [iceberg]

Posted by "Fokko (via GitHub)" <gi...@apache.org>.
Fokko commented on issue #10830:
URL: https://github.com/apache/iceberg/issues/10830#issuecomment-2263236654

   @RussellSpitzer For sure!


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] A move after a rename fails [iceberg]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #10830:
URL: https://github.com/apache/iceberg/issues/10830#issuecomment-2623222951

   This issue has been automatically marked as stale because it has been open for 180 days with no activity. It will be closed in next 14 days if no further activity occurs. To permanently prevent this issue from being considered stale, add the label 'not-stale', but commenting on the issue is preferred when possible.


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] A move after a rename fails [iceberg]

Posted by "RussellSpitzer (via GitHub)" <gi...@apache.org>.
RussellSpitzer commented on issue #10830:
URL: https://github.com/apache/iceberg/issues/10830#issuecomment-2261433397

   I doubt we intend it to work that way, but I'm not sure it's worth fixing?


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] A move after a rename fails [iceberg]

Posted by "RussellSpitzer (via GitHub)" <gi...@apache.org>.
RussellSpitzer commented on issue #10830:
URL: https://github.com/apache/iceberg/issues/10830#issuecomment-2263103027

   This may be a good first issue for someone @Fokko In case you want to leave it for someone else to tinker with :)


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] A move after a rename fails [iceberg]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #10830: A move after a rename fails
URL: https://github.com/apache/iceberg/issues/10830


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] A move after a rename fails [iceberg]

Posted by "Fokko (via GitHub)" <gi...@apache.org>.
Fokko commented on issue #10830:
URL: https://github.com/apache/iceberg/issues/10830#issuecomment-2261424723

   Yes, this works:
   
   ```java
     @Test
     public void testMoveAfterRename() {
       Schema schema =
         new Schema(
                 required(1, "b", Types.IntegerType.get()),
                 required(2, "c", Types.IntegerType.get()));
   
       Schema actual = new SchemaUpdate(schema, 4)
               .moveBefore("c", "b")
               .renameColumn("c", "a")
               .apply();
   
       Schema expected =
               new Schema(
                       required(2, "a", Types.IntegerType.get()),
                       required(1, "b", Types.IntegerType.get()));
       assertThat(actual.asStruct()).isEqualTo(expected.asStruct());
     }
   ```
   
   To make the other way around work, we have to track the in-flight renames, so it is essentially more bookkeeping. Just wanted to check if this is intentional.


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] A move after a rename fails [iceberg]

Posted by "RussellSpitzer (via GitHub)" <gi...@apache.org>.
RussellSpitzer commented on issue #10830:
URL: https://github.com/apache/iceberg/issues/10830#issuecomment-2261411157

   Can you move then rename?  Just wondering how this is actually set up.


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] A move after a rename fails [iceberg]

Posted by "FANNG1 (via GitHub)" <gi...@apache.org>.
FANNG1 commented on issue #10830:
URL: https://github.com/apache/iceberg/issues/10830#issuecomment-2265700793

   @Fokko , I'd like to take this issue, could you assign it to me?


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org