lamber-ken commented on issue #828: Synchronizing to hive partition is incorrect URL: https://github.com/apache/incubator-hudi/issues/828#issuecomment-568181869 > it's correct on hudi-0.5.0 > > ```java > private transient DateTimeFormatter dtfOut; > > public SlashEncodedDayPartitionValueExtractor() { > this.dtfOut = DateTimeFormat.forPattern("yyyy-MM-dd"); > } > > private DateTimeFormatter getDtfOut() { > if (dtfOut == null) { > dtfOut = DateTimeFormat.forPattern("yyyy-MM-dd"); > } > return dtfOut; > } > > @Override > public List<String> extractPartitionValuesInPath(String partitionPath) { > // partition path is expected to be in this format yyyy/mm/dd > String[] splits = partitionPath.split("/"); > if (splits.length != 3) { > 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]); > DateTime dateTime = new DateTime(year, mm, dd, 0, 0); > return Lists.newArrayList(getDtfOut().print(dateTime)); > } > ``` hi, I guess you didn't use this parameter `DataSourceWriteOptions.HIVE_ASSUME_DATE_PARTITION_OPT_KEY`.
---------------------------------------------------------------- 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: [email protected] With regards, Apache Git Services
