Skip to content

Commit e0029a2

Browse files
committedFeb 5, 2025
Merge from main
Signed-off-by: Andy Kwok <andy.kwok@improving.com>
1 parent 7da0dec commit e0029a2

File tree

49 files changed

+1137
-98
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1137
-98
lines changed
 

‎core/src/main/java/org/opensearch/sql/data/type/ExprType.java

+14
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
import java.util.Arrays;
1111
import java.util.List;
12+
import java.util.Optional;
1213
import org.opensearch.sql.data.model.ExprValue;
1314
import org.opensearch.sql.expression.Expression;
1415

@@ -54,4 +55,17 @@ default List<ExprType> getParent() {
5455
default String legacyTypeName() {
5556
return typeName();
5657
}
58+
59+
/** Get the original path. Types like alias type will set the actual path in field property. */
60+
default Optional<String> getOriginalPath() {
61+
return Optional.empty();
62+
}
63+
64+
/**
65+
* Get the original path. Types like alias type should be derived from the type of the original
66+
* field.
67+
*/
68+
default ExprType getOriginalExprType() {
69+
return this;
70+
}
5771
}

‎core/src/main/java/org/opensearch/sql/expression/DSL.java

+4
Original file line numberDiff line numberDiff line change
@@ -985,6 +985,10 @@ public static FunctionExpression utc_timestamp(
985985
return compile(functionProperties, BuiltinFunctionName.UTC_TIMESTAMP, args);
986986
}
987987

988+
public static FunctionExpression geoip(Expression... args) {
989+
return compile(FunctionProperties.None, BuiltinFunctionName.GEOIP, args);
990+
}
991+
988992
public static FunctionExpression json_function(Expression value) {
989993
return compile(FunctionProperties.None, BuiltinFunctionName.JSON, value);
990994
}

0 commit comments

Comments
 (0)