carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chenliang...@apache.org
Subject [30/50] [abbrv] incubator-carbondata git commit: [Bug] ColumnProperty: Change visibility of variable (#764)
Date Thu, 30 Jun 2016 17:42:17 GMT
[Bug] ColumnProperty: Change visibility of variable (#764)



Project: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/commit/5e1a67b9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/tree/5e1a67b9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/diff/5e1a67b9

Branch: refs/heads/master
Commit: 5e1a67b9b5f2a24a8cded7e7c299ae3b9d06dea8
Parents: cdfd08c
Author: ashokblend <ashok.blend@gmail.com>
Authored: Mon Jun 27 23:16:42 2016 +0530
Committer: Venkata Ramana G <g.ramana.v@gmail.com>
Committed: Mon Jun 27 23:16:42 2016 +0530

----------------------------------------------------------------------
 .../carbondata/core/carbon/ColumnIdentifier.java  | 18 ++++++++++++++++++
 .../core/carbon/path/CarbonTablePath.java         |  6 +++---
 .../CarbonDictionaryMetadataReaderImpl.java       |  8 ++++----
 .../core/reader/CarbonDictionaryReaderImpl.java   |  8 ++++----
 .../CarbonDictionarySortIndexReaderImpl.java      | 14 +++++++++-----
 .../core/writer/CarbonDictionaryWriterImpl.java   |  4 ++--
 .../CarbonDictionarySortIndexWriterImpl.java      |  2 +-
 .../org/apache/spark/sql/CarbonSqlParser.scala    |  5 ++---
 .../apache/spark/sql/hive/CarbonStrategies.scala  |  4 ++--
 9 files changed, 45 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/5e1a67b9/core/src/main/java/org/carbondata/core/carbon/ColumnIdentifier.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/carbondata/core/carbon/ColumnIdentifier.java b/core/src/main/java/org/carbondata/core/carbon/ColumnIdentifier.java
index 928f53b..f15aed3 100644
--- a/core/src/main/java/org/carbondata/core/carbon/ColumnIdentifier.java
+++ b/core/src/main/java/org/carbondata/core/carbon/ColumnIdentifier.java
@@ -1,3 +1,21 @@
+/*
+ * 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.carbondata.core.carbon;
 
 import java.io.Serializable;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/5e1a67b9/core/src/main/java/org/carbondata/core/carbon/path/CarbonTablePath.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/carbondata/core/carbon/path/CarbonTablePath.java b/core/src/main/java/org/carbondata/core/carbon/path/CarbonTablePath.java
index 538a16b..b764458 100644
--- a/core/src/main/java/org/carbondata/core/carbon/path/CarbonTablePath.java
+++ b/core/src/main/java/org/carbondata/core/carbon/path/CarbonTablePath.java
@@ -36,9 +36,9 @@ import org.apache.hadoop.fs.Path;
 public class CarbonTablePath extends Path {
 
   protected static final String METADATA_DIR = "Metadata";
-  private static final String DICTIONARY_EXT = ".dict";
-  private static final String DICTIONARY_META_EXT = ".dictmeta";
-  private static final String SORT_INDEX_EXT = ".sortindex";
+  protected static final String DICTIONARY_EXT = ".dict";
+  protected static final String DICTIONARY_META_EXT = ".dictmeta";
+  protected static final String SORT_INDEX_EXT = ".sortindex";
   protected static final String SCHEMA_FILE = "schema";
   protected static final String TABLE_STATUS_FILE = "tablestatus";
   protected static final String FACT_DIR = "Fact";

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/5e1a67b9/core/src/main/java/org/carbondata/core/reader/CarbonDictionaryMetadataReaderImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/carbondata/core/reader/CarbonDictionaryMetadataReaderImpl.java
b/core/src/main/java/org/carbondata/core/reader/CarbonDictionaryMetadataReaderImpl.java
index 3b4d271..512ca8d 100644
--- a/core/src/main/java/org/carbondata/core/reader/CarbonDictionaryMetadataReaderImpl.java
+++ b/core/src/main/java/org/carbondata/core/reader/CarbonDictionaryMetadataReaderImpl.java
@@ -40,12 +40,12 @@ public class CarbonDictionaryMetadataReaderImpl implements CarbonDictionaryMetad
   /**
    * carbon table identifier
    */
-  private CarbonTableIdentifier carbonTableIdentifier;
+  protected CarbonTableIdentifier carbonTableIdentifier;
 
   /**
    * HDFS store path
    */
-  private String hdfsStorePath;
+  protected String hdfsStorePath;
 
   /**
    * column identifier
@@ -55,7 +55,7 @@ public class CarbonDictionaryMetadataReaderImpl implements CarbonDictionaryMetad
   /**
    * dictionary metadata file path
    */
-  private String columnDictionaryMetadataFilePath;
+  protected String columnDictionaryMetadataFilePath;
 
   /**
    * dictionary metadata thrift file reader
@@ -152,7 +152,7 @@ public class CarbonDictionaryMetadataReaderImpl implements CarbonDictionaryMetad
   /**
    * This method will form the path for dictionary metadata file for a given column
    */
-  private void initFileLocation() {
+  protected void initFileLocation() {
     CarbonTablePath carbonTablePath =
         CarbonStorePath.getCarbonTablePath(this.hdfsStorePath, carbonTableIdentifier);
     this.columnDictionaryMetadataFilePath =

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/5e1a67b9/core/src/main/java/org/carbondata/core/reader/CarbonDictionaryReaderImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/carbondata/core/reader/CarbonDictionaryReaderImpl.java
b/core/src/main/java/org/carbondata/core/reader/CarbonDictionaryReaderImpl.java
index addedf6..1313535 100644
--- a/core/src/main/java/org/carbondata/core/reader/CarbonDictionaryReaderImpl.java
+++ b/core/src/main/java/org/carbondata/core/reader/CarbonDictionaryReaderImpl.java
@@ -42,12 +42,12 @@ public class CarbonDictionaryReaderImpl implements CarbonDictionaryReader
{
   /**
    * carbon table identifier
    */
-  private CarbonTableIdentifier carbonTableIdentifier;
+  protected CarbonTableIdentifier carbonTableIdentifier;
 
   /**
    * HDFS store path
    */
-  private String hdfsStorePath;
+  protected String hdfsStorePath;
 
   /**
    * column name
@@ -57,7 +57,7 @@ public class CarbonDictionaryReaderImpl implements CarbonDictionaryReader
{
   /**
    * dictionary file path
    */
-  private String columnDictionaryFilePath;
+  protected String columnDictionaryFilePath;
 
   /**
    * dictionary thrift file reader
@@ -197,7 +197,7 @@ public class CarbonDictionaryReaderImpl implements CarbonDictionaryReader
{
   /**
    * This method will form the path for dictionary file for a given column
    */
-  private void initFileLocation() {
+  protected void initFileLocation() {
     CarbonTablePath carbonTablePath =
         CarbonStorePath.getCarbonTablePath(this.hdfsStorePath, carbonTableIdentifier);
     this.columnDictionaryFilePath = carbonTablePath

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/5e1a67b9/core/src/main/java/org/carbondata/core/reader/sortindex/CarbonDictionarySortIndexReaderImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/carbondata/core/reader/sortindex/CarbonDictionarySortIndexReaderImpl.java
b/core/src/main/java/org/carbondata/core/reader/sortindex/CarbonDictionarySortIndexReaderImpl.java
index eb3f8bd..99431ed 100644
--- a/core/src/main/java/org/carbondata/core/reader/sortindex/CarbonDictionarySortIndexReaderImpl.java
+++ b/core/src/main/java/org/carbondata/core/reader/sortindex/CarbonDictionarySortIndexReaderImpl.java
@@ -40,7 +40,7 @@ public class CarbonDictionarySortIndexReaderImpl implements CarbonDictionarySort
   /**
    * carbonTable Identifier holding the info of databaseName and tableName
    */
-  private CarbonTableIdentifier carbonTableIdentifier;
+  protected CarbonTableIdentifier carbonTableIdentifier;
 
   /**
    * column name
@@ -50,12 +50,12 @@ public class CarbonDictionarySortIndexReaderImpl implements CarbonDictionarySort
   /**
    * hdfs store location
    */
-  private String carbonStorePath;
+  protected String carbonStorePath;
 
   /**
    * the path of the dictionary Sort Index file
    */
-  private String sortIndexFilePath;
+  protected String sortIndexFilePath;
 
   /**
    * Column sort info thrift instance.
@@ -143,10 +143,14 @@ public class CarbonDictionarySortIndexReaderImpl implements CarbonDictionarySort
    * @throws IOException if any I/O errors occurs
    */
   private void init() throws IOException {
+    initPath();
+    openThriftReader();
+  }
+
+  protected void initPath() {
     CarbonTablePath carbonTablePath =
-        CarbonStorePath.getCarbonTablePath(carbonStorePath, carbonTableIdentifier);
+         CarbonStorePath.getCarbonTablePath(carbonStorePath, carbonTableIdentifier);
     this.sortIndexFilePath = carbonTablePath.getSortIndexFilePath(columnIdentifier.getColumnId());
-    openThriftReader();
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/5e1a67b9/core/src/main/java/org/carbondata/core/writer/CarbonDictionaryWriterImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/carbondata/core/writer/CarbonDictionaryWriterImpl.java
b/core/src/main/java/org/carbondata/core/writer/CarbonDictionaryWriterImpl.java
index 22e5bbe..474b746 100644
--- a/core/src/main/java/org/carbondata/core/writer/CarbonDictionaryWriterImpl.java
+++ b/core/src/main/java/org/carbondata/core/writer/CarbonDictionaryWriterImpl.java
@@ -89,12 +89,12 @@ public class CarbonDictionaryWriterImpl implements CarbonDictionaryWriter
{
   /**
    * dictionary file path
    */
-  private String dictionaryFilePath;
+  protected String dictionaryFilePath;
 
   /**
    * dictionary metadata file path
    */
-  private String dictionaryMetaFilePath;
+  protected String dictionaryMetaFilePath;
 
   /**
    * start offset of dictionary chunk  for a segment

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/5e1a67b9/core/src/main/java/org/carbondata/core/writer/sortindex/CarbonDictionarySortIndexWriterImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/carbondata/core/writer/sortindex/CarbonDictionarySortIndexWriterImpl.java
b/core/src/main/java/org/carbondata/core/writer/sortindex/CarbonDictionarySortIndexWriterImpl.java
index d28b176..1a9553e 100644
--- a/core/src/main/java/org/carbondata/core/writer/sortindex/CarbonDictionarySortIndexWriterImpl.java
+++ b/core/src/main/java/org/carbondata/core/writer/sortindex/CarbonDictionarySortIndexWriterImpl.java
@@ -54,7 +54,7 @@ public class CarbonDictionarySortIndexWriterImpl implements CarbonDictionarySort
   /**
    * Path of dictionary sort index file for which the sortIndex to be written
    */
-  private String sortIndexFilePath;
+  protected String sortIndexFilePath;
   /**
    * Instance of thrift writer to write the data
    */

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/5e1a67b9/integration/spark/src/main/scala/org/apache/spark/sql/CarbonSqlParser.scala
----------------------------------------------------------------------
diff --git a/integration/spark/src/main/scala/org/apache/spark/sql/CarbonSqlParser.scala b/integration/spark/src/main/scala/org/apache/spark/sql/CarbonSqlParser.scala
index 69026ee..b340884 100644
--- a/integration/spark/src/main/scala/org/apache/spark/sql/CarbonSqlParser.scala
+++ b/integration/spark/src/main/scala/org/apache/spark/sql/CarbonSqlParser.scala
@@ -141,7 +141,6 @@ class CarbonSqlParser()
   protected val STARTTIME = Keyword("STARTTIME")
   protected val SEGMENTS = Keyword("SEGMENTS")
   protected val SEGMENT = Keyword("SEGMENT")
-  protected val SHARED = Keyword("SHARED")
 
   protected val doubleQuotedString = "\"([^\"]+)\"".r
   protected val singleQuotedString = "'([^']+)'".r
@@ -695,8 +694,8 @@ class CarbonSqlParser()
       dictIncludeCols =
         tableProperties.get(CarbonCommonConstants.DICTIONARY_INCLUDE).get.split(",").map(_.trim)
       dictIncludeCols.map { distIncludeCol =>
-          if (!fields.exists(x => x.column.equalsIgnoreCase(distIncludeCol))) {
-            val errormsg = "DICTIONARY_INCLUDE column: " + distIncludeCol +
+          if (!fields.exists(x => x.column.equalsIgnoreCase(distIncludeCol.trim))) {
+            val errormsg = "DICTIONARY_INCLUDE column: " + distIncludeCol.trim +
               " does not exist in table. Please check create table statement."
             throw new MalformedCarbonCommandException(errormsg)
           }

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/5e1a67b9/integration/spark/src/main/scala/org/apache/spark/sql/hive/CarbonStrategies.scala
----------------------------------------------------------------------
diff --git a/integration/spark/src/main/scala/org/apache/spark/sql/hive/CarbonStrategies.scala
b/integration/spark/src/main/scala/org/apache/spark/sql/hive/CarbonStrategies.scala
index 412ca90..171d649 100644
--- a/integration/spark/src/main/scala/org/apache/spark/sql/hive/CarbonStrategies.scala
+++ b/integration/spark/src/main/scala/org/apache/spark/sql/hive/CarbonStrategies.scala
@@ -63,7 +63,7 @@ class CarbonStrategies(sqlContext: SQLContext) extends QueryPlanner[SparkPlan]
{
   /**
    * Carbon strategies for Carbon cube scanning
    */
-  private[sql] class CarbonTableScans extends Strategy {
+  protected[sql] class CarbonTableScans extends Strategy {
 
     def apply(plan: LogicalPlan): Seq[SparkPlan] = plan match {
       case PhysicalOperation(projectList, predicates,
@@ -269,7 +269,7 @@ class CarbonStrategies(sqlContext: SQLContext) extends QueryPlanner[SparkPlan]
{
     /**
      * Create carbon scan
      */
-    private def carbonScan(projectList: Seq[NamedExpression],
+    protected def carbonScan(projectList: Seq[NamedExpression],
         predicates: Seq[Expression],
         relation: CarbonRelation,
         groupExprs: Option[Seq[Expression]],


Mime
View raw message