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

fix: Disallow column aliases in inner queries of subqueries #5888

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

evanh
Copy link
Member

@evanh evanh commented May 10, 2024

When a column is aliased to something different in the inner subquery, it
breaks how aliasing works at the higher levels. It's also not necessary, since
the column can be referenced directly, and the outer query can alias the
expression however it likes in the results.

Also fixed some typing in the test file.

When a column is aliased to something different in the inner subquery, it
breaks how aliasing works at the higher levels. It's also not necessary, since
the column can be referenced directly, and the outer query can alias the
expression however it likes in the results.
@evanh evanh requested a review from a team as a code owner May 10, 2024 14:29
Copy link

codecov bot commented May 10, 2024

Test Failures Detected: Due to failing tests, we cannot provide coverage reports at this time.

❌ Failed Test Results:

Completed 315 tests with 1 failed, 313 passed and 1 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
pytest

Test name:
tests.test_snql_api.TestSnQLApi::test_join_query_in_sub_query

Envs:
- default
Traceback (most recent call last):
File ".../snuba/tests/test_snql_api.py", line 246, in test_join_query_in_sub_query
assert response.status_code == 200
AssertionError: assert 400 == 200
+ where 400 = <WrapperTestResponse 127 bytes [400 BAD REQUEST]>.status_code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants