nsivabalan commented on pull request #4453:
URL: https://github.com/apache/hudi/pull/4453#issuecomment-1003816771


   I tried to fix the issue, but guess its involved. 
   ```
   diff --git 
a/hudi-sync/hudi-hive-sync/src/test/java/org/apache/hudi/hive/TestHiveSyncTool.java
 
b/hudi-sync/hudi-hive-sync/src/test/java/org/apache/hudi/hive/TestHiveSyncTool.java
   index eaca52170..63ef1ed77 100644
   --- 
a/hudi-sync/hudi-hive-sync/src/test/java/org/apache/hudi/hive/TestHiveSyncTool.java
   +++ 
b/hudi-sync/hudi-hive-sync/src/test/java/org/apache/hudi/hive/TestHiveSyncTool.java
   @@ -812,12 +812,15 @@ public class TestHiveSyncTool {
        
assertEquals(hiveClient.getTableSchema(HiveTestUtil.hiveSyncConfig.tableName).size(),
            hiveClient.getDataSchema().getColumns().size() + 1,
            "Hive Schema should match the table schema + partition field");
   -    assertEquals(1, 
hiveClient.scanTablePartitions(hiveSyncConfig.tableName).size(),
   +    List<Partition> partitions = 
hiveClient.scanTablePartitions(hiveSyncConfig.tableName);
   +    assertEquals(1, partitions.size(),
            "Table partitions should match the number of partitions we wrote");
        assertEquals(instantTime, 
hiveClient.getLastCommitTimeSynced(hiveSyncConfig.tableName).get(),
            "The last commit that was synced should be updated in the 
TBLPROPERTIES");
   +    String partitiontoDelete = 
partitions.get(0).getValues().get(0).replace("-","/");
   +
        // create a replace commit to delete current partitions
   -    HiveTestUtil.createReplaceCommit("101", "2021/12/28", 
WriteOperationType.DELETE_PARTITION);
   +    HiveTestUtil.createReplaceCommit("101", partitiontoDelete, 
WriteOperationType.DELETE_PARTITION);
    
        // sync drop partitins
        tool = new HiveSyncTool(hiveSyncConfig, HiveTestUtil.getHiveConf(), 
fileSystem);
   ```
   
   with this fix, hiveql succeeds, but hms and jdbc fails. 
   Can either of you take a look and put up a patch with the right fix.
   


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


Reply via email to