diff --git a/src/databricks/sql/thrift_backend.py b/src/databricks/sql/thrift_backend.py index e433e878..281d0468 100644 --- a/src/databricks/sql/thrift_backend.py +++ b/src/databricks/sql/thrift_backend.py @@ -1046,8 +1046,8 @@ def fetch_results( resp = self.make_request(self._client.FetchResults, req) if resp.results.startRowOffset > expected_row_start_offset: - raise ValueError( - "Expected results to start from {} but they instead start at {}".format( + raise DataError( + "fetch_results failed due to inconsistency in the state between the client and the server. Expected results to start from {} but they instead start at {}, some result batch must have been skipped".format( expected_row_start_offset, resp.results.startRowOffset ) )