xuyang1706 commented on issue #9355: [FLINK-13577][ml] Add an util class to 
build result row and generate …
URL: https://github.com/apache/flink/pull/9355#issuecomment-551479826
 
 
   > Hi @xuyang1706 . After I read through #9413 I think I understood the 
intent a bit better.
   > I think the outputColHelper did 2 things in the same class which made it 
very hard to review. please correct me if I were wrong.
   > 
   > 1. It tries provide a simple API to enrich the computed column 
(predict/transform) results - by allowing users to make some of the input 
columns as "pass through"
   > 2. It tries to allow users to rename some of the columns in the output.
   >    As a side effect of achieving both 1&2, It also allow users to reorder 
the outputs.
   > 
   > I think it is better to split the intent into 2 different utility classes:
   > 
   > * `ColumnExtractHelper` which provides the reserve/passthrough 
functionality.
   >   
   >   * allows users to define `passthrough` (or `reserve` in your word)
   >   * allows users to define the output columns (e.g. the predict/transform 
result)
   > * `ColumnFormatHelper` which provides the renaming/reordering 
functionality.
   >   
   >   * takes the column extract helper output as a whole row input (including 
the passthrough ones and function output ones, but doesn't actually know which 
is which)
   >   * performs the renaming - this step is optional.
   > 
   > Please let me know if any use cases you had in mind was not covered by 
this split. thanks --Rong
   
   Thanks for your suggestion @walterddr . The purpose of this Helper is to 
merge input columns with output columns. Your first point exactly describes 
what it is doing, and it does no more. It is not the purpose of this Helper to 
allow users to rename or reorder columns. I have renamed some of the variables 
to make this code more clear and accessible. Thanks  --Xu

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to