public class DeltaOptimizeBuilder
extends Object
implements org.apache.spark.sql.delta.util.AnalysisHelper
param: sparkSession SparkSession to use for execution param: tableIdentifier Id of the table on which to execute the optimize param: options Hadoop file system options for read and write.
Constructor and Description |
---|
DeltaOptimizeBuilder() |
Modifier and Type | Method and Description |
---|---|
org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> |
executeCompaction()
Compact the small files in selected partitions.
|
org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> |
executeZOrderBy(scala.collection.Seq<String> columns)
Z-Order the data in selected partitions using the given columns.
|
org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> |
executeZOrderBy(String... columns)
Z-Order the data in selected partitions using the given columns.
|
DeltaOptimizeBuilder |
where(String partitionFilter)
Apply partition filter on this optimize command builder to limit
the operation on selected partitions.
|
public org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> executeZOrderBy(String... columns)
columns
- Zero or more columns to order the data
using Z-Order curvespublic DeltaOptimizeBuilder where(String partitionFilter)
partitionFilter
- The partition filter to applyDeltaOptimizeBuilder
with partition filter appliedpublic org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> executeCompaction()
public org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> executeZOrderBy(scala.collection.Seq<String> columns)
columns
- Zero or more columns to order the data
using Z-Order curves