ganeshashree commented on code in PR #57395:
URL: https://github.com/apache/spark/pull/57395#discussion_r3718244593
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/columnar/ArrowCachedBatchSerializer.scala:
##########
@@ -144,8 +144,12 @@ class ArrowCachedBatchSerializer extends
SimpleMetricsCachedBatchSerializer {
conf: SQLConf): RDD[ColumnarBatch] = {
val cacheSchema = DataTypeUtils.fromAttributes(cacheAttributes)
val selectedSchema = DataTypeUtils.fromAttributes(selectedAttributes)
+ // Use AttributeSeq's cached exprId -> ordinal map so each selected
attribute is a
+ // constant-time lookup, instead of rebuilding the exprId list and
linear-scanning it
+ // per selected attribute.
Review Comment:
Fixed. The hazard is now documented only once, in the helper
(`CachedColumnIndices.scala:34-36`):
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]