Github user ravipesala commented on a diff in the pull request: https://github.com/apache/carbondata/pull/3019#discussion_r244097115 --- Diff: examples/spark2/src/main/scala/org/apache/carbondata/examples/CarbonSessionExample.scala --- @@ -72,69 +74,107 @@ object CarbonSessionExample { val path = s"$rootPath/examples/spark2/src/main/resources/data.csv" // scalastyle:off - spark.sql( - s""" - | LOAD DATA LOCAL INPATH '$path' - | INTO TABLE source - | OPTIONS('HEADER'='true', 'COMPLEX_DELIMITER_LEVEL_1'='#') - """.stripMargin) - // scalastyle:on - - spark.sql( - s""" - | SELECT charField, stringField, intField - | FROM source - | WHERE stringfield = 'spark' AND decimalField > 40 - """.stripMargin).show() - - spark.sql( - s""" - | SELECT * - | FROM source WHERE length(stringField) = 5 - """.stripMargin).show() - - spark.sql( - s""" - | SELECT * - | FROM source WHERE date_format(dateField, "yyyy-MM-dd") = "2015-07-23" - """.stripMargin).show() - - spark.sql("SELECT count(stringField) FROM source").show() - - spark.sql( - s""" - | SELECT sum(intField), stringField - | FROM source - | GROUP BY stringField - """.stripMargin).show() - - spark.sql( - s""" - | SELECT t1.*, t2.* - | FROM source t1, source t2 - | WHERE t1.stringField = t2.stringField - """.stripMargin).show() - - spark.sql( - s""" - | WITH t1 AS ( - | SELECT * FROM source - | UNION ALL - | SELECT * FROM source - | ) - | SELECT t1.*, t2.* - | FROM t1, source t2 - | WHERE t1.stringField = t2.stringField - """.stripMargin).show() - - spark.sql( - s""" - | SELECT * - | FROM source - | WHERE stringField = 'spark' and floatField > 2.8 - """.stripMargin).show() +// spark.sql( --- End diff -- done
---