You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by fe...@apache.org on 2024/05/08 16:31:25 UTC
(kyuubi) branch master updated: [KYUUBI #6370] For saveToFile, checking idx to prevent IndexOutOfBoundsException
This is an automated email from the ASF dual-hosted git repository.
feiwang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kyuubi.git
The following commit(s) were added to refs/heads/master by this push:
new 12c5568c9 [KYUUBI #6370] For saveToFile, checking idx to prevent IndexOutOfBoundsException
12c5568c9 is described below
commit 12c5568c9b020b1212c9514f046c67fcb267467e
Author: Wang, Fei <fw...@ebay.com>
AuthorDate: Wed May 8 09:31:16 2024 -0700
[KYUUBI #6370] For saveToFile, checking idx to prevent IndexOutOfBoundsException
# :mag: Description
## Issue References ๐
This pull request fixes #6370
## Describe Your Solution ๐ง
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
## Types of changes :bookmark:
- [ ] Bugfix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
## Test Plan ๐งช
#### Behavior Without This Pull Request :coffin:
#### Behavior With This Pull Request :tada:
#### Related Unit Tests
---
# Checklist ๐
- [x] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html)
**Be nice. Be informative.**
Closes #6372 from turboFei/kyuubi_6370.
Closes #6370
d0c6a9236 [Wang, Fei] fix
Authored-by: Wang, Fei <fw...@ebay.com>
Signed-off-by: Wang, Fei <fw...@ebay.com>
---
.../org/apache/kyuubi/engine/spark/operation/FetchOrcStatement.scala | 1 +
1 file changed, 1 insertion(+)
diff --git a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/FetchOrcStatement.scala b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/FetchOrcStatement.scala
index 64a9855f9..09d68c0f6 100644
--- a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/FetchOrcStatement.scala
+++ b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/FetchOrcStatement.scala
@@ -79,6 +79,7 @@ class OrcFileIterator(fileList: ListBuffer[LocatedFileStatus]) extends Iterator[
var idx = 0
override def hasNext: Boolean = {
+ if (idx >= iters.size) return false
val hasNext = iters(idx).hasNext
if (!hasNext) {
iters(idx).close()