Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-16563

Repeat calling Spark SQL thrift server fetchResults return empty for ExecuteStatement operation

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.6.2
    • Fix Version/s: 2.0.1, 2.1.0
    • Component/s: SQL
    • Labels:
      None

      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

            Activity

              People

              • Assignee:
                alicegugu Gu Huiqin Alice
                Reporter:
                alicegugu Gu Huiqin Alice
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: