eric-wang-1990 commented on code in PR #3302: URL: https://github.com/apache/arrow-adbc/pull/3302#discussion_r2291774172
########## csharp/src/Drivers/Databricks/DatabricksConnection.cs: ########## @@ -294,6 +294,16 @@ private void ValidateProperties() /// </summary> internal bool EnableDirectResults => _enableDirectResults; + /// <inheritdoc/> + protected internal override bool TrySetGetDirectResults(IRequest request) Review Comment: Thanks for fixing ########## csharp/src/Drivers/Apache/Hive2/HiveServer2Statement.cs: ########## @@ -1006,5 +1028,72 @@ public bool TryGetDirectResults(IResponse response, out TSparkDirectResults? dir directResults = null; return false; } + + /// <inheritdoc/> + public override void Cancel() + { + this.TraceActivity(_ => + { + // This will cancel any operation using the current token source + CancelTokenSource(); + }); + } + + private async Task CancelOperationAsync(Activity? activity, TOperationHandle? operationHandle) + { + if (operationHandle == null) + { + return; + } + using CancellationTokenSource cancellationTokenSource = ApacheUtility.GetCancellationTokenSource(QueryTimeoutSeconds, ApacheUtility.TimeUnit.Seconds); Review Comment: Why do we need to create a new cancellationTokenSource here? Can we cancel a cancel request? Should we just pass a default/null to the await Client.CancelOperation(req, cancellationTokenSource.Token);? -- 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