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

Order rule should keep consistent for create datamap

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Won't Fix
    • 1.3.0
    • 1.3.0
    • core, spark-integration
    • None

    Description

      It success:

        test("test timeseries create table 18: support day=1,year=1,month=1") {
          try {
            sql(
              """create datamap agg1 on table mainTable
                | using 'preaggregate'
                | DMPROPERTIES (
                |    'timeseries.eventTime'='dataTime',
                |    'timeseries.hierarchy'='day=1,year=1,month=1')
                | as select dataTime, sum(age) from mainTable
                | group by dataTime
              """.stripMargin)
            checkExistence(sql("show tables"), false, "maintable_agg1_hour")
            checkExistence(sql("show tables"), true, "maintable_agg1_day", "maintable_agg1_month", "maintable_agg1_year")
          } catch {
            case _: Exception =>
              assert(false)
          }
        }
      

      but it fail:

      
        test("test timeseries create table 21: don't support year=1,month=1") {
          try {
            sql(
              """create datamap agg1 on table mainTable
                |using 'preaggregate'
                |DMPROPERTIES (
                |   'timeseries.eventTime'='dataTime',
                |   'timeseries.hierarchy'='year=1,month=1')
                |as select dataTime, sum(age) from mainTable
                |group by dataTime""".stripMargin)
            assert(false)
          } catch {
            case e: MalformedCarbonCommandException =>
              assert(e.getMessage.contains("year=1,month=1 is in wrong order"))
          } finally {
            checkExistence(sql("show tables"), false, "maintable_agg1_year")
          }
        }
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            xubo245 Bo Xu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: