HeartSaVioR edited a comment on issue #23891: [SPARK-26987][SQL] Add a new 
method to RowFactory: Row with schema
URL: https://github.com/apache/spark/pull/23891#issuecomment-467736168
 
 
   Please see pasted code in `How was the patch tested`, which is originally 
reported by other issue (Unable to find origin issue... I'll comment once I 
find it.). 
   We know end users can initialize GenericRowWithSchema directly, but 
RowFactory is annotated as stable API hence end users just think Row creation 
is encouraged to be done with RowFactory.
   
   Origin issue claimed runtime type of Row instance in filter function is 
different whether watermark is defined before filter function or not. If 
watermark is defined before filter function, filter function gets 
GenericRowWithSchema and getAs succeeds, otherwise filter function gets 
GenericRow and getAs fails. Letting end users be able to create 
GenericRowWithSchema in map function guarantees filter function can get 
GenericRowWithSchema consistently.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to