Skip to content

Commit b7d534e

Browse files
authored
Move IsNull/IsNotNull predicates to QL project (#52502)
1 parent c80948f commit b7d534e

File tree

11 files changed

+19
-19
lines changed

11 files changed

+19
-19
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* or more contributor license agreements. Licensed under the Elastic License;
44
* you may not use this file except in compliance with the Elastic License.
55
*/
6-
package org.elasticsearch.xpack.sql.expression.predicate.nulls;
6+
package org.elasticsearch.xpack.ql.expression.predicate.nulls;
77

88
import org.elasticsearch.common.io.stream.StreamInput;
99
import org.elasticsearch.common.io.stream.StreamOutput;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@
33
* or more contributor license agreements. Licensed under the Elastic License;
44
* you may not use this file except in compliance with the Elastic License.
55
*/
6-
package org.elasticsearch.xpack.sql.expression.predicate.nulls;
6+
package org.elasticsearch.xpack.ql.expression.predicate.nulls;
77

88
import org.elasticsearch.xpack.ql.expression.Expression;
99
import org.elasticsearch.xpack.ql.expression.Nullability;
1010
import org.elasticsearch.xpack.ql.expression.function.scalar.UnaryScalarFunction;
1111
import org.elasticsearch.xpack.ql.expression.gen.processor.Processor;
1212
import org.elasticsearch.xpack.ql.expression.gen.script.Scripts;
1313
import org.elasticsearch.xpack.ql.expression.predicate.Negatable;
14+
import org.elasticsearch.xpack.ql.expression.predicate.nulls.CheckNullProcessor.CheckNullOperation;
1415
import org.elasticsearch.xpack.ql.tree.NodeInfo;
1516
import org.elasticsearch.xpack.ql.tree.Source;
1617
import org.elasticsearch.xpack.ql.type.DataType;
1718
import org.elasticsearch.xpack.ql.type.DataTypes;
18-
import org.elasticsearch.xpack.sql.expression.predicate.nulls.CheckNullProcessor.CheckNullOperation;
1919

2020
public class IsNotNull extends UnaryScalarFunction implements Negatable<UnaryScalarFunction> {
2121

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@
33
* or more contributor license agreements. Licensed under the Elastic License;
44
* you may not use this file except in compliance with the Elastic License.
55
*/
6-
package org.elasticsearch.xpack.sql.expression.predicate.nulls;
6+
package org.elasticsearch.xpack.ql.expression.predicate.nulls;
77

88
import org.elasticsearch.xpack.ql.expression.Expression;
99
import org.elasticsearch.xpack.ql.expression.Nullability;
1010
import org.elasticsearch.xpack.ql.expression.function.scalar.UnaryScalarFunction;
1111
import org.elasticsearch.xpack.ql.expression.gen.processor.Processor;
1212
import org.elasticsearch.xpack.ql.expression.gen.script.Scripts;
1313
import org.elasticsearch.xpack.ql.expression.predicate.Negatable;
14+
import org.elasticsearch.xpack.ql.expression.predicate.nulls.CheckNullProcessor.CheckNullOperation;
1415
import org.elasticsearch.xpack.ql.tree.NodeInfo;
1516
import org.elasticsearch.xpack.ql.tree.Source;
1617
import org.elasticsearch.xpack.ql.type.DataType;
1718
import org.elasticsearch.xpack.ql.type.DataTypes;
18-
import org.elasticsearch.xpack.sql.expression.predicate.nulls.CheckNullProcessor.CheckNullOperation;
1919

2020
public class IsNull extends UnaryScalarFunction implements Negatable<UnaryScalarFunction> {
2121

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
* or more contributor license agreements. Licensed under the Elastic License;
44
* you may not use this file except in compliance with the Elastic License.
55
*/
6-
package org.elasticsearch.xpack.sql.expression.predicate.nulls;
6+
package org.elasticsearch.xpack.ql.expression.predicate.nulls;
77

88
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
99
import org.elasticsearch.common.io.stream.Writeable.Reader;
1010
import org.elasticsearch.test.AbstractWireSerializingTestCase;
1111
import org.elasticsearch.xpack.ql.expression.gen.processor.ConstantProcessor;
1212
import org.elasticsearch.xpack.ql.expression.gen.processor.Processor;
13+
import org.elasticsearch.xpack.ql.expression.predicate.nulls.CheckNullProcessor;
1314
import org.elasticsearch.xpack.ql.expression.processor.Processors;
14-
import org.elasticsearch.xpack.sql.expression.predicate.nulls.CheckNullProcessor;
1515

1616
public class CheckNullProcessorTests extends AbstractWireSerializingTestCase<CheckNullProcessor> {
1717

x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/analysis/analyzer/Verifier.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
import org.elasticsearch.xpack.ql.expression.predicate.fulltext.FullTextPredicate;
2727
import org.elasticsearch.xpack.ql.expression.predicate.logical.BinaryLogic;
2828
import org.elasticsearch.xpack.ql.expression.predicate.logical.Not;
29+
import org.elasticsearch.xpack.ql.expression.predicate.nulls.IsNotNull;
30+
import org.elasticsearch.xpack.ql.expression.predicate.nulls.IsNull;
2931
import org.elasticsearch.xpack.ql.expression.predicate.operator.comparison.BinaryComparison;
3032
import org.elasticsearch.xpack.ql.plan.logical.Aggregate;
3133
import org.elasticsearch.xpack.ql.plan.logical.Filter;
@@ -44,8 +46,6 @@
4446
import org.elasticsearch.xpack.sql.expression.function.aggregate.Max;
4547
import org.elasticsearch.xpack.sql.expression.function.aggregate.Min;
4648
import org.elasticsearch.xpack.sql.expression.function.aggregate.TopHits;
47-
import org.elasticsearch.xpack.sql.expression.predicate.nulls.IsNotNull;
48-
import org.elasticsearch.xpack.sql.expression.predicate.nulls.IsNull;
4949
import org.elasticsearch.xpack.sql.plan.logical.Distinct;
5050
import org.elasticsearch.xpack.sql.plan.logical.LocalRelation;
5151
import org.elasticsearch.xpack.sql.plan.logical.Pivot;

x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/expression/function/scalar/Processors.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
99
import org.elasticsearch.common.io.stream.NamedWriteableRegistry.Entry;
1010
import org.elasticsearch.xpack.ql.expression.gen.processor.Processor;
11+
import org.elasticsearch.xpack.ql.expression.predicate.nulls.CheckNullProcessor;
1112
import org.elasticsearch.xpack.ql.expression.predicate.operator.arithmetic.BinaryArithmeticOperation;
1213
import org.elasticsearch.xpack.ql.type.Converter;
1314
import org.elasticsearch.xpack.sql.expression.function.scalar.datetime.DateAddProcessor;
@@ -36,7 +37,6 @@
3637
import org.elasticsearch.xpack.sql.expression.predicate.conditional.CaseProcessor;
3738
import org.elasticsearch.xpack.sql.expression.predicate.conditional.ConditionalProcessor;
3839
import org.elasticsearch.xpack.sql.expression.predicate.conditional.NullIfProcessor;
39-
import org.elasticsearch.xpack.sql.expression.predicate.nulls.CheckNullProcessor;
4040
import org.elasticsearch.xpack.sql.expression.predicate.operator.arithmetic.SqlBinaryArithmeticOperation;
4141
import org.elasticsearch.xpack.sql.expression.predicate.operator.comparison.InProcessor;
4242
import org.elasticsearch.xpack.sql.type.SqlDataTypeConverter.SqlConverter;

x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/expression/function/scalar/whitelist/InternalSqlScriptUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import org.elasticsearch.index.fielddata.ScriptDocValues;
1010
import org.elasticsearch.script.JodaCompatibleZonedDateTime;
1111
import org.elasticsearch.xpack.ql.expression.function.scalar.whitelist.InternalQlScriptUtils;
12+
import org.elasticsearch.xpack.ql.expression.predicate.nulls.CheckNullProcessor.CheckNullOperation;
1213
import org.elasticsearch.xpack.ql.expression.predicate.operator.arithmetic.UnaryArithmeticProcessor.UnaryArithmeticOperation;
1314
import org.elasticsearch.xpack.ql.expression.predicate.regex.RegexProcessor.RegexOperation;
1415
import org.elasticsearch.xpack.sql.SqlIllegalArgumentException;
@@ -41,7 +42,6 @@
4142
import org.elasticsearch.xpack.sql.expression.predicate.conditional.CaseProcessor;
4243
import org.elasticsearch.xpack.sql.expression.predicate.conditional.ConditionalProcessor.ConditionalOperation;
4344
import org.elasticsearch.xpack.sql.expression.predicate.conditional.NullIfProcessor;
44-
import org.elasticsearch.xpack.sql.expression.predicate.nulls.CheckNullProcessor.CheckNullOperation;
4545
import org.elasticsearch.xpack.sql.expression.predicate.operator.arithmetic.SqlBinaryArithmeticOperation;
4646
import org.elasticsearch.xpack.sql.expression.predicate.operator.comparison.InProcessor;
4747
import org.elasticsearch.xpack.sql.type.SqlDataTypeConverter;

x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/optimizer/Optimizer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
import org.elasticsearch.xpack.ql.expression.function.aggregate.InnerAggregate;
2424
import org.elasticsearch.xpack.ql.expression.predicate.logical.And;
2525
import org.elasticsearch.xpack.ql.expression.predicate.logical.Or;
26+
import org.elasticsearch.xpack.ql.expression.predicate.nulls.IsNotNull;
27+
import org.elasticsearch.xpack.ql.expression.predicate.nulls.IsNull;
2628
import org.elasticsearch.xpack.ql.expression.predicate.operator.comparison.BinaryComparison;
2729
import org.elasticsearch.xpack.ql.expression.predicate.operator.comparison.Equals;
2830
import org.elasticsearch.xpack.ql.expression.predicate.operator.comparison.GreaterThan;
@@ -75,8 +77,6 @@
7577
import org.elasticsearch.xpack.sql.expression.predicate.conditional.Case;
7678
import org.elasticsearch.xpack.sql.expression.predicate.conditional.Coalesce;
7779
import org.elasticsearch.xpack.sql.expression.predicate.conditional.IfConditional;
78-
import org.elasticsearch.xpack.sql.expression.predicate.nulls.IsNotNull;
79-
import org.elasticsearch.xpack.sql.expression.predicate.nulls.IsNull;
8080
import org.elasticsearch.xpack.sql.expression.predicate.operator.comparison.In;
8181
import org.elasticsearch.xpack.sql.plan.logical.LocalRelation;
8282
import org.elasticsearch.xpack.sql.plan.logical.Pivot;

x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/parser/ExpressionBuilder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
import org.elasticsearch.xpack.ql.expression.predicate.logical.And;
3232
import org.elasticsearch.xpack.ql.expression.predicate.logical.Not;
3333
import org.elasticsearch.xpack.ql.expression.predicate.logical.Or;
34+
import org.elasticsearch.xpack.ql.expression.predicate.nulls.IsNotNull;
35+
import org.elasticsearch.xpack.ql.expression.predicate.nulls.IsNull;
3436
import org.elasticsearch.xpack.ql.expression.predicate.operator.arithmetic.Neg;
3537
import org.elasticsearch.xpack.ql.expression.predicate.operator.comparison.Equals;
3638
import org.elasticsearch.xpack.ql.expression.predicate.operator.comparison.GreaterThan;
@@ -56,8 +58,6 @@
5658
import org.elasticsearch.xpack.sql.expression.literal.interval.Intervals.TimeUnit;
5759
import org.elasticsearch.xpack.sql.expression.predicate.conditional.Case;
5860
import org.elasticsearch.xpack.sql.expression.predicate.conditional.IfConditional;
59-
import org.elasticsearch.xpack.sql.expression.predicate.nulls.IsNotNull;
60-
import org.elasticsearch.xpack.sql.expression.predicate.nulls.IsNull;
6161
import org.elasticsearch.xpack.sql.expression.predicate.operator.arithmetic.Add;
6262
import org.elasticsearch.xpack.sql.expression.predicate.operator.arithmetic.Div;
6363
import org.elasticsearch.xpack.sql.expression.predicate.operator.arithmetic.Mod;

x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/planner/QueryTranslator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
import org.elasticsearch.xpack.ql.expression.predicate.logical.And;
2424
import org.elasticsearch.xpack.ql.expression.predicate.logical.Not;
2525
import org.elasticsearch.xpack.ql.expression.predicate.logical.Or;
26+
import org.elasticsearch.xpack.ql.expression.predicate.nulls.IsNotNull;
27+
import org.elasticsearch.xpack.ql.expression.predicate.nulls.IsNull;
2628
import org.elasticsearch.xpack.ql.expression.predicate.operator.comparison.BinaryComparison;
2729
import org.elasticsearch.xpack.ql.expression.predicate.operator.comparison.LessThan;
2830
import org.elasticsearch.xpack.ql.expression.predicate.operator.comparison.LessThanOrEqual;
@@ -58,8 +60,6 @@
5860
import org.elasticsearch.xpack.sql.expression.function.scalar.datetime.DateTimeFunction;
5961
import org.elasticsearch.xpack.sql.expression.function.scalar.geo.StDistance;
6062
import org.elasticsearch.xpack.sql.expression.literal.geo.GeoShape;
61-
import org.elasticsearch.xpack.sql.expression.predicate.nulls.IsNotNull;
62-
import org.elasticsearch.xpack.sql.expression.predicate.nulls.IsNull;
6363
import org.elasticsearch.xpack.sql.expression.predicate.operator.comparison.In;
6464
import org.elasticsearch.xpack.sql.querydsl.agg.AggFilter;
6565
import org.elasticsearch.xpack.sql.querydsl.agg.AndAggFilter;

x-pack/plugin/sql/src/test/java/org/elasticsearch/xpack/sql/optimizer/OptimizerTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
import org.elasticsearch.xpack.ql.expression.predicate.logical.BinaryLogic;
3030
import org.elasticsearch.xpack.ql.expression.predicate.logical.Not;
3131
import org.elasticsearch.xpack.ql.expression.predicate.logical.Or;
32+
import org.elasticsearch.xpack.ql.expression.predicate.nulls.IsNotNull;
33+
import org.elasticsearch.xpack.ql.expression.predicate.nulls.IsNull;
3234
import org.elasticsearch.xpack.ql.expression.predicate.operator.comparison.Equals;
3335
import org.elasticsearch.xpack.ql.expression.predicate.operator.comparison.GreaterThan;
3436
import org.elasticsearch.xpack.ql.expression.predicate.operator.comparison.GreaterThanOrEqual;
@@ -97,8 +99,6 @@
9799
import org.elasticsearch.xpack.sql.expression.predicate.conditional.Iif;
98100
import org.elasticsearch.xpack.sql.expression.predicate.conditional.Least;
99101
import org.elasticsearch.xpack.sql.expression.predicate.conditional.NullIf;
100-
import org.elasticsearch.xpack.sql.expression.predicate.nulls.IsNotNull;
101-
import org.elasticsearch.xpack.sql.expression.predicate.nulls.IsNull;
102102
import org.elasticsearch.xpack.sql.expression.predicate.operator.arithmetic.Add;
103103
import org.elasticsearch.xpack.sql.expression.predicate.operator.arithmetic.Sub;
104104
import org.elasticsearch.xpack.sql.expression.predicate.operator.comparison.In;

0 commit comments

Comments
 (0)