Skip to content

Commit a7646e6

Browse files
committed
generate_schema.py: add comment to explain the 'Q' types
1 parent 79c7ef2 commit a7646e6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

bigquery_schema_generator/generate_schema.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -798,6 +798,10 @@ def convert_type(atype, btype):
798798
* [Q]FLOAT + [Q]INTEGER => FLOAT (except QFLOAT + QINTEGER)
799799
* (DATE, TIME, TIMESTAMP, QBOOLEAN, QINTEGER, QFLOAT, STRING) +
800800
(DATE, TIME, TIMESTAMP, QBOOLEAN, QINTEGER, QFLOAT, STRING) => STRING
801+
802+
The "Q" refers to the quoted (i.e. string) versions of the various types,
803+
which are needed to emulate the type inference inside quoted strings
804+
performed by BigQuery.
801805
"""
802806
# type + type => type
803807
if atype == btype:

0 commit comments

Comments
 (0)