apache / apache/parquet-java

Hive Avro to Parquet table conversion

Aperta
#1,415 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Component: Parquet Priority: Major Type: bug
Lingua principale
Java
Stelle
3.1k
Fork
1.6k
Merge medio
3g 12h
PR unite (30g)
33

Descrizione

Hi.
I have following avro schema

```Java
{
"namespace" : "com.example.test",
"type" : "record",
"name" : "TestRecord",
"fields" : [{"name" : "objectLink", "type" : [
{"type": "record", "name" : "TestObj1", "fields" : [{"name":"obj1VisitorId","type":["null","string"]}] },
{"type": "record", "name" : "TestObj2", "fields" : [{"name":"obj2VisitorId","type":["null","string"]}]}
]
}],
"doc" : "event for test purposes"
}
```

Using this schema I can create avro objects, also I'm able to create table backed by avro in Hive. But then I want to create a table backed by parquet I'm doing

CREATE TABLE parquet_table
STORED AS parquet
AS SELECT \* FROM avro_table

and i get
SemanticException java.lang.UnsupportedOperationException: Unknown field type: uniontype,struct>

Is there a way to convert such structures, to store them in hive backed as parquet? This is a simple example, but I have big data structure described in avro, so I can't convert it manually, and also I have data which already stored in avro and need to be loaded in table, backed by parquet. Is there any way to this?

I'm using hive 0.13.

**Reporter**: [Dmitriy](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=dimaga) / @dimaga

**Note**: *This issue was originally created as [PARQUET-155](https://issues.apache.org/jira/browse/PARQUET-155). Please see the [migration documentation](https://issues.apache.org/jira/browse/PARQUET-2502) for further details.*

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Leggi la documentazione di migrazione indicata e riproduci la query Hive 0.13 CREATE TABLE parquet_table STORED AS parquet AS SELECT * FROM avro_table utilizzando lo schema union annidato. Usa l'errore segnalato Unknown field type: uniontype come punto di partenza; il lavoro sarà completato quando esisterà un percorso documentato o implementato per convertire questa struttura in Parquet.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Ambito
databases
Tipo di issue
Bug
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
20/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.