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


##########
sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/RowSetUtils.scala:
##########
@@ -142,7 +142,16 @@ object RowSetUtils {
           val value = if (row.isNullAt(ordinal)) {
             ""
           } else {
-            toHiveString((row.get(ordinal), typ), nested = true, 
timeFormatters, binaryFormatter)
+            // Geospatial types implement nested quoting in `toHiveString` 
(wrapping EWKT in double
+            // quotes when nested = true), intended for values inside 
containers like arrays, maps,
+            // or structs. However, in this Thrift Server code path, `nested` 
is always set to true
+            // because values are serialized into Hive string columns. We 
override to false her for
+            // singular geospatial types to avoid spurious quotes around 
standalone EWKT values.

Review Comment:
   We don't need to flip it now, but let's update the comment to make it 
clearer. The `nested` should be false here, but it was not a problem before 
because other types do not care about the `nested` flag. The new geo types care.



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