spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [spark] cloud-fan commented on a change in pull request #26599: [SPARK-29961][SQL] Implement builtin function - typeof
Date Wed, 20 Nov 2019 06:11:51 GMT
cloud-fan commented on a change in pull request #26599: [SPARK-29961][SQL] Implement builtin
function - typeof
URL: https://github.com/apache/spark/pull/26599#discussion_r348305688
 
 

 ##########
 File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/misc.scala
 ##########
 @@ -177,3 +177,22 @@ case class Version() extends LeafExpression with CodegenFallback {
     UTF8String.fromString(SPARK_VERSION_SHORT + " " + SPARK_REVISION)
   }
 }
+
+// scalastyle:off line.size.limit
+@ExpressionDescription(
+  usage = """_FUNC_(expr) - Return readable string representation for the data type of the
input.""",
+  examples = """
+      Examples:
+      > SELECT _FUNC_(1);
+       int
+      > SELECT _FUNC_(array(1));
+       array<int>
+  """,
+  since = "3.0.0")
+// scalastyle:on line.size.limit
+case class TypeOf(child: Expression) extends UnaryExpression with CodegenFallback {
 
 Review comment:
   This is foldable so Spark should be able to turn it into literal before entering codegen.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message