@Internal public class RowPartitionComputer extends Object implements PartitionComputer<Row>
PartitionComputer
for Row
.Modifier and Type | Field and Description |
---|---|
protected String |
defaultPartValue |
protected String[] |
partitionColumns |
protected int[] |
partitionIndexes |
Constructor and Description |
---|
RowPartitionComputer(String defaultPartValue,
String[] columnNames,
String[] partitionColumns) |
Modifier and Type | Method and Description |
---|---|
LinkedHashMap<String,String> |
generatePartValues(Row in)
Compute partition values from record.
|
Row |
projectColumnsToWrite(Row in)
Project non-partition columns for output writer.
|
static Object |
restorePartValueFromType(String valStr,
DataType type) |
static Object |
restorePartValueFromType(String valStr,
LogicalType type)
Restore partition value from string and type.
|
protected final String defaultPartValue
protected final String[] partitionColumns
protected final int[] partitionIndexes
public LinkedHashMap<String,String> generatePartValues(Row in) throws Exception
PartitionComputer
generatePartValues
in interface PartitionComputer<Row>
in
- input record.Exception
public Row projectColumnsToWrite(Row in)
PartitionComputer
projectColumnsToWrite
in interface PartitionComputer<Row>
in
- input record.public static Object restorePartValueFromType(String valStr, DataType type)
public static Object restorePartValueFromType(String valStr, LogicalType type)
generatePartValues(org.apache.flink.types.Row)
.valStr
- string partition value.type
- type of partition field.Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.