Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: Use standard SQL as default. #245

Merged
merged 1 commit into from
Jan 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 4 additions & 11 deletions pandas_gbq/gbq.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ def __init__(
reauth=False,
private_key=None,
auth_local_webserver=False,
dialect="legacy",
dialect="standard",
location=None,
credentials=None,
):
Expand Down Expand Up @@ -732,8 +732,8 @@ def read_gbq(
http://google-auth-oauthlib.readthedocs.io/en/latest/reference/google_auth_oauthlib.flow.html#google_auth_oauthlib.flow.InstalledAppFlow.run_console

.. versionadded:: 0.2.0
dialect : str, default 'legacy'
Note: The default value is changing to 'standard' in a future verion.
dialect : str, default 'standard'
Note: The default value changed to 'standard' in version 0.10.0.

SQL syntax dialect to use. Value can be one of:

Expand Down Expand Up @@ -796,14 +796,7 @@ def read_gbq(
dialect = context.dialect

if dialect is None:
dialect = "legacy"
warnings.warn(
'The default value for dialect is changing to "standard" in a '
'future version. Pass in dialect="legacy" or set '
'pandas_gbq.context.dialect="legacy" to disable this warning.',
FutureWarning,
stacklevel=2,
)
dialect = "standard"

_test_google_api_imports()

Expand Down
5 changes: 0 additions & 5 deletions tests/unit/test_gbq.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,11 +429,6 @@ def test_read_gbq_with_invalid_dialect():
assert "is not valid for dialect" in str(excinfo.value)


def test_read_gbq_without_dialect_warns_future_change():
with pytest.warns(FutureWarning):
gbq.read_gbq("SELECT 1")


def test_generate_bq_schema_deprecated():
# 11121 Deprecation of generate_bq_schema
with pytest.warns(FutureWarning):
Expand Down