gengliangwang commented on code in PR #51146:
URL: https://github.com/apache/spark/pull/51146#discussion_r2162200500


##########
sql/catalyst/src/main/java/org/apache/spark/sql/connector/expressions/filter/AlwaysNull.java:
##########
@@ -0,0 +1,32 @@
+package org.apache.spark.sql.connector.expressions.filter;
+
+import org.apache.spark.annotation.Evolving;
+import org.apache.spark.sql.connector.expressions.Literal;
+import org.apache.spark.sql.types.DataType;
+import org.apache.spark.sql.types.DataTypes;
+
+/**
+ * A predicate that always evaluates to {@code null}.
+ *
+ * @since 4.1.0
+ */
+@Evolving
+public final class AlwaysNull extends Predicate implements Literal<Boolean> {

Review Comment:
   Databases supports `CHECK(null)`:
   * PostgreSQL
   * Oracle
   
   Databases doesn't support `CHECK(null)`:
   * MySQL: `ERROR 3813 (HY000) at line 2: Column check constraint 
'product_chk_1' references other column.`
   * SQL server: The bare token NULL has no boolean meaning: `An expression of 
non-boolean type specified in a context where a condition is expected`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to