Copilot commented on code in PR #12981:
URL: https://github.com/apache/gluten/pull/12981#discussion_r3969923943
##########
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:
The assertion message dereferences `files.head`, which can mask the real
failure if `files` is unexpectedly empty (you’d get a secondary exception while
building the message). Consider making the message resilient (e.g., using
`headOption` or including file count/paths safely) so codec mismatches always
surface as the primary failure.
--
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]