mirror of
https://github.com/apache/impala.git
synced 2026-01-06 06:01:03 -05:00
For Avro tables the column information in the underlying database of the Hive metastore can be different from what is specified in the avro schema. HIVE-6308 aimed to improve upon this, but for older tables the two don't necessarily align. There are two possible cases: 1) Hive's underlying database contains a column which is not present in the Avro schema file. In this case we encounter a NullPointerException in DescribeResultFactory.java#L189 when trying to look up the column in the internal table object. 2) The Avro schema contains a column, which is not present in the underlying database. In this case the column will not be displayed in describe formatted. In addition to the automatic tests I verified this manually by creating an Avro table with an external schema file in Hive. This populated the underlying database with the column information. I then either removed a column from the Avro schema file (case 1) or cleared the column information from the "COLUMNS_V2" table in the underlying database (case 2) and verified that the change fixed both cases. Change-Id: Ieb69d3678e662465d40aee80ba23132ea13871a0 Reviewed-on: http://gerrit.cloudera.org:8080/4126 Reviewed-by: Lars Volker <lv@cloudera.com> Tested-by: Internal Jenkins Reviewed-by: Jim Apple <jbapple@cloudera.com>
3.9 KiB
3.9 KiB