[ 
https://issues.apache.org/jira/browse/FLINK-15677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17028938#comment-17028938
 ] 

hailong wang commented on FLINK-15677:
--------------------------------------

Thanks [~lzljs3620320]. Sorry for the late reply. I found we can use 

DataTypeUtils.expandCompositeTypeToSchema to extract physical Schema, and 
getFieldNames from it, just like:
{code:java}
TableSchema physicalSchema = 
DataTypeUtils.expandCompositeTypeToSchema(getProducedDataType());
return TableConnectorUtils.generateRuntimeName(getClass(), 
physicalSchema.getFieldNames());
{code}
what do you think of it?

As for the test, there is already test for 
DataTypeUtils.expandCompositeTypeToSchema method, so we can not add a test.

 

> TableSource#explainSource should return the field names from 
> getProducedDataType instead of getTableSchema
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-15677
>                 URL: https://issues.apache.org/jira/browse/FLINK-15677
>             Project: Flink
>          Issue Type: Improvement
>          Components: Table SQL / Planner
>    Affects Versions: 1.10.0
>            Reporter: hailong wang
>            Priority: Major
>             Fix For: 1.11.0
>
>
> For the fields push down, the final fieldNames  of tablesource are not 
> consistent with FieldNames from TableSchema. So we should return the field 
> names from getProducedDataType instead of getTableSchema.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to