[ https://issues.apache.org/jira/browse/SPARK-41907?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Apache Spark reassigned SPARK-41907: ------------------------------------ Assignee: Apache Spark > Function `sampleby` return parity > --------------------------------- > > Key: SPARK-41907 > URL: https://issues.apache.org/jira/browse/SPARK-41907 > Project: Spark > Issue Type: Sub-task > Components: Connect > Affects Versions: 3.4.0 > Reporter: Sandeep Singh > Assignee: Apache Spark > Priority: Major > > {code:java} > df = self.spark.createDataFrame([Row(a=i, b=(i % 3)) for i in range(100)]) > sampled = df.stat.sampleBy("b", fractions={0: 0.5, 1: 0.5}, seed=0) > self.assertTrue(sampled.count() == 35){code} > {code:java} > Traceback (most recent call last): > File > "/Users/s.singh/personal/spark-oss/python/pyspark/sql/tests/test_functions.py", > line 202, in test_sampleby > self.assertTrue(sampled.count() == 35) > AssertionError: False is not true {code} -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org