Skip to content

Commit ce005e1

Browse files
committed
Revert changes to the section New PPL Command Checklist in DEVELOPER_GUIDE.rst
Signed-off-by: Yuanchun Shen <yuanchu@amazon.com>
1 parent ee40c9a commit ce005e1

1 file changed

Lines changed: 10 additions & 11 deletions

File tree

DEVELOPER_GUIDE.rst

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -215,20 +215,19 @@ Java files are formatted using `Spotless <https://github.com/diffplug/spotless>`
215215
New PPL Command Checklist
216216
=========================
217217

218-
If you are working on contributing a new PPL command, please read this guide and review all items in the checklist are done before
219-
code review. You also can leverage this checklist to guide how to add new PPL command.
218+
If you are working on contributing a new PPL command, please read this guide and review all items in the checklist are done before code review. You also can leverage this checklist to guide how to add new PPL command.
220219

221220
Prerequisite
222221
------------
223222

224-
| ✅ Open an RFC issue describing the command:
225-
- Specify the purpose and need for the new command
226-
- Include syntax definition, usage and examples
227-
- Outline implementation options if multiple approaches exist
223+
| ✅ Open an RFC issue before starting to code:
224+
- Describe the purpose of the new command
225+
- Include at least syntax definition, usage and examples
226+
- Implementation options are welcome if you have multiple ways to implement it
228227

229228
| ✅ Obtain PM review approval for the RFC:
230-
- Consult repository maintainers if PM is unavailable
231-
- Be prepared for meetings to discuss syntax and usage details
229+
- If PM unavailable, consult repository maintainers as alternative
230+
- An offline meeting might be required to discuss the syntax and usage
232231

233232
Coding & Tests
234233
--------------
@@ -282,15 +281,15 @@ Prerequisites
282281
Developing User-Defined Functions (UDFs)
283282
----------------------------------------
284283

285-
| ✅ Creating UDFs: A user-defined function is an instance of ``SqlOperator`` that transforms input row expressions (``RexNode``) into a new one. There are three approaches to implementing UDFs:
284+
| ✅ Creating UDFs: A user-defined function is an instance of `SqlOperator <https://calcite.apache.org/javadocAggregate/org/apache/calcite/sql/SqlOperator.html>`_ that transforms input row expressions (`RexNode <https://calcite.apache.org/javadocAggregate/org/apache/calcite/rex/RexNode.html>`_) into a new one. There are three approaches to implementing UDFs:
286285
287-
- Use existing Calcite operators: Leverage operators already declared in Calcite's ``SqlStdOperatorTable`` or ``SqlLibraryOperators``, and defined in ``RexImpTable.java``
286+
- Use existing Calcite operators: Leverage operators already declared in Calcite's `SqlStdOperatorTable <https://calcite.apache.org/javadocAggregate/org/apache/calcite/sql/fun/SqlStdOperatorTable.html>`_ or `SqlLibraryOperators <https://calcite.apache.org/javadocAggregate/org/apache/calcite/sql/fun/SqlLibraryOperators.html>`_, and defined in `RexImpTable.java <https://calcite.apache.org/javadocAggregate/org/apache/calcite/adapter/enumerable/RexImpTable.html>`_
288287
- Adapt existing static methods: Convert Java static methods to UDFs using utility functions like ``UserDefinedFunctionUtils.adaptExprMethodToUDF``
289288
- Implement from scratch
290289

291290
* Implement the ``ImplementorUDF`` interface
292291
* Instantiate and convert it to a ``SqlOperator`` in ``PPLBuiltinOperators``
293-
* For optimal UDF performance, implement any data-independent logic during the compilation phase instead of at runtime. Specifically, use ling4j expressions for these operations rather than internal static method calls, as expressions are evaluated during compilation.
292+
* For optimal UDF performance, implement any data-independent logic during the compilation phase instead of at runtime. Specifically, use `linq4j expressions <https://calcite.apache.org/javadocAggregate/org/apache/calcite/linq4j/tree/Expression.html>`_ for these operations rather than internal static method calls, as expressions are evaluated during compilation.
294293

295294
| ✅ Type Checking for UDFs
296295
- Each ``SqlOperator`` provides an operand type checker via the ``getOperandTypeChecker`` method

0 commit comments

Comments
 (0)