apache / apache/parquet-java

GroupType.union(Type toMerge, boolean strict) does not honor strict parameter

Ouverte
#1,901 7 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Component: Java Component: Parquet Priority: Major Type: bug
Langage dominant
Java
Étoiles
3.1k
Forks
1.6k
Merge moyen
3 j 12 h
PR mergées (30 j)
33

Description

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.*

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

Recherchez dans la base de code Parquet Java GroupType.union(Type toMerge, boolean strict), puis examinez comment mergeFields est appelé depuis cette méthode. Confirmez que la valeur de strict est propagée comme décrit et exécutez les tests pertinents du projet afin de vérifier le comportement de la fusion de schémas en mode strict et non strict.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
java
Domaine
data-engineering
Type d'issue
Bug
Difficulté
2/5
Temps estimé
1-3 heures
Activité
À l'abandon
Clarté
Clairement spécifiée
Accessibilité débutants
38/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.