Skip to content

Commit

Permalink
address comment
Browse files Browse the repository at this point in the history
  • Loading branch information
cfmcgrady committed Apr 7, 2023
1 parent 8280783 commit 6d596fc
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ object KyuubiArrowConverters extends SQLConfHelper with Logging {
start: Int,
length: Int): Array[Byte] = {
val in = new ByteArrayInputStream(bytes)
val out = new ByteArrayOutputStream()
val out = new ByteArrayOutputStream(bytes.length)

try {
val recordBatch = MessageSerializer.deserializeRecordBatch(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,11 +210,12 @@ object SparkDatasetHelper extends Logging {
* earlier versions of Spark, this function uses reflective calls to the "offset".
*/
private def offset(collectLimitExec: CollectLimitExec): Int = {
val offset = DynMethods.builder("offset")
.impl(collectLimitExec.getClass)
.orNoop()
.build()
Option(offset.invoke[Int](collectLimitExec))
Option(
DynMethods.builder("offset")
.impl(collectLimitExec.getClass)
.orNoop()
.build()
.invoke[Int](collectLimitExec))
.getOrElse(0)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
package org.apache.kyuubi.engine.spark.operation

import java.sql.Statement
import java.util.{Set => JSet}

import org.apache.spark.KyuubiSparkContextHelper
import org.apache.spark.scheduler.{SparkListener, SparkListenerJobStart}
Expand Down Expand Up @@ -431,7 +432,7 @@ class SparkArrowbasedOperationSuite extends WithSparkSQLEngine with SparkDataTyp
private def isStaticConfigKey(key: String): Boolean = {
val staticConfKeys = DynFields.builder()
.hiddenImpl(SQLConf.getClass, "staticConfKeys")
.build[java.util.Set[String]](SQLConf)
.build[JSet[String]](SQLConf)
.get()
staticConfKeys.contains(key)
}
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -538,8 +538,8 @@
<artifactId>hadoop-client</artifactId>
</exclusion>
<!--
The module is only used in Kyuubi Spark Extensions, so we don't care about which
version of Log4j it depends on.
The module is only used in Kyuubi Spark Extensions and Engine Spark SQL, so we
don't care about which version of Log4j it depends on.
-->
</exclusions>
</dependency>
Expand Down

0 comments on commit 6d596fc

Please sign in to comment.