[GitHub] incubator-carbondata pull request #790: [CARBONDATA-919]result_size in query...

2017-04-13 Thread nareshpr
Github user nareshpr commented on a diff in the pull request:


https://github.com/apache/incubator-carbondata/pull/790#discussion_r111356217
  
--- Diff: 
integration/spark2/src/main/java/org/apache/carbondata/spark/vectorreader/VectorizedCarbonRecordReader.java
 ---
@@ -147,7 +148,11 @@ public VectorizedCarbonRecordReader(QueryModel 
queryModel) {
   }
 
   @Override public Object getCurrentValue() throws IOException, 
InterruptedException {
-if (returnColumnarBatch) return columnarBatch;
+if (returnColumnarBatch) {
+  rowCount += columnarBatch.numValidRows();
+  return columnarBatch;
+}
+rowCount += 1;
--- End diff --

if incase returnColumnarBatch is false, we are return only 1 row.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-carbondata issue #730: [CARBONDATA-898]NullPointerException is get...

2017-04-12 Thread nareshpr
Github user nareshpr commented on the issue:

https://github.com/apache/incubator-carbondata/pull/730
  
Updated comments


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-carbondata pull request #730: [WIP]NullPointerException is getting...

2017-04-05 Thread nareshpr
Github user nareshpr closed the pull request at:

https://github.com/apache/incubator-carbondata/pull/730


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-carbondata pull request #730: [WIP]NullPointerException is getting...

2017-04-05 Thread nareshpr
GitHub user nareshpr opened a pull request:

https://github.com/apache/incubator-carbondata/pull/730

[WIP]NullPointerException is getting thrown when rename table and select 
query is run concurrently



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/nareshpr/incubator-carbondata 
concurrentalterrename

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-carbondata/pull/730.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #730


commit 15e653aa2048a2f0a56a6399ed9cacd2ba53e069
Author: nareshpr <prnaresh.nar...@gmail.com>
Date:   2017-04-05T07:06:45Z

NullPointer is getting thrown when rename table and select query is fired 
concurrently




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-carbondata pull request #713: [WIP]add decimal column without scal...

2017-03-30 Thread nareshpr
GitHub user nareshpr opened a pull request:

https://github.com/apache/incubator-carbondata/pull/713

[WIP]add decimal column without scale and precision is failing.



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/nareshpr/incubator-carbondata altertablefixes

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-carbondata/pull/713.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #713


commit ec779b5c3ed8ec74ee72a1fe5a1ea1ad4762a1d2
Author: nareshpr <prnaresh.nar...@gmail.com>
Date:   2017-03-30T11:22:51Z

add decimal column without scale and precision is failing.




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-carbondata issue #681: [CARBONDATA-802]Select query is throwing ex...

2017-03-21 Thread nareshpr
Github user nareshpr commented on the issue:

https://github.com/apache/incubator-carbondata/pull/681
  
Fixed review comments. Pls review and merge


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-carbondata pull request #681: [CARBONDATA-802]Select query is thro...

2017-03-21 Thread nareshpr
GitHub user nareshpr opened a pull request:

https://github.com/apache/incubator-carbondata/pull/681

[CARBONDATA-802]Select query is throwing exception when newly column is 
added without any default value

If user does not provide default value in add column, dictionary & sort 
index file will not be created which is throwing exception while querying. 
Current change will create dictionary file with default null value if not 
default value is provided in add column query

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/nareshpr/incubator-carbondata altertablefixes

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-carbondata/pull/681.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #681






---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-carbondata pull request #674: [CARBONDATA-795]rename table is chan...

2017-03-20 Thread nareshpr
GitHub user nareshpr reopened a pull request:

https://github.com/apache/incubator-carbondata/pull/674

[CARBONDATA-795]rename table is changing provided db to current db

When user trigger rename table command not on current database, table is 
getting renamed from provided db to current db.
eg., alter table testdb.test1 rename to testdb.test2
Assume current db is default,
Above query is renaming the table from testdb.test1 to default.test2

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/nareshpr/incubator-carbondata renametablefix

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-carbondata/pull/674.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #674


commit e41f66eb83162370a785a6df37cd17a6cc7a3be2
Author: nareshpr <prnaresh.nar...@gmail.com>
Date:   2017-03-20T07:11:32Z

rename table is changing provided db to current db




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-carbondata issue #674: [CARBONDATA-795]rename table is changing pr...

2017-03-20 Thread nareshpr
Github user nareshpr commented on the issue:

https://github.com/apache/incubator-carbondata/pull/674
  
retest this please


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-carbondata pull request #675: [CARBONDATA-796]Drop database comman...

2017-03-20 Thread nareshpr
GitHub user nareshpr opened a pull request:

https://github.com/apache/incubator-carbondata/pull/675

[CARBONDATA-796]Drop database command clears all carbonfiles from 
carbon.store/dbfolder

When user trigger drop database command, Carbon is deleted all the files 
from /database/ folder without check whether any file exist
eg., create database db1;
create table db1.test1(id int, name string) stored as 'carbondata';
drop database db1; --> This command clears all the files in 
/database/ folder.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/nareshpr/incubator-carbondata dropdbcascade

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-carbondata/pull/675.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #675


commit 8bf6a62089d4c2618aa6575419ae46b3aad9f952
Author: nareshpr <prnaresh.nar...@gmail.com>
Date:   2017-03-20T09:48:30Z

drop database command clears all carbonfiles from carbon.store/dbfolder




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-carbondata issue #674: [CARBONDATA-795]rename table is changing pr...

2017-03-20 Thread nareshpr
Github user nareshpr commented on the issue:

https://github.com/apache/incubator-carbondata/pull/674
  
retest this please


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-carbondata pull request #674: [CARBONDATA-795]rename table is chan...

2017-03-20 Thread nareshpr
GitHub user nareshpr opened a pull request:

https://github.com/apache/incubator-carbondata/pull/674

[CARBONDATA-795]rename table is changing provided db to current db

When user trigger rename table command not on current database, table is 
getting renamed from provided db to current db.
eg., alter table testdb.test1 rename to testdb.test2
Assume current db is default,
Above query is renaming the table from testdb.test1 to default.test2

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/nareshpr/incubator-carbondata renametablefix

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-carbondata/pull/674.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #674


commit 0642d2664526836a97ffec901ddcba811cfbeebe
Author: nareshpr <prnaresh.nar...@gmail.com>
Date:   2017-03-20T07:11:32Z

rename table is changing provided db to current db




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-carbondata pull request #641: [CARBONDATA-767] Alter table support...

2017-03-15 Thread nareshpr
Github user nareshpr commented on a diff in the pull request:


https://github.com/apache/incubator-carbondata/pull/641#discussion_r106192438
  
--- Diff: 
integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/carbonTableSchema.scala
 ---
@@ -313,6 +307,100 @@ private[sql] case class AlterTableAddColumns(
   }
 }
 
+private[sql] case class AlterTableRenameTable(alterTableRenameModel: 
AlterTableRenameModel)
--- End diff --

Done


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-carbondata pull request #641: [CARBONDATA-767] Alter table support...

2017-03-15 Thread nareshpr
Github user nareshpr commented on a diff in the pull request:


https://github.com/apache/incubator-carbondata/pull/641#discussion_r106131227
  
--- Diff: 
integration/spark2/src/main/scala/org/apache/spark/sql/parser/CarbonSpark2SqlParser.scala
 ---
@@ -129,4 +134,80 @@ class CarbonSpark2SqlParser extends CarbonDDLSqlParser 
{
   case databaseName ~ tableName ~ limit =>
 ShowLoadsCommand(convertDbNameToLowerCase(databaseName), 
tableName.toLowerCase(), limit)
 }
+
+  protected lazy val alterTableModifyDataType: Parser[LogicalPlan] =
+ALTER ~> TABLE ~> (ident <~ ".").? ~ ident ~ CHANGE ~ ident ~ ident ~
+ident ~ opt("(" ~> rep1sep(valueOptions, ",") <~ ")") <~ opt(";") ^^ {
+  case dbName ~ table ~ change ~ columnName ~ columnNameCopy ~ 
dataType ~ values =>
+// both the column names should be same
+CommonUtil.validateColumnNames(columnName, columnNameCopy)
+val alterTableChangeDataTypeModel =
+  
AlterTableDataTypeChangeModel(parseDataType(dataType.toLowerCase, values),
+convertDbNameToLowerCase(dbName),
+table.toLowerCase,
+columnName.toLowerCase,
+columnNameCopy.toLowerCase)
+AlterTableDataTypeChange(alterTableChangeDataTypeModel)
+}
+
+  protected lazy val alterTableAddColumns: Parser[LogicalPlan] =
+ALTER ~> TABLE ~> (ident <~ ".").? ~ ident ~
+(ADD ~> COLUMNS ~> "(" ~> repsep(anyFieldDef, ",") <~ ")") ~
+(TBLPROPERTIES ~> "(" ~> repsep(loadOptions, ",") <~ ")").? <~ 
opt(";") ^^ {
+  case dbName ~ table ~ fields ~ tblProp =>
+fields.foreach{ f =>
+  if (isComplexDimDictionaryExclude(f.dataType.get)) {
+throw new MalformedCarbonCommandException(
+  s"Add column is unsupported for complex datatype column: 
${f.column}")
+  }
+}
+val tableProps = if (tblProp.isDefined) {
+  // default value should not be converted to lower case
+  val tblProps = tblProp.get.map(f => if 
(f._1.toLowerCase.startsWith("default.value.")) {
+f._1 -> f._2
+  } else {
+f._1 -> f._2.toLowerCase
+  })
+  scala.collection.mutable.Map(tblProps: _*)
+} else {
+  scala.collection.mutable.Map.empty[String, String]
+}
+
+val tableModel = prepareTableModel (false,
+  convertDbNameToLowerCase(dbName),
+  table.toLowerCase,
+  fields.map(convertFieldNamesToLowercase),
+  Seq.empty,
+  tableProps,
+  None,
+  true)
+
+val alterTableAddColumnsModel = 
AlterTableAddColumnsModel(convertDbNameToLowerCase(dbName),
+  table,
+  tableProps,
+  tableModel.dimCols,
+  tableModel.msrCols,
+  tableModel.highcardinalitydims.getOrElse(Seq.empty))
+AlterTableAddColumns(alterTableAddColumnsModel)
+}
+
+  private def convertFieldNamesToLowercase(field: Field): Field = {
+val name = field.column.toLowerCase
+field.copy(column = name, name = Some(name))
+  }
+  protected lazy val alterTableDropColumn: Parser[LogicalPlan] =
--- End diff --

Ok


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-carbondata pull request #641: [CARBONDATA-767] Alter table support...

2017-03-15 Thread nareshpr
Github user nareshpr commented on a diff in the pull request:


https://github.com/apache/incubator-carbondata/pull/641#discussion_r106129635
  
--- Diff: 
integration/spark2/src/main/scala/org/apache/spark/sql/parser/CarbonSpark2SqlParser.scala
 ---
@@ -129,4 +134,80 @@ class CarbonSpark2SqlParser extends CarbonDDLSqlParser 
{
   case databaseName ~ tableName ~ limit =>
 ShowLoadsCommand(convertDbNameToLowerCase(databaseName), 
tableName.toLowerCase(), limit)
 }
+
+  protected lazy val alterTableModifyDataType: Parser[LogicalPlan] =
+ALTER ~> TABLE ~> (ident <~ ".").? ~ ident ~ CHANGE ~ ident ~ ident ~
+ident ~ opt("(" ~> rep1sep(valueOptions, ",") <~ ")") <~ opt(";") ^^ {
+  case dbName ~ table ~ change ~ columnName ~ columnNameCopy ~ 
dataType ~ values =>
+// both the column names should be same
+CommonUtil.validateColumnNames(columnName, columnNameCopy)
--- End diff --

Ok


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-carbondata pull request #641: [CARBONDATA-767] Alter table support...

2017-03-15 Thread nareshpr
Github user nareshpr commented on a diff in the pull request:


https://github.com/apache/incubator-carbondata/pull/641#discussion_r106125641
  
--- Diff: 
integration/spark2/src/main/scala/org/apache/spark/sql/hive/CarbonMetastore.scala
 ---
@@ -304,38 +341,76 @@ class CarbonMetastore(conf: RuntimeConfig, val 
storePath: String) {
 if (tableExists(tableName, Some(dbName))(sparkSession)) {
   sys.error(s"Table [$tableName] already exists under Database 
[$dbName]")
 }
+val schemaEvolutionEntry = new 
SchemaEvolutionEntry(tableInfo.getLastUpdatedTime)
 val schemaConverter = new ThriftWrapperSchemaConverterImpl
 val thriftTableInfo = schemaConverter
   .fromWrapperToExternalTableInfo(tableInfo, dbName, tableName)
-val schemaEvolutionEntry = new 
SchemaEvolutionEntry(tableInfo.getLastUpdatedTime)
 
thriftTableInfo.getFact_table.getSchema_evolution.getSchema_evolution_history
   .add(schemaEvolutionEntry)
+val carbonTablePath = createSchemaThriftFile(tableInfo,
+  thriftTableInfo,
+  dbName,
+  tableName)(sparkSession)
+updateSchemasUpdatedTime(touchSchemaFileSystemTime(dbName, tableName))
+LOGGER.info(s"Table $tableName for Database $dbName created 
successfully.")
+carbonTablePath
+  }
 
+  /**
+   * This method will write the schema thrift file in carbon store and 
load table metadata
+   *
+   * @param tableInfo
+   * @param thriftTableInfo
+   * @param dbName
+   * @param tableName
+   * @param sparkSession
+   * @return
+   */
+  private def createSchemaThriftFile(
+  tableInfo: 
org.apache.carbondata.core.metadata.schema.table.TableInfo,
+  thriftTableInfo: org.apache.carbondata.format.TableInfo,
+  dbName: String, tableName: String)
+(sparkSession: SparkSession): String = {
 val carbonTableIdentifier = new CarbonTableIdentifier(dbName, 
tableName,
   tableInfo.getFactTable.getTableId)
 val carbonTablePath = CarbonStorePath.getCarbonTablePath(storePath, 
carbonTableIdentifier)
 val schemaFilePath = carbonTablePath.getSchemaFilePath
 val schemaMetadataPath = 
CarbonTablePath.getFolderContainingFile(schemaFilePath)
 tableInfo.setMetaDataFilepath(schemaMetadataPath)
 tableInfo.setStorePath(storePath)
-CarbonMetadata.getInstance().loadTableMetadata(tableInfo)
-val tableMeta = new TableMeta(carbonTableIdentifier, storePath,
-  CarbonMetadata.getInstance().getCarbonTable(dbName + "_" + 
tableName))
-
 val fileType = FileFactory.getFileType(schemaMetadataPath)
 if (!FileFactory.isFileExist(schemaMetadataPath, fileType)) {
   FileFactory.mkdirs(schemaMetadataPath, fileType)
 }
 val thriftWriter = new ThriftWriter(schemaFilePath, false)
-thriftWriter.open()
+thriftWriter.open(FileWriteOperation.OVERWRITE)
 thriftWriter.write(thriftTableInfo)
 thriftWriter.close()
+removeTableFromMetadata(dbName, tableName)
--- End diff --

As per old code, when new table is created, table info is added into 
CarbonMetastore and modified.mdt file is timestamp is updated to refresh in 
other sessions. Those changes are extracted to a new method and used in 
CreateTable and AlterTable flow, updating mdt file code is missing, which i 
added


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-carbondata pull request #641: [CARBONDATA-767] Alter table support...

2017-03-15 Thread nareshpr
Github user nareshpr commented on a diff in the pull request:


https://github.com/apache/incubator-carbondata/pull/641#discussion_r106112796
  
--- Diff: 
integration/spark-common/src/main/scala/org/apache/carbondata/spark/util/CarbonScalaUtil.scala
 ---
@@ -194,4 +196,102 @@ object CarbonScalaUtil {
   }
 }
   }
+
+  /**
+   * This method will validate a column for its data type and check 
whether the column data type
+   * can be modified and update if conditions are met
+   *
+   * @param dataTypeInfo
+   * @param carbonColumn
+   */
+  def validateColumnDataType(dataTypeInfo: DataTypeInfo, carbonColumn: 
CarbonColumn): Unit = {
+carbonColumn.getDataType.getName match {
+  case "INT" =>
+if (!dataTypeInfo.dataType.equals("bigint")) {
+  sys
+.error(s"Given column ${ carbonColumn.getColName } with data 
type ${
+  carbonColumn
+.getDataType.getName
+} cannot be modified. Int can only be changed to bigInt")
+}
+  case "DECIMAL" =>
+if (!dataTypeInfo.dataType.equals("decimal")) {
+  sys
+.error(s"Given column ${ carbonColumn.getColName } with data 
type ${
+  carbonColumn.getDataType.getName
+} cannot be modified. Decimal can be only be changed to 
Decimal of higher precision")
+}
+if (dataTypeInfo.precision <= 
carbonColumn.getColumnSchema.getPrecision) {
+  sys
+.error(s"Given column ${
+  carbonColumn
+.getColName
+} cannot be modified. Specified precision value ${
+  dataTypeInfo
+.precision
+} should be greater or equal to current precision value ${
+  carbonColumn.getColumnSchema
+.getPrecision
+}")
+} else if (dataTypeInfo.scale <= 
carbonColumn.getColumnSchema.getScale) {
+  sys
+.error(s"Given column ${
+  carbonColumn
+.getColName
+} cannot be modified. Specified scale value ${
+  dataTypeInfo
+.scale
+} should be greater or equal to current scale value ${
+  carbonColumn.getColumnSchema
+.getScale
+}")
+} else {
+  // difference of precision and scale specified by user should 
not be less than the
+  // difference of already existing precision and scale else it 
will result in data loss
+  val carbonColumnPrecisionScaleDiff = 
carbonColumn.getColumnSchema.getPrecision -
+   
carbonColumn.getColumnSchema.getScale
+  val dataInfoPrecisionScaleDiff = dataTypeInfo.precision - 
dataTypeInfo.scale
+  if (dataInfoPrecisionScaleDiff < carbonColumnPrecisionScaleDiff) 
{
+sys
+  .error(s"Given column ${
+carbonColumn
+  .getColName
+  } cannot be modified. Specified precision and scale values 
will lead to data loss")
+  }
+}
+  case _ =>
+sys
+  .error(s"Given column ${ carbonColumn.getColName } with data 
type ${
+carbonColumn
+  .getDataType.getName
+  } cannot be modified. Only Int and Decimal data types are 
allowed for modification")
+}
+  }
+
+  /**
+   * This method will create a copy of the same object
+   *
+   * @param thriftColumnSchema object to be cloned
+   * @return
+   */
+  def createColumnSchemaCopyObject(thriftColumnSchema: 
org.apache.carbondata.format.ColumnSchema)
--- End diff --

Done


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-carbondata pull request #641: [CARBONDATA-767] Alter table support...

2017-03-15 Thread nareshpr
Github user nareshpr commented on a diff in the pull request:


https://github.com/apache/incubator-carbondata/pull/641#discussion_r106112761
  
--- Diff: 
integration/spark-common/src/main/scala/org/apache/carbondata/spark/util/DataTypeConverterUtil.scala
 ---
@@ -77,4 +77,40 @@ object DataTypeConverterUtil {
   case DataType.STRUCT => "struct"
 }
   }
+
+  /**
+   * convert from wrapper to external data type
+   *
+   * @param dataType
+   * @return
+   */
+  def convertToThriftDataType(dataType: String): 
org.apache.carbondata.format.DataType = {
--- End diff --

There is no direct string to thrift datatype conversion. When creating 
table, we first convert string to Wrapper datatype and from wrapper datatype, 
we convert into thrift datatype. This method is required for alter table, as we 
r directly converting string to thrift type in alter table change datatype


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-carbondata pull request #558: [CARBONDATA-562] Supporting Spark 1....

2017-01-19 Thread nareshpr
GitHub user nareshpr opened a pull request:

https://github.com/apache/incubator-carbondata/pull/558

[CARBONDATA-562] Supporting Spark 1.6.3 Version in CarbonData

Implemented support for Spark 1.6.3 in CarbonData

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/nareshpr/incubator-carbondata Support163Spark

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-carbondata/pull/558.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #558






---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-carbondata issue #491: [CARBONDATA-583] Add replace function suppo...

2017-01-04 Thread nareshpr
Github user nareshpr commented on the issue:

https://github.com/apache/incubator-carbondata/pull/491
  
Can you check regexp_replace spark function? This function replace all 
substrings of the specified string that matches the pattern


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-carbondata pull request #308: [CARBONDATA-398] In DropCarbonTable ...

2016-11-22 Thread nareshpr
Github user nareshpr closed the pull request at:

https://github.com/apache/incubator-carbondata/pull/308


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---