carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "xubo245 (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CARBONDATA-2084) timeseries pre-aggregate table should support min and max when the create datamap don't as select max and sum
Date Fri, 26 Jan 2018 03:36:00 GMT
xubo245 created CARBONDATA-2084:
-----------------------------------

             Summary: timeseries pre-aggregate table should support min and max when the create
datamap don't as select max and sum
                 Key: CARBONDATA-2084
                 URL: https://issues.apache.org/jira/browse/CARBONDATA-2084
             Project: CarbonData
          Issue Type: Bug
          Components: core, spark-integration
    Affects Versions: 1.3.0
            Reporter: xubo245
             Fix For: 1.3.0



{code:java}

  // TODO: support max
  ignore("test PreAggregate table selection 38: filter < and >=, max") {
    val df = sql(
      """
        | select
        |   timeseries(mytime,'second') as secondLevel,
        |   max(age) as maxValue
        | from mainTable
        | where timeseries(mytime,'second')<'2016-02-23 01:02:00' and timeseries(mytime,'second')>='2016-02-23
01:01:00'
        | group by
        |   timeseries(mytime,'second')
        | order by
        |   timeseries(mytime,'second')
      """.stripMargin)

    df.show()
    checkAnswer(df, Seq(Row(Timestamp.valueOf("2016-02-23 01:01:50"), 30)))
  }

  ignore("test PreAggregate table selection 39: filter < and >=, min") {
    val df = sql(
      """
        | select
        |   timeseries(mytime,'second') as secondLevel,
        |   min(age) as minValue
        | from mainTable
        | where timeseries(mytime,'second')<'2016-02-23 01:02:00' and timeseries(mytime,'second')>='2016-02-23
01:01:00'
        | group by
        |   timeseries(mytime,'second')
        | order by
        |   timeseries(mytime,'second')
      """.stripMargin)

    df.show()
    checkAnswer(df, Seq(Row(Timestamp.valueOf("2016-02-23 01:01:30"), 10)))
  }
{code}




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message