@PublicEvolving
public interface DefinedFieldMapping
DefinedFieldMapping interface provides a mapping for the fields of the table schema
(TableSource.getTableSchema() to fields of the physical returned type
TableSource.getReturnType() of a TableSource.
If a TableSource does not implement the DefinedFieldMapping interface, the fields of
its TableSchema are mapped to the fields of its return type TypeInformation by name.
If the fields cannot or should not be implicitly mapped by name, an explicit mapping can be provided by implementing this interface.
If a mapping is provided, all fields must be explicitly mapped.
| 限定符和类型 | 方法和说明 |
|---|---|
Map<String,String> |
getFieldMapping()
Returns the mapping for the fields of the
TableSource's TableSchema to the fields of
its return type TypeInformation. |
@Nullable Map<String,String> getFieldMapping()
TableSource's TableSchema to the fields of
its return type TypeInformation.
The mapping is done based on field names, e.g., a mapping "name" -> "f1" maps the schema field
"name" to the field "f1" of the return type, for example in this case the second field of a
Tuple.
The returned mapping must map all fields (except proctime and rowtime fields) to the return
type. It can also provide a mapping for fields which are not in the TableSchema to make
fields in the physical TypeInformation accessible for a TimestampExtractor.
TableSchema fields to TypeInformation fields or
null if no mapping is necessary.Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.