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: substring correctly #130

Conversation

catalyst17
Copy link
Contributor

@catalyst17 catalyst17 commented Dec 20, 2024

TL;DR

Fixed incorrect string slicing in ClickHouse filter parameters for 'gte' and 'lte' conditions.

What changed?

Modified the string slicing length in addFilterParams function from -3 to -4 for 'gte' and 'lte' suffixes to properly extract the base column name from filter parameters.

How to test?

  1. Execute queries using filters with 'gte' and 'lte' suffixes
  2. Verify that the generated SQL queries contain the correct column names
  3. Confirm that filter conditions are properly applied to the results

Why make this change?

The previous implementation was incorrectly slicing the column names for 'gte' and 'lte' conditions, which could lead to malformed SQL queries. This fix ensures proper column name extraction and maintains consistency with the filter parameter naming convention.

Copy link

linear bot commented Dec 20, 2024

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@catalyst17 catalyst17 marked this pull request as ready for review December 20, 2024 10:53
@catalyst17 catalyst17 merged commit 0de561b into main Dec 20, 2024
5 checks passed
@catalyst17 catalyst17 deleted the arsenii/infra-521-error-fetching-data-with-_gte-or-_lte-queries branch December 20, 2024 11:27
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