[GitHub] [carbondata] xubo245 commented on a change in pull request #3181: [CARBONDATA-3356] Fix the issue when carbonData DataSource read SDK files with varchar

2019-04-28 Thread GitBox
xubo245 commented on a change in pull request #3181: [CARBONDATA-3356] Fix the 
issue when carbonData DataSource read SDK files with varchar
URL: https://github.com/apache/carbondata/pull/3181#discussion_r279227524
 
 

 ##
 File path: 
integration/spark-datasource/src/test/scala/org/apache/spark/sql/carbondata/datasource/SparkCarbonDataSourceTest.scala
 ##
 @@ -22,6 +22,7 @@ import java.util
 import scala.collection.JavaConverters._
 import scala.collection.mutable
 
+import org.apache.commons.io.FileUtils
 
 Review comment:
   ok, done


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [carbondata] xubo245 commented on a change in pull request #3181: [CARBONDATA-3356] Fix the issue when carbonData DataSource read SDK files with varchar

2019-04-22 Thread GitBox
xubo245 commented on a change in pull request #3181: [CARBONDATA-3356] Fix the 
issue when carbonData DataSource read SDK files with varchar
URL: https://github.com/apache/carbondata/pull/3181#discussion_r277284722
 
 

 ##
 File path: store/sdk/src/main/java/org/apache/carbondata/sdk/file/Field.java
 ##
 @@ -78,6 +78,8 @@ public Field(String name, String type) {
   this.type = DataTypes.FLOAT;
 } else if (type.equalsIgnoreCase("double")) {
   this.type = DataTypes.DOUBLE;
+} else if (type.equalsIgnoreCase("decimal")) {
+  this.type = DataTypes.createDefaultDecimalType();
 
 Review comment:
   already support in new commit


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [carbondata] xubo245 commented on a change in pull request #3181: [CARBONDATA-3356] Fix the issue when carbonData DataSource read SDK files with varchar

2019-04-22 Thread GitBox
xubo245 commented on a change in pull request #3181: [CARBONDATA-3356] Fix the 
issue when carbonData DataSource read SDK files with varchar
URL: https://github.com/apache/carbondata/pull/3181#discussion_r277236736
 
 

 ##
 File path: store/sdk/src/main/java/org/apache/carbondata/sdk/file/Field.java
 ##
 @@ -78,6 +78,8 @@ public Field(String name, String type) {
   this.type = DataTypes.FLOAT;
 } else if (type.equalsIgnoreCase("double")) {
   this.type = DataTypes.DOUBLE;
+} else if (type.equalsIgnoreCase("decimal")) {
+  this.type = DataTypes.createDefaultDecimalType();
 
 Review comment:
   Schema.parseJson(schema) doesn't support decimal. So I support default 
decimal in here, we can support if need set scale and precision.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [carbondata] xubo245 commented on a change in pull request #3181: [CARBONDATA-3356] Fix the issue when carbonData DataSource read SDK files with varchar

2019-04-21 Thread GitBox
xubo245 commented on a change in pull request #3181: [CARBONDATA-3356] Fix the 
issue when carbonData DataSource read SDK files with varchar
URL: https://github.com/apache/carbondata/pull/3181#discussion_r277189124
 
 

 ##
 File path: 
core/src/main/java/org/apache/carbondata/core/util/BlockletDataMapUtil.java
 ##
 @@ -264,6 +264,14 @@ public static boolean 
isSameColumnAndDifferentDatatypeInSchema(
 .equalsIgnoreCase(tableColumnList.get(i).getColumnName()) && 
!indexFileColumnList.get(j)
 .getDataType().getName()
 .equalsIgnoreCase(tableColumnList.get(i).getDataType().getName())) 
{
+  if 
("varchar".equalsIgnoreCase(indexFileColumnList.get(j).getDataType().getName()) 
&&
+  
"string".equalsIgnoreCase(tableColumnList.get(i).getDataType().getName())) {
+LOG.info("Datatype of the Column " + 
indexFileColumnList.get(j).getDataType().getName()
++ " present in index file, is varchar and not same as datatype 
of the column " +
+"with same name present in table, " +
+"because carbon convert varchar of carbon to string of spark");
+return true;
 
 Review comment:
   ok,you are right, done


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [carbondata] xubo245 commented on a change in pull request #3181: [CARBONDATA-3356] Fix the issue when carbonData DataSource read SDK files with varchar

2019-04-21 Thread GitBox
xubo245 commented on a change in pull request #3181: [CARBONDATA-3356] Fix the 
issue when carbonData DataSource read SDK files with varchar
URL: https://github.com/apache/carbondata/pull/3181#discussion_r277189124
 
 

 ##
 File path: 
core/src/main/java/org/apache/carbondata/core/util/BlockletDataMapUtil.java
 ##
 @@ -264,6 +264,14 @@ public static boolean 
isSameColumnAndDifferentDatatypeInSchema(
 .equalsIgnoreCase(tableColumnList.get(i).getColumnName()) && 
!indexFileColumnList.get(j)
 .getDataType().getName()
 .equalsIgnoreCase(tableColumnList.get(i).getDataType().getName())) 
{
+  if 
("varchar".equalsIgnoreCase(indexFileColumnList.get(j).getDataType().getName()) 
&&
+  
"string".equalsIgnoreCase(tableColumnList.get(i).getDataType().getName())) {
+LOG.info("Datatype of the Column " + 
indexFileColumnList.get(j).getDataType().getName()
++ " present in index file, is varchar and not same as datatype 
of the column " +
+"with same name present in table, " +
+"because carbon convert varchar of carbon to string of spark");
+return true;
 
 Review comment:
   ok,done


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services