Skip to content

Commit

Permalink
Bug fix: pass zoneId to Cast
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxGekk committed Sep 6, 2019
1 parent 775c7ec commit be787f4
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -492,7 +492,7 @@ object PartitioningUtils {
// We need to check that we can cast the raw string since we later can use Cast to get
// the partition values with the right DataType (see
// org.apache.spark.sql.execution.datasources.PartitioningAwareFileIndex.inferPartitioning)
val dateValue = Cast(Literal(raw), DateType).eval()
val dateValue = Cast(Literal(raw), DateType, Some(zoneId.getId)).eval()
// Disallow DateType if the cast returned null
require(dateValue != null)
Literal.create(dateValue, DateType)
Expand Down

0 comments on commit be787f4

Please sign in to comment.