[ 
https://issues.apache.org/jira/browse/HIVE-25065?focusedWorklogId=590357&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-590357
 ]

ASF GitHub Bot logged work on HIVE-25065:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 28/Apr/21 12:48
            Start Date: 28/Apr/21 12:48
    Worklog Time Spent: 10m 
      Work Description: marton-bod commented on a change in pull request #2230:
URL: https://github.com/apache/hive/pull/2230#discussion_r622145076



##########
File path: 
iceberg/iceberg-handler/src/test/java/org/apache/iceberg/mr/hive/TestHiveIcebergStorageHandlerNoScan.java
##########
@@ -535,6 +538,38 @@ public void testCreateTableWithoutColumnComments() {
     }
   }
 
+  @Test
+  public void testAlterTableProperties() {
+    TableIdentifier identifier = TableIdentifier.of("default", "customers");
+    shell.executeStatement("CREATE EXTERNAL TABLE customers (" +
+        "t_int INT,  " +
+        "t_string STRING) " +
+        "STORED BY 'org.apache.iceberg.mr.hive.HiveIcebergStorageHandler' " +
+        testTables.locationForCreateTableSQL(identifier) +
+        testTables.propertiesForCreateTableSQL(ImmutableMap.of()));
+    String propKey = "dummy";
+    String propValue = "dummy_val";
+    shell.executeStatement(String.format("ALTER TABLE customers SET 
TBLPROPERTIES('%s'='%s')", propKey, propValue));
+    // Check the Iceberg table parameters
+    Table icebergTable = testTables.loadTable(identifier);
+    Assert.assertTrue(icebergTable.properties().containsKey(propKey));
+    Assert.assertEquals(icebergTable.properties().get(propKey), propValue);
+    propValue = "new_dummy_val";
+    shell.executeStatement(String.format("ALTER TABLE customers SET 
TBLPROPERTIES('%s'='%s')", propKey, propValue));

Review comment:
       nit: for readability, would it make sense to separate the 3 sections 
with a comment, e.g.
   `// adding a new property`, 
   `// changing the value of an existing property`, 
   `// removing/unsetting an existing prop` ..., etc.




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

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


Issue Time Tracking
-------------------

    Worklog Id:     (was: 590357)
    Time Spent: 1h  (was: 50m)

> Implement ALTER TABLE for setting iceberg table properties
> ----------------------------------------------------------
>
>                 Key: HIVE-25065
>                 URL: https://issues.apache.org/jira/browse/HIVE-25065
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: László Pintér
>            Assignee: László Pintér
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> Currently, only the Iceberg -> HMS table property synchronization is 
> implemented.
> We would like to make sure that {{ALTER TABLE SET TBLPROPERTIES()}} will 
> update the Iceberg table properties as well.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to