unnest
isn't handled correctly
#283
Labels
api: bigquery
Issues related to the googleapis/python-bigquery-sqlalchemy API.
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Given a table,
foo
, with schema:[SchemaField('objects', 'RECORD', 'REPEATED', None, (SchemaField('object_id', 'STRING', 'NULLABLE', None, (), ()),), ())]
BigQuery needs this select to be spelled:
or
The
in the FROM is needed to establish an alias for interpreting
or for providing a default table for
But otherwise, there's no special requirement for the extra
from
.In particular, consider:
which needs no extra
from
because the expression given tounnest
doesn't reference a column.The fact that
unnest
takes an expression that may have 0 or more column references (from zero or more tables) makes the fix rather complicated.(The examples above don't show a dataset, because it's set as a default.)
The text was updated successfully, but these errors were encountered: