GroupType.union(Type toMerge, boolean strict) does not honor strict parameter
- Lingua principale
- Java
- Stelle
- 3.1k
- Fork
- 1.6k
- Merge medio
- 3g 12h
- PR unite (30g)
- 33
Descrizione
This is the code as it currently stands in master:
```Java
@Override
protected Type union(Type toMerge, boolean strict) {
if (toMerge.isPrimitive()) {
throw new IncompatibleSchemaModificationException("can not merge primitive type " + toMerge + " into group type " + this);
}
return new GroupType(toMerge.getRepetition(), getName(), mergeFields(toMerge.asGroupType()));
}
```
Note the call to `mergeFields` omits the `strict` parameter. I believe the code should be:
```Java
@Override
protected Type union(Type toMerge, boolean strict) {
if (toMerge.isPrimitive()) {
throw new IncompatibleSchemaModificationException("can not merge primitive type " + toMerge + " into group type " + this);
}
return new GroupType(toMerge.getRepetition(), getName(), mergeFields(toMerge.asGroupType(), strict));
}
```
Note the call to `mergeFields` includes the `strict` parameter.
I would work on this myself, but I'm having considerable trouble working with the codebase (see e.g. http://stackoverflow.com/questions/31229445/build-failure-apache-parquet-mr-source-mvn-install-failure). Given the (assumed) simplicity of the fix, can a seasoned Parquet contributor take this up? Cheers.
**Reporter**: [Michael MacFadden](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=michael) / @mallman
**Note**: *This issue was originally created as [PARQUET-390](https://issues.apache.org/jira/browse/PARQUET-390). 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
Cerca nel codebase Parquet Java GroupType.union(Type toMerge, boolean strict), quindi esamina come viene chiamato mergeFields da quel metodo. Conferma che il valore di strict venga propagato come descritto ed esegui i test pertinenti del progetto per verificare il comportamento dell'unione degli schemi in modalità strict e non strict.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java
- Ambito
- data-engineering
- Tipo di issue
- Bug
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Ferma
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 38/100