Skip to content

Commit

Permalink
fix core
Browse files Browse the repository at this point in the history
  • Loading branch information
hubgeter committed Sep 12, 2024
1 parent 99cae55 commit e56b87e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
10 changes: 9 additions & 1 deletion be/src/vec/functions/function_timestamp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ struct StrToDate {

static bool is_variadic() { return false; }

static size_t get_number_of_arguments() { return 2; }

static DataTypes get_variadic_argument_types() {
return {std::make_shared<DataTypeString>(), std::make_shared<DataTypeString>()};
}
Expand Down Expand Up @@ -245,6 +247,8 @@ struct MakeDateImpl {

static bool is_variadic() { return false; }

static size_t get_number_of_arguments() { return 2; }

static DataTypes get_variadic_argument_types() { return {}; }

static DataTypePtr get_return_type_impl(const DataTypes& arguments) {
Expand Down Expand Up @@ -409,6 +413,8 @@ struct DateTrunc {

static bool is_variadic() { return true; }

static size_t get_number_of_arguments() { return 2; }

static DataTypes get_variadic_argument_types() {
return {std::make_shared<DateType>(), std::make_shared<DataTypeString>()};
}
Expand Down Expand Up @@ -1150,7 +1156,7 @@ class FunctionOtherTypesToDateType : public IFunction {

String get_name() const override { return name; }

size_t get_number_of_arguments() const override { return 2; }
size_t get_number_of_arguments() const override { return Impl::get_number_of_arguments(); }

bool is_variadic() const override { return Impl::is_variadic(); }

Expand Down Expand Up @@ -1185,6 +1191,8 @@ class FunctionOtherTypesToDateType : public IFunction {
struct FromIso8601DateV2 {
static constexpr auto name = "from_iso8601_date";

static size_t get_number_of_arguments() { return 1; }

static bool is_variadic() { return false; }

static DataTypes get_variadic_argument_types() { return {std::make_shared<DataTypeString>()}; }
Expand Down
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.AlwaysNullable;
import org.apache.doris.nereids.trees.expressions.functions.ExplicitlyCastableSignature;
import org.apache.doris.nereids.trees.expressions.functions.PropagateNullable;
import org.apache.doris.nereids.trees.expressions.shape.UnaryExpression;
import org.apache.doris.nereids.trees.expressions.visitor.ExpressionVisitor;
import org.apache.doris.nereids.types.DateTimeType;
Expand All @@ -38,7 +38,7 @@
* ScalarFunction 'to_iso8601'. This class is generated by GenerateFunction.
*/
public class ToIso8601 extends ScalarFunction
implements UnaryExpression, ExplicitlyCastableSignature, AlwaysNullable {
implements UnaryExpression, ExplicitlyCastableSignature, PropagateNullable {

public static final List<FunctionSignature> SIGNATURES = ImmutableList.of(
FunctionSignature.ret(StringType.INSTANCE).args(DateTimeV2Type.SYSTEM_DEFAULT),
Expand Down

0 comments on commit e56b87e

Please sign in to comment.