Skip to content

Commit 8f87a96

Browse files
authored
[fix](compile) fix fe compile failed by code too large (apache#46408)
### What problem does this PR solve? fix fe compile failed by code too large
1 parent 3c9b29a commit 8f87a96

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

fe/fe-core/src/main/java/org/apache/doris/nereids/pattern/generator/ExpressionTypeMappingGenerator.java

+23
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,25 @@
3636

3737
/** ExpressionTypeMappingGenerator */
3838
public class ExpressionTypeMappingGenerator {
39+
private static final Set<String> FORBIDDEN_CLASS = Sets.newHashSet(
40+
"org.apache.doris.nereids.trees.expressions.functions.ExpressionTrait",
41+
"org.apache.doris.nereids.trees.expressions.shape.LeafExpression",
42+
"org.apache.doris.nereids.trees.expressions.shape.UnaryExpression",
43+
"org.apache.doris.nereids.trees.expressions.shape.BinaryExpression",
44+
"org.apache.doris.nereids.trees.expressions.functions.AlwaysNullable",
45+
"org.apache.doris.nereids.trees.expressions.functions.AlwaysNotNullable",
46+
"org.apache.doris.nereids.trees.expressions.functions.PropagateNullLiteral",
47+
"org.apache.doris.nereids.trees.expressions.typecoercion.ImplicitCastInputTypes",
48+
"org.apache.doris.nereids.trees.expressions.functions.ExplicitlyCastableSignature",
49+
"org.apache.doris.nereids.trees.expressions.functions.Function",
50+
"org.apache.doris.nereids.trees.expressions.functions.FunctionTrait",
51+
"org.apache.doris.nereids.trees.expressions.functions.ComputeSignature",
52+
"org.apache.doris.nereids.trees.expressions.functions.scalar.ScalarFunction",
53+
"org.apache.doris.nereids.trees.expressions.typecoercion.ExpectsInputTypes",
54+
"org.apache.doris.nereids.trees.expressions.functions.ComputeNullable",
55+
"org.apache.doris.nereids.trees.expressions.functions.PropagateNullable"
56+
);
57+
3958
private final JavaAstAnalyzer analyzer;
4059

4160
public ExpressionTypeMappingGenerator(JavaAstAnalyzer javaAstAnalyzer) {
@@ -134,6 +153,10 @@ private String generateCode(Map<String, Set<String>> childrenNameMap,
134153
+ " = ImmutableMap.builderWithExpectedSize(" + childrenNameMap.size() + ");\n";
135154

136155
for (String superExpression : superExpressions) {
156+
if (FORBIDDEN_CLASS.contains(superExpression)) {
157+
continue;
158+
}
159+
137160
Set<String> childrenClasseSet = childrenNameMap.get(superExpression)
138161
.stream()
139162
.filter(childClass -> parentNameMap.get(childClass)

0 commit comments

Comments
 (0)