[feature](Nereids) add array distance functions (#25196)

- l1_distance
- l2_distance
- cosine_distance
- inner_product
This commit is contained in:
morrySnow
2023-10-11 10:35:06 +08:00
committed by GitHub
parent 8e66dbc4a8
commit b91bce8a62
8 changed files with 1276 additions and 16 deletions

View File

@ -108,6 +108,7 @@ import org.apache.doris.nereids.trees.expressions.functions.scalar.Conv;
import org.apache.doris.nereids.trees.expressions.functions.scalar.ConvertTo;
import org.apache.doris.nereids.trees.expressions.functions.scalar.ConvertTz;
import org.apache.doris.nereids.trees.expressions.functions.scalar.Cos;
import org.apache.doris.nereids.trees.expressions.functions.scalar.CosineDistance;
import org.apache.doris.nereids.trees.expressions.functions.scalar.CountEqual;
import org.apache.doris.nereids.trees.expressions.functions.scalar.CreateMap;
import org.apache.doris.nereids.trees.expressions.functions.scalar.CreateNamedStruct;
@ -180,6 +181,7 @@ import org.apache.doris.nereids.trees.expressions.functions.scalar.HoursDiff;
import org.apache.doris.nereids.trees.expressions.functions.scalar.HoursSub;
import org.apache.doris.nereids.trees.expressions.functions.scalar.If;
import org.apache.doris.nereids.trees.expressions.functions.scalar.Initcap;
import org.apache.doris.nereids.trees.expressions.functions.scalar.InnerProduct;
import org.apache.doris.nereids.trees.expressions.functions.scalar.Instr;
import org.apache.doris.nereids.trees.expressions.functions.scalar.JsonArray;
import org.apache.doris.nereids.trees.expressions.functions.scalar.JsonContains;
@ -213,6 +215,8 @@ import org.apache.doris.nereids.trees.expressions.functions.scalar.JsonbParseNul
import org.apache.doris.nereids.trees.expressions.functions.scalar.JsonbParseNullableErrorToValue;
import org.apache.doris.nereids.trees.expressions.functions.scalar.JsonbType;
import org.apache.doris.nereids.trees.expressions.functions.scalar.JsonbValid;
import org.apache.doris.nereids.trees.expressions.functions.scalar.L1Distance;
import org.apache.doris.nereids.trees.expressions.functions.scalar.L2Distance;
import org.apache.doris.nereids.trees.expressions.functions.scalar.LastDay;
import org.apache.doris.nereids.trees.expressions.functions.scalar.Least;
import org.apache.doris.nereids.trees.expressions.functions.scalar.Left;
@ -491,6 +495,7 @@ public class BuiltinScalarFunctions implements FunctionHelper {
scalar(ConvertTo.class, "convert_to"),
scalar(ConvertTz.class, "convert_tz"),
scalar(Cos.class, "cos"),
scalar(CosineDistance.class, "cosine_distance"),
scalar(CountEqual.class, "countequal"),
scalar(CreateMap.class, "map"),
scalar(CreateStruct.class, "struct"),
@ -560,6 +565,7 @@ public class BuiltinScalarFunctions implements FunctionHelper {
scalar(HoursSub.class, "hours_sub"),
scalar(If.class, "if"),
scalar(Initcap.class, "initcap"),
scalar(InnerProduct.class, "inner_product"),
scalar(Instr.class, "instr"),
scalar(JsonArray.class, "json_array"),
scalar(JsonObject.class, "json_object"),
@ -614,6 +620,8 @@ public class BuiltinScalarFunctions implements FunctionHelper {
scalar(JsonbType.class, "jsonb_type"),
scalar(JsonLength.class, "json_length"),
scalar(JsonContains.class, "json_contains"),
scalar(L1Distance.class, "l1_distance"),
scalar(L2Distance.class, "l2_distance"),
scalar(LastDay.class, "last_day"),
scalar(Least.class, "least"),
scalar(Left.class, "left"),

View File

@ -0,0 +1,89 @@
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package org.apache.doris.nereids.trees.expressions.functions.scalar;
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.ComputePrecisionForArrayItemAgg;
import org.apache.doris.nereids.trees.expressions.functions.ExplicitlyCastableSignature;
import org.apache.doris.nereids.trees.expressions.shape.UnaryExpression;
import org.apache.doris.nereids.trees.expressions.visitor.ExpressionVisitor;
import org.apache.doris.nereids.types.ArrayType;
import org.apache.doris.nereids.types.BigIntType;
import org.apache.doris.nereids.types.DoubleType;
import org.apache.doris.nereids.types.FloatType;
import org.apache.doris.nereids.types.IntegerType;
import org.apache.doris.nereids.types.LargeIntType;
import org.apache.doris.nereids.types.SmallIntType;
import org.apache.doris.nereids.types.TinyIntType;
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableList;
import java.util.List;
/**
* cosine_distance function
*/
public class CosineDistance extends ScalarFunction implements ExplicitlyCastableSignature,
ComputePrecisionForArrayItemAgg, UnaryExpression, AlwaysNullable {
public static final List<FunctionSignature> SIGNATURES = ImmutableList.of(
FunctionSignature.ret(DoubleType.INSTANCE)
.args(ArrayType.of(TinyIntType.INSTANCE), ArrayType.of(TinyIntType.INSTANCE)),
FunctionSignature.ret(DoubleType.INSTANCE)
.args(ArrayType.of(SmallIntType.INSTANCE), ArrayType.of(SmallIntType.INSTANCE)),
FunctionSignature.ret(DoubleType.INSTANCE)
.args(ArrayType.of(IntegerType.INSTANCE), ArrayType.of(IntegerType.INSTANCE)),
FunctionSignature.ret(DoubleType.INSTANCE)
.args(ArrayType.of(BigIntType.INSTANCE), ArrayType.of(BigIntType.INSTANCE)),
FunctionSignature.ret(DoubleType.INSTANCE)
.args(ArrayType.of(LargeIntType.INSTANCE), ArrayType.of(LargeIntType.INSTANCE)),
FunctionSignature.ret(DoubleType.INSTANCE)
.args(ArrayType.of(FloatType.INSTANCE), ArrayType.of(FloatType.INSTANCE)),
FunctionSignature.ret(DoubleType.INSTANCE)
.args(ArrayType.of(DoubleType.INSTANCE), ArrayType.of(DoubleType.INSTANCE))
);
/**
* constructor with 1 argument.
*/
public CosineDistance(Expression arg0, Expression arg1) {
super("cosine_distance", arg0, arg1);
}
/**
* withChildren.
*/
@Override
public CosineDistance withChildren(List<Expression> children) {
Preconditions.checkArgument(children.size() == 2);
return new CosineDistance(children.get(0), children.get(1));
}
@Override
public <R, C> R accept(ExpressionVisitor<R, C> visitor, C context) {
return visitor.visitCosineDistance(this, context);
}
@Override
public List<FunctionSignature> getSignatures() {
return SIGNATURES;
}
}

View File

@ -0,0 +1,89 @@
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package org.apache.doris.nereids.trees.expressions.functions.scalar;
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.ComputePrecisionForArrayItemAgg;
import org.apache.doris.nereids.trees.expressions.functions.ExplicitlyCastableSignature;
import org.apache.doris.nereids.trees.expressions.shape.UnaryExpression;
import org.apache.doris.nereids.trees.expressions.visitor.ExpressionVisitor;
import org.apache.doris.nereids.types.ArrayType;
import org.apache.doris.nereids.types.BigIntType;
import org.apache.doris.nereids.types.DoubleType;
import org.apache.doris.nereids.types.FloatType;
import org.apache.doris.nereids.types.IntegerType;
import org.apache.doris.nereids.types.LargeIntType;
import org.apache.doris.nereids.types.SmallIntType;
import org.apache.doris.nereids.types.TinyIntType;
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableList;
import java.util.List;
/**
* inner_product function
*/
public class InnerProduct extends ScalarFunction implements ExplicitlyCastableSignature,
ComputePrecisionForArrayItemAgg, UnaryExpression, AlwaysNullable {
public static final List<FunctionSignature> SIGNATURES = ImmutableList.of(
FunctionSignature.ret(DoubleType.INSTANCE)
.args(ArrayType.of(TinyIntType.INSTANCE), ArrayType.of(TinyIntType.INSTANCE)),
FunctionSignature.ret(DoubleType.INSTANCE)
.args(ArrayType.of(SmallIntType.INSTANCE), ArrayType.of(SmallIntType.INSTANCE)),
FunctionSignature.ret(DoubleType.INSTANCE)
.args(ArrayType.of(IntegerType.INSTANCE), ArrayType.of(IntegerType.INSTANCE)),
FunctionSignature.ret(DoubleType.INSTANCE)
.args(ArrayType.of(BigIntType.INSTANCE), ArrayType.of(BigIntType.INSTANCE)),
FunctionSignature.ret(DoubleType.INSTANCE)
.args(ArrayType.of(LargeIntType.INSTANCE), ArrayType.of(LargeIntType.INSTANCE)),
FunctionSignature.ret(DoubleType.INSTANCE)
.args(ArrayType.of(FloatType.INSTANCE), ArrayType.of(FloatType.INSTANCE)),
FunctionSignature.ret(DoubleType.INSTANCE)
.args(ArrayType.of(DoubleType.INSTANCE), ArrayType.of(DoubleType.INSTANCE))
);
/**
* constructor with 1 argument.
*/
public InnerProduct(Expression arg0, Expression arg1) {
super("inner_product", arg0, arg1);
}
/**
* withChildren.
*/
@Override
public InnerProduct withChildren(List<Expression> children) {
Preconditions.checkArgument(children.size() == 2);
return new InnerProduct(children.get(0), children.get(1));
}
@Override
public <R, C> R accept(ExpressionVisitor<R, C> visitor, C context) {
return visitor.visitInnerProduct(this, context);
}
@Override
public List<FunctionSignature> getSignatures() {
return SIGNATURES;
}
}

View File

@ -0,0 +1,89 @@
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package org.apache.doris.nereids.trees.expressions.functions.scalar;
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.ComputePrecisionForArrayItemAgg;
import org.apache.doris.nereids.trees.expressions.functions.ExplicitlyCastableSignature;
import org.apache.doris.nereids.trees.expressions.shape.UnaryExpression;
import org.apache.doris.nereids.trees.expressions.visitor.ExpressionVisitor;
import org.apache.doris.nereids.types.ArrayType;
import org.apache.doris.nereids.types.BigIntType;
import org.apache.doris.nereids.types.DoubleType;
import org.apache.doris.nereids.types.FloatType;
import org.apache.doris.nereids.types.IntegerType;
import org.apache.doris.nereids.types.LargeIntType;
import org.apache.doris.nereids.types.SmallIntType;
import org.apache.doris.nereids.types.TinyIntType;
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableList;
import java.util.List;
/**
* l1_distance function
*/
public class L1Distance extends ScalarFunction implements ExplicitlyCastableSignature,
ComputePrecisionForArrayItemAgg, UnaryExpression, AlwaysNullable {
public static final List<FunctionSignature> SIGNATURES = ImmutableList.of(
FunctionSignature.ret(DoubleType.INSTANCE)
.args(ArrayType.of(TinyIntType.INSTANCE), ArrayType.of(TinyIntType.INSTANCE)),
FunctionSignature.ret(DoubleType.INSTANCE)
.args(ArrayType.of(SmallIntType.INSTANCE), ArrayType.of(SmallIntType.INSTANCE)),
FunctionSignature.ret(DoubleType.INSTANCE)
.args(ArrayType.of(IntegerType.INSTANCE), ArrayType.of(IntegerType.INSTANCE)),
FunctionSignature.ret(DoubleType.INSTANCE)
.args(ArrayType.of(BigIntType.INSTANCE), ArrayType.of(BigIntType.INSTANCE)),
FunctionSignature.ret(DoubleType.INSTANCE)
.args(ArrayType.of(LargeIntType.INSTANCE), ArrayType.of(LargeIntType.INSTANCE)),
FunctionSignature.ret(DoubleType.INSTANCE)
.args(ArrayType.of(FloatType.INSTANCE), ArrayType.of(FloatType.INSTANCE)),
FunctionSignature.ret(DoubleType.INSTANCE)
.args(ArrayType.of(DoubleType.INSTANCE), ArrayType.of(DoubleType.INSTANCE))
);
/**
* constructor with 1 argument.
*/
public L1Distance(Expression arg0, Expression arg1) {
super("l1_distance", arg0, arg1);
}
/**
* withChildren.
*/
@Override
public L1Distance withChildren(List<Expression> children) {
Preconditions.checkArgument(children.size() == 2);
return new L1Distance(children.get(0), children.get(1));
}
@Override
public <R, C> R accept(ExpressionVisitor<R, C> visitor, C context) {
return visitor.visitL1Distance(this, context);
}
@Override
public List<FunctionSignature> getSignatures() {
return SIGNATURES;
}
}

View File

@ -0,0 +1,89 @@
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package org.apache.doris.nereids.trees.expressions.functions.scalar;
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.ComputePrecisionForArrayItemAgg;
import org.apache.doris.nereids.trees.expressions.functions.ExplicitlyCastableSignature;
import org.apache.doris.nereids.trees.expressions.shape.UnaryExpression;
import org.apache.doris.nereids.trees.expressions.visitor.ExpressionVisitor;
import org.apache.doris.nereids.types.ArrayType;
import org.apache.doris.nereids.types.BigIntType;
import org.apache.doris.nereids.types.DoubleType;
import org.apache.doris.nereids.types.FloatType;
import org.apache.doris.nereids.types.IntegerType;
import org.apache.doris.nereids.types.LargeIntType;
import org.apache.doris.nereids.types.SmallIntType;
import org.apache.doris.nereids.types.TinyIntType;
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableList;
import java.util.List;
/**
* l2_distance function
*/
public class L2Distance extends ScalarFunction implements ExplicitlyCastableSignature,
ComputePrecisionForArrayItemAgg, UnaryExpression, AlwaysNullable {
public static final List<FunctionSignature> SIGNATURES = ImmutableList.of(
FunctionSignature.ret(DoubleType.INSTANCE)
.args(ArrayType.of(TinyIntType.INSTANCE), ArrayType.of(TinyIntType.INSTANCE)),
FunctionSignature.ret(DoubleType.INSTANCE)
.args(ArrayType.of(SmallIntType.INSTANCE), ArrayType.of(SmallIntType.INSTANCE)),
FunctionSignature.ret(DoubleType.INSTANCE)
.args(ArrayType.of(IntegerType.INSTANCE), ArrayType.of(IntegerType.INSTANCE)),
FunctionSignature.ret(DoubleType.INSTANCE)
.args(ArrayType.of(BigIntType.INSTANCE), ArrayType.of(BigIntType.INSTANCE)),
FunctionSignature.ret(DoubleType.INSTANCE)
.args(ArrayType.of(LargeIntType.INSTANCE), ArrayType.of(LargeIntType.INSTANCE)),
FunctionSignature.ret(DoubleType.INSTANCE)
.args(ArrayType.of(FloatType.INSTANCE), ArrayType.of(FloatType.INSTANCE)),
FunctionSignature.ret(DoubleType.INSTANCE)
.args(ArrayType.of(DoubleType.INSTANCE), ArrayType.of(DoubleType.INSTANCE))
);
/**
* constructor with 1 argument.
*/
public L2Distance(Expression arg0, Expression arg1) {
super("l2_distance", arg0, arg1);
}
/**
* withChildren.
*/
@Override
public L2Distance withChildren(List<Expression> children) {
Preconditions.checkArgument(children.size() == 2);
return new L2Distance(children.get(0), children.get(1));
}
@Override
public <R, C> R accept(ExpressionVisitor<R, C> visitor, C context) {
return visitor.visitL2Distance(this, context);
}
@Override
public List<FunctionSignature> getSignatures() {
return SIGNATURES;
}
}

View File

@ -108,6 +108,7 @@ import org.apache.doris.nereids.trees.expressions.functions.scalar.Conv;
import org.apache.doris.nereids.trees.expressions.functions.scalar.ConvertTo;
import org.apache.doris.nereids.trees.expressions.functions.scalar.ConvertTz;
import org.apache.doris.nereids.trees.expressions.functions.scalar.Cos;
import org.apache.doris.nereids.trees.expressions.functions.scalar.CosineDistance;
import org.apache.doris.nereids.trees.expressions.functions.scalar.CountEqual;
import org.apache.doris.nereids.trees.expressions.functions.scalar.CreateMap;
import org.apache.doris.nereids.trees.expressions.functions.scalar.CreateNamedStruct;
@ -176,6 +177,7 @@ import org.apache.doris.nereids.trees.expressions.functions.scalar.HoursDiff;
import org.apache.doris.nereids.trees.expressions.functions.scalar.HoursSub;
import org.apache.doris.nereids.trees.expressions.functions.scalar.If;
import org.apache.doris.nereids.trees.expressions.functions.scalar.Initcap;
import org.apache.doris.nereids.trees.expressions.functions.scalar.InnerProduct;
import org.apache.doris.nereids.trees.expressions.functions.scalar.Instr;
import org.apache.doris.nereids.trees.expressions.functions.scalar.JsonArray;
import org.apache.doris.nereids.trees.expressions.functions.scalar.JsonContains;
@ -209,6 +211,8 @@ import org.apache.doris.nereids.trees.expressions.functions.scalar.JsonbParseNul
import org.apache.doris.nereids.trees.expressions.functions.scalar.JsonbParseNullableErrorToValue;
import org.apache.doris.nereids.trees.expressions.functions.scalar.JsonbType;
import org.apache.doris.nereids.trees.expressions.functions.scalar.JsonbValid;
import org.apache.doris.nereids.trees.expressions.functions.scalar.L1Distance;
import org.apache.doris.nereids.trees.expressions.functions.scalar.L2Distance;
import org.apache.doris.nereids.trees.expressions.functions.scalar.LastDay;
import org.apache.doris.nereids.trees.expressions.functions.scalar.Least;
import org.apache.doris.nereids.trees.expressions.functions.scalar.Left;
@ -716,6 +720,10 @@ public interface ScalarFunctionVisitor<R, C> {
return visitScalarFunction(concatWs, context);
}
default R visitConnectionId(ConnectionId connectionId, C context) {
return visitScalarFunction(connectionId, context);
}
default R visitConv(Conv conv, C context) {
return visitScalarFunction(conv, context);
}
@ -732,10 +740,18 @@ public interface ScalarFunctionVisitor<R, C> {
return visitScalarFunction(cos, context);
}
default R visitCosineDistance(CosineDistance cosineDistance, C context) {
return visitScalarFunction(cosineDistance, context);
}
default R visitCountEqual(CountEqual countequal, C context) {
return visitScalarFunction(countequal, context);
}
default R visitCurrentCatalog(CurrentCatalog currentCatalog, C context) {
return visitScalarFunction(currentCatalog, context);
}
default R visitCurrentDate(CurrentDate currentDate, C context) {
return visitScalarFunction(currentDate, context);
}
@ -744,28 +760,16 @@ public interface ScalarFunctionVisitor<R, C> {
return visitScalarFunction(currentTime, context);
}
default R visitDate(Date date, C context) {
return visitScalarFunction(date, context);
default R visitCurrentUser(CurrentUser currentUser, C context) {
return visitScalarFunction(currentUser, context);
}
default R visitDatabase(Database database, C context) {
return visitScalarFunction(database, context);
}
default R visitCurrentUser(CurrentUser currentUser, C context) {
return visitScalarFunction(currentUser, context);
}
default R visitCurrentCatalog(CurrentCatalog currentCatalog, C context) {
return visitScalarFunction(currentCatalog, context);
}
default R visitUser(User user, C context) {
return visitScalarFunction(user, context);
}
default R visitConnectionId(ConnectionId connectionId, C context) {
return visitScalarFunction(connectionId, context);
default R visitDate(Date date, C context) {
return visitScalarFunction(date, context);
}
default R visitDateDiff(DateDiff dateDiff, C context) {
@ -1048,6 +1052,10 @@ public interface ScalarFunctionVisitor<R, C> {
return visitScalarFunction(initcap, context);
}
default R visitInnerProduct(InnerProduct innerProduct, C context) {
return visitScalarFunction(innerProduct, context);
}
default R visitInstr(Instr instr, C context) {
return visitScalarFunction(instr, context);
}
@ -1180,6 +1188,14 @@ public interface ScalarFunctionVisitor<R, C> {
return visitScalarFunction(jsonbValid, context);
}
default R visitL1Distance(L1Distance l1Distance, C context) {
return visitScalarFunction(l1Distance, context);
}
default R visitL2Distance(L2Distance l2Distance, C context) {
return visitScalarFunction(l2Distance, context);
}
default R visitLastDay(LastDay lastDay, C context) {
return visitScalarFunction(lastDay, context);
}
@ -1724,6 +1740,10 @@ public interface ScalarFunctionVisitor<R, C> {
return visitScalarFunction(upper, context);
}
default R visitUser(User user, C context) {
return visitScalarFunction(user, context);
}
default R visitUtcTimestamp(UtcTimestamp utcTimestamp, C context) {
return visitScalarFunction(utcTimestamp, context);
}