File tree Expand file tree Collapse file tree
opensearch/src/main/java/org/opensearch/sql/opensearch/functions Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616import org .apache .calcite .rel .type .RelDataType ;
1717import org .apache .calcite .rel .type .RelDataTypeFactory ;
1818import org .apache .calcite .rex .RexCall ;
19+ import org .apache .calcite .sql .type .CompositeOperandTypeChecker ;
20+ import org .apache .calcite .sql .type .OperandTypes ;
1921import org .apache .calcite .sql .type .SqlReturnTypeInference ;
2022import org .apache .calcite .sql .type .SqlTypeName ;
2123import org .opensearch .geospatial .action .IpEnrichmentActionClient ;
2426import org .opensearch .sql .data .model .ExprTupleValue ;
2527import org .opensearch .sql .data .model .ExprValue ;
2628import org .opensearch .sql .expression .function .ImplementorUDF ;
29+ import org .opensearch .sql .expression .function .UDFOperandMetadata ;
2730import org .opensearch .transport .client .node .NodeClient ;
2831
2932/**
@@ -53,6 +56,13 @@ public SqlReturnTypeInference getReturnTypeInference() {
5356 };
5457 }
5558
59+ @ Override
60+ public UDFOperandMetadata getOperandMetadata () {
61+ return UDFOperandMetadata .wrap (
62+ (CompositeOperandTypeChecker )
63+ OperandTypes .STRING_STRING .or (OperandTypes .STRING_STRING_STRING ));
64+ }
65+
5666 public static class GeoIPImplementor implements NotNullImplementor {
5767 @ Getter private static NodeClient nodeClient ;
5868
You can’t perform that action at this time.
0 commit comments