Github user chenghao-intel commented on a diff in the pull request:

    https://github.com/apache/spark/pull/9086#discussion_r41943729
  
    --- Diff: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/LiteralGenerator.scala
 ---
    @@ -78,7 +78,17 @@ object LiteralGenerator {
             Double.NaN, Double.PositiveInfinity, Double.NegativeInfinity)
         } yield Literal.create(f, DoubleType)
     
    -  // TODO: decimal type
    +
    +  // TODO cache the generated data, and boarder the value range
    +  // Since scalacheck doesn't support the decimal yet in `Choose`.
    +  def decimalLiteralGen(precision: Int, scale: Int): Gen[Literal] = {
    +    Gen.chooseNum(Double.MinValue, Double.MaxValue,
    +      Double.NaN, Double.PositiveInfinity, Double.NegativeInfinity) map { 
bd =>
    +      val d = Decimal(bd)
    +      d.changePrecision(precision, scale)
    --- End diff --
    
    Yes, that's true, I will udpate the code by gen the random decimal 
according to the `precision` and `scale`.


---
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