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/02/01 06:59:00 UTC
[jira] [Updated] (CARBONDATA-2082) Timeseries pre-aggregate table
should support the blank space
[ https://issues.apache.org/jira/browse/CARBONDATA-2082?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
xubo245 updated CARBONDATA-2082:
--------------------------------
Description:
timeseries pre-aggregate table should support the blank space
1.scenario 1
{code:java}
test("test timeseries create table 35: support event_time and granularity key with space") {
sql("DROP DATAMAP IF EXISTS agg1_month ON TABLE maintable")
sql(
s"""CREATE DATAMAP agg1_month ON TABLE mainTable
|USING '$timeSeries'
|DMPROPERTIES (
| 'event_time '=' dataTime',
| 'MONTH_GRANULARITY '='1')
|AS SELECT dataTime, SUM(age) FROM mainTable
|GROUP BY dataTime
""".stripMargin)
checkExistence(sql("SHOW TABLES"), true, "maintable_agg1_month")
}
{code}
problem: NPE
{code:java}
java.lang.NullPointerException was thrown.
java.lang.NullPointerException
at org.apache.spark.sql.execution.command.timeseries.TimeSeriesUtil$.validateTimeSeriesEventTime(TimeSeriesUtil.scala:50)
at org.apache.spark.sql.execution.command.preaaggregate.CreatePreAggregateTableCommand.processMetadata(CreatePreAggregateTableCommand.scala:104)
at org.apache.spark.sql.execution.command.datamap.CarbonCreateDataMapCommand.processMetadata(CarbonCreateDataMapCommand.scala:75)
at org.apache.spark.sql.execution.command.AtomicRunnableCommand.run(package.scala:84)
at org.apache.spark.sql.execution.command.ExecutedCommandExec.sideEffectResult$lzycompute(commands.scala:58)
{code}
2.scenario 2
{code:java}
test("test timeseries create table 36: support event_time and granularity key with space") {
sql("DROP DATAMAP IF EXISTS agg1_month ON TABLE maintable")
sql(
s"""CREATE DATAMAP agg1_month ON TABLE mainTable
|USING '$timeSeries'
|DMPROPERTIES (
| 'event_time '='dataTime',
| 'MONTH_GRANULARITY '=' 1')
|AS SELECT dataTime, SUM(age) FROM mainTable
|GROUP BY dataTime
""".stripMargin)
checkExistence(sql("SHOW TABLES"), true, "maintable_agg1_month")
}
{code}
problem:
{code:java}
Granularity only support 1
org.apache.carbondata.spark.exception.MalformedDataMapCommandException: Granularity only support 1
at org.apache.spark.sql.execution.command.timeseries.TimeSeriesUtil$.getTimeSeriesGranularityDetails(TimeSeriesUtil.scala:118)
at org.apache.spark.sql.execution.command.datamap.CarbonCreateDataMapCommand.processMetadata(CarbonCreateDataMapCommand.scala:58)
at org.apache.spark.sql.execution.command.AtomicRunnableCommand.run(package.scala:84)
at org.apache.spark.sql.execution.command.ExecutedCommandExec.sideEffectResult$lzycompute(commands.scala:58)
at org.apache.spark.sql.execution.command.ExecutedCommandExec.sideEffectResult(commands.scala:56)
at org.apache.spark.sql.execution.command.ExecutedCommandExec.executeCollect(commands.scala:67)
at org.apache.spark.sql.Dataset.<init>(Dataset.scala:183)
at org.apache.spark.sql.Dataset$.ofRows(Dataset.scala:68)
at org.apache.spark.sql.SparkSession.sql(SparkSession.scala:632)
{code}
was:
timeseries pre-aggregate table should support the blank space
1.scenario 1
{code:java}
test("test timeseries create table 12: hierarchy type with space") {
try {
sql(
"""create datamap agg1 on table mainTable using 'preaggregate'
|DMPROPERTIES (
| 'timeseries.eventTime'='dataTime',
| 'timeseries.hierarchy'='second= 1,hour=1,day=1,month=1,year=1')
|as select dataTime, sum(age) from mainTable
|group by dataTime
""".stripMargin)
assert(false)
} catch {
case e: MalformedCarbonCommandException =>
assert(e.getMessage.contains("Unsupported Value for hierarchy:second= 1"))
assert(true)
}
}
{code}
2.scenario 2
second=1, hour=1,day=1,month=1,year=1
> Timeseries pre-aggregate table should support the blank space
> -------------------------------------------------------------
>
> Key: CARBONDATA-2082
> URL: https://issues.apache.org/jira/browse/CARBONDATA-2082
> Project: CarbonData
> Issue Type: Bug
> Components: core, spark-integration
> Affects Versions: 1.3.0
> Reporter: xubo245
> Assignee: xubo245
> Priority: Minor
> Fix For: 1.3.0
>
> Time Spent: 1h 10m
> Remaining Estimate: 0h
>
> timeseries pre-aggregate table should support the blank space
> 1.scenario 1
> {code:java}
> test("test timeseries create table 35: support event_time and granularity key with space") {
> sql("DROP DATAMAP IF EXISTS agg1_month ON TABLE maintable")
> sql(
> s"""CREATE DATAMAP agg1_month ON TABLE mainTable
> |USING '$timeSeries'
> |DMPROPERTIES (
> | 'event_time '=' dataTime',
> | 'MONTH_GRANULARITY '='1')
> |AS SELECT dataTime, SUM(age) FROM mainTable
> |GROUP BY dataTime
> """.stripMargin)
> checkExistence(sql("SHOW TABLES"), true, "maintable_agg1_month")
> }
> {code}
> problem: NPE
> {code:java}
> java.lang.NullPointerException was thrown.
> java.lang.NullPointerException
> at org.apache.spark.sql.execution.command.timeseries.TimeSeriesUtil$.validateTimeSeriesEventTime(TimeSeriesUtil.scala:50)
> at org.apache.spark.sql.execution.command.preaaggregate.CreatePreAggregateTableCommand.processMetadata(CreatePreAggregateTableCommand.scala:104)
> at org.apache.spark.sql.execution.command.datamap.CarbonCreateDataMapCommand.processMetadata(CarbonCreateDataMapCommand.scala:75)
> at org.apache.spark.sql.execution.command.AtomicRunnableCommand.run(package.scala:84)
> at org.apache.spark.sql.execution.command.ExecutedCommandExec.sideEffectResult$lzycompute(commands.scala:58)
> {code}
> 2.scenario 2
> {code:java}
> test("test timeseries create table 36: support event_time and granularity key with space") {
> sql("DROP DATAMAP IF EXISTS agg1_month ON TABLE maintable")
> sql(
> s"""CREATE DATAMAP agg1_month ON TABLE mainTable
> |USING '$timeSeries'
> |DMPROPERTIES (
> | 'event_time '='dataTime',
> | 'MONTH_GRANULARITY '=' 1')
> |AS SELECT dataTime, SUM(age) FROM mainTable
> |GROUP BY dataTime
> """.stripMargin)
> checkExistence(sql("SHOW TABLES"), true, "maintable_agg1_month")
> }
>
> {code}
> problem:
> {code:java}
> Granularity only support 1
> org.apache.carbondata.spark.exception.MalformedDataMapCommandException: Granularity only support 1
> at org.apache.spark.sql.execution.command.timeseries.TimeSeriesUtil$.getTimeSeriesGranularityDetails(TimeSeriesUtil.scala:118)
> at org.apache.spark.sql.execution.command.datamap.CarbonCreateDataMapCommand.processMetadata(CarbonCreateDataMapCommand.scala:58)
> at org.apache.spark.sql.execution.command.AtomicRunnableCommand.run(package.scala:84)
> at org.apache.spark.sql.execution.command.ExecutedCommandExec.sideEffectResult$lzycompute(commands.scala:58)
> at org.apache.spark.sql.execution.command.ExecutedCommandExec.sideEffectResult(commands.scala:56)
> at org.apache.spark.sql.execution.command.ExecutedCommandExec.executeCollect(commands.scala:67)
> at org.apache.spark.sql.Dataset.<init>(Dataset.scala:183)
> at org.apache.spark.sql.Dataset$.ofRows(Dataset.scala:68)
> at org.apache.spark.sql.SparkSession.sql(SparkSession.scala:632)
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)