Closed GoogleCodeExporter closed 8 years ago
Hi, you've stumbled into an oddity of the existing BigQuery SQL dialect. Try:
SELECT
doctor.dr_id AS doctor_dr_id,
FROM [rsdw.doctor] doctor
WHERE
doctor.is_published
AND doctor.specialties.specialty = 'Plastic Surgeon'
LIMIT 500
The sub-select `(SELECT * FROM rsdw.doctor)` is evaluated in a way that makes
the other repeated fields visible at top-scope, even if not included in the
query results. You can either remove the SELECT * sub-select as in my example,
or explicitly sub-select the fields you desire from the underlying table.
Also note that we're working on an improved SQL dialect that will better handle
"pushing down" the outer-selected fields into the inner sub-select, see issue
448. I'll close this as "WontFix", but we'll improve the behavior soon.
Original comment by wes...@google.com
on 8 Apr 2016 at 3:42
Original issue reported on code.google.com by
a...@realself.com
on 8 Apr 2016 at 6:18