CurtHagenlocher commented on code in PR #3256:
URL: https://github.com/apache/arrow-adbc/pull/3256#discussion_r2271004959


##########
csharp/src/Drivers/Databricks/DatabricksStatement.cs:
##########
@@ -120,22 +120,14 @@ protected override void 
SetStatementProperties(TExecuteStatementReq statement)
             statement.MaxBytesPerFile = maxBytesPerFile;
             statement.RunAsync = runAsyncInThrift;
 
-            if (Connection.AreResultsAvailableDirectly)
-            {
-                statement.GetDirectResults = 
DatabricksConnection.defaultGetDirectResults;
-            }
+            Connection.TrySetGetDirectResults(statement);
         }
 
         /// <summary>
         /// Checks if direct results are available.
         /// </summary>
         /// <returns>True if direct results are available and contain result 
data, false otherwise.</returns>
-        public bool HasDirectResults => DirectResults?.ResultSet != null && 
DirectResults?.ResultSetMetadata != null;
-
-        public TSparkDirectResults? DirectResults
-        {
-            get { return _directResults; }
-        }
+        public bool HasDirectResults => Response!.DirectResults?.ResultSet != 
null && Response!.DirectResults?.ResultSetMetadata != null;

Review Comment:
   > @CurtHagenlocher I refactored such that the Statement is no longer 
responsible for managing the (latest) response/operation. It is now the 
responsibility of the Stream to close the operation and manage its lifetime.
   
   This is great! If we ever want to change the connection to support multiple 
concurrent statements, this will have done most of the heavy lifting.



-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to