[ https://issues.apache.org/jira/browse/CARBONDATA-2082?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] kumar vishal resolved CARBONDATA-2082. -------------------------------------- Resolution: Fixed > 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: 2h 50m > 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) |
Free forum by Nabble | Edit this page |