Skip to content

Commit

Permalink
rebase to master
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangstar333 committed Apr 18, 2024
1 parent 8510ec4 commit a1ea131
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
1 change: 0 additions & 1 deletion be/src/vec/exec/vtable_function_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ Status VTableFunctionNode::_get_expanded_block(RuntimeState* state, Block* outpu
for (int i = 0; i < _fn_num; i++) {
if (columns[i + _child_slots.size()]->is_nullable()) {
_fns[i]->set_nullable();
LOG(INFO) << "_fns[i]->set_nullable(): " << i + _child_slots.size();
}
}

Expand Down
2 changes: 0 additions & 2 deletions be/src/vec/exprs/vectorized_fn_call.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,12 @@ Status VectorizedFnCall::prepare(RuntimeState* state, const RowDescriptor& desc,

_expr_name = fmt::format("VectorizedFnCall[{}](arguments={},return={})", _fn.name.function_name,
get_child_names(), _data_type->get_name());
LOG(INFO) << "_expr_name: " << _expr_name;
if (_fn.binary_type == TFunctionBinaryType::RPC) {
_function = FunctionRPC::create(_fn, argument_template, _data_type);
} else if (_fn.binary_type == TFunctionBinaryType::JAVA_UDF) {
if (config::enable_java_support) {
if (_fn.is_udtf_function) {
_function = FakeJavaUDTF::create(_fn, argument_template, _data_type);
// _function = JavaFunctionCall::create(_fn, argument_template, _data_type);
} else {
_function = JavaFunctionCall::create(_fn, argument_template, _data_type);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

package org.apache.doris.nereids.trees.expressions.functions.udf;

import org.apache.doris.common.Pair;
import org.apache.doris.common.util.ReflectionUtils;
import org.apache.doris.nereids.trees.expressions.Expression;
import org.apache.doris.nereids.trees.expressions.functions.BoundFunction;
Expand Down Expand Up @@ -73,14 +74,14 @@ public boolean canApply(List<?> arguments) {
}

@Override
public BoundFunction build(String name, List<?> arguments) {
public Pair<JavaUdtf, JavaUdtf> build(String name, List<?> arguments) {
List<Expression> exprs = arguments.stream().map(Expression.class::cast).collect(Collectors.toList());
List<DataType> argTypes = udf.getSignatures().get(0).argumentsTypes;

List<Expression> processedExprs = Lists.newArrayList();
for (int i = 0; i < exprs.size(); ++i) {
processedExprs.add(TypeCoercionUtils.castIfNotSameType(exprs.get(i), ((DataType) argTypes.get(i))));
processedExprs.add(TypeCoercionUtils.castIfNotSameType(exprs.get(i), argTypes.get(i)));
}
return udf.withChildren(processedExprs);
return Pair.ofSame(udf.withChildren(processedExprs));
}
}

0 comments on commit a1ea131

Please sign in to comment.