Commit 0de561b
authored
fix: substring correctly (#130)
### 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.1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
493 | 493 | | |
494 | 494 | | |
495 | 495 | | |
496 | | - | |
| 496 | + | |
497 | 497 | | |
498 | | - | |
| 498 | + | |
499 | 499 | | |
500 | 500 | | |
501 | 501 | | |
| |||
0 commit comments