更新时间:2024-11-29 GMT+08:00

FlinkSQL DISTRIBUTEBY

FlinkSQL新增DISTRIBUTEBY特性,根据指定的字段进行分区,支持单字段及多字段,解决数据仅需要分区的场景。示例如下:

SELECT /*+ DISTRIBUTEBY('id') */ id, name FROM t1;
SELECT /*+ DISTRIBUTEBY('id', 'name') */ id, name FROM t1;
SELECT /*+ DISTRIBUTEBY('id1') */ id as id1, name FROM t1;