public class ColumnMapping
extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
COLUMN_MAPPING_ID_KEY |
static String |
COLUMN_MAPPING_MODE_ID |
static String |
COLUMN_MAPPING_MODE_KEY |
static String |
COLUMN_MAPPING_MODE_NAME |
static String |
COLUMN_MAPPING_MODE_NONE |
static String |
COLUMN_MAPPING_PHYSICAL_NAME_KEY |
static String |
PARQUET_FIELD_ID_KEY |
| Modifier and Type | Method and Description |
|---|---|
static StructType |
convertToPhysicalSchema(StructType logicalSchema,
StructType physicalSchema,
String columnMappingMode)
Helper method that converts the logical schema (requested by the connector) to physical
schema of the data stored in data files based on the table's column mapping mode.
|
static String |
getColumnMappingMode(java.util.Map<String,String> configuration)
Returns the column mapping mode from the given configuration.
|
static String |
getPhysicalName(StructField field)
Returns the physical name for a given
StructField |
static void |
throwOnUnsupportedColumnMappingMode(Metadata metadata)
Checks if the given column mapping mode in the given table metadata is supported.
|
public static final String COLUMN_MAPPING_MODE_KEY
public static final String COLUMN_MAPPING_MODE_NONE
public static final String COLUMN_MAPPING_MODE_NAME
public static final String COLUMN_MAPPING_MODE_ID
public static final String COLUMN_MAPPING_PHYSICAL_NAME_KEY
public static final String COLUMN_MAPPING_ID_KEY
public static final String PARQUET_FIELD_ID_KEY
public static String getColumnMappingMode(java.util.Map<String,String> configuration)
configuration - Configurationpublic static void throwOnUnsupportedColumnMappingMode(Metadata metadata)
metadata - Metadata of the tablepublic static StructType convertToPhysicalSchema(StructType logicalSchema, StructType physicalSchema, String columnMappingMode)
logicalSchema - Logical schema of the scanphysicalSchema - Physical schema of the scancolumnMappingMode - Column mapping modepublic static String getPhysicalName(StructField field)
StructField