xintongsong commented on PR #63:
URL: https://github.com/apache/flink-agents/pull/63#issuecomment-3086445736

   It seems we are always trying the pydantic serialization first, and fallback 
to json serialization with custom serializer if the first try fail.
   
   This approach leads to a few issues.
   - Inefficiency, for trying to serialize the object twice.
   - Potential inconsistency. Adding one row-type filed in the nested object 
will entirely change the serializer.
   
   I think the most elegant approach might be making the pyflink `Row` a 
pydantic base model and override `model_dump_json()` for it. However, even we 
make the change in Flink now, it will only be available to future Flink 
versions. Moreover, we'd better not to affect Flink for Flink Agents untill the 
latter is stabilized. Alternatively, we may consider modifying `Row` in Flink 
Agents with some monkey patches, as a temporal solution.
   
   WDYT? @Kavishankarks @wenjin272 


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to