englefly commented on code in PR #64314:
URL: https://github.com/apache/doris/pull/64314#discussion_r3386186286
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/processor/post/RuntimeFilterGenerator.java:
##########
@@ -262,7 +260,7 @@ public PhysicalPlan
visitPhysicalHashJoin(PhysicalHashJoin<? extends Plan, ? ext
return join;
}
RuntimeFilterContext ctx = context.getRuntimeFilterContext();
- List<TRuntimeFilterType> legalTypes =
Arrays.stream(TRuntimeFilterType.values())
+ List<TRuntimeFilterType> legalTypes =
RuntimeFilterTypeHelper.getSupportedRuntimeFilterTypes().stream()
Review Comment:
这里的意思是如果用户定义的type 包含1、2、16, 那么legalTypes就是1、2, 去掉16.
用type和supportedRuntimeFilterTypes 求交集就可以。allowedRuntimeFilterType 现在的实现会返回
1、2、4、8、16
##########
fe/fe-core/src/main/java/org/apache/doris/qe/RuntimeFilterTypeHelper.java:
##########
@@ -52,15 +60,24 @@ public class RuntimeFilterTypeHelper {
varValueSet.put("BLOOM_FILTER", (long)
TRuntimeFilterType.BLOOM.getValue());
varValueSet.put("MIN_MAX", (long)
TRuntimeFilterType.MIN_MAX.getValue());
varValueSet.put("IN_OR_BLOOM_FILTER", (long)
TRuntimeFilterType.IN_OR_BLOOM.getValue());
- varValueSet.put("BITMAP_FILTER", (long)
TRuntimeFilterType.BITMAP.getValue());
}
public static boolean allowedRuntimeFilterType(long runtimeFilterType,
TRuntimeFilterType type) {
- return (runtimeFilterType & type.getValue()) != 0;
+ return SUPPORTED_RUNTIME_FILTER_TYPES.contains(type)
Review Comment:
runtime filter type 因为是按位与计算的,所以只能是1/2/4/8/16/32/64 这几个值,所以浪费一个16损失还是挺大的。
能不能直接删除16. 如果用户升级,老系统上配置了16,新版本会直接忽略。如果将来我们新加了 16 的rf 类型,那么用户就自动用了新rf
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]