When invalid column name is specified for column statistics IndexOutOfBoundsException is thrown.
If the invalid column name appears at first or last then INVALID_COLUMN_REFERENCE is thrown at query planning stage. But if the invalid column name appears somewhere in the middle of column lists then IndexOutOfBoundsException is thrown at semantic analysis step. The problem is with getTableColumnType() and getPartitionColumnType() methods. The following segment
is the reason for it. If the invalid column names appears in the middle of column list then the equalsIgnoreCase() skips the invalid name and increments the i. Since the list is not initialized it results in exception.