CurtHagenlocher commented on code in PR #2165:
URL: https://github.com/apache/arrow-adbc/pull/2165#discussion_r1767208226
##########
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:
What would it mean if there were multiple child jobs that match these
criteria? Should that produce an error?
##########
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();
Review Comment:
This doesn't look like obvious logic. If there's specific documentation for
BigQuery which describes this behavior then it would be good to link to that
from the source code.
--
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]