[
https://issues.apache.org/jira/browse/FLINK-41414?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ramin Gharib closed FLINK-41414.
--------------------------------
Fix Version/s: 2.5.0
Resolution: Fixed
Fixed in master via [#29844|https://github.com/apache/flink/pull/29844]:
* d7ad073a4645e3a799a81577958684c473798424 [FLINK-41414][table] Expand the
AGENTS.md guide for adding a built-in function
* 30e854cb49b59238b39b864aa02ab97ac15d7017 [hotfix][python] List the missing
expressions in the PyFlink API reference
> Add AGENTS.md guidance for adding a built-in function
> -----------------------------------------------------
>
> Key: FLINK-41414
> URL: https://issues.apache.org/jira/browse/FLINK-41414
> Project: Flink
> Issue Type: Sub-task
> Components: Table SQL / API
> Reporter: Ramin Gharib
> Assignee: Ramin Gharib
> Priority: Major
> Labels: pull-request-available
> Fix For: 2.5.0
>
>
> The root {{AGENTS.md}} lists six steps for a new built-in function, and the
> planner and runtime {{AGENTS.md}} files add a few lines on base classes and
> tests. Several steps that every function PR needs are not named anywhere, so
> an agent or a new contributor has to find them by reading earlier PRs.
> ||Step||Named in an AGENTS.md today||
> |Register the definition in {{BuiltInFunctionDefinitions}}|Yes|
> |Input and output type strategies, such as {{SpecificInputTypeStrategies}}|No|
> |Runtime class that extends {{BuiltInScalarFunction}} or another base
> class|Yes|
> |Table API method in {{BaseExpressions}}|No, only "Extend Table API support"|
> |PyFlink expression in {{expressions.py}}, checked by
> {{test_expression_completeness.py}}|No|
> |ITCase with {{TestSetSpec}}|Yes|
> |Docs in {{docs/data/sql_functions.yml}} and {{sql_functions_zh.yml}}|No,
> only "Document in docs/"|
> Scope:
> * Expand the "Adding a new SQL built-in function" section of the root
> {{AGENTS.md}} into a checklist that names the file for each step, for scalar,
> aggregate and table functions.
> * Cover the parts that are easy to miss: validating literal arguments at
> planning time, TRY_ forms, SQL NULL handling, the visibility annotation that
> ArchUnit requires on new public classes, and registering a definition only
> once, since a duplicate registration makes compiled plans that use it fail to
> restore.
> * Keep module details in {{flink-table-runtime/AGENTS.md}} and
> {{flink-table-planner/AGENTS.md}}, and link them from the checklist.
> * Point at one merged function PR as a worked example, such as VARIANT_GET
> from FLINK-39049.
> The FLIP-618 function subtasks follow this guide, so it lands before them.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)