advancedxy commented on PR #424: URL: https://github.com/apache/datafusion-comet/pull/424#issuecomment-2110446840
> I'd like to see the tests use some randomly generated inputs. > > As a quick hack, I added the following test to `CometCastSuite` and it shows some differences in results between Spark and Comet. > > ```scala > test("xxhash64") { > val input = generateStrings(timestampPattern, 8).toDF("a") > withTempPath { dir => > val data = roundtripParquet(input, dir).coalesce(1) > data.createOrReplaceTempView("t") > val df = spark.sql(s"select a, xxhash64(a) from t order by a") > checkSparkAnswerAndOperator(df) > } > } > ``` > > Some differences: > > ``` > !== Correct Answer - 1000 == == Spark Answer - 1000 == > struct<a:string,xxhash64(a):bigint> struct<a:string,xxhash64(a):bigint> > ![,-7444071767201028348] [,-1205034819632174695] > ![ 23,-1992628079781282865] [ 23,4312780814362028915] > ![ 31T3,5857608402363468958] [ 31T3,6089516869931970265] > ``` > > We could extract the `generate*` methods from `CometCastSuite` into a separate `DataGenerator` class that other test suites can leverage. Good catch, and a good way to make sure the impl is correct. Let me check why the test is failing first. -- 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. To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org