[
https://issues.apache.org/jira/browse/CARBONDATA-326?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15601966#comment-15601966
]
ASF GitHub Bot commented on CARBONDATA-326:
-------------------------------------------
Github user jackylk commented on a diff in the pull request:
https://github.com/apache/incubator-carbondata/pull/254#discussion_r84686198
--- Diff:
integration/spark/src/main/scala/org/apache/spark/sql/CarbonCatalystOperators.scala
---
@@ -90,3 +90,11 @@ abstract class CarbonProfile(attributes: Seq[Attribute])
extends Serializable {
case class IncludeProfile(attributes: Seq[Attribute]) extends
CarbonProfile(attributes)
case class ExcludeProfile(attributes: Seq[Attribute]) extends
CarbonProfile(attributes)
+
+case class CreateLikeTable(likeTableName: String, createHiveLikeTableSql:
String)
--- End diff --
please add description to the parameters
> Creates wrong table on 'create table like'
> -------------------------------------------
>
> Key: CARBONDATA-326
> URL: https://issues.apache.org/jira/browse/CARBONDATA-326
> Project: CarbonData
> Issue Type: Bug
> Reporter: Prabhat Kashyap
>
> I'm trying to create a table like my old table but it is not creating as
> expected.
> 0: jdbc:hive2://localhost:10000> CREATE TABLE mainTable(id INT, name STRING)
> STORED BY 'carbondata';
> +---------+--+
> | Result |
> +---------+--+
> +---------+--+
> No rows selected (0.206 seconds)
> 0: jdbc:hive2://localhost:10000> DESC mainTable;
> +-----------+------------+----------+--+
> | col_name | data_type | comment |
> +-----------+------------+----------+--+
> | name | string | |
> | id | bigint | |
> +-----------+------------+----------+--+
> 2 rows selected (0.056 seconds)
> Above one is my mainTable and I wants to create copiedTable from it but
> everytime it is show something like:
> 0: jdbc:hive2://localhost:10000> CREATE TABLE copiedTable LIKE mainTable;
> +---------+--+
> | result |
> +---------+--+
> +---------+--+
> No rows selected (0.101 seconds)
> 0: jdbc:hive2://localhost:10000> DESC copiedTable;
> +-----------+----------------+--------------------+--+
> | col_name | data_type | comment |
> +-----------+----------------+--------------------+--+
> | col | array<string> | from deserializer |
> +-----------+----------------+--------------------+--+
> 1 row selected (0.022 seconds)
> 0: jdbc:hive2://localhost:10000> LOAD DATA LOCAL INPATH
> 'hdfs://localhost:54310/user/hduser/datafiles/data.csv' INTO TABLE
> copiedTable OPTIONS('DELIMITER'=',');
> Error: java.lang.RuntimeException: Data loading failed. table not found:
> knoldus.copiedtable (state=,code=0)
> 0: jdbc:hive2://localhost:10000> select * from copiedTable;
> +------+--+
> | col |
> +------+--+
> +------+--+
> No rows selected (0.11 seconds)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)