fix: allow aggregation by date#208
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
DateTimeBin is not a valid Cosmos DB SQL API function. Instead, use LEFT() on ISO 8601 date strings for date grouping (Day=10, Month=7, Year=4 chars). Also remove ORDER BY from grouped queries as Cosmos DB doesn't support ORDER BY on computed expressions with GROUP BY. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
forest-bot
added a commit
that referenced
this pull request
Mar 27, 2026
# [2.9.0](https://github.com/ForestAdmin/forestadmin-experimental/compare/rpc-agent@2.8.0...rpc-agent@2.9.0) (2026-03-27) ### Bug Fixes * allow aggregation by date ([#208](#208)) ([4622350](4622350)) * use Cosmos DB compatible functions for date aggregation ([#209](#209)) ([f4be4e2](f4be4e2)) ### Features * **api chart:** allow customizing api chart with query or body parameters ([#211](#211)) ([6d3eb65](6d3eb65)) ### Performance Improvements * rollup Week/Quarter from Day-level queries ([#210](#210)) ([9528843](9528843))
forest-bot
added a commit
that referenced
this pull request
Apr 24, 2026
# [1.12.0](https://github.com/ForestAdmin/forestadmin-experimental/compare/datasource-rpc@1.11.0...datasource-rpc@1.12.0) (2026-04-24) ### Bug Fixes * allow aggregation by date ([#208](#208)) ([4622350](4622350)) * **datasource-cosmos:** increase maxConditions default to 1000 ([#212](#212)) ([96df1f5](96df1f5)) * fix aggregation when using a reserved keyword ([#207](#207)) ([7200f0b](7200f0b)) * **rpc agent:** release ([8f532a0](8f532a0)) * **rpc datasource:** fix introspection parsing ([b3978a1](b3978a1)) * use Cosmos DB compatible functions for date aggregation ([#209](#209)) ([f4be4e2](f4be4e2)) ### Features * **api chart:** allow customizing api chart with query or body parameters ([#211](#211)) ([6d3eb65](6d3eb65)) ### Performance Improvements * rollup Week/Quarter from Day-level queries ([#210](#210)) ([9528843](9528843))
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix date-based aggregation grouping in Cosmos datasource
AggregationConverterDATE_OPERATION_TO_LENGTHmapping andbuildDateGroupExpressionhelper to aggregation-converter.ts, which converts Year/Month/Day group operations toLEFT(c.<field>, N)SQL expressions using ISO 8601 substring lengths.buildGroupedAggregationQueryto allow date operations on a single group field instead of rejecting them.ORDER BYclause; unsupported date operations now throw an error.Macroscope summarized d74e965.