[Bug] Get only one column using KyuubiStatement.executeAsync function
- 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
When we start a new session by connecting with kyuubi-hive-jdbc(org.apache.kyuubi:kyuubi-hive-jdbc:1.9.0), every first query by KyuubiStatement.executeAsync function will lead to only one column in the result.
As shown in the figure1, there are actually 4 columns in the table platform_dim.dim_app, but the first query only shows
one column called "Result". Try it again will get the correct feedback.

BTW, right now we avoid this problem superficially by configuring an initial sql(spark.kyuubi.engine.initialize.sql).
### Affects Version(s)
1.9.0
### Kyuubi Server Log Output
_No response_
### Kyuubi Engine Log Output
_No response_
### Kyuubi Server Configurations
_No response_
### Kyuubi Engine Configurations
_No response_
### Additional context
_No response_
### Are you willing to submit PR?
- [ ] Yes. I would be willing to submit a PR with guidance from the Kyuubi community to fix.
- [X] No. I cannot submit a PR at this time.
Contributor guide
Research direction
Start by tracing the KyuubiStatement.executeAsync entry point in the kyuubi-hive-jdbc implementation and reproduce the first-query behavior against version 1.9.0. Compare the first result with a repeated query and inspect the effect of spark.kyuubi.engine.initialize.sql. Done means the first asynchronous query returns all expected columns rather than only Result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala, spark, sql
- Domain
- api, backend, database
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100