You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/03/25 12:15:35 UTC
[GitHub] [spark] MrDLontheway commented on a change in pull request #27993:
[SPARK-30996][Core] invaild parquet map key type
MrDLontheway commented on a change in pull request #27993: [SPARK-30996][Core] invaild parquet map key type
URL: https://github.com/apache/spark/pull/27993#discussion_r397808676
##########
File path: sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetFileFormatSuite.scala
##########
@@ -56,4 +55,22 @@ class ParquetFileFormatSuite extends QueryTest with ParquetTest with SharedSpark
}.getCause
assert(exception.getMessage().contains("Could not read footer for file"))
}
+
+ test("read parquet map invaild key type") {
+ withTempDir { dir =>
+ val spark_session = spark
+ import spark_session.implicits._
+ val df = Seq(Map(Map(1 -> 1) -> 1L)).toDF("map")
+ val exception = intercept[AnalysisException] {
+ df.write.mode("overwrite").parquet(dir.getPath)
+ }
+ assert(exception.getMessage().contains("Parquet data source does not support"))
Review comment:
o sorry , I seem to be wrong
This side will make it impossible to read. Let me review it again.
Seq(Seq(Map(Map(1 -> 1) -> StructValue(1L)))).toDF("long1")
root
|-- long1: array (nullable = true)
| |-- element: map (containsNull = true)
| | |-- key: map
| | | |-- key: integer
| | | |-- value: integer (valueContainsNull = false)
| | |-- value: struct (valueContainsNull = true)
| | | |-- l: long (nullable = false)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org