rdblue commented on a change in pull request #24812: [SPARK-27965][SQL] Add 
extractors for v2 catalog transforms.
URL: https://github.com/apache/spark/pull/24812#discussion_r291262916
 
 

 ##########
 File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalog/v2/expressions/expressions.scala
 ##########
 @@ -111,32 +122,104 @@ private[sql] final case class ApplyTransform(
   override def toString: String = describe
 }
 
+/**
+ * Convenience extractor for any Literal.
+ */
+private object Lit {
+  def unapply[T](literal: Literal[T]): Some[(T, DataType)] = {
 
 Review comment:
   This always returns `Some` so I thought it was correct to use here. This 
practice was pointed out by @HyukjinKwon here: 
https://github.com/apache/spark/pull/24689#discussion_r287632404

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

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

Reply via email to