CurtHagenlocher commented on code in PR #2695:
URL: https://github.com/apache/arrow-adbc/pull/2695#discussion_r2052811127
##########
csharp/src/Drivers/Apache/Hive2/HiveServer2Statement.cs:
##########
@@ -406,7 +407,39 @@ private async Task<QueryResult>
GetColumnsAsync(CancellationToken cancellationTo
cancellationToken);
OperationHandle = resp.OperationHandle;
- return await GetQueryResult(resp.DirectResults, cancellationToken);
+ // Common variables declared upfront
+ TGetResultSetMetadataResp metadata;
+ Schema schema;
+ TRowSet rowSet;
+
+ // For GetColumns, we need to enhance the result with
BASE_TYPE_NAME
+ if (Connection.AreResultsAvailableDirectly() &&
resp.DirectResults?.ResultSet?.Results != null)
+ {
+ // Get data from direct results
+ metadata = resp.DirectResults.ResultSetMetadata;
+ schema =
Connection.SchemaParser.GetArrowSchema(metadata.Schema,
Connection.DataTypeConversion);
+ rowSet = resp.DirectResults.ResultSet.Results;
+ }
+ else
+ {
+ // Poll and fetch results
+ await
HiveServer2Connection.PollForResponseAsync(OperationHandle!, Connection.Client,
PollTimeMilliseconds, cancellationToken);
+
Review Comment:
There's whitespace on this line that the linter doesn't like.
--
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]