dongjoon-hyun commented on a change in pull request #34199:
URL: https://github.com/apache/spark/pull/34199#discussion_r740755564
##########
File path:
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetSchemaSuite.scala
##########
@@ -114,7 +130,66 @@ abstract class ParquetSchemaTest extends ParquetTest with
SharedSparkSession {
sqlSchema,
parquetSchema,
binaryAsString,
- int96AsTimestamp)
+ int96AsTimestamp,
+ expectedParquetColumn = expectedParquetColumn)
+ }
+
+ protected def compareParquetColumn(actual: ParquetColumn, expected:
ParquetColumn): Unit = {
+ assert(actual.sparkType == expected.sparkType, "sparkType mismatch: " +
+ s"actual = ${actual.sparkType}, expected = ${expected.sparkType}")
+ assert(actual.descriptor === expected.descriptor, "column descriptor
mismatch: " +
+ s"actual = ${actual.descriptor}, expected = ${expected.descriptor})")
+ // Parquet ColumnDescriptor equals only compare path so we'll need to
compare other fields
Review comment:
Shall we codify `equals` and `path`? And, maybe `compares` instead of
`compare`?
```
- Parquet ColumnDescriptor equals only compare path so we'll need ...
- Since Parquet ColumnDescriptor `equals` only compares `path`, we need ...
```
--
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]