LuciferYang commented on code in PR #12981:
URL: https://github.com/apache/gluten/pull/12981#discussion_r3969956188
##########
backends-velox/src/test/scala/org/apache/spark/sql/execution/VeloxParquetWriteForHiveSuite.scala:
##########
@@ -298,7 +295,11 @@ class VeloxParquetWriteForHiveSuite extends
GlutenQueryTest with SQLTestUtils wi
reader =>
val column =
reader.getFooter.getBlocks.get(0).getColumns.get(0)
// native writer and vanilla spark hive writer should be
consistent
- "zstd".equalsIgnoreCase(column.getCodec.toString)
+ assert(
+ "zstd".equalsIgnoreCase(column.getCodec.toString),
+ s"expected zstd but got ${column.getCodec} in
${files.head.getPath}, " +
+ s"nativeWriteEnabled=$enableNativeWrite"
+ )
Review Comment:
`files` cannot be empty at that point, so the message adds no new failure
path. Two guards precede it:
```scala
assert(files.nonEmpty) // :292
val in = HadoopInputFile.fromStatus(files.head, ...) // :293
```
`files.head` is already dereferenced on :293 to build the reader,
unconditionally, and :292 fails first if the array is empty. If `files` were
somehow empty, the failure would surface at :292 as `false was not true`, well
before the codec assertion is reached, and `headOption` in the message would
only change what an unreachable branch prints.
Leaving it as is. Worth noting the case is `ignore`d as of c2da3e8 anyway,
pending #12987.
--
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]