ulysses-you commented on code in PR #6789:
URL: https://github.com/apache/kyuubi/pull/6789#discussion_r1825328760
##########
externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/KyuubiSparkUtil.scala:
##########
@@ -48,7 +48,7 @@ object KyuubiSparkUtil extends Logging {
interruptOnCancel = true)
debug(s"Execute initialization sql: $sql")
try {
- spark.sql(sql).isEmpty
+ spark.sql(sql).take(1).isEmpty
Review Comment:
`spark.sql(sql).take(1)` has two issues:
- it will do an row conversion from `InternalRow` to `Row`
- it does not do column pruning
how about using the same way of the pr
https://github.com/apache/spark/pull/45373 to improve it ?
--
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]