Skip to content

Commit a74d62a

Browse files
committed
Fix comment
1 parent 13dbfef commit a74d62a

File tree

1 file changed

+5
-5
lines changed
  • sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver

1 file changed

+5
-5
lines changed

sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/RowSetUtils.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,11 +142,11 @@ object RowSetUtils {
142142
val value = if (row.isNullAt(ordinal)) {
143143
""
144144
} else {
145-
// Geospatial types implement nested quoting in `toHiveString` (wrapping EWKT in double
146-
// quotes when nested = true), intended for values inside containers like arrays, maps,
147-
// or structs. However, in this Thrift Server code path, `nested` is always set to true
148-
// because values are serialized into Hive string columns. We override to false here for
149-
// singular geospatial types to avoid spurious quotes around standalone EWKT values.
145+
// In this code path, `nested` was historically set to true for all types by default,
146+
// but ideally it should be false in general. This was never a problem because other
147+
// types that reach this branch do not use the `nested` flag in `toHiveString`. Now,
148+
// Geospatial types use it for wrapping EWKT in quotes when nested = true, so we need
149+
// to set `nested` here to false to avoid spurious quotes for standalone geo values.
150150
val nested = typ match {
151151
case _: GeometryType | _: GeographyType => false
152152
case _ => true

0 commit comments

Comments
 (0)