HyukjinKwon commented on a change in pull request #24800: [SPARK-27947][SQL] ParsedStatement subclass toString may throw ClassCastException URL: https://github.com/apache/spark/pull/24800#discussion_r291442243
########## File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/sql/ParsedStatement.scala ########## @@ -36,8 +38,11 @@ import org.apache.spark.sql.catalyst.plans.logical.LogicalPlan private[sql] abstract class ParsedStatement extends LogicalPlan { // Redact properties and options when parsed nodes are used by generic methods like toString override def productIterator: Iterator[Any] = super.productIterator.map { Review comment: why don't we add like: ```scala protected def options: Map[String, String] = { Map.empty } protected def properties: Map[String, String] = { Map.empty } ``` and, ```diff - options: Map[String, String], + override val options: Map[String, String], ``` at implementation of this classes? Seems like currently we'll check every maps whatever it is. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org