Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
924060929 committed Dec 5, 2024
1 parent eb8fb92 commit 33bd8bb
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

import org.apache.doris.catalog.FunctionSignature;
import org.apache.doris.nereids.trees.expressions.Expression;
import org.apache.doris.nereids.trees.expressions.functions.AlwaysNotNullable;
import org.apache.doris.nereids.trees.expressions.functions.ExplicitlyCastableSignature;
import org.apache.doris.nereids.trees.expressions.functions.scalar.BitmapEmpty;
import org.apache.doris.nereids.trees.expressions.literal.VarcharLiteral;
import org.apache.doris.nereids.types.BitmapType;
import org.apache.doris.nereids.types.VarcharType;
Expand All @@ -33,8 +33,8 @@
import java.util.List;

/** OrthogonalBitmapExprCalculate */
public class OrthogonalBitmapExprCalculate extends AggregateFunction
implements AlwaysNotNullable, OrthogonalBitmapFunction, ExplicitlyCastableSignature {
public class OrthogonalBitmapExprCalculate extends NotNullableAggregateFunction
implements OrthogonalBitmapFunction, ExplicitlyCastableSignature {

static final List<FunctionSignature> FUNCTION_SIGNATURES = ImmutableList.of(
FunctionSignature.ret(BitmapType.INSTANCE)
Expand Down Expand Up @@ -76,4 +76,9 @@ public OrthogonalBitmapExprCalculate withDistinctAndChildren(boolean distinct, L
public List<FunctionSignature> getSignatures() {
return FUNCTION_SIGNATURES;
}

@Override
public Expression resultForEmptyInput() {
return new BitmapEmpty();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

import org.apache.doris.catalog.FunctionSignature;
import org.apache.doris.nereids.trees.expressions.Expression;
import org.apache.doris.nereids.trees.expressions.functions.AlwaysNotNullable;
import org.apache.doris.nereids.trees.expressions.functions.ExplicitlyCastableSignature;
import org.apache.doris.nereids.trees.expressions.functions.scalar.BitmapEmpty;
import org.apache.doris.nereids.trees.expressions.literal.VarcharLiteral;
import org.apache.doris.nereids.types.BigIntType;
import org.apache.doris.nereids.types.BitmapType;
Expand All @@ -34,8 +34,8 @@
import java.util.List;

/** OrthogonalBitmapExprCalculateCount */
public class OrthogonalBitmapExprCalculateCount extends AggregateFunction
implements AlwaysNotNullable, OrthogonalBitmapFunction, ExplicitlyCastableSignature {
public class OrthogonalBitmapExprCalculateCount extends NotNullableAggregateFunction
implements OrthogonalBitmapFunction, ExplicitlyCastableSignature {

static final List<FunctionSignature> FUNCTION_SIGNATURES = ImmutableList.of(
FunctionSignature.ret(BigIntType.INSTANCE)
Expand Down Expand Up @@ -78,4 +78,9 @@ public OrthogonalBitmapExprCalculateCount withDistinctAndChildren(boolean distin
public List<FunctionSignature> getSignatures() {
return FUNCTION_SIGNATURES;
}

@Override
public Expression resultForEmptyInput() {
return new BitmapEmpty();
}
}

0 comments on commit 33bd8bb

Please sign in to comment.