parthchandra commented on code in PR #1610: URL: https://github.com/apache/datafusion-comet/pull/1610#discussion_r2032147349
########## spark/src/test/scala/org/apache/comet/CometFuzzTestSuite.scala: ########## @@ -0,0 +1,183 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.comet + +import java.io.File + +import scala.util.Random + +import org.scalactic.source.Position +import org.scalatest.Tag + +import org.apache.commons.io.FileUtils +import org.apache.spark.sql.CometTestBase +import org.apache.spark.sql.comet.{CometNativeScanExec, CometScanExec} +import org.apache.spark.sql.execution.SparkPlan +import org.apache.spark.sql.execution.adaptive.AdaptiveSparkPlanHelper +import org.apache.spark.sql.internal.SQLConf + +import org.apache.comet.testing.{DataGenOptions, ParquetGenerator} + +class CometFuzzTestSuite extends CometTestBase with AdaptiveSparkPlanHelper { + + private var filename: String = null + + override def beforeAll(): Unit = { + super.beforeAll() + val tempDir = System.getProperty("java.io.tmpdir") + filename = s"$tempDir/CometFuzzTestSuite_${System.currentTimeMillis()}.parquet" + val random = new Random(42) + withSQLConf( + CometConf.COMET_ENABLED.key -> "false", + SQLConf.SESSION_LOCAL_TIMEZONE.key -> "Asia/Kathmandu" /* UTC+5:45 */ ) { Review Comment: And also makes a great trivia question :) ########## spark/src/main/scala/org/apache/comet/testing/ParquetGenerator.scala: ########## @@ -205,6 +212,11 @@ object ParquetGenerator { 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 => Review Comment: Or you could just use `SimpleDateFormat("YYYY-MM-DD hh:mm:ss").parse("1980-12-08 23:15:00")` ? ########## common/src/main/scala/org/apache/spark/sql/comet/util/Utils.scala: ########## @@ -278,7 +277,7 @@ object Utils { case v @ (_: BitVector | _: TinyIntVector | _: SmallIntVector | _: IntVector | _: BigIntVector | _: Float4Vector | _: Float8Vector | _: VarCharVector | _: DecimalVector | _: DateDayVector | _: TimeStampMicroTZVector | _: VarBinaryVector | - _: FixedSizeBinaryVector | _: TimeStampMicroVector | _: StructVector) => + _: FixedSizeBinaryVector | _: TimeStampMicroVector | _: StructVector | _: ListVector) => Review Comment: We could add `MapVector` here as well without any ill effects. -- 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