wecharyu commented on code in PR #9484: URL: https://github.com/apache/hudi/pull/9484#discussion_r1300861013
########## hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/HoodieBaseRelation.scala: ########## @@ -483,24 +483,20 @@ abstract class HoodieBaseRelation(val sqlContext: SQLContext, protected def getPartitionColumnsAsInternalRowInternal(file: FileStatus, basePath: Path, extractPartitionValuesFromPartitionPath: Boolean): InternalRow = { try { - val tableConfig = metaClient.getTableConfig if (extractPartitionValuesFromPartitionPath) { val tablePathWithoutScheme = CachingPath.getPathWithoutSchemeAndAuthority(basePath) val partitionPathWithoutScheme = CachingPath.getPathWithoutSchemeAndAuthority(file.getPath.getParent) val relativePath = new URI(tablePathWithoutScheme.toString).relativize(new URI(partitionPathWithoutScheme.toString)).toString - val hiveStylePartitioningEnabled = tableConfig.getHiveStylePartitioningEnable.toBoolean - if (hiveStylePartitioningEnabled) { - val partitionSpec = PartitioningUtils.parsePathFragment(relativePath) - InternalRow.fromSeq(partitionColumns.map(partitionSpec(_)).map(UTF8String.fromString)) - } else { - if (partitionColumns.length == 1) { - InternalRow.fromSeq(Seq(UTF8String.fromString(relativePath))) - } else { - val parts = relativePath.split("/") - assert(parts.size == partitionColumns.length) - InternalRow.fromSeq(parts.map(UTF8String.fromString)) - } - } + val timeZoneId = conf.get("timeZone", sparkSession.sessionState.conf.sessionLocalTimeZone) + val rowValues = HoodieSparkUtils.parsePartitionColumnValues( Review Comment: Addressed! -- 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: commits-unsubscr...@hudi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org