|
32 | 32 | import org.apache.calcite.sql.fun.SqlLibrary; |
33 | 33 | import org.apache.calcite.sql.fun.SqlLibraryOperatorTableFactory; |
34 | 34 | import org.apache.calcite.sql.fun.SqlStdOperatorTable; |
| 35 | +import org.apache.calcite.sql.type.OperandTypes; |
35 | 36 | import org.apache.calcite.sql.type.ReturnTypes; |
36 | 37 | import org.apache.calcite.sql.type.SqlTypeName; |
37 | 38 | import org.apache.calcite.sql.util.ListSqlOperatorTable; |
|
58 | 59 | import org.opensearch.sql.expression.function.BuiltinFunctionName; |
59 | 60 | import org.opensearch.sql.expression.function.PPLBuiltinOperators; |
60 | 61 | import org.opensearch.sql.expression.function.PPLFuncImpTable; |
| 62 | +import org.opensearch.sql.expression.function.UDFOperandMetadata; |
61 | 63 | import org.opensearch.sql.opensearch.client.OpenSearchClient; |
62 | 64 | import org.opensearch.sql.opensearch.executor.protector.ExecutionProtector; |
63 | 65 | import org.opensearch.sql.opensearch.functions.DistinctCountApproxAggFunction; |
@@ -302,7 +304,7 @@ private void registerOpenSearchFunctions() { |
302 | 304 | DistinctCountApproxAggFunction.class, |
303 | 305 | BuiltinFunctionName.DISTINCT_COUNT_APPROX.name(), |
304 | 306 | ReturnTypes.BIGINT_FORCE_NULLABLE, |
305 | | - null); |
| 307 | + UDFOperandMetadata.wrap(OperandTypes.ANY)); |
306 | 308 | PPLFuncImpTable.INSTANCE.registerExternalAggOperator( |
307 | 309 | BuiltinFunctionName.DISTINCT_COUNT_APPROX, approxDistinctCountFunction); |
308 | 310 | OperatorTable.addOperator( |
|
0 commit comments