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

jackylau commented on FLINK-16993:
----------------------------------

Hi [~twalthr], i read the flip-95 and find this statement "The converter might 
be code generated and works on `RowData`" in your docs.

Could you give me any more details about it. *And i try and don't know how to* 

RowData convert(RowData producedRow).

 
{code:java}
// this it my code block, But some details are not clear

((SupportsComputedColumnPushDown) newTableSource).applyComputedColumn(new 
SupportsComputedColumnPushDown.ComputedColumnConverter() {
   @Override
   public RowData convert(RowData producedRow) {
      BinaryRowData newRowData = null;
      if (producedRow instanceof BinaryRowData) {
         newRowData = new BinaryRowData(producedRow.getArity() + 
convertedExpressions.size());
         for (int i = 0; i < convertedExpressions.size(); i++) {
            DataType dataType = convertedExpressions.get(i).getOutputDataType();
            //according the datatype , call this set**(pos, value)
         }
      } else if (producedRow instanceof GenericRowData ) {
         //TODO
      } else if (producedRow instanceof BoxedWrapperRowData) {
         //TODO
      }
      return newRowData;
   }

   @Override
   public void open(Context context) {

   }
}, 
TypeConversions.fromLogicalToDataType(FlinkTypeFactory.toLogicalType(project.getRowType())));
{code}

> Support SupportsComputedColumnPushDown in planner
> -------------------------------------------------
>
>                 Key: FLINK-16993
>                 URL: https://issues.apache.org/jira/browse/FLINK-16993
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Table SQL / Planner
>            Reporter: Timo Walther
>            Priority: Major
>
> Support the {{SupportsComputedColumnPushDown}} interface for 
> {{ScanTableSource}}.



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

Reply via email to