nastra commented on issue #9597:
URL: https://github.com/apache/iceberg/issues/9597#issuecomment-1921539818

   I think we could make this similar to how it's done for a `MetricsReport`. 
We have a `ReportMetricsRequestParser` that reads a `report-type` field and 
then delegates to the respective parser for the particular type as can be seen 
[here](https://github.com/apache/iceberg/blob/49fb12e66e865c0b0e1dcabb68cd9ebf1e9989b1/core/src/main/java/org/apache/iceberg/rest/requests/ReportMetricsRequestParser.java#L54-L60).
   
   In this case we could have a `task-type` at the JSON level, which could be 
an enum in Java (similar to 
[ReportType](https://github.com/apache/iceberg/blob/49fb12e66e865c0b0e1dcabb68cd9ebf1e9989b1/core/src/main/java/org/apache/iceberg/rest/requests/ReportMetricsRequest.java#L32)).
 I'm not sure using FQCN is necessarily good, because classes can be moved 
around and their names could change.
   
   I haven't looked what challeges we'd have with serializing all subclasses of 
`FileScanTask`, but in terms of handling different task types the proposed 
approach could be used.


-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to