CurtHagenlocher commented on code in PR #2165:
URL: https://github.com/apache/arrow-adbc/pull/2165#discussion_r1767829145
##########
csharp/src/Drivers/BigQuery/BigQueryStatement.cs:
##########
@@ -75,6 +76,24 @@ public override QueryResult ExecuteQuery()
readClientBuilder.Credential = this.credential;
BigQueryReadClient readClient = readClientBuilder.Build();
+ if (results.TableReference == null)
+ {
+ ListJobsOptions listJobsOptions = new ListJobsOptions();
+ listJobsOptions.ParentJobId = results.JobReference.JobId;
+ PagedEnumerable<JobList, BigQueryJob> joblist =
client.ListJobs(listJobsOptions);
+ BigQueryJob firstQueryJob = new BigQueryJob(client,
job.Resource);
+ foreach (BigQueryJob childJob in joblist)
+ {
+ var tempJob = client.GetJob(childJob.Reference.JobId);
+ var query = tempJob.Resource?.Configuration?.Query;
+ if (query != null && query.DestinationTable != null &&
query.DestinationTable.ProjectId != null && query.DestinationTable.DatasetId !=
null && query.DestinationTable.TableId != null)
Review Comment:
Won't the current implementation return the last child job instead of the
first one? Do we need a `break;` after the assignment to `firstQueryJob`?
--
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]