Yang, Tong 48706b7552 MRS COMP-LTS 320-lts.1 version
Reviewed-by: Kacur, Michal <michal.kacur@t-systems.com>
Co-authored-by: Yang, Tong <yangtong2@huawei.com>
Co-committed-by: Yang, Tong <yangtong2@huawei.com>
2024-04-12 12:51:10 +00:00

73 lines
6.1 KiB
HTML

<a name="mrs_01_24802"></a><a name="mrs_01_24802"></a>
<h1 class="topictitle1">Hudi CLUSTERING</h1>
<div id="body0000001534515254"><div class="section" id="mrs_01_24802__en-us_topic_0265792787_s1c2fb9c848d3442b9a23498a756f65f5"><h4 class="sectiontitle">Function</h4><p id="mrs_01_24802__p8807155341516">Performs the clustering operation on Hudi tables. For details, see <a href="mrs_01_24088.html">Clustering</a>.</p>
</div>
<div class="section" id="mrs_01_24802__en-us_topic_0265792787_s74e38960eb19422bb6e00e049a8e144e"><h4 class="sectiontitle">Syntax</h4><ul id="mrs_01_24802__ul1582105073215"><li id="mrs_01_24802__li15821350103215">Creating a savepoint:<p id="mrs_01_24802__p11203630161219"><a name="mrs_01_24802__li15821350103215"></a><a name="li15821350103215"></a><strong id="mrs_01_24802__b853542821213">call run_clustering(table=&gt;'[table]', path=&gt;'[path]', predicate=&gt;'[predicate]', order=&gt;'[order]');</strong></p>
</li><li id="mrs_01_24802__li1857610461213">Performing clustering:<p id="mrs_01_24802__p1057654191218"><a name="mrs_01_24802__li1857610461213"></a><a name="li1857610461213"></a><strong id="mrs_01_24802__b657613471215">call show_clustering(table=&gt;'[table]', path=&gt;'[path]', limit=&gt;'[limit]');</strong></p>
</li></ul>
</div>
<div class="section" id="mrs_01_24802__en-us_topic_0265792787_sc562f5f2c9e440dc8ea25a1f3b145668"><h4 class="sectiontitle">Parameter Description</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_24802__en-us_topic_0265792787_tfbb991adf4344d2fb27629f70630100e" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameters</caption><thead align="left"><tr id="mrs_01_24802__en-us_topic_0265792787_ra556d91581f04f5188576c64927a0949"><th align="left" class="cellrowborder" valign="top" width="30%" id="mcps1.3.3.2.2.4.1.1"><p id="mrs_01_24802__en-us_topic_0265792787_af4cec97db0194bc4b70e1eeee4a8dd0e"><strong id="mrs_01_24802__en-us_topic_0265792787_a7159780c1ca74891b3b3f3781df6b927">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.2.2.4.1.2"><p id="mrs_01_24802__en-us_topic_0265792787_a6014dc4378b24178aac7350b85362666"><strong id="mrs_01_24802__en-us_topic_0265792787_a61e428b8462f4ec6837d268ee9c7e33d">Description</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="30%" id="mcps1.3.3.2.2.4.1.3"><p id="mrs_01_24802__p281718341555">Mandatory</p>
</th>
</tr>
</thead>
<tbody><tr id="mrs_01_24802__en-us_topic_0265792787_r32b79a740ce44d94a3a3982e80ba7f48"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.3.2.2.4.1.1 "><p id="mrs_01_24802__p188052025141310">table</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.4.1.2 "><p id="mrs_01_24802__en-us_topic_0265792787_ad05a3f749c7c45b780e0d8b4218b508d">Name of the table to be queried. The value can be in the <strong id="mrs_01_24802__b1511105510467">database.tablename</strong> format.</p>
</td>
<td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.3.2.2.4.1.3 "><p id="mrs_01_24802__p88171434853">No</p>
</td>
</tr>
<tr id="mrs_01_24802__row384112558810"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.3.2.2.4.1.1 "><p id="mrs_01_24802__p134791140151315">path</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.4.1.2 "><p id="mrs_01_24802__p17376415182420">Path of the table to be queried</p>
</td>
<td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.3.2.2.4.1.3 "><p id="mrs_01_24802__p381719341251">No</p>
</td>
</tr>
<tr id="mrs_01_24802__row1140651517610"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.3.2.2.4.1.1 "><p id="mrs_01_24802__p340631519616">predicate</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.4.1.2 "><p id="mrs_01_24802__p1640617155610">Predicate sentence to be defined</p>
</td>
<td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.3.2.2.4.1.3 "><p id="mrs_01_24802__p34076151264">No</p>
</td>
</tr>
<tr id="mrs_01_24802__row13608419201413"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.3.2.2.4.1.1 "><p id="mrs_01_24802__p4609101918145">order</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.4.1.2 "><p id="mrs_01_24802__p760921911415">Sorting field for clustering</p>
</td>
<td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.3.2.2.4.1.3 "><p id="mrs_01_24802__p386120917296">No</p>
</td>
</tr>
<tr id="mrs_01_24802__row128701911963"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.3.2.2.4.1.1 "><p id="mrs_01_24802__p365814116143">limit</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.4.1.2 "><p id="mrs_01_24802__p5870311061">Number of query results to display</p>
</td>
<td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.3.2.2.4.1.3 "><p id="mrs_01_24802__p587181111610">No</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="mrs_01_24802__en-us_topic_0265792787_s48d23baacfa245edaf9586eb4ed766d6"><h4 class="sectiontitle">Example</h4><pre class="screen" id="mrs_01_24802__screen168131147123417">call show_clustering(table =&gt; 'hudi_table1');
call run_clustering(table =&gt; 'hudi_table1', predicate =&gt; '(ts &gt;= 1006L and ts &lt; 1008L) or ts &gt;= 1009L', order =&gt; 'ts');</pre>
</div>
<div class="section" id="mrs_01_24802__section1142451142514"><h4 class="sectiontitle">Precautions</h4><p id="mrs_01_24802__p1725114413113">Either <strong id="mrs_01_24802__b1970045320497">table</strong> or <strong id="mrs_01_24802__b1989845715499">path</strong> must exist. Otherwise, the Hudi table to be clustered cannot be determined.</p>
</div>
<div class="section" id="mrs_01_24802__en-us_topic_0265792787_s3bdfd790912444eaa61e25c34d4fbe0b"><h4 class="sectiontitle">System Response</h4><p id="mrs_01_24802__en-us_topic_0265792787_a023bbb240c584e7ba4b2b2c7981f64b9">You can view query results on the client.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="mrs_01_24739.html">CALL COMMAND</a></div>
</div>
</div>