kyuubi/python/pyhive
Frank Bertsch b49ed02f16
[KYUUBI #7106] Make response.results.columns optional
### Why are the changes needed?
Bugfix. Spark 3.5 is returning `None` for `response.results.columns`, while Spark 3.3 returned actual values.

The response here: https://github.com/apache/kyuubi/blob/master/python/pyhive/hive.py#L507

For a query that does nothing (mine was an `add jar s3://a/b/c.jar`), here are the responses I received.

Spark 3.3:
```
TFetchResultsResp(status=TStatus(statusCode=0, infoMessages=None, sqlState=None, errorCode=None, errorMessage=None), hasMoreRows=False, results=TRowSet(startRowOffset=0, rows=[], columns=[TColumn(boolVal=None, byteVal=None, i16Val=None, i32Val=None, i64Val=None, doubleVal=None, stringVal=TStringColumn(values=[], nulls=b'\x00'), binaryVal=None)], binaryColumns=None, columnCount=None))
```

Spark 3.5:
```
TFetchResultsResp(status=TStatus(statusCode=0, infoMessages=None, sqlState=None, errorCode=None, errorMessage=None), hasMoreRows=False, results=TRowSet(startRowOffset=0, rows=[], columns=None, binaryColumns=None, columnCount=None))
```

### How was this patch tested?
I tested by applying it locally and running my query against Spark 3.5. I was not able to get any unit tests running, sorry!

### Was this patch authored or co-authored using generative AI tooling?
No.

Closes #7107 from fbertsch/spark_3_5_fix.

Closes #7106

13d1440a8 [Frank Bertsch] Make response.results.columns optional

Authored-by: Frank Bertsch <fbertsch@netflix.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
2025-06-23 23:28:18 +08:00
..
tests [KYUUBI #6908] Connection class ssl context object paramater 2025-02-25 22:22:14 +08:00
__init__.py
common.py
exc.py
hive.py [KYUUBI #7106] Make response.results.columns optional 2025-06-23 23:28:18 +08:00
presto.py
sasl_compat.py
sqlalchemy_hive.py [KYUUBI #6905] PyHive HTTP/HTTPS dialect to use the database name from url 2025-02-14 10:30:32 +08:00
sqlalchemy_presto.py [KYUUBI #6485] Fix the Presto TABLE NOT FOUND error message that failed to match 2024-08-12 08:38:09 +00:00
sqlalchemy_trino.py
trino.py