@@ -21,16 +21,11 @@ package org.apache.comet.fuzz
2121
2222import java .io .File
2323
24- import scala .util .Random
25-
26- import org .rogach .scallop .{ScallopConf , Subcommand }
27- import org .rogach .scallop .ScallopOption
24+ import org .rogach .scallop .{ScallopConf , ScallopOption , Subcommand }
2825
2926import org .apache .spark .sql .SparkSession
3027
31- import org .apache .comet .testing .{DataGenOptions , ParquetGenerator }
32-
33- class Conf (arguments : Seq [String ]) extends ScallopConf (arguments) {
28+ class ComparisonToolConf (arguments : Seq [String ]) extends ScallopConf (arguments) {
3429 object compareParquet extends Subcommand (" compareParquet" ) {
3530 val inputSparkFolder : ScallopOption [String ] =
3631 opt[String ](required = true , descr = " Folder with Spark produced results in Parquet format" )
@@ -41,14 +36,14 @@ class Conf(arguments: Seq[String]) extends ScallopConf(arguments) {
4136 verify()
4237}
4338
44- object Main {
39+ object ComparisonToolMain {
4540
4641 lazy val spark : SparkSession = SparkSession
4742 .builder()
4843 .getOrCreate()
4944
5045 def main (args : Array [String ]): Unit = {
51- val conf = new Conf (args.toIndexedSeq)
46+ val conf = new ComparisonToolConf (args.toIndexedSeq)
5247 conf.subcommand match {
5348 case Some (conf.compareParquet) =>
5449 compareParquetFolders(
@@ -92,7 +87,7 @@ object Main {
9287 .map(_.getName)
9388 .sorted
9489
95- output.write(s " # Comparing Parquet Folders \n\n " )
90+ output.write(" # Comparing Parquet Folders\n\n " )
9691 output.write(s " Spark folder: $sparkFolderPath\n " )
9792 output.write(s " Comet folder: $cometFolderPath\n " )
9893 output.write(s " Found ${sparkSubfolders.length} subfolders to compare \n\n " )
@@ -147,7 +142,7 @@ object Main {
147142 output.flush()
148143 }
149144
150- output.write(s " \n # Comparison Complete \n " )
145+ output.write(" \n # Comparison Complete\n " )
151146 output.write(s " Compared ${sparkSubfolders.length} subfolders \n " )
152147
153148 } finally {
0 commit comments