mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-25 01:19:02 +00:00
SQL: Allow IN from empty lists
It won't find anything, but it is valid. This fixes a rare test failure. Original commit: elastic/x-pack-elasticsearch@95ee6be507
This commit is contained in:
parent
ed65987500
commit
d7944722cf
@ -37,8 +37,8 @@ public class In extends Expression {
|
||||
|
||||
@Override
|
||||
public Expression replaceChildren(List<Expression> newChildren) {
|
||||
if (newChildren.size() < 2) {
|
||||
throw new IllegalArgumentException("expected more than one child but received [" + newChildren.size() + "]");
|
||||
if (newChildren.size() < 1) {
|
||||
throw new IllegalArgumentException("expected one or more children but received [" + newChildren.size() + "]");
|
||||
}
|
||||
return new In(location(), newChildren.get(newChildren.size() - 1), newChildren.subList(0, newChildren.size() - 1));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user