pabloem commented on issue #11206: [BEAM-9598] Ensuring _CustomBigQuerySource 
ValueProvider is only checked when strictly needed
URL: https://github.com/apache/beam/pull/11206#issuecomment-603550412
 
 
   r: @TheNeuralBit 
   The problem here was that `check_accessible`[1] was checking that the 
ValueProvider of `self.query` for the _CustomBigQuerySource was accessible.
   
   `query` is not always accessible in this case because the 
_CustomBigQuerySource can read from queries, or directly from tables. Note how 
`estimate_size`[2] has two paths - one for query, and one for table. The tests 
were failing because `query` was `None`.
   
   The check_accessible annotations remain in functions that depend directly on 
query.[3]
   
   [1] 
https://github.com/apache/beam/blob/b91560cc354da471e3de502aad78dd059997a3d0/sdks/python/apache_beam/options/value_provider.py#L125-L139
   [2] 
https://github.com/apache/beam/blob/master/sdks/python/apache_beam/io/gcp/bigquery.py#L642-L660
   [3] 
https://github.com/apache/beam/blob/master/sdks/python/apache_beam/io/gcp/bigquery.py#L699-L716

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to