Skip to content

chore: Enable CometFuzzTestSuite int96 test for experimental native scans (without complex types) #1664

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 21, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions spark/src/test/scala/org/apache/comet/CometFuzzTestSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,12 @@ class CometFuzzTestSuite extends CometTestBase with AdaptiveSparkPlanHelper {
}

test("Parquet temporal types written as INT96") {

// there are known issues with INT96 support in the new experimental scans
// https://github.com/apache/datafusion-comet/issues/1441
assume(!CometConf.isExperimentalNativeScan)

testParquetTemporalTypes(ParquetOutputTimestampType.INT96)
// int96 coercion in DF does not work with nested types yet
// https://github.com/apache/datafusion/issues/15763
testParquetTemporalTypes(
ParquetOutputTimestampType.INT96,
generateArray = false,
generateStruct = false)
}

test("Parquet temporal types written as TIMESTAMP_MICROS") {
Expand All @@ -206,10 +206,15 @@ class CometFuzzTestSuite extends CometTestBase with AdaptiveSparkPlanHelper {
}

private def testParquetTemporalTypes(
outputTimestampType: ParquetOutputTimestampType.Value): Unit = {
outputTimestampType: ParquetOutputTimestampType.Value,
generateArray: Boolean = true,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we also generate maps?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to start testing maps as well in the fuzz suite. Some of the existing tests cannot work with map types though (because maps don't implementing ordering). We may need to add new map-specific tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this PR I'd just like to match existing functionality. We should open an issue to add map coverage to the CometFuzzTestSuite.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I filed an issue: #1665

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Filed #1666

generateStruct: Boolean = true): Unit = {

val options =
DataGenOptions(generateArray = true, generateStruct = true, generateNegativeZero = false)
DataGenOptions(
generateArray = generateArray,
generateStruct = generateStruct,
generateNegativeZero = false)

withTempPath { filename =>
val random = new Random(42)
Expand Down
Loading