public class DataWriteContextImpl extends Object implements DataWriteContext
DataWriteContext interface. In addition to the data needed for the
interface, it also contains the partition values of the targeted partition. In case of
un-partitioned tables, the partition values will be empty.| Constructor and Description |
|---|
DataWriteContextImpl(String targetDirectory,
java.util.Map<String,Literal> partitionValues,
java.util.List<Column> statsColumns)
Creates a new instance of WriteContext.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<String,Literal> |
getPartitionValues()
Returns the partition values for the data to be written.
|
java.util.List<Column> |
getStatisticsColumns()
Returns the list of
Column that the connector can optionally collect statistics. |
String |
getTargetDirectory()
Returns the target directory where the data should be written.
|
public DataWriteContextImpl(String targetDirectory,
java.util.Map<String,Literal> partitionValues,
java.util.List<Column> statsColumns)
targetDirectory - fully qualified path of the target directorypartitionValues - partition values for the data to be written. If the table is
un-partitioned, this should be an empty map.statsColumns - Set of columns that need statistics for the data to be written. The column
can be a top-level column or a nested column. E.g. "a.b.c" is a nested column. "d" is a
top-level column.public String getTargetDirectory()
getTargetDirectory in interface DataWriteContextpublic java.util.Map<String,Literal> getPartitionValues()
public java.util.List<Column> getStatisticsColumns()
Column that the connector can optionally collect statistics. Each
Column is a reference to a top-level or nested column in the table.
Statistics collections can be skipped or collected for a partial list of the returned Columns. When stats are present in the written Delta log, they can be used to optimize query
performance.
getStatisticsColumns in interface DataWriteContext