This is an automated email from the ASF dual-hosted git repository.
dongjoon pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new 76d9a7b43465 [SPARK-53717][SQL] Revise `MapType.valueContainsNull`
parameter comment more correctly
76d9a7b43465 is described below
commit 76d9a7b43465246b16679a903b11b9856710520e
Author: Yihong He <[email protected]>
AuthorDate: Thu Sep 25 09:26:28 2025 -0700
[SPARK-53717][SQL] Revise `MapType.valueContainsNull` parameter comment
more correctly
### What changes were proposed in this pull request?
This PR improves the accuracy of the documentation comment for the
`valueContainsNull` parameter in the `MapType` class.
### Why are the changes needed?
The previous documentation was imprecise and potentially misleading. The
`valueContainsNull` parameter is a boolean flag that indicates whether the
map's value type *allows* null values, not whether the map currently *contains*
null values. This is similar to how `ArrayType.containsNull` works - it's a
schema-level constraint, not a runtime state indicator.
The improved wording "can have" more accurately describes the semantic
meaning of this parameter, making the API documentation clearer for developers
using Spark's type system.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Existing tests
### Was this patch authored or co-authored using generative AI tooling?
Generated-by: Cursor 1.6.45
Closes #52455 from heyihong/SPARK-53717.
Authored-by: Yihong He <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
---
sql/api/src/main/scala/org/apache/spark/sql/types/MapType.scala | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sql/api/src/main/scala/org/apache/spark/sql/types/MapType.scala
b/sql/api/src/main/scala/org/apache/spark/sql/types/MapType.scala
index de656c13ca4b..db3d7701552e 100644
--- a/sql/api/src/main/scala/org/apache/spark/sql/types/MapType.scala
+++ b/sql/api/src/main/scala/org/apache/spark/sql/types/MapType.scala
@@ -33,7 +33,7 @@ import org.apache.spark.sql.catalyst.util.StringConcat
* @param valueType
* The data type of map values.
* @param valueContainsNull
- * Indicates if map values have `null` values.
+ * Indicates if map values can have `null` values.
*/
@Stable
case class MapType(keyType: DataType, valueType: DataType, valueContainsNull:
Boolean)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]