[jira] [Work logged] (HIVE-26061) Do not add 'from deserializer' comment upon alter commands for Iceberg tables
[ https://issues.apache.org/jira/browse/HIVE-26061?focusedWorklogId=748468=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-748468 ] ASF GitHub Bot logged work on HIVE-26061: - Author: ASF GitHub Bot Created on: 28/Mar/22 07:52 Start Date: 28/Mar/22 07:52 Worklog Time Spent: 10m Work Description: pvary merged pull request #3129: URL: https://github.com/apache/hive/pull/3129 -- 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: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 748468) Time Spent: 1h 20m (was: 1h 10m) > Do not add 'from deserializer' comment upon alter commands for Iceberg tables > - > > Key: HIVE-26061 > URL: https://issues.apache.org/jira/browse/HIVE-26061 > Project: Hive > Issue Type: Bug >Reporter: Peter Vary >Assignee: Peter Vary >Priority: Major > Labels: pull-request-available > Time Spent: 1h 20m > Remaining Estimate: 0h > > Currently an ALTER TABLE command for Iceberg tables adds the 'from > deserializer' comment to all columns which do not already have a comment. > This becomes annoying when issueing REPLACE COLUMNS operations, where you > have to write out all these superflous comments. -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Work logged] (HIVE-26061) Do not add 'from deserializer' comment upon alter commands for Iceberg tables
[ https://issues.apache.org/jira/browse/HIVE-26061?focusedWorklogId=748156=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-748156 ] ASF GitHub Bot logged work on HIVE-26061: - Author: ASF GitHub Bot Created on: 26/Mar/22 05:31 Start Date: 26/Mar/22 05:31 Worklog Time Spent: 10m Work Description: pvary commented on a change in pull request #3129: URL: https://github.com/apache/hive/pull/3129#discussion_r835720938 ## File path: metastore/src/java/org/apache/hadoop/hive/metastore/SerDeStorageSchemaReader.java ## @@ -45,7 +45,7 @@ } Deserializer s = HiveMetaStoreUtils.getDeserializer(conf, tbl, null, false); - return HiveMetaStoreUtils.getFieldsFromDeserializer(tbl.getTableName(), s); + return HiveMetaStoreUtils.getFieldsFromDeserializer(tbl.getTableName(), s, null); Review comment: Changed the whole approach since we do not have enough info here to decide on the default comment -- 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: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 748156) Time Spent: 1h 10m (was: 1h) > Do not add 'from deserializer' comment upon alter commands for Iceberg tables > - > > Key: HIVE-26061 > URL: https://issues.apache.org/jira/browse/HIVE-26061 > Project: Hive > Issue Type: Bug >Reporter: Peter Vary >Assignee: Peter Vary >Priority: Major > Labels: pull-request-available > Time Spent: 1h 10m > Remaining Estimate: 0h > > Currently an ALTER TABLE command for Iceberg tables adds the 'from > deserializer' comment to all columns which do not already have a comment. > This becomes annoying when issueing REPLACE COLUMNS operations, where you > have to write out all these superflous comments. -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Work logged] (HIVE-26061) Do not add 'from deserializer' comment upon alter commands for Iceberg tables
[ https://issues.apache.org/jira/browse/HIVE-26061?focusedWorklogId=747794=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-747794 ] ASF GitHub Bot logged work on HIVE-26061: - Author: ASF GitHub Bot Created on: 25/Mar/22 13:44 Start Date: 25/Mar/22 13:44 Worklog Time Spent: 10m Work Description: pvary commented on a change in pull request #3129: URL: https://github.com/apache/hive/pull/3129#discussion_r835283057 ## File path: ql/src/java/org/apache/hadoop/hive/ql/metadata/HiveUtils.java ## @@ -304,6 +304,10 @@ public static HiveStorageHandler getStorageHandler( } } + public static String getDefaultComment(HiveStorageHandler storageHandler) { +return storageHandler != null ? storageHandler.getDefaultColumnComment() : HiveStorageHandler.FROM_SERIALIZER; Review comment: Default storage handler still could have a `from deserializer` field. For example AVRO files can contain the schema and they can dictate the columns of the table. This change makes sure that we do not get an error when the storage handler is null. The other default is handled by the default implementation for the `getDefaultColumnComment()` method -- 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: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 747794) Time Spent: 1h (was: 50m) > Do not add 'from deserializer' comment upon alter commands for Iceberg tables > - > > Key: HIVE-26061 > URL: https://issues.apache.org/jira/browse/HIVE-26061 > Project: Hive > Issue Type: Bug >Reporter: Peter Vary >Assignee: Peter Vary >Priority: Major > Labels: pull-request-available > Time Spent: 1h > Remaining Estimate: 0h > > Currently an ALTER TABLE command for Iceberg tables adds the 'from > deserializer' comment to all columns which do not already have a comment. > This becomes annoying when issueing REPLACE COLUMNS operations, where you > have to write out all these superflous comments. -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Work logged] (HIVE-26061) Do not add 'from deserializer' comment upon alter commands for Iceberg tables
[ https://issues.apache.org/jira/browse/HIVE-26061?focusedWorklogId=747793=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-747793 ] ASF GitHub Bot logged work on HIVE-26061: - Author: ASF GitHub Bot Created on: 25/Mar/22 13:41 Start Date: 25/Mar/22 13:41 Worklog Time Spent: 10m Work Description: pvary commented on a change in pull request #3129: URL: https://github.com/apache/hive/pull/3129#discussion_r835280974 ## File path: itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcWithMiniLlapVectorArrowBatch.java ## @@ -320,7 +320,7 @@ // test with legacy avro files // similar to ql/src/test/queries/clientpositive/avro_legacy_mixed_timestamp.q - @Test public void testAvroLegacyMixedTimestamps() throws Exception { + @Test(timeout = 1200) public void testAvroLegacyMixedTimestamps() throws Exception { Review comment: Reverted the change -- 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: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 747793) Time Spent: 50m (was: 40m) > Do not add 'from deserializer' comment upon alter commands for Iceberg tables > - > > Key: HIVE-26061 > URL: https://issues.apache.org/jira/browse/HIVE-26061 > Project: Hive > Issue Type: Bug >Reporter: Peter Vary >Assignee: Peter Vary >Priority: Major > Labels: pull-request-available > Time Spent: 50m > Remaining Estimate: 0h > > Currently an ALTER TABLE command for Iceberg tables adds the 'from > deserializer' comment to all columns which do not already have a comment. > This becomes annoying when issueing REPLACE COLUMNS operations, where you > have to write out all these superflous comments. -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Work logged] (HIVE-26061) Do not add 'from deserializer' comment upon alter commands for Iceberg tables
[ https://issues.apache.org/jira/browse/HIVE-26061?focusedWorklogId=747783=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-747783 ] ASF GitHub Bot logged work on HIVE-26061: - Author: ASF GitHub Bot Created on: 25/Mar/22 13:20 Start Date: 25/Mar/22 13:20 Worklog Time Spent: 10m Work Description: marton-bod commented on a change in pull request #3129: URL: https://github.com/apache/hive/pull/3129#discussion_r835262573 ## File path: ql/src/java/org/apache/hadoop/hive/ql/metadata/HiveUtils.java ## @@ -304,6 +304,10 @@ public static HiveStorageHandler getStorageHandler( } } + public static String getDefaultComment(HiveStorageHandler storageHandler) { +return storageHandler != null ? storageHandler.getDefaultColumnComment() : HiveStorageHandler.FROM_SERIALIZER; Review comment: Doesn't this add "from deserializer" to native tables (where storage handler is null)? I thought this default comment thing was only related to non-native tables -- 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: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 747783) Time Spent: 40m (was: 0.5h) > Do not add 'from deserializer' comment upon alter commands for Iceberg tables > - > > Key: HIVE-26061 > URL: https://issues.apache.org/jira/browse/HIVE-26061 > Project: Hive > Issue Type: Bug >Reporter: Peter Vary >Assignee: Peter Vary >Priority: Major > Labels: pull-request-available > Time Spent: 40m > Remaining Estimate: 0h > > Currently an ALTER TABLE command for Iceberg tables adds the 'from > deserializer' comment to all columns which do not already have a comment. > This becomes annoying when issueing REPLACE COLUMNS operations, where you > have to write out all these superflous comments. -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Work logged] (HIVE-26061) Do not add 'from deserializer' comment upon alter commands for Iceberg tables
[ https://issues.apache.org/jira/browse/HIVE-26061?focusedWorklogId=747778=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-747778 ] ASF GitHub Bot logged work on HIVE-26061: - Author: ASF GitHub Bot Created on: 25/Mar/22 13:09 Start Date: 25/Mar/22 13:09 Worklog Time Spent: 10m Work Description: marton-bod commented on a change in pull request #3129: URL: https://github.com/apache/hive/pull/3129#discussion_r835254267 ## File path: iceberg/iceberg-handler/src/test/java/org/apache/iceberg/mr/hive/TestHiveIcebergStorageHandlerNoScan.java ## @@ -1172,8 +1179,11 @@ public void testAlterTableReplaceColumns() throws TException, InterruptedExcepti ); testTables.createTable(shell, identifier.name(), schema, SPEC, FileFormat.PARQUET, ImmutableList.of()); +// Run some alter commands so the Review comment: nit: unfinished sentence -- 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: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 747778) Time Spent: 0.5h (was: 20m) > Do not add 'from deserializer' comment upon alter commands for Iceberg tables > - > > Key: HIVE-26061 > URL: https://issues.apache.org/jira/browse/HIVE-26061 > Project: Hive > Issue Type: Bug >Reporter: Peter Vary >Assignee: Peter Vary >Priority: Major > Labels: pull-request-available > Time Spent: 0.5h > Remaining Estimate: 0h > > Currently an ALTER TABLE command for Iceberg tables adds the 'from > deserializer' comment to all columns which do not already have a comment. > This becomes annoying when issueing REPLACE COLUMNS operations, where you > have to write out all these superflous comments. -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Work logged] (HIVE-26061) Do not add 'from deserializer' comment upon alter commands for Iceberg tables
[ https://issues.apache.org/jira/browse/HIVE-26061?focusedWorklogId=747776=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-747776 ] ASF GitHub Bot logged work on HIVE-26061: - Author: ASF GitHub Bot Created on: 25/Mar/22 13:08 Start Date: 25/Mar/22 13:08 Worklog Time Spent: 10m Work Description: marton-bod commented on a change in pull request #3129: URL: https://github.com/apache/hive/pull/3129#discussion_r835253494 ## File path: iceberg/iceberg-handler/src/test/java/org/apache/iceberg/mr/hive/TestHiveIcebergStorageHandlerNoScan.java ## @@ -809,8 +810,14 @@ public void testCreateTableWithColumnComments() { for (int i = 0; i < icebergTable.schema().columns().size(); i++) { Types.NestedField field = icebergTable.schema().columns().get(i); Assert.assertArrayEquals(new Object[] {field.name(), HiveSchemaUtil.convert(field.type()).getTypeName(), - field.doc() != null ? field.doc() : "from deserializer"}, rows.get(i)); + field.doc() != null ? field.doc() : ""}, rows.get(i)); } + +// Check the columns directly +List cols = shell.metastore() +.run(client -> client.getTable(new GetTableRequest("default", "comment_table"))) Review comment: Shall we refactor`shell.metastore().getTable()` to use this implementation too, if this is superior? -- 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: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 747776) Time Spent: 20m (was: 10m) > Do not add 'from deserializer' comment upon alter commands for Iceberg tables > - > > Key: HIVE-26061 > URL: https://issues.apache.org/jira/browse/HIVE-26061 > Project: Hive > Issue Type: Bug >Reporter: Peter Vary >Assignee: Peter Vary >Priority: Major > Labels: pull-request-available > Time Spent: 20m > Remaining Estimate: 0h > > Currently an ALTER TABLE command for Iceberg tables adds the 'from > deserializer' comment to all columns which do not already have a comment. > This becomes annoying when issueing REPLACE COLUMNS operations, where you > have to write out all these superflous comments. -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Work logged] (HIVE-26061) Do not add 'from deserializer' comment upon alter commands for Iceberg tables
[ https://issues.apache.org/jira/browse/HIVE-26061?focusedWorklogId=746465=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-746465 ] ASF GitHub Bot logged work on HIVE-26061: - Author: ASF GitHub Bot Created on: 23/Mar/22 10:10 Start Date: 23/Mar/22 10:10 Worklog Time Spent: 10m Work Description: pvary opened a new pull request #3129: URL: https://github.com/apache/hive/pull/3129 ### What changes were proposed in this pull request? Add a new method for StorageHandler to decide if the default comment is needed for a table or not. ### Why are the changes needed? Iceberg table fields should match the Hive table fields exactly and the `from deserializer` is causing usability issues ### Does this PR introduce _any_ user-facing change? Iceberg table columns will not have this extra comment after the PR ### How was this patch tested? Unit tests -- 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: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 746465) Remaining Estimate: 0h Time Spent: 10m > Do not add 'from deserializer' comment upon alter commands for Iceberg tables > - > > Key: HIVE-26061 > URL: https://issues.apache.org/jira/browse/HIVE-26061 > Project: Hive > Issue Type: Bug >Reporter: Peter Vary >Assignee: Peter Vary >Priority: Major > Time Spent: 10m > Remaining Estimate: 0h > > Currently an ALTER TABLE command for Iceberg tables adds the 'from > deserializer' comment to all columns which do not already have a comment. > This becomes annoying when issueing REPLACE COLUMNS operations, where you > have to write out all these superflous comments. -- This message was sent by Atlassian Jira (v8.20.1#820001)