-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Kernel][Expressions] Adds the IS_NULL expressions #2651
Conversation
Signed-off-by: Tai Le Manh <manhtai.lmt@gmail.com>
Signed-off-by: Tai Le Manh <manhtai.lmt@gmail.com>
# Conflicts: # kernel/kernel-defaults/src/test/scala/io/delta/kernel/defaults/internal/expressions/DefaultExpressionEvaluatorSuite.scala
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great.
Minor comment. Ready to merge once resolved.
* <li>Name: <code>IS_NULL</code> | ||
* <ul> | ||
* <li>SQL semantic: <code>expr IS NULL</code></li> | ||
* <li>Since version: 3.1.0</li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* <li>Since version: 3.1.0</li> | |
* <li>Since version: 3.2.0</li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will go in next release version 3.2.0
@@ -232,6 +232,15 @@ ExpressionTransformResult visitIsNotNull(Predicate predicate) { | |||
); | |||
} | |||
|
|||
@Override | |||
ExpressionTransformResult visitIsNull(Predicate predicate) { | |||
Expression child = visit(predicate.getChildren().get(0)).expression; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expression child = visit(predicate.getChildren().get(0)).expression; | |
Expression child = visit(getUnaryChild(predicate)).expression; |
@@ -513,6 +522,16 @@ ColumnVector visitIsNotNull(Predicate predicate) { | |||
); | |||
} | |||
|
|||
@Override | |||
ColumnVector visitIsNull(Predicate predicate) { | |||
ColumnVector childResult = visit(childAt(predicate, 0)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ColumnVector childResult = visit(childAt(predicate, 0)); | |
ColumnVector childResult = visit(getUnaryChild(predicate)); |
@vkorukanti TYSM, I have resolved it. |
Which Delta project/connector is this regarding?
Description
Resolve #2632. Adds the IS NULL expressions.
How was this patch tested?
Adds unit test.