Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
Description
steps to reproduce:
create table maintable(name string, c_code int, price int) STORED AS carbondata;
create materialized view mv_table as select name, sum(price) from maintable group by name;
create table new_Table like maintable;
Result:
2021-03-22 20:40:06 ERROR CarbonCreateTableCommand:176 - org.apache.spark.sql.AnalysisException: == Spark Parser: org.apache.spark.sql.execution.SparkSqlParser ==
extraneous input 'default' expecting {')', ','}(line 8, pos 25)
== SQL ==
CREATE TABLE default.new_table
(`name` string,`c_code` int,`price` int)
USING carbondata
OPTIONS (
indexexists "false",
sort_columns "",
comment "",
relatedmvtablesmap "{"default":["mv_table"]}",
-------------------------^^^
bad_record_path "",
local_dictionary_enable "true",
indextableexists "false",
tableName "new_table",
dbName "default",
tablePath "/home/root1/carbondata/integration/spark/target/warehouse/new_table",
path "file:/home/root1/carbondata/integration/spark/target/warehouse/new_table",
isExternal "false",
isTransactional "true",
isVisible "true"
,carbonSchemaPartsNo '1',carbonSchema0 '{"databaseName":"default","tableUniqueName":"default_new_table","factTable":{"tableId":"4ddbaea5-42b8-4ca2-b0ce-dec0af81d3b6","tableName":"new_table","listOfColumns":[{"dataType":
,"columnName":"name","columnUniqueId":"2293eee8-41fa-4869-8275-8c16a5dd7222","columnReferenceId":"2293eee8-41fa-4869-8275-8c16a5dd7222","isColumnar":true,"encodingList":[],"isDimensionColumn":true,"scale":-1,"precision":-1,"schemaOrdinal":0,"numberOfChild":0,"columnProperties":{},"invisible":false,"isSortColumn":false,"aggFunction":"","timeSeriesFunction":"","isLocalDictColumn":true},{"dataType":
{"id":5,"precedenceOrder":3,"name":"INT","sizeInBytes":4},"columnName":"c_code","columnUniqueId":"cc3ab016-51e9-4791-8f37-8d697d972b8a","columnReferenceId":"cc3ab016-51e9-4791-8f37-8d697d972b8a","isColumnar":true,"encodingList":[],"isDimensionColumn":false,"scale":-1,"precision":-1,"schemaOrdinal":1,"numberOfChild":0,"columnProperties":{},"invisible":false,"isSortColumn":false,"aggFunction":"","timeSeriesFunction":"","isLocalDictColumn":false},{"dataType":
{"id":5,"precedenceOrder":3,"name":"INT","sizeInBytes":4},"columnName":"price","columnUniqueId":"c67ed6d5-8f10-488f-a990-dfda20739907","columnReferenceId":"c67ed6d5-8f10-488f-a990-dfda20739907","isColumnar":true,"encodingList":[],"isDimensionColumn":false,"scale":-1,"precision":-1,"schemaOrdinal":2,"numberOfChild":0,"columnProperties":{},"invisible":false,"isSortColumn":false,"aggFunction":"","timeSeriesFunction":"","isLocalDictColumn":false}],"schemaEvolution":{"schemaEvolutionEntryList":[
{"timeStamp":1616425806915}]},"tableProperties":{"indexexists":"false","sort_columns":"","comment":"","relatedmvtablesmap":"
{\"default\":[\"mv_table\"]}","bad_record_path":"","local_dictionary_enable":"true","indextableexists":"false"}},"lastUpdatedTime":1616425806915,"tablePath":"file:/home/root1/carbondata/integration/spark/target/warehouse/new_table","isTransactionalTable":true,"hasColumnDrift":false,"isSchemaModified":false}')