Uploaded image for project: 'CarbonData'
  1. CarbonData
  2. CARBONDATA-2515

Filter OR Expression not working properly in Presto integration

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.4.0
    • 1.5.0, 1.4.1
    • presto-integration
    • None
    • Spark 2.1, Presto 0.187

    Description

      Scenario - carbon-data Table 'load_table' with columns 'integer', 'datetime'

      //table creation and load code (spark)
      val random = new Random()
      val df = spark.sparkContext.parallelize(1 to (365 * 24 * 360))
      .map(x => (random.nextInt(200), new Timestamp(currentMillis - (x * 1000l))))
      .toDF("integer", "datetime")

      // Saves dataframe to carbondata file
      df.write.format("carbondata")
      .option("tableName", "load_table")
      .option("compress", "true")
      .option("tempCSV", "false")
      .mode(SaveMode.Overwrite)
      .save()

      SQL (through Presto CLI) - select * from load_table where integer < 10 or integer > 50;

      Actual result - 0 rows.
      Expected result - rows with integer value less than 10 and greater than 50.

      cause - PrestoFilterUtil is creating AND Expressions.

      Attachments

        Issue Links

          Activity

            People

              sourabh.verma Sourabh Verma
              sourabh.verma Sourabh Verma
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 7h 40m
                  7h 40m