[HUDI-353] Add hive style partitioning path
This commit is contained in:
committed by
Balaji Varadarajan
parent
63e330b17c
commit
e555aa516d
@@ -54,9 +54,9 @@ public class SlashEncodedDayPartitionValueExtractor implements PartitionValueExt
|
||||
throw new IllegalArgumentException("Partition path " + partitionPath + " is not in the form yyyy/mm/dd ");
|
||||
}
|
||||
// Get the partition part and remove the / as well at the end
|
||||
int year = Integer.parseInt(splits[0]);
|
||||
int mm = Integer.parseInt(splits[1]);
|
||||
int dd = Integer.parseInt(splits[2]);
|
||||
int year = Integer.parseInt(splits[0].contains("=") ? splits[0].split("=")[1] : splits[0]);
|
||||
int mm = Integer.parseInt(splits[1].contains("=") ? splits[1].split("=")[1] : splits[1]);
|
||||
int dd = Integer.parseInt(splits[2].contains("=") ? splits[2].split("=")[1] : splits[2]);
|
||||
DateTime dateTime = new DateTime(year, mm, dd, 0, 0);
|
||||
return Lists.newArrayList(getDtfOut().print(dateTime));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user