wypoon commented on a change in pull request #31451:
URL: https://github.com/apache/spark/pull/31451#discussion_r605096457
##########
File path:
sql/catalyst/src/main/java/org/apache/spark/sql/connector/read/PartitionReader.java
##########
@@ -51,7 +51,8 @@
T get();
/**
- * Returns an array of custom task metrics. By default it returns empty
array.
+ * Returns an array of custom task metrics. By default it returns empty
array. Note that it is
+ * not recommended to put heavy logic in this method as it may affect
reading performance.
Review comment:
My interest is in the batch scan use case. It is true that, under the
hood, a particular DS v2 may well need to track some particular metric per row,
but there are definitely cases where a metric does not need to be updated per
row; in those cases, simply reporting the metric value at the end of the read
would be cheaper.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]