This is an automated email from the ASF dual-hosted git repository.
hongze pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-gluten.git
The following commit(s) were added to refs/heads/main by this push:
new 3b8ea67f4 [VL] CI: Gluten-it: Fix unreadable test reporting when there
are query failures (#5753)
3b8ea67f4 is described below
commit 3b8ea67f49d0b3afdbc327905a6cb0fefe23b56a
Author: Hongze Zhang <[email protected]>
AuthorDate: Wed May 15 13:56:51 2024 +0800
[VL] CI: Gluten-it: Fix unreadable test reporting when there are query
failures (#5753)
---
.../scala/org/apache/gluten/integration/tpc/action/Queries.scala | 2 +-
.../org/apache/gluten/integration/tpc/action/QueriesCompare.scala | 2 +-
.../org/apache/gluten/integration/tpc/action/TableFormatter.scala | 8 ++++++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git
a/tools/gluten-it/common/src/main/scala/org/apache/gluten/integration/tpc/action/Queries.scala
b/tools/gluten-it/common/src/main/scala/org/apache/gluten/integration/tpc/action/Queries.scala
index edeb960fc..290b8e3f5 100644
---
a/tools/gluten-it/common/src/main/scala/org/apache/gluten/integration/tpc/action/Queries.scala
+++
b/tools/gluten-it/common/src/main/scala/org/apache/gluten/integration/tpc/action/Queries.scala
@@ -80,7 +80,7 @@ case class Queries(
var all = Queries.aggregate(results, "all")
if (passedCount != count) {
- all = Queries.aggregate(succeed, "all succeed") ::: all
+ all = Queries.aggregate(succeed, "succeeded") ::: all
}
println("Overall: ")
diff --git
a/tools/gluten-it/common/src/main/scala/org/apache/gluten/integration/tpc/action/QueriesCompare.scala
b/tools/gluten-it/common/src/main/scala/org/apache/gluten/integration/tpc/action/QueriesCompare.scala
index cfb3e7dc5..404d75cb4 100644
---
a/tools/gluten-it/common/src/main/scala/org/apache/gluten/integration/tpc/action/QueriesCompare.scala
+++
b/tools/gluten-it/common/src/main/scala/org/apache/gluten/integration/tpc/action/QueriesCompare.scala
@@ -80,7 +80,7 @@ case class QueriesCompare(
var all = QueriesCompare.aggregate(results, "all")
if (passedCount != count) {
- all = QueriesCompare.aggregate(succeed, "all succeed") ::: all
+ all = QueriesCompare.aggregate(succeed, "succeeded") ::: all
}
println("Overall: ")
diff --git
a/tools/gluten-it/common/src/main/scala/org/apache/gluten/integration/tpc/action/TableFormatter.scala
b/tools/gluten-it/common/src/main/scala/org/apache/gluten/integration/tpc/action/TableFormatter.scala
index cb6ab7ebd..8aeea9938 100644
---
a/tools/gluten-it/common/src/main/scala/org/apache/gluten/integration/tpc/action/TableFormatter.scala
+++
b/tools/gluten-it/common/src/main/scala/org/apache/gluten/integration/tpc/action/TableFormatter.scala
@@ -46,6 +46,12 @@ object TableFormatter {
}
override def print(s: OutputStream): Unit = {
+ val printer = new PrintStream(s)
+ if (rows.isEmpty) {
+ printer.println("(N/A)")
+ printer.flush()
+ return
+ }
val numFields = schema.fields.size
val widths = (0 until numFields)
.map { i =>
@@ -58,13 +64,11 @@ object TableFormatter {
pBuilder ++= s"%${w}s|"
}
val pattern = pBuilder.toString()
- val printer = new PrintStream(s)
printer.println(String.format(pattern, schema.fields: _*))
rows.foreach { r =>
printer.println(String.format(pattern, r: _*))
}
printer.flush()
- printer.close()
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]