Overview
ISO/IEC 19075-7:2021 provides formal guidance on polymorphic table functions (PTFs) in SQL. It explains how PTFs are defined, created, maintained, invoked and implemented within the SQL environment, and addresses compilation, optimization and execution concerns. The document is part of the ISO/IEC 19075 series that advises on advanced SQL language features and is aimed at implementers and advanced SQL users who design extensible table-producing routines.
Key Topics and Technical Requirements
The standard covers the full lifecycle and technical model for polymorphic table functions, including:
- PTF processing model: phases, virtual processors, flow of control, information and row types.
- Functional and design specification: parameter lists, input table semantics, result row types, determinism and prunability.
- Data Definition Language (DDL) for PTFs: creation, altering and dropping of PTFs and component procedures.
- Implementation details: PTF descriptor areas, descriptor formats for row types, partitioning and ordering metadata, reading/writing descriptors.
- Invocation semantics: how PTFs are used as table expressions, table arguments, nested invocations, partitioning, pruning and co-partitioning rules.
- Compilation, optimization and execution: invoking describe procedures, optimization opportunities, execution flow across virtual processors, start/fulfill/finish component procedures, and cleanup.
- Examples and use-cases: worked examples (Projection, CSVreader, Pivot, Score, TopNplus, MapReduce and more) illustrating practical implementations and invocation patterns.
Keywords: ISO/IEC 19075-7:2021, polymorphic table functions, SQL, PTF, processing model, partitioning, descriptor area, virtual processors.
Applications and Who Should Use This Standard
ISO/IEC 19075-7:2021 is targeted at:
- Database engine implementers building support for advanced table-valued and polymorphic functions.
- Query optimizer and compiler authors who need to reason about describe/compile/execute semantics for PTFs.
- SQL extension designers and language architects implementing DDL, invocation and security models for PTFs.
- Application developers and DBAs designing high-performance data-processing functions (e.g., CSV readers, pivots, Top-N algorithms, custom MapReduce patterns) inside the database.
- System integrators who require predictable behavior when embedding procedural or external row-generation into SQL queries.
PTFs enable powerful in-database processing patterns where table-producing routines adapt to input schemas, support partitioned parallelism and integrate with the SQL optimizer.
Related Standards
- ISO/IEC 19075 (other parts) - guidance on SQL advanced features.
- ISO/IEC 9075 (SQL) - the core international SQL standard that PTF guidance complements.
For implementers and architects working on extensible SQL functions, ISO/IEC 19075-7:2021 is a practical reference to ensure consistent, optimizable, and secure polymorphic table function behavior.