maropu commented on a change in pull request #28130: [SPARK-31355][SQL][DOCS] 
Document TABLESAMPLE in SQL Reference
URL: https://github.com/apache/spark/pull/28130#discussion_r403875124
 
 

 ##########
 File path: docs/sql-ref-syntax-qry-sampling.md
 ##########
 @@ -19,4 +19,72 @@ license: |
   limitations under the License.
 ---
 
-**This page is under construction**
+### Description
+
+The `TABLESAMPLE` statement is used to sample the table. It supports the 
following sampling methods:
+- `TABLESAMPLE`(x `ROWS`): Sample the table down to the given number of rows.
+- `TABLESAMPLE`(x `PERCENT`): Sample the table down to the given percentage. 
Note that percentages are defined as a number between 0 and 100.
+- `TABLESAMPLE`(`BUCKET` x `OUT OF` y): Sample the table down to a `x` out of 
`y` fraction.
+
+Note: `TABLESAMPLE` returns the approximate number of rows or fraction 
requested.
 
 Review comment:
   ok, thanks for the check. Looks ok as it is.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to