chore: Create simple fuzz test as part of test suite#1610
chore: Create simple fuzz test as part of test suite#1610andygrove merged 17 commits intoapache:mainfrom
Conversation
| _: BigIntVector | _: Float4Vector | _: Float8Vector | _: VarCharVector | | ||
| _: DecimalVector | _: DateDayVector | _: TimeStampMicroTZVector | _: VarBinaryVector | | ||
| _: FixedSizeBinaryVector | _: TimeStampMicroVector | _: StructVector) => | ||
| _: FixedSizeBinaryVector | _: TimeStampMicroVector | _: StructVector | _: ListVector) => |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1610 +/- ##
============================================
+ Coverage 56.12% 58.97% +2.84%
- Complexity 976 1074 +98
============================================
Files 119 125 +6
Lines 11743 12522 +779
Branches 2251 2339 +88
============================================
+ Hits 6591 7385 +794
+ Misses 4012 3971 -41
- Partials 1140 1166 +26 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| Make sure `SPARK_HOME` points to the same Spark version as Comet was built for. | ||
|
|
||
| ```console | ||
| ```shell |
There was a problem hiding this comment.
This fixes an issue where previously it was not possible to copy and paste the $ in $SPARK_HOME when copying from the published documentation.
| if (groupingExprs.exists(_.isEmpty)) { | ||
| withInfo(op, "Not all grouping expressions are supported") | ||
| return None | ||
| } |
|
@parthchandra @mbutrovich could you review? |
| Range(0, numRows).map(_ => new java.sql.Date(1716645600011L + r.nextInt())) | ||
| case DataTypes.TimestampType => | ||
| Range(0, numRows).map(_ => new Timestamp(1716645600011L + r.nextInt())) | ||
| case DataTypes.TimestampNTZType => |
There was a problem hiding this comment.
Do we know what this magic number is? If so could we define it as a variable?
There was a problem hiding this comment.
Updated. It was approximately the current date when I worked on this code. I added a variable with comments.
There was a problem hiding this comment.
Or you could just use SimpleDateFormat("YYYY-MM-DD hh:mm:ss").parse("1980-12-08 23:15:00") ?
| val random = new Random(42) | ||
| withSQLConf( | ||
| CometConf.COMET_ENABLED.key -> "false", | ||
| SQLConf.SESSION_LOCAL_TIMEZONE.key -> "Asia/Kathmandu" /* UTC+5:45 */ ) { |
There was a problem hiding this comment.
We should document that his is a non-arbitrary timezone choice. I know @parthchandra said it's a tricky timezone due to the unique offset from UTC.
There was a problem hiding this comment.
And also makes a great trivia question :)
parthchandra
left a comment
There was a problem hiding this comment.
lgtm. Non binding comments.
| Range(0, numRows).map(_ => new java.sql.Date(1716645600011L + r.nextInt())) | ||
| case DataTypes.TimestampType => | ||
| Range(0, numRows).map(_ => new Timestamp(1716645600011L + r.nextInt())) | ||
| case DataTypes.TimestampNTZType => |
There was a problem hiding this comment.
Or you could just use SimpleDateFormat("YYYY-MM-DD hh:mm:ss").parse("1980-12-08 23:15:00") ?
| _: BigIntVector | _: Float4Vector | _: Float8Vector | _: VarCharVector | | ||
| _: DecimalVector | _: DateDayVector | _: TimeStampMicroTZVector | _: VarBinaryVector | | ||
| _: FixedSizeBinaryVector | _: TimeStampMicroVector | _: StructVector) => | ||
| _: FixedSizeBinaryVector | _: TimeStampMicroVector | _: StructVector | _: ListVector) => |
There was a problem hiding this comment.
We could add MapVector here as well without any ill effects.
| val random = new Random(42) | ||
| withSQLConf( | ||
| CometConf.COMET_ENABLED.key -> "false", | ||
| SQLConf.SESSION_LOCAL_TIMEZONE.key -> "Asia/Kathmandu" /* UTC+5:45 */ ) { |
There was a problem hiding this comment.
And also makes a great trivia question :)
Which issue does this PR close?
Part of #1373
Closes #1289
Closes #1613
Closes #1611 (actually, I can no longer reproduce this issue)
Rationale for this change
This is a starting point for fuzz testing as part of our standard test suite.
What changes are included in this PR?
How are these changes tested?