Skip to main content
Version: Candidate-4.0

inspect_hive_part_info

inspect_hive_part_info(table_name)

This function returns Hive partition information for a table.

Arguments​

table_name: The name of the table (VARCHAR).

Return Value​

Returns a VARCHAR string containing the Hive partition information in JSON format.

Examples​

Example 1: Inspect a partitioned Hive table's partition information:

mysql> select inspect_hive_part_info('t1');
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| inspect_hive_part_info('t1') |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| {"k3=9999-12-03/k4=3":{"parameters":{"totalSize":"625","numRows":"1","starrocks_version":"bc39130-bc39130","numFiles":"1","starrocks_query_id":"0197ca18-dd10-76fd-bb85-253226af8365","transient_lastDdlTime":"1751442316","STATS_GENERATED_VIA_STATS_TASK":"workaround for potential lack of HIVE-12730"},"inputFormat":"PARQUET","textFileFormatDesc":{},"fullPath":"hdfs://emr-header-1.cluster-49091:9000/user/hive/warehouse/hive_db_b4425ea7d8184049a2b1e039c0a8f595.db/t1/k3=9999-12-03/k4=3","isSplittable":true}} |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)