You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(schema-compiler): custom granularity support (#8537)
* remove unneeded filter for granularities
* dedup month in standardGranularitiesParents
* feat(schema-compiler): update cube's schema to allow granularities for time dimensions
* fix custom granularity processing in time dimension
* update yaml schema compiler to process custom granularities
* Add custom granularities support to time dimension and base query
* feat(schema-compiler): update cube's schema to allow granularities for time dimensions (simple syntax)
* Add custom granularities simple syntax support to the time dimension and base query
* Rename baseGranularity → rollupGranularity
* fix schema validation
* fix custom granularity processing in BaseTimeDimension
* Moved custom granularity processing from time dimension to base query
* Revert: deep evaluateSymbolSql processing
* Implement dimensionTimeGroupedColumn for Snowflake
* Implement dimensionTimeGroupedColumn for MySQL
* Add custom granularity time intervals generation (used in rollups)
* Rewrite parseSqlInterval from regex to split
* Add tests for timeSeriesFromCustomInterval
* Add tests for yaml schema compiler
* Add tests for cube validator
* Fix overTimeSeriesQuery with custom granularities
* Add tests for sql query generation for queries with custom granularities
* return back deleted test
* Remove comment, add types
* update cube validation scheme: remove sql, add origin
* add tests for cube validator
* add another test for yaml schema compiler
* move isGranularityNaturalAligned() to utils to be reused
* Add Granularity entity and move all related processing there
also implement date_bin for postgres
* temporary comment out dimensionTimeGroupedColumn
* Fix timeSeriesFromCustomInterval generation
* Fix tests timeSeriesFromCustomInterval
* Add more tests for timeSeriesFromCustomInterval
* Fix Granularity constructor
* Add integration tests for Custom Granularities for PostgreSQL
* Fix Custom Granularities tests in CI (needs order by)
* Implement date_bin for Snowflake
* Move BaseDbRunner from postgres to separate folder
* fix customGranularity.origin init
* implement dateBin in MySQL
* fix interval math ops in MySQL
* fix postgres custom granularities tests
* Add tests for custom granularities in MySQL
* move granularityFromIntervalString from BaseQuery → Granularity
* fix granularityFromIntervalString
* improve addInterval / subtractInterval in MS SQL Query (now supports intervals with >1 time units)
* Implement dateBin for MS SQL
* Add tests for custom granularities in MS SQL
* fix 2 granularities test (actually revert the bad changes back)
* add comment for dateBin in postgresql query
* Implement dateBin for Databricks
* Implement dateBin for DuckDB
* implement dateBin for BigQuery
* extend testing fixtures with custom granularities
* fix TimeDimensionGranularity type to allow custom granularities
* Add more unit tests for granularities
* fix writing yaml with test cubes definitions containing origin with dashes
* add tests for custom granularities in testing drivers
* skip custom granularities tests for athena
* skip custom granularities tests for clickhouse
* add test snapshots for custom granularities tests for postgres
* skip custom granularities tests for mysql (some)
* add test snapshots for custom granularities tests for ms sql
* skip custom granularities tests for mssql (some)
* add test snapshots for custom granularities tests for snowflake
* add test snapshots for custom granularities tests for bigQuery
* skip custom granularities tests for databricks (some)
* add test snapshots for custom granularities tests for Databricks
* Implement dateBin for ClickHouse
* Add custom granularities integration tests for ClickHouse
* unskip custom granularities tests for clickhouse (some)
* add test snapshots for custom granularities tests for ClickHouse
* fix linting
* fix integration tests for clickhouse v22.x
* fix in dateBin for Postgresql and Bigquery
* Add char limits for granularities names in queries
* Add time series date range limit checking before generating
* add tests for limit checking in time series generation
* Improve error message for time series limit
* fix tests for time series limit
* Refactor: move isGranularityNaturalAligned from Basequery → Granularity class
* add test snapshots for custom granularities tests for MySQL
* move diffTimeUnitForInterval to BaseQuery
* fix in choosing minGranularity for granularity with origin point
constlimit=50000;// TODO Make this as configurable soft limit
134
+
constcount=rangeSeconds/intervalAsSeconds;
135
+
136
+
if(count>limit){
137
+
thrownewError(`The count of generated date ranges (${count}) for the request from [${startStr}] to [${endStr}] by ${intervalStr} is over limit (${limit}). Please reduce the requested date interval or use bigger granularity.`);
0 commit comments