Github user rxin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/6721#discussion_r32074111
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/math.scala
 ---
    @@ -17,24 +17,35 @@
     
     package org.apache.spark.sql.catalyst.expressions
     
    +import java.lang.{Long => JLong}
    +
     import org.apache.spark.sql.catalyst.expressions.codegen._
    -import org.apache.spark.sql.types.{DataType, DoubleType}
    +import org.apache.spark.sql.types.{DataType, DoubleType, LongType, 
StringType, UTF8String}
     
     /**
      * A unary expression specifically for math functions. Math Functions 
expect a specific type of
      * input format, therefore these functions extend `ExpectsInputTypes`.
      * @param name The short name of the function
      */
    -abstract class UnaryMathExpression(f: Double => Double, name: String)
    +abstract class AbstractUnaryMathExpression[T, U](name: String)
       extends UnaryExpression with Serializable with ExpectsInputTypes {
       self: Product =>
     
    -  override def expectedChildTypes: Seq[DataType] = Seq(DoubleType)
    -  override def dataType: DataType = DoubleType
       override def foldable: Boolean = child.foldable
       override def nullable: Boolean = true
       override def toString: String = s"$name($child)"
     
    +  // name of function in java.lang.Math
    +  def funcName: String = name.toLowerCase
    +}
    +
    +abstract class UnaryMathExpression(f: Double => Double, name: String)
    --- End diff --
    
    ```
    /**
     * Base for [[AbstractUnaryMathExpression]] that accepts a Double and 
returns a Double.
     */
    ```


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to