You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ossie.apache.org by "fanruan-tuco (via GitHub)" <gi...@apache.org> on 2026/08/13 13:15:35 UTC

[I] Add window function use cases to the TPC-DS example [ossie]

fanruan-tuco opened a new issue, #324:
URL: https://github.com/apache/ossie/issues/324

   ## Problem
   
   Window functions are already defined in both the [Expression Language proposal](https://docs.google.com/document/d/1Jn98kHWsnbvo1MycQBAnWirGTwRmw-DWaen7coNCYWA/edit?tab=t.0) and the [core expression language specification](https://github.com/apache/ossie/blob/main/core-spec/expression_language.md#window-functions). The specification covers ranking functions, offset functions, and window aggregations, but the canonical [`examples/tpcds_semantic_model.yaml`](https://github.com/apache/ossie/blob/main/examples/tpcds_semantic_model.yaml) currently demonstrates only regular aggregate metrics.
   
   Without model-level examples, implementers and users do not have a concrete reference for expressing common analytical use cases, including ordering, partitioning, explicit window frames, field qualification across relationships, and the expected query grain.
   
   ## Proposed change
   
   Add a small, representative set of validated ANSI SQL window-function use cases to `examples/tpcds_semantic_model.yaml`, using the existing TPC-DS datasets and relationships. Suggested cases:
   
   - Running/cumulative sales through each calendar date (window aggregation)
   - Sales rank by brand or store (ranking function)
   - Sales change versus the previous period (offset function such as `LAG`)
   
   For example, a cumulative sales metric could be expressed as:
   
   ```yaml
   - name: cumulative_sales
     expression:
       dialects:
         - dialect: ANSI_SQL
           expression: SUM(store_sales.ss_ext_sales_price) OVER (ORDER BY date_dim.d_date ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)
     description: Running total of sales revenue through each calendar date
     datatype: Decimal
   ```
   
   ## Acceptance criteria
   
   - The TPC-DS example includes window-function use cases covering window aggregation and representative ranking/offset behavior.
   - Cumulative calculations use an explicit frame so the boundary semantics are clear.
   - Each example documents its expected grouping/grain in the description when needed.
   - All added expressions pass `validation/validate.py`.
   - If any window-function category cannot be represented at the current metric or field level, the supported placement and limitation are documented instead.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@ossie.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Add window function use cases to the TPC-DS example [ossie]

Posted by "jbonofre (via GitHub)" <gi...@apache.org>.
jbonofre closed issue #324: Add window function use cases to the TPC-DS example
URL: https://github.com/apache/ossie/issues/324


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@ossie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org