qifanzhang-ms commented on code in PR #2165:
URL: https://github.com/apache/arrow-adbc/pull/2165#discussion_r1767857011
##########
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:
In the joblist, child jobs are stored in reverse order.
--
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]