-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Lantao Jin <[email protected]>
- Loading branch information
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | | ||
+------------------+----------+ | ||
|