Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions tools/workload/tpch/run_tpch/tpch_parquet.scala
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,16 @@ val sorted = fileLists.sortBy {

// Main program to run TPC-H testing
for (t <- sorted) {
val fileContents = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't change the function time, just close the file

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. I mean to print the final results for statistics without any middle results. Maybe the middle results is important for other situations.

val src = Source.fromFile(t)
try {
src.getLines().filter(!_.startsWith("--")).mkString(" ")
} finally {
src.close()
}
}
println(t)
val fileContents = Source.fromFile(t).getLines.filter(!_.startsWith("--")).mkString(" ")
println(fileContents)
time{spark.sql(fileContents).collectAsList()}
//spark.sql(fileContents).explain
Thread.sleep(2000)
}