Skip to content

refactor(cubejs/profiler): improve handling of ClickHouse data types …#52

Merged
akshaykumar2505 merged 1 commit into
mainfrom
fix/profile-table-fill
May 7, 2026
Merged

refactor(cubejs/profiler): improve handling of ClickHouse data types …#52
akshaykumar2505 merged 1 commit into
mainfrom
fix/profile-table-fill

Conversation

@akshaykumar2505
Copy link
Copy Markdown
Member

…and enhance SQL generation

  • Replaced logical OR with nullish coalescing for default values in profileTable.
  • Introduced coerceAggNum function to normalize numeric values from ClickHouse, ensuring accurate fill-rate calculations.
  • Updated SQL generation for Enum and Array types to avoid invalid comparisons with empty strings.
  • Enhanced tests to validate the new behavior for presence calculations and aggregate coercion.
  • Added utility functions to identify unsafe comparisons for specific ClickHouse types.

…and enhance SQL generation

- Replaced logical OR with nullish coalescing for default values in profileTable.
- Introduced `coerceAggNum` function to normalize numeric values from ClickHouse, ensuring accurate fill-rate calculations.
- Updated SQL generation for Enum and Array types to avoid invalid comparisons with empty strings.
- Enhanced tests to validate the new behavior for presence calculations and aggregate coercion.
- Added utility functions to identify unsafe comparisons for specific ClickHouse types.
@akshaykumar2505 akshaykumar2505 merged commit 3d20e4d into main May 7, 2026
3 checks passed
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