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

ASF GitHub Bot logged work on GOBBLIN-1533:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 10/Sep/21 18:46
            Start Date: 10/Sep/21 18:46
    Worklog Time Spent: 10m 
      Work Description: vikrambohra commented on a change in pull request #3385:
URL: https://github.com/apache/gobblin/pull/3385#discussion_r706397688



##########
File path: 
gobblin-iceberg/src/main/java/org/apache/gobblin/iceberg/writer/IcebergMetadataWriter.java
##########
@@ -422,6 +465,21 @@ private void 
computeCandidateSchema(GobblinMetadataChangeEvent gmce, TableIdenti
     }
   }
 
+  /**
+   * Add a partition column to the schema and partition spec
+   * @param table incoming iceberg table
+   * @param fieldName name of partition column
+   * @param type datatype of partition column
+   * @return table with updated schema and partition spec
+   */
+  private Table addPartitionToIcebergTable(Table table, String fieldName, 
String type) {
+    if(!table.schema().columns().stream().anyMatch(x -> 
x.name().equalsIgnoreCase(fieldName))) {
+      table.updateSchema().addColumn(fieldName, 
Types.fromPrimitiveString(type)).commit();
+      table.updateSpec().addField(fieldName).commit();

Review comment:
       done




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


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

    Worklog Id:     (was: 649385)
    Time Spent: 7.5h  (was: 7h 20m)

> Add Completeness watermark to iceberg table
> -------------------------------------------
>
>                 Key: GOBBLIN-1533
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-1533
>             Project: Apache Gobblin
>          Issue Type: Improvement
>            Reporter: Vikram Bohra
>            Priority: Major
>          Time Spent: 7.5h
>  Remaining Estimate: 0h
>




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

Reply via email to