Affects Version/s: None
Fix Version/s: 1.6.0
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.
Add data type cast rule for insert into.
- 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.