Skip to content

Conversation

ritvibhatt
Copy link
Contributor

@ritvibhatt ritvibhatt commented Oct 15, 2025

This PR standardizes the structure and content of PPL command documentation files to improve consistency and user experience.

Changes Made

Documentation Structure Standardization

Implemented consistent section ordering across all PPL command files:

  1. Description - Clear explanation of command functionality
  2. Syntax - Command syntax with parameter details
  3. Optional sections - Behavior notes, configuration details, or usage guidance as needed
  4. Examples - Practical usage examples with expected output
  5. Limitations - Known constraints or considerations

Content Cleanup and Modernization

  • Removed version information - Eliminated outdated version references (e.g., "Version:
    3.3.0") to keep documentation current and reduce maintenance overhead
  • Extracted aggregation functions - Moved aggregation function documentation to dedicated
    functions file (/functions/aggregations.rst) for better organization

Related Issues

Resolves #[Issue number to be closed when this PR is merged]
#4220

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • New functionality has javadoc added.
  • New functionality has a user manual doc added.
  • New PPL command checklist all confirmed.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff or -s.
  • Public documentation issue/PR created.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Ritvi Bhatt <ribhatt@amazon.com>
Signed-off-by: Ritvi Bhatt <ribhatt@amazon.com>
Signed-off-by: Ritvi Bhatt <ribhatt@amazon.com>
Signed-off-by: ritvibhatt <53196324+ritvibhatt@users.noreply.github.com>
@ritvibhatt ritvibhatt marked this pull request as draft October 15, 2025 04:13
Signed-off-by: Ritvi Bhatt <ribhatt@amazon.com>
@ritvibhatt ritvibhatt changed the title Update Documentation Update PPL Command Documentation Oct 15, 2025
@ritvibhatt ritvibhatt marked this pull request as ready for review October 15, 2025 15:54
Copy link
Collaborator

@RyanL1997 RyanL1997 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ritvibhatt , thanks for the change. And I can signoff for rex, regex, and parse. And I just left some minor comments.

================================== ============ ============


Limitations
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw that in the regex.rst, there are some formatting changes in the "Limitation" section, and I was wondering do we need to apply the same here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the format is good, I removed the first sentence in limitations but let me know if you think format can be changed to match regex better

============
| Using ``append`` command to append the result of a sub-search and attach it as additional rows to the bottom of the input search results (The main search).
| The ``append`` command appends the result of a sub-search and attaches it as additional rows to the bottom of the input search results (The main search).
The command aligns columns with the same field names and types. For different column fields between the main search and sub-search, NULL values are filled in the respective rows.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need a | before head of this line.

Version
=======
3.1.0
| The ``appendcol`` command appends the result of a sub-search and attaches it alongside with the input search results (The main search).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to keep the | any more if there is single line in description. | means starting from a new line

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed all the | where there was only a single line thanks!

============
| Using ``dedup`` command to remove identical document defined by field from the search result.
| The ``dedup`` command removes duplicate documents defined by specified fields from the search result.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Syntax
============
describe <dataSource>.<schema>.<tablename>
describe [dataSource].[schema].<tablename>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be describe [dataSource.][schema.]<tablename>

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

Comment on lines 18 to 21
1. It generates one row per element in the specified array field.
2. The specified array field is converted into individual rows.
3. If an alias is provided, the expanded values appear under the alias instead of the original field name.
4. If the specified field is an empty array, the row is retained with the expanded field set to null.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not bullet mark here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right bullet points make more sense here, updated

======

fillnull with <replacement> [in <field-list>]

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you delete new line, please add | at the beginning of each line.

fillnull with <replacement> [in <field-list>]

fillnull using <field> = <replacement> [, <field> = <replacement>]

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto


Example 1: Replace null values with a specified value on one field
-------------------------------------------------------------------
===================================================================
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete last =

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated all of the = and - underlines to match


Example 2: Replace null values with a specified value on multiple fields
-------------------------------------------------------------------------
=========================================================================
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto and following


For extended syntax (join with field list) in 3.3.0, when duplicate-named fields in output results are deduplicated, the fields in output determined by the value of 'overwrite' option.

Since 3.3.0, join types ``inner``, ``left``, ``outer`` (alias of ``left``), ``semi`` and ``anti`` are supported by default. ``right``, ``full``, ``cross`` are performance sensitive join types which are disabled by default. Set config ``plugins.calcite.all_join_types.allowed = true`` to enable.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this information (how to enable full capability of join types) totally lost

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was mistakenly deleted thanks for catching that! Added back

@LantaoJin LantaoJin added the documentation Improvements or additions to documentation label Oct 16, 2025
Example 3: no inputField
========================
Example 3: No inputField specified
====================================
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete last two =

Example 4: outputField as a new field
=====================================
Example 4: OutputField as a new field
======================================
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete last one =

Change default pattern method
============
Change the default pattern method
=============================
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add 4 =

+-----------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------+

Simple Pattern Example 3: Extract log patterns with custom regex pattern
=========================================================
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add more =

Configuration
-------------
With Calcite specific option ``show_numbered_token`` enabled, the output can detect numbered variable tokens from the pattern field.
With option ``show_numbered_token`` enabled, the output can detect numbered variable tokens from the pattern field.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete one space between With and option


Example 8: Sort with specifying field type
Example 9: Sort with specifying field type
==================================
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

+----------+---+

Example 2: Lists & Nesting
============================
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

= problem

"plugins.calcite.enabled" : true
}
}'
* aggregation: mandatory. An aggregation function. The argument of aggregation must be field.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The argument of aggregation must be field. can be removed

Comment on lines 1 to 3
=============
subquery (aka subsearch)
subquery
=============
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

= problem

3.3.0

Syntax
============
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

= problem

ritvibhatt and others added 6 commits October 16, 2025 11:11
Signed-off-by: Ritvi Bhatt <ribhatt@amazon.com>
Signed-off-by: Ritvi Bhatt <ribhatt@amazon.com>
Signed-off-by: ritvibhatt <53196324+ritvibhatt@users.noreply.github.com>
Signed-off-by: Ritvi Bhatt <ribhatt@amazon.com>
Signed-off-by: Ritvi Bhatt <ribhatt@amazon.com>
Signed-off-by: Ritvi Bhatt <ribhatt@amazon.com>
@aalva500-prog
Copy link
Contributor

Hi @ritvibhatt, thanks for the changes! Quick question: should we also update the documentation in condition.rst for recently added functions like coalesce?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants