[GitHub] carbondata pull request #1565: [CARBONDATA-1518]Support creating timeseries ...

classic Classic list List threaded Threaded
47 messages Options
123
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #1565: [CARBONDATA-1518][Pre-Aggregate]Support creat...

qiuchenjian-2
Github user jackylk commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1565#discussion_r154990920
 
    --- Diff: core/src/main/java/org/apache/carbondata/core/metadata/schema/table/column/ColumnSchema.java ---
    @@ -439,6 +447,14 @@ public void setAggFunction(String aggFunction) {
         this.aggFunction = aggFunction;
       }
     
    +  public String getTimeSeriesFunction() {
    +    return timeSeriesFunction;
    +  }
    +
    +  public void setTimeSeriesFunction(String timeSeriesFunction) {
    +    this.timeSeriesFunction = timeSeriesFunction;
    --- End diff --
   
    should check it is not null


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #1565: [CARBONDATA-1518][Pre-Aggregate]Support creat...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user kumarvishal09 commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1565#discussion_r154992762
 
    --- Diff: core/src/main/java/org/apache/carbondata/core/metadata/schema/table/column/ColumnSchema.java ---
    @@ -126,8 +126,16 @@
        */
       private String aggFunction = "";
     
    +  /**
    +   * list of parent column relations
    +   */
       private List<ParentColumnTableRelation> parentColumnTableRelations;
     
    +  /**
    +   * timeseries function applied on column
    +   */
    +  private String timeSeriesFunction = "";
    --- End diff --
   
    it is specific to column schema and it has only two property timeseriesfunction and aggregation type


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1565: [CARBONDATA-1518][Pre-Aggregate]Support creating tim...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1565
 
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/1743/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1565: [CARBONDATA-1518][Pre-Aggregate]Support creating tim...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:

    https://github.com/apache/carbondata/pull/1565
 
    SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/2120/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #1565: [CARBONDATA-1518][Pre-Aggregate]Support creat...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user kumarvishal09 commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1565#discussion_r155170079
 
    --- Diff: core/src/main/java/org/apache/carbondata/core/preagg/TimeSeriesUDF.java ---
    @@ -0,0 +1,127 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *    http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +package org.apache.carbondata.core.preagg;
    +
    +import java.sql.Timestamp;
    +import java.util.ArrayList;
    +import java.util.Calendar;
    +import java.util.GregorianCalendar;
    +import java.util.List;
    +
    +/**
    + * class for applying timeseries udf
    + */
    +public class TimeSeriesUDF {
    +
    +  public final List<String> TIMESERIES_FUNCTION = new ArrayList<>();
    +
    +  // thread local for keeping calender instance
    +  private ThreadLocal<Calendar> calanderThreadLocal = new ThreadLocal<>();
    +
    +  /**
    +   * singleton instance
    +   */
    +  public static final TimeSeriesUDF INSTANCE = new TimeSeriesUDF();
    +
    +  private TimeSeriesUDF() {
    +    initialize();
    +  }
    +
    +  /**
    +   * Below method will be used to apply udf on data provided
    +   * Method will work based on below logic.
    +   * Data: 2016-7-23 01:01:30,10
    +   * Year Level UDF will return: 2016-1-1 00:00:00,0
    +   * Month Level UDF will return: 2016-7-1 00:00:00,0
    +   * Day Level UDF will return: 2016-7-23 00:00:00,0
    +   * Hour Level UDF will return: 2016-7-23 01:00:00,0
    +   * Minute Level UDF will return: 2016-7-23 01:01:00,0
    +   * Second Level UDF will return: 2016-7-23 01:01:30,0
    +   * If function does not match with any of the above functions
    +   * it will throw exception
    --- End diff --
   
    ok


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #1565: [CARBONDATA-1518][Pre-Aggregate]Support creat...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user kumarvishal09 commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1565#discussion_r155172117
 
    --- Diff: core/src/main/java/org/apache/carbondata/core/preagg/TimeSeriesUDF.java ---
    @@ -0,0 +1,127 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *    http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +package org.apache.carbondata.core.preagg;
    +
    +import java.sql.Timestamp;
    +import java.util.ArrayList;
    +import java.util.Calendar;
    +import java.util.GregorianCalendar;
    +import java.util.List;
    +
    +/**
    + * class for applying timeseries udf
    + */
    +public class TimeSeriesUDF {
    +
    +  public final List<String> TIMESERIES_FUNCTION = new ArrayList<>();
    +
    +  // thread local for keeping calender instance
    +  private ThreadLocal<Calendar> calanderThreadLocal = new ThreadLocal<>();
    +
    +  /**
    +   * singleton instance
    +   */
    +  public static final TimeSeriesUDF INSTANCE = new TimeSeriesUDF();
    +
    +  private TimeSeriesUDF() {
    +    initialize();
    +  }
    +
    +  /**
    +   * Below method will be used to apply udf on data provided
    +   * Method will work based on below logic.
    +   * Data: 2016-7-23 01:01:30,10
    +   * Year Level UDF will return: 2016-1-1 00:00:00,0
    +   * Month Level UDF will return: 2016-7-1 00:00:00,0
    +   * Day Level UDF will return: 2016-7-23 00:00:00,0
    +   * Hour Level UDF will return: 2016-7-23 01:00:00,0
    +   * Minute Level UDF will return: 2016-7-23 01:01:00,0
    +   * Second Level UDF will return: 2016-7-23 01:01:30,0
    +   * If function does not match with any of the above functions
    +   * it will throw exception
    --- End diff --
   
    ok


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #1565: [CARBONDATA-1518][Pre-Aggregate]Support creat...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user kumarvishal09 commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1565#discussion_r155172136
 
    --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/datamap/CarbonCreateDataMapCommand.scala ---
    @@ -50,13 +51,30 @@ case class CarbonCreateDataMapCommand(
         val LOGGER = LogServiceFactory.getLogService(this.getClass.getCanonicalName)
         if (dmClassName.equals("org.apache.carbondata.datamap.AggregateDataMapHandler") ||
             dmClassName.equalsIgnoreCase("preaggregate")) {
    -      CreatePreAggregateTableCommand(
    -        dataMapName,
    -        tableIdentifier,
    -        dmClassName,
    -        dmproperties,
    -        queryString.get
    -      ).processMetadata(sparkSession)
    +      val timeHierarchyString = dmproperties.get("timeseries.hierarchy")
    --- End diff --
   
    ok


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #1565: [CARBONDATA-1518][Pre-Aggregate]Support creat...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user kumarvishal09 commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1565#discussion_r155172378
 
    --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/timeseries/TimeseriesUtil.scala ---
    @@ -0,0 +1,158 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *    http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +package org.apache.spark.sql.execution.command.timeseries
    +
    +import java.sql.Timestamp
    +
    +import org.apache.spark.sql.execution.command.{DataMapField, Field}
    +
    +import org.apache.carbondata.core.metadata.datatype.DataTypes
    +import org.apache.carbondata.core.metadata.schema.table.CarbonTable
    +import org.apache.carbondata.core.preagg.TimeSeriesUDF
    +import org.apache.carbondata.spark.exception.MalformedCarbonCommandException
    +
    +/**
    + * Utility class for time series to keep
    + */
    +object TimeSeriesUtil {
    --- End diff --
   
    Some method is specific which we cannot move to core because of dependency that is why timeseries util is in integration


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1565: [CARBONDATA-1518][Pre-Aggregate]Support creating tim...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1565
 
    Build Failed with Spark 2.2.0, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/494/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1565: [CARBONDATA-1518][Pre-Aggregate]Support creating tim...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1565
 
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/1758/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1565: [CARBONDATA-1518][Pre-Aggregate]Support creating tim...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:

    https://github.com/apache/carbondata/pull/1565
 
    SDV Build Success , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/2140/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1565: [CARBONDATA-1518][Pre-Aggregate]Support creating tim...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1565
 
    Build Success with Spark 2.2.0, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/511/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #1565: [CARBONDATA-1518][Pre-Aggregate]Support creat...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user ravipesala commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1565#discussion_r155293926
 
    --- Diff: core/src/main/java/org/apache/carbondata/core/metadata/schema/table/column/ColumnSchema.java ---
    @@ -126,8 +126,16 @@
        */
       private String aggFunction = "";
     
    +  /**
    +   * list of parent column relations
    +   */
       private List<ParentColumnTableRelation> parentColumnTableRelations;
     
    +  /**
    +   * timeseries function applied on column
    +   */
    +  private String timeSeriesFunction = "";
    --- End diff --
   
    @kumarvishal09 I don't think it is required to add timeSeriesFunction here, just rename aggFunction to function and use the same for both aggFunction and timeseries function.


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1565: [CARBONDATA-1518][Pre-Aggregate]Support creating tim...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1565
 
    Build Success with Spark 2.2.0, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/522/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1565: [CARBONDATA-1518][Pre-Aggregate]Support creating tim...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user kumarvishal09 commented on the issue:

    https://github.com/apache/carbondata/pull/1565
 
    retest this please


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1565: [CARBONDATA-1518][Pre-Aggregate]Support creating tim...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1565
 
    Build Success with Spark 2.2.0, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/528/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1565: [CARBONDATA-1518][Pre-Aggregate]Support creating tim...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1565
 
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/1776/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1565: [CARBONDATA-1518][Pre-Aggregate]Support creating tim...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user kumarvishal09 commented on the issue:

    https://github.com/apache/carbondata/pull/1565
 
    rest this please


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1565: [CARBONDATA-1518][Pre-Aggregate]Support creating tim...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:

    https://github.com/apache/carbondata/pull/1565
 
    SDV Build Success , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/2154/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1565: [CARBONDATA-1518][Pre-Aggregate]Support creating tim...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1565
 
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/1784/



---
123