Skip to content

Commit

Permalink
Remove TEXT output from COALESCE
Browse files Browse the repository at this point in the history
  • Loading branch information
craigtaverner committed Oct 23, 2024
1 parent 0fa28ad commit 84e045e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions docs/reference/esql/functions/kibana/definition/coalesce.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/reference/esql/functions/types/coalesce.asciidoc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ public class Coalesce extends EsqlScalarFunction implements OptionalArgument {
"ip",
"keyword",
"long",
"text",
"version" },
description = "Returns the first of its arguments that is not null. If all arguments are null, it returns `null`.",
examples = { @Example(file = "null", tag = "coalesce") }
Expand Down Expand Up @@ -142,12 +141,12 @@ protected TypeResolution resolveType() {

for (int position = 0; position < children().size(); position++) {
if (dataType == null || dataType == NULL) {
dataType = children().get(position).dataType();
dataType = children().get(position).dataType().noText();
continue;
}
TypeResolution resolution = TypeResolutions.isType(
children().get(position),
t -> t == dataType,
t -> t.noText() == dataType,
sourceText(),
TypeResolutions.ParamOrdinal.fromIndex(position),
dataType.typeName()
Expand Down

0 comments on commit 84e045e

Please sign in to comment.