Hive cannot determine the list of columns automatically based on Parquet serde
- Vorherrschende Sprache
- Java
- Sterne
- 3.1k
- Forks
- 1.6k
- Ø Merge
- 3 T. 12 Std.
- Gemergte PRs (30 T.)
- 33
Beschreibung
Today we are not able to create a parquet based hive table without having to specify the column names and types. When we try to define it the following way, we get the error
"14/08/20 17:27:46 ERROR ql.Driver: FAILED: SemanticException [Error 10043]: Either list of columns or a custom serializer should be specified"
```sql
CREATE TABLE parquet_test
ROW FORMAT SERDE
'org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe'
STORED AS INPUTFORMAT
'org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat'
OUTPUTFORMAT
'org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat'
LOCATION
'/user/pratik/campaigns';
```
Whereas if we create a hive table on top of AVRO based files, we do not need to specify the column names, hive automatically figures out the schema through the SerDe.
```sql
CREATE EXTERNAL TABLE campaigns
ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.avro.AvroSerDe'
STORED AS INPUTFORMAT 'org.apache.hadoop.hive.ql.io.avro.AvroContainerInputFormat'
OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.avro.AvroContainerOutputFormat'
LOCATION '/user/pratik/campaigns'
TBLPROPERTIES ('avro.schema.url'='hdfs:///user/pratik/campaigns.avsc');
```
**Reporter**: [Pratik Khadloya](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=tispratik)
**Assignee**: [Ashish Singh](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=singhashish) / @SinghAsDev
**Note**: *This issue was originally created as [PARQUET-76](https://issues.apache.org/jira/browse/PARQUET-76). Please see the [migration documentation](https://issues.apache.org/jira/browse/PARQUET-2502) for further details.*
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Prüfe zuerst den ursprünglichen PARQUET-76-Bericht und die mit PARQUET-2502 verknüpfte Migrationsdokumentation. Bestätige, ob die automatische Spaltenerkennung für Hive-Tabellen mit Parquet-Backend weiterhin erforderlich ist oder an eine andere Stelle verschoben wurde, und ermittle anschließend die aktuellen Einstiegsstellen für Implementierung und Tests, bevor du den verbleibenden Umfang und die Akzeptanzkriterien festlegst.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- java, sql
- Bereich
- data-engineering, databases
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 25/100