Github user huaxingao commented on a diff in the pull request: https://github.com/apache/spark/pull/10505#discussion_r49678184 --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSourceStrategy.scala --- @@ -485,6 +486,74 @@ private[sql] object DataSourceStrategy extends Strategy with Logging { } /** + * Convert add predicate such as C1 + C2 + C3 to string + */ + private[this] def getAddString (predicate: Expression): String = { + predicate match { + case expressions.Add(left, right) => + { + val leftString = left match { + case a: Attribute => a.name + case add: Add => getAddString (add) + case _ => None + } + val rightString = right match { + case a: Attribute => a.name + case add: Add => getAddString (add) + case _ => None + } + leftString + " + " + rightString + } + } + } + + /** + * Tries to translate a Catalyst [[Expression]] into data source [[Filter]]. --- End diff -- @viirya Thank you very much for your comments. I changed the code based on your suggestion. Since the new code is quite different from the original, I will close this PR and submit a new one.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org