Dongjoon Hyun created SPARK-15709:
-------------------------------------

             Summary: Prevent `freqItems` from raising 
`UnsupportedOperationException: empty.min`
                 Key: SPARK-15709
                 URL: https://issues.apache.org/jira/browse/SPARK-15709
             Project: Spark
          Issue Type: Bug
          Components: SQL
            Reporter: Dongjoon Hyun


Currently, `freqItems` raises `UnsupportedOperationException` on `empty.min` 
usually when its `support` argument is high. 

{code}
scala> spark.createDataset(Seq(1, 2, 2, 3, 3, 3)).stat.freqItems(Seq("value"), 
2)
16/06/01 11:11:38 ERROR Executor: Exception in task 5.0 in stage 0.0 (TID 5)
java.lang.UnsupportedOperationException: empty.min
{code}

Also, the parameter checking message is wrong.

{code}
require(support >= 1e-4, s"support ($support) must be greater than 1e-4.")
{code}

This issue changes the logic to handle the `empty` case and also improves 
parameter checking.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to