[Bug] An error 'The query did not generate a result set' is reported when Hive Engine executeQuery INSERT OVERWRITE DIRECTORY
- Dominant language
- Scala
- Stars
- 2.4k
- Forks
- 1k
- PR merge metrics
- No merged PRs in 30d
Description
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
### Search before asking
- [X] I have searched in the [issues](https://github.com/apache/kyuubi/issues?q=is%3Aissue) and found no similar issues.
### Describe the bug
Using the Java JDBC client to execute 'INSERT OVERWRITE DIRECTORY' on the Hive engine through executeQuery results in an error. However, it works when using the Spark engine.
Using stmt.execute to execute 'INSERT OVERWRITE DIRECTORY' returns false.
Regardless, from the results, this SQL is always executed successfully.
Exception in thread "main" org.apache.kyuubi.jdbc.hive.KyuubiSQLException: The query did not generate a result set!
at org.apache.kyuubi.jdbc.hive.KyuubiStatement.executeQuery(KyuubiStatement.java:462)
at com.zyb.sqlservice.localtest.TestKyuubiHive.main(TestKyuubiHive.java:26)
### Affects Version(s)
1.9.0
### Kyuubi Server Log Output
```logtalk
The error is the client
```
### Kyuubi Engine Log Output
```logtalk
None
```
### Kyuubi Server Configurations
```yaml
None
```
### Kyuubi Engine Configurations
```yaml
None
```
### Additional context
jdbc:hive2://10.106.32.24:10009/default?;kyuubi.engine.type=HIVE_SQL;
### Are you willing to submit PR?
- [ ] Yes. I would be willing to submit a PR with guidance from the Kyuubi community to fix.
- [ ] No. I cannot submit a PR at this time.
Contributor guide
Research direction
Start in KyuubiStatement.java around line 462, where executeQuery reports that no result set was generated, and compare this path with stmt.execute for INSERT OVERWRITE DIRECTORY. Done means the Hive engine statement executes successfully through executeQuery without the erroneous result-set exception, while preserving the existing successful behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, sql
- Domain
- database
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100