Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.9.0, 0.10.0
-
None
Description
It was observed that while creating table with deeply nested structs might throw this exception:
java.lang.ArrayIndexOutOfBoundsException: 9 at org.apache.hadoop.hive.serde2.lazy.LazyFactory.createLazyObjectInspector(LazyFactory.java:281) at org.apache.hadoop.hive.serde2.lazy.LazyFactory.createLazyObjectInspector(LazyFactory.java:263) at org.apache.hadoop.hive.serde2.lazy.LazyFactory.createLazyObjectInspector(LazyFactory.java:276) at org.apache.hadoop.hive.serde2.lazy.LazyFactory.createLazyObjectInspector(LazyFactory.java:263) at org.apache.hadoop.hive.serde2.lazy.LazyFactory.createLazyObjectInspector(LazyFactory.java:276) at org.apache.hadoop.hive.serde2.lazy.LazyFactory.createLazyObjectInspector(LazyFactory.java:263) at org.apache.hadoop.hive.serde2.lazy.LazyFactory.createLazyObjectInspector(LazyFactory.java:276) at org.apache.hadoop.hive.serde2.lazy.LazyFactory.createLazyObjectInspector(LazyFactory.java:263) at org.apache.hadoop.hive.serde2.lazy.LazyFactory.createLazyObjectInspector(LazyFactory.java:276) at org.apache.hadoop.hive.serde2.lazy.LazyFactory.createLazyStructInspector(LazyFactory.java:354)
The reason being that currently the separators array has been hardcoded to be of size 8 in the LazySimpleSerde.
// Read the separators: We use 8 levels of separators by default, but we // should change this when we allow users to specify more than 10 levels // of separators through DDL. serdeParams.separators = new byte[8];
If possible, we should increase this size or at least make it configurable to properly handle deeply nested structs.