Description
CarbonSchemaReader don't support Array<string>
When we read schema from index file and the data include array<string> data type
run org.apache.carbondata.examples.sdk.CarbonReaderExample :
Schema schema = CarbonSchemaReader .readSchemaInIndexFile(dataFiles[0].getAbsolutePath()) .asOriginOrder(); // Transform the schema String[] strings = new String[schema.getFields().length]; for (int i = 0; i < schema.getFields().length; i++) { strings[i] = (schema.getFields())[i].getFieldName(); System.out.println(strings[i] + "\t" + schema.getFields()[i].getSchemaOrdinal()); }
and throw some exception:
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
arrayfield.val0 -1
stringfield 0
shortfield 1
intfield 2
longfield 3
doublefield 4
boolfield 5
datefield 6
timefield 7
decimalfield 8
varcharfield 9
arrayfield 10
Complex child columns projection NOT supported through CarbonReader
java.lang.UnsupportedOperationException: Complex child columns projection NOT supported through CarbonReader
at org.apache.carbondata.sdk.file.CarbonReaderBuilder.build(CarbonReaderBuilder.java:155)
at org.apache.carbondata.examples.sdk.CarbonReaderExample.main(CarbonReaderExample.java:110)
It print arrayfield.val0 -1, child schema
Attachments
Issue Links
- links to