Skip to content

Commit

Permalink
[CARMEL-3812] Support multiple bucket columns in Delta (delta-io#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
LantaoJin authored and GitHub Enterprise committed Oct 12, 2020
1 parent aa28ec0 commit 18be790
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,11 @@ class DeltaCatalog(val spark: SparkSession) extends DelegatingCatalogExtension
case IdentityTransform(FieldReference(Seq(col))) =>
identityCols += col

case BucketTransform(numBuckets, FieldReference(Seq(col))) =>
bucketSpec = Some(BucketSpec(numBuckets, col :: Nil, Nil))
case BucketTransform(numBuckets, fieldReferences) =>
val bucketColumns = fieldReferences.collect {
case FieldReference(parts) => parts.mkString(".")
}
bucketSpec = Some(BucketSpec(numBuckets, bucketColumns, Nil))

case transform =>
throw DeltaErrors.operationNotSupportedException(s"Partitioning by expressions")
Expand Down

0 comments on commit 18be790

Please sign in to comment.