cloud-fan commented on code in PR #60219:
URL: https://github.com/apache/spark/pull/60219#discussion_r4549318120


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/hash.scala:
##########
@@ -650,6 +657,7 @@ abstract class HashExpression[E] extends Expression {
     case _: DayTimeIntervalType => genHashLong(input, result)
     case _: YearMonthIntervalType => genHashInt(input, result)
     case BinaryType => genHashBytes(input, result)
+    case _: GeometryType | _: GeographyType => genHashBinaryView(input, result)

Review Comment:
   Thanks, with this check a GEOMETRY or GEOGRAPHY value can no longer be 
stored under a bucket id that disagrees with the bytes read back. I need to 
correct my earlier comment, though: I said no Spark release could write such 
tables, but released 4.2 and 4.3 do complete bucketed writes whose geo values 
are all NULL or that write no rows, so rejecting by column type makes those 
writes fail. This review raises that as a separate finding. Since resolving it 
may change how this check works, I'll confirm in the next review that the 
wrong-bucket problem stays closed.
   
   <!-- SPARK_DEV_REVIEW_REPLY 
{"feedback_id":"inline:4508964139","thread_id":"inline:4508964139","verdict_sha256":"df6ef6b78659003134ffc037f8c9f8f2efc56da91aaa21acbb88d695dd58b4d0"}
 -->



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

Reply via email to