You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by "xubo245 (JIRA)" <ji...@apache.org> on 2018/01/26 03:50:00 UTC

[jira] [Updated] (CARBONDATA-2084) Timeseries pre-aggregate table should support min and max when the create datamap don't as select max and sum

     [ https://issues.apache.org/jira/browse/CARBONDATA-2084?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

xubo245 updated CARBONDATA-2084:
--------------------------------
    Summary: Timeseries pre-aggregate table should support min and max when the create datamap don't as select max and sum  (was: timeseries pre-aggregate table should support min and max when the create datamap don't as select max and sum)

> 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
>            Priority: Major
>             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)