File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/fulltext Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 2323import org .elasticsearch .xpack .esql .core .expression .Expression ;
2424import org .elasticsearch .xpack .esql .core .expression .FieldAttribute ;
2525import org .elasticsearch .xpack .esql .core .expression .FoldContext ;
26+ import org .elasticsearch .xpack .esql .core .expression .Literal ;
2627import org .elasticsearch .xpack .esql .core .expression .MapExpression ;
2728import org .elasticsearch .xpack .esql .core .expression .TypeResolutions ;
2829import org .elasticsearch .xpack .esql .core .querydsl .query .Query ;
@@ -280,10 +281,10 @@ private Map<String, Object> parseOptions() throws InvalidArgumentException {
280281 if (resolution .unresolved ()) {
281282 throw new InvalidArgumentException (resolution .message ());
282283 }
283- Object optionExprFold = optionExpr . fold ( FoldContext . small () );
284- Object valueExprFold = valueExpr . fold ( FoldContext . small () );
285- String optionName = optionExprFold instanceof BytesRef br ? br .utf8ToString () : optionExprFold .toString ();
286- String optionValue = valueExprFold instanceof BytesRef br ? br .utf8ToString () : valueExprFold .toString ();
284+ Object optionExprLiteral = (( Literal ) optionExpr ). value ( );
285+ Object valueExprLiteral = (( Literal ) valueExpr ). value ( );
286+ String optionName = optionExprLiteral instanceof BytesRef br ? br .utf8ToString () : optionExprLiteral .toString ();
287+ String optionValue = valueExprLiteral instanceof BytesRef br ? br .utf8ToString () : valueExprLiteral .toString ();
287288 // validate the optionExpr is supported
288289 DataType dataType = ALLOWED_OPTIONS .get (optionName );
289290 if (dataType == null ) {
You can’t perform that action at this time.
0 commit comments