Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
ghx-label-4
Description
For MAP types field id resolution indexes the top-level columns via the current 'table_idx - 1' at:
In this case table_idx is either SchemaPathConstants::MAP_KEY or SchemaPathConstants::MAP_VALUE which are 0 and 1 respectively. Hence 'table_idx - 1' can be -1 which is not a valid index for a vector, hence we get an ASAN error. Even if the 'table_idx - 1' is zero we get a wrong field id.
Note that at this point in the schema resolution we have successfully found a MAP type with a matching field id, therefore it is safe to resolve the child via the value of 'table_idx' (which is the position of the child, MAP_KEY or MAP_VALUE).