同步OSS数据源上实际的数据分区信息到元数据中
语法
MSCK REPAIR TABLE table_name
示例
在命令执行前,SHOW PARTITIONS primitives_parquet_p
无法显示分区信息。
mysql> show partitions primitives_parquet_p;
+--------+
| Result |
+--------+
| |
+--------+
1 row in set (0.85 sec)
执行完MSCK REPAIR TABLE
命令后,可以看到对应的分区信息:
mysql> msck repair table primitives_parquet_p;
+--------+
| Result |
+--------+
| NULL |
+--------+
1 row in set (0.94 sec)
mysql> show partitions primitives_parquet_p;
+--------------------------------------------------------------------------+
| Result |
+--------------------------------------------------------------------------+
| year=2009/month=1
year=2009/month=2
year=2009/month=3
year=2009/month=4
|
+--------------------------------------------------------------------------+
1 row in set (0.33 sec)