Skip to content

Commit

Permalink
[FLINK] Replace scala bounded reflection utils with the common ones
Browse files Browse the repository at this point in the history
  • Loading branch information
link3280 committed Dec 4, 2023
1 parent 2d8b9c1 commit 60e76cc
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import org.apache.flink.types.Row
import org.apache.kyuubi.Logging
import org.apache.kyuubi.engine.flink.shim.FlinkResultSet
import org.apache.kyuubi.operation.FetchIterator
import org.apache.kyuubi.util.reflect.ReflectUtils.getField
import org.apache.kyuubi.util.reflect.DynFields

class IncrementalResultFetchIterator(
resultFetcher: ResultFetcher,
Expand All @@ -59,7 +59,10 @@ class IncrementalResultFetchIterator(

val FETCH_INTERVAL_MS: Long = 1000

val isQueryResult: Boolean = getField(resultFetcher, "isQueryResult")
val isQueryResult: Boolean =
DynFields.builder
.hiddenImpl(classOf[ResultFetcher], "isQueryResult")
.build[Boolean](resultFetcher).get()

val effectiveMaxRows: Int = if (isQueryResult) maxRows else Int.MaxValue

Expand Down

0 comments on commit 60e76cc

Please sign in to comment.