huaxingao commented on code in PR #36332:
URL: https://github.com/apache/spark/pull/36332#discussion_r857773127
##########
sql/catalyst/src/main/java/org/apache/spark/sql/connector/expressions/filter/Predicate.java:
##########
@@ -146,4 +149,210 @@ public class Predicate extends GeneralScalarExpression {
public Predicate(String name, Expression[] children) {
super(name, children);
}
+
+ public org.apache.spark.sql.sources.Filter toV1() {
+ String expressionStr = "";
+ for (Expression e : children()) {
+ expressionStr += e.describe() + ", ";
+ }
+
+ if (name().equals("=")) {
+ if (children()[1] instanceof LiteralValue) {
+ // e.g. a = 1
+ return new EqualTo(children()[0].describe(),
+
CatalystTypeConverters.convertToScala(((LiteralValue)children()[1]).value(),
Review Comment:
I changed my ide java continuation indent to 4 for another project. Changed
back to 2 space. All the indentation should be good now.
--
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]