You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ja...@apache.org on 2022/09/20 01:45:24 UTC

[flink] 12/25: [FLINK-29025][docs] add table sample page for Hive dialect

This is an automated email from the ASF dual-hosted git repository.

jark pushed a commit to branch release-1.16
in repository https://gitbox.apache.org/repos/asf/flink.git

commit f76084f6d800e15df5ada2bf703a1d66c34b69d1
Author: luoyuxia <lu...@alumni.sjtu.edu.cn>
AuthorDate: Mon Aug 29 15:22:09 2022 +0800

    [FLINK-29025][docs] add table sample page for Hive dialect
---
 .../hiveDialect/Queries/table-sample.md            | 49 ++++++++++++++++++++++
 .../hiveDialect/Queries/table-sample.md            | 49 ++++++++++++++++++++++
 2 files changed, 98 insertions(+)

diff --git a/docs/content.zh/docs/dev/table/hiveCompatibility/hiveDialect/Queries/table-sample.md b/docs/content.zh/docs/dev/table/hiveCompatibility/hiveDialect/Queries/table-sample.md
new file mode 100644
index 00000000000..35b0caa9b92
--- /dev/null
+++ b/docs/content.zh/docs/dev/table/hiveCompatibility/hiveDialect/Queries/table-sample.md
@@ -0,0 +1,49 @@
+---
+title: "Table Sample"
+weight: 11
+type: docs
+---
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+# Table Sample
+
+## Description
+
+The `TABLESAMPLE` statement is used to sample rows from the table.
+
+### Syntax
+
+```sql
+TABLESAMPLE ( num_rows ROWS )
+```
+{{< hint warning >}}
+**Note:**
+Currently, only sample specific number of rows is supported.
+{{< /hint >}}
+
+### Parameters
+
+- num_rows `ROWS`
+
+  num_rows is a constant positive to specify how many rows to sample.
+
+### Examples
+
+```sql
+SELECT * FROM src TABLESAMPLE (5 ROWS)
+```
diff --git a/docs/content/docs/dev/table/hiveCompatibility/hiveDialect/Queries/table-sample.md b/docs/content/docs/dev/table/hiveCompatibility/hiveDialect/Queries/table-sample.md
new file mode 100644
index 00000000000..35b0caa9b92
--- /dev/null
+++ b/docs/content/docs/dev/table/hiveCompatibility/hiveDialect/Queries/table-sample.md
@@ -0,0 +1,49 @@
+---
+title: "Table Sample"
+weight: 11
+type: docs
+---
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+  http://www.apache.org/licenses/LICENSE-2.0
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+# Table Sample
+
+## Description
+
+The `TABLESAMPLE` statement is used to sample rows from the table.
+
+### Syntax
+
+```sql
+TABLESAMPLE ( num_rows ROWS )
+```
+{{< hint warning >}}
+**Note:**
+Currently, only sample specific number of rows is supported.
+{{< /hint >}}
+
+### Parameters
+
+- num_rows `ROWS`
+
+  num_rows is a constant positive to specify how many rows to sample.
+
+### Examples
+
+```sql
+SELECT * FROM src TABLESAMPLE (5 ROWS)
+```