Copilot commented on code in PR #7107:
URL: https://github.com/apache/kyuubi/pull/7107#discussion_r2155430651


##########
python/pyhive/hive.py:
##########
@@ -508,14 +508,17 @@ def _fetch_more(self):
         _check_status(response)
         schema = self.description
         assert not response.results.rows, 'expected data in columnar format'
-        columns = [_unwrap_column(col, col_schema[1]) for col, col_schema in
-                   zip(response.results.columns, schema)]
-        new_data = list(zip(*columns))
-        self._data += new_data
+        has_new_data = False
+        if response.results.columns:
+            columns = [_unwrap_column(col, col_schema[1]) for col, col_schema 
in
+                       zip(response.results.columns, schema)]
+            new_data = list(zip(*columns))
+            self._data += new_data
+            has_new_data = (True if new_data else False)

Review Comment:
   [nitpick] Consider simplifying the assignment by using 'bool(new_data)' 
instead of the ternary operator to improve readability and clarity.
   ```suggestion
               has_new_data = bool(new_data)
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to