MaxGekk commented on code in PR #49773:
URL: https://github.com/apache/spark/pull/49773#discussion_r1947241109


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/UnsafeRowUtils.scala:
##########
@@ -74,23 +92,23 @@ object UnsafeRowUtils {
       case (field, index) if UnsafeRow.isFixedLength(field.dataType) && 
!row.isNullAt(index) =>
         field.dataType match {
           case BooleanType =>
-            if ((row.getLong(index) >> 1) != 0L) {
+            if (getPaddingBoolean(row, index) != 0L) {

Review Comment:
   I worry about creating functions in the loop 
`expectedSchema.fields.zipWithIndex.foreach {`. This might cause perf 
regression. How about to place `getPadding` and `getPaddingBoolean` in separate 
classes like `UnsafeRowBeUtils` and `UnsafeRowLeUtils`, and instantiate them 
out of the loop.



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

Reply via email to