pan3793 opened a new pull request, #7715:
URL: https://github.com/apache/kyuubi/pull/7715
### Why are the changes needed?
`dev/kyuubi-tpcds` has never compiled under Scala 2.13. The snapshot publish
workflow
(`-Pflink-provided,spark-provided,hive-provided,scala-2.13,spark-4.2,tpcds`)
fails with:
```
DataGenerator.scala:609: value par is not a member of
Seq[org.apache.kyuubi.tpcds.TableGenerator]
TableGenerator.scala:62: type mismatch; found:
scala.collection.mutable.Buffer[String], required: Seq[Any]
Benchmark.scala:267: ... cannot be applied to (ArrayBuffer[ExperimentRun],
...)
Benchmarkable.scala:87: value getStackTraceString is not a member of
Throwable
```
plus `Query.scala:90` (`Unit` companion rejected by the 2.13 parser), which
was masked by the error limit.
The fixes preserve the original Scala 2.12 semantics:
- `parForeach` helper built on `Future.traverse` keeps table generation
concurrent (no new dependency on scala-parallel-collections)
- `.toSeq` conversions are identity on 2.12
- `getStackTrace.mkString("\n", "\n", "\n")` replicates 2.12's
`getStackTraceString` exactly, including the leading/trailing newline (verified
against 2.12 bytecode)
### How was this patch tested?
```
build/mvn -Pscala-2.13 -Pspark-4.2 -Ptpcds -Pspark-provided -pl
dev/kyuubi-tpcds compile
build/mvn -Ptpcds -Pspark-provided -pl dev/kyuubi-tpcds compile # Scala
2.12 + Spark 3.5
build/mvn -Ptpcds -Pspark-provided -pl dev/kyuubi-tpcds spotless:check
```
Both cross-builds now compile; spotless is clean. No runtime behavior change
was intended; the parallel-execution path was smoke-checked for API equivalence
only (the generator itself needs a cluster to run end-to-end).
### Was this patch assisted by generative AI tooling?
Assisted-by: GLM 5.3
--
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]