Skip to content

Commit 127f4f1

Browse files
committed
CLN: Warn that default dialect is changing to "standard"
Towards issue googleapis#195
1 parent 993fe55 commit 127f4f1

File tree

3 files changed

+130
-75
lines changed

3 files changed

+130
-75
lines changed

pandas_gbq/gbq.py

+10-1
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ def _parse_data(schema, rows):
471471

472472
def read_gbq(query, project_id=None, index_col=None, col_order=None,
473473
reauth=False, private_key=None, auth_local_webserver=False,
474-
dialect='legacy', location=None, configuration=None,
474+
dialect=None, location=None, configuration=None,
475475
verbose=None):
476476
r"""Load data from Google BigQuery using google-cloud-python
477477
@@ -515,6 +515,8 @@ def read_gbq(query, project_id=None, index_col=None, col_order=None,
515515
516516
.. versionadded:: 0.2.0
517517
dialect : str, default 'legacy'
518+
Note: The default value is changing to 'standard' in a future verion.
519+
518520
SQL syntax dialect to use. Value can be one of:
519521
520522
``'legacy'``
@@ -552,6 +554,13 @@ def read_gbq(query, project_id=None, index_col=None, col_order=None,
552554
df: DataFrame
553555
DataFrame representing results of query.
554556
"""
557+
if dialect is None:
558+
dialect = 'legacy'
559+
warnings.warn(
560+
'The default value for dialect is changing to "standard" in a '
561+
'future version. Pass in dialect="legacy" to disable this '
562+
'warning.',
563+
FutureWarning, stacklevel=1)
555564

556565
_test_google_api_imports()
557566

0 commit comments

Comments
 (0)