CoollZzz opened a new pull request, #19152:
URL: https://github.com/apache/iotdb/pull/19152

   ## Description
   
   ### PIVOT
   
   Add simplified and SQL-style PIVOT syntax to the table model. PIVOT supports 
static and dynamically discovered values, multiple ON items, ON expressions, 
multiple aggregate expressions, explicit and implicit grouping, and generated 
column aliases.
   
   For dynamic PIVOT, materialize the input once, discover distinct non-NULL ON 
values from that input, and reuse the materialized data for aggregation. This 
keeps value discovery and aggregation consistent. Validate duplicate IN values, 
unsupported aggregate and GROUP BY expressions, empty dynamic output, generated 
column names, and the configured output-column limit.
   
   ### UNPIVOT
   
   Add simplified and SQL-style UNPIVOT syntax, with single-value and 
multi-value forms. Support computed single-value sources, aliases, 
COLUMNS-based source selection for single-value UNPIVOT, and INCLUDE NULLS in 
SQL-style syntax. By default, filter rows whose unpivoted value is NULL; 
INCLUDE NULLS preserves them. Unpivoted values are unified to a compatible 
output type, and invalid source groups, expressions, types, and output column 
names are rejected during analysis.
   
   ### Configuration and tests
   
   Add the following system properties:
   
   - `pivot_limit` (`100000`): maximum PIVOT output column count, including 
grouping columns.
   - `pivot_input_buffer_size_in_bytes` (`67108864`): maximum buffered input 
size for each dynamic PIVOT.
   - `pivot_input_max_rows` (`1000000`): maximum buffered input rows for each 
dynamic PIVOT.
   
   Non-positive or malformed configuration values retain the current effective 
value. Dynamic PIVOT fails with an error if its input exceeds either buffer 
limit.
   
   Add parser, analyzer, planner, operator, configuration, and integration 
tests covering static and dynamic PIVOT, UNPIVOT forms, NULL and empty-input 
behavior, grouping, aliases, output limits, resource limits, and invalid 
expressions or schemas.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to