You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by GitBox <gi...@apache.org> on 2022/02/17 11:44:15 UTC

[GitHub] [incubator-kyuubi] iodone commented on a change in pull request #1921: [KYUUBI #1920] Skip the Plan parsing of UseStatement

iodone commented on a change in pull request #1921:
URL: https://github.com/apache/incubator-kyuubi/pull/1921#discussion_r808961190



##########
File path: externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/PlanOnlyStatement.scala
##########
@@ -38,23 +38,25 @@ class PlanOnlyStatement(
   private val operationLog: OperationLog = OperationLog.createOperationLog(session, getHandle)
   override def getOperationLog: Option[OperationLog] = Option(operationLog)
 
-  override protected def resultSchema: StructType =
-    if (result == null) {
+  override protected def resultSchema: StructType = Option(result) match {

Review comment:
       Of course it is possible, here is just my personal scala programming preference, try to avoid dealing with `null`, and not to produce `null`. Is it sure that the wrapping of Option needs to be removed here?




-- 
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: commits-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org