snuba icon indicating copy to clipboard operation
snuba copied to clipboard

fix: Disallow column aliases in inner queries of subqueries

Open evanh opened this issue 1 year ago • 1 comments

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.

evanh avatar May 10 '24 14:05 evanh

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

:x: 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

codecov[bot] avatar May 10 '24 14:05 codecov[bot]

Out of date

evanh avatar Nov 04 '24 14:11 evanh