GitHub user anubhav100 opened a pull request:
https://github.com/apache/incubator-carbondata/pull/639 [CARBONDATA-752] solved bug for complex type give exception in spark2.1 using complex type in create table gives me exception spark.sql( s""" CREATE TABLE carbon_table( shortField short, intField int, bigintField long, doubleField double, stringField string, timestampField timestamp, decimalField decimal(18,2), dateField date, charField char(5), floatField float, complexData array<string> ) STORED BY 'CARBONDATA' TBLPROPERTIES('DICTIONARY_INCLUDE'='dateField, charField') """.stripMargin) it gives me exception Caused by: java.lang.RuntimeException: Unsupported data type: ArrayType(StringType,true) at scala.sys.package$.error(package.scala:27) at org.apache.carbondata.spark.util.DataTypeConverterUtil$.convertToCarbonTypeForSpark2(DataTypeConverterUtil.scal You can merge this pull request into a Git repository by running: $ git pull https://github.com/anubhav100/incubator-carbondata CARBONDATA-752 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-carbondata/pull/639.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 #639 ---- commit 4da0d8ab5b0423f554315340f7fa91f3830132ee Author: anubhav100 <[hidden email]> Date: 2017-03-08T11:27:08Z solved bug for complex type give exception in spark2.1 ---- --- 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 [hidden email] or file a JIRA ticket with INFRA. --- |
Github user CarbonDataQA commented on the issue:
https://github.com/apache/incubator-carbondata/pull/639 Build Success with Spark 1.6.2, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder/1061/ --- 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 [hidden email] or file a JIRA ticket with INFRA. --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/incubator-carbondata/pull/639 Build Success with Spark 1.6.2, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder/1062/ --- 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 [hidden email] or file a JIRA ticket with INFRA. --- |
In reply to this post by qiuchenjian-2
Github user jackylk commented on the issue:
https://github.com/apache/incubator-carbondata/pull/639 Please add a testcase to verify it --- 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 [hidden email] or file a JIRA ticket with INFRA. --- |
In reply to this post by qiuchenjian-2
Github user anubhav100 commented on the issue:
https://github.com/apache/incubator-carbondata/pull/639 @jackylk added a test case --- 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 [hidden email] or file a JIRA ticket with INFRA. --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/incubator-carbondata/pull/639 Build Success with Spark 1.6.2, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder/1123/ --- 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 [hidden email] or file a JIRA ticket with INFRA. --- |
In reply to this post by qiuchenjian-2
Github user ravipesala commented on a diff in the pull request:
https://github.com/apache/incubator-carbondata/pull/639#discussion_r105883239 --- Diff: integration/spark-common/src/main/scala/org/apache/carbondata/spark/util/DataTypeConverterUtil.scala --- @@ -56,7 +56,9 @@ object DataTypeConverterUtil { case "decimaltype" => DataType.DECIMAL case "timestamptype" => DataType.TIMESTAMP case "datetype" => DataType.DATE - case "arraytype" => DataType.ARRAY + case "arraytype" | "arraytype(stringtype,true)" | "arraytype(inttype,true)" | --- End diff -- I think it would be the same case with structtype as well. Please simplify as follows. ``` def convertToCarbonTypeForSpark2(dataType: String): DataType = { dataType.toLowerCase match { case "stringtype" => DataType.STRING case "inttype" => DataType.INT case "integertype" => DataType.INT case "tinyinttype" => DataType.SHORT case "shorttype" => DataType.SHORT case "longtype" => DataType.LONG case "biginttype" => DataType.LONG case "numerictype" => DataType.DOUBLE case "doubletype" => DataType.DOUBLE case "floattype" => DataType.DOUBLE case "decimaltype" => DataType.DECIMAL case "timestamptype" => DataType.TIMESTAMP case "datetype" => DataType.DATE case others => if (others != null && others.startsWith("arraytype")) { DataType.ARRAY } else if (others != null && others.startsWith("structtype")) { DataType.STRUCT } else { sys.error(s"Unsupported data type: $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 [hidden email] or file a JIRA ticket with INFRA. --- |
In reply to this post by qiuchenjian-2
Github user anubhav100 commented on a diff in the pull request:
https://github.com/apache/incubator-carbondata/pull/639#discussion_r105884483 --- Diff: integration/spark-common/src/main/scala/org/apache/carbondata/spark/util/DataTypeConverterUtil.scala --- @@ -56,7 +56,9 @@ object DataTypeConverterUtil { case "decimaltype" => DataType.DECIMAL case "timestamptype" => DataType.TIMESTAMP case "datetype" => DataType.DATE - case "arraytype" => DataType.ARRAY + case "arraytype" | "arraytype(stringtype,true)" | "arraytype(inttype,true)" | --- End diff -- @ravipesala changes done can review? --- 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 [hidden email] or file a JIRA ticket with INFRA. --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/incubator-carbondata/pull/639 Build Success with Spark 1.6.2, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder/1136/ --- 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 [hidden email] or file a JIRA ticket with INFRA. --- |
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:
https://github.com/apache/incubator-carbondata/pull/639 LGTM --- 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 [hidden email] or file a JIRA ticket with INFRA. --- |
In reply to this post by qiuchenjian-2
Github user asfgit closed the pull request at:
https://github.com/apache/incubator-carbondata/pull/639 --- 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 [hidden email] or file a JIRA ticket with INFRA. --- |
Free forum by Nabble | Edit this page |