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

Do not require mocks for ARRAY JOIN clause arguments #51

Merged
merged 1 commit into from
Apr 2, 2024

Conversation

smoothml
Copy link
Collaborator

The ARRAY JOIN clause in Clickhouse is currently recognised as a table that requires a mock by the library. This is not the case as this clause is used for expanding arrays in the source table into separate rows. This commit adds an additional clause to the get_source_tables helper function to ignore joins of kind ARRAY.

Closes #48

@smoothml smoothml requested a review from Somtom March 27, 2024 14:24
@smoothml smoothml self-assigned this Mar 27, 2024
Copy link
Collaborator

@Somtom Somtom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!
We should just add things to the unreleased section of the changelog

pyproject.toml Outdated Show resolved Hide resolved
src/sql_mock/helpers.py Show resolved Hide resolved
The `ARRAY JOIN` clause in Clickhouse is currently recognised as a table
that requires a mock by the library. This is not the case as this clause
is used for expanding arrays in the source table into separate rows.
This commit adds an additional clause to the `get_source_tables` helper
function to ignore joins of kind `ARRAY`.

Closes #48
@smoothml smoothml merged commit 8b224f7 into main Apr 2, 2024
3 checks passed
@smoothml smoothml deleted the clickhouse-array-join branch April 2, 2024 12:21
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.

ARRAY JOIN operations are not recognised in Clickhouse queries
2 participants