Ajantha Bhat created CARBONDATA-3436:
----------------------------------------

             Summary: update pre insert into rule as per spark
                 Key: CARBONDATA-3436
                 URL: https://issues.apache.org/jira/browse/CARBONDATA-3436
             Project: CarbonData
          Issue Type: Bug
            Reporter: Ajantha Bhat


*Problem:* Carbon is not following hive syntax for one insert into strictly.

*Cause:* For insert into, carbon has its own rule. 
CarbonAnalysisRule[CarbonPreInsertionCasts]
In CarbonPreInsertionCasts, data type cast is missed. Hence carbon was not 
following hive syntax.

*solution:*
Add data type cast rule for insert into.

*Note:*
 # Change syntax for insert single record(for binary and complex 
type(array,struct,map))
 # Binary cannot accept value as integer, need to pass in quotes only.
 # Earlier complex type was accepting null values for complex datatypes, now it 
won't accept null values for complex types as per Hive rule.
 # Need to pass in default format only for date type and timestamp type for 
Complex type in insert command.
 # For boolean type 't' is a valid entry for true and 'f' is a valid entry for 
false.
 # For boolean type , any integer greater than 0 will be considered as true and 
0 will be considered as false.
 # In case of map,for same key. As per hive, the latter value should be 
inserted for the same key.

Steps to reproduce:

create table test(name string,id binary) stored by 'carbondata';
insert into test select 'a',1;

insert should throw cast exception as 1 is not binary. But it is passing now.

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to