Skip to content

Commit

Permalink
add user doc
Browse files Browse the repository at this point in the history
Signed-off-by: Lantao Jin <[email protected]>
  • Loading branch information
LantaoJin committed Jul 9, 2024
1 parent b93de5a commit 9b0074e
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions docs/user/ppl/general/comments.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
========
Comments
========

.. rubric:: Table of contents

.. contents::
:local:
:depth: 2


Comments are not evaluated texts. PPL supports both line comments and block comments.

Line Comments
-------------
Line comments begin with two slashes ( // ) and end with a new line.

Example::

os> source=accounts | top gender // finds most common gender of all the accounts
fetched rows / total rows = 2/2
+----------+
| gender |
|----------|
| M |
| F |
+----------+

Block Comments
--------------
Block comments begin with a slash followed by an asterisk ( /\* ) and end with an asterisk followed by a slash ( \*/ ).

Example::

os> source=accounts | dedup 2 gender /* dedup the document with gender field keep 2 duplication */ | fields account_number, gender
fetched rows / total rows = 3/3
+------------------+----------+
| account_number | gender |
|------------------+----------|
| 1 | M |
| 6 | M |
| 13 | F |
+------------------+----------+

0 comments on commit 9b0074e

Please sign in to comment.