zhengruifeng commented on code in PR #50540: URL: https://github.com/apache/spark/pull/50540#discussion_r2034194525
########## sql/core/src/main/java/org/apache/spark/sql/execution/UnsafeKVExternalSorter.java: ########## @@ -133,7 +133,7 @@ public UnsafeKVExternalSorter( // pages in BytesToBytesMap to hold records during sorting. // The only new memory we are allocating is the pointer/prefix array. BytesToBytesMap.MapIterator iter = map.iterator(); - final int numKeyFields = keySchema.size(); + final int numKeyFields = keySchema.length(); Review Comment: `StructType` extends `Seq[StructField]`, so its `size()` just invokes `length()` -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org