Description
Repeat calling FetchResults(... orientation=FetchOrientation.FETCH_FIRST ..) of spark sql thrift service will return empty set after calling ExecuteStatement of TCLIService.
The bug exist in function public RowSet getNextRowSet(FetchOrientation orientation, long maxRows)
https://github.com/apache/spark/blob/02c8072eea72425e89256347e1f373a3e76e6eba/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/operation/SQLOperation.java#L332
The iterator for geting result can be used for only once, so repeat calling FetchResults with FETCH_FIRST parameter will return empty result.
FetchOrientation.FETCH_FIRST
Attachments
Issue Links
- is related to
-
SPARK-18857 SparkSQL ThriftServer hangs while extracting huge data volumes in incremental collect mode
- Resolved
- links to