Skip to content

Update allowed SQL functions in computed column editor#102

Merged
roncodes merged 1 commit intofeature/universe-refactor-supportfrom
update-computed-column-allowed-functions
Dec 4, 2025
Merged

Update allowed SQL functions in computed column editor#102
roncodes merged 1 commit intofeature/universe-refactor-supportfrom
update-computed-column-allowed-functions

Conversation

@roncodes
Copy link
Member

Summary

This PR updates the allowed SQL functions list in the query builder's computed column editor modal to match the comprehensive list of 100+ functions supported by the backend ComputedColumnValidator.

Changes

  • Expanded from 16 to 100+ SQL functions to match backend capabilities
  • Date/Time Functions: Added LAST_DAY, TIMESTAMPDIFF, DATE_FORMAT, QUARTER, WEEK, and many more
  • String Functions: Added CONCAT_WS, SUBSTRING, REPLACE, LOCATE, LPAD, RPAD, and more
  • Numeric/Math Functions: Added CEIL, FLOOR, SQRT, MOD, trigonometric functions (SIN, COS, TAN, etc.)
  • Conditional Functions: Added IF, CASE/WHEN/THEN/ELSE/END
  • Aggregate Functions: Added COUNT, SUM, AVG, MIN, MAX, GROUP_CONCAT
  • Type Conversion: Added CAST, CONVERT
  • Organized by category with comments for better readability

Why This Change?

The backend ComputedColumnValidator was recently updated to support 70+ SQL functions (see core-api PRs #173-175), but the frontend modal was still showing only the original 16 functions. This created confusion for users who might think certain functions aren't supported when they actually are.

Testing

  • The functions list is displayed in the computed column editor modal as reference
  • Backend validation will still be the source of truth (via the validate-computed-column endpoint)
  • No functional changes - this is purely informational for users

Related Work

  • Relates to core-api enhancements for Fliit reporting framework
  • Supports complex computed columns like hire_days_current_month and monthly_hire_revenue_current

- Expanded from 16 to 100+ SQL functions to match backend ComputedColumnValidator
- Added comprehensive date/time functions (LAST_DAY, TIMESTAMPDIFF, DATE_FORMAT, etc.)
- Added string manipulation functions (CONCAT_WS, SUBSTRING, REPLACE, etc.)
- Added numeric/math functions (CEIL, FLOOR, SQRT, trigonometric functions, etc.)
- Added conditional functions (IF, CASE/WHEN/THEN/ELSE/END)
- Added aggregate functions (COUNT, SUM, AVG, MIN, MAX, GROUP_CONCAT)
- Added type conversion functions (CAST, CONVERT)
- Organized functions by category with comments for better readability
- Ensures frontend validation matches backend capabilities
@roncodes roncodes changed the base branch from main to feature/universe-refactor-support December 4, 2025 09:04
@roncodes roncodes merged commit 2405b8b into feature/universe-refactor-support Dec 4, 2025
3 of 4 checks passed
@roncodes roncodes deleted the update-computed-column-allowed-functions branch December 4, 2025 09:04
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.

1 participant