apache / apache/parquet-java

Question on pig loader read parquet file

Open
#2,106 0 comments 0 reactions 0 assignees View on GitHub
Component: Java Component: Parquet Component: Pig Priority: Major Type: bug
Dominant language
Java
Stars
3.1k
Forks
1.6k
Avg merge
3d 12h
Merged PRs (30d)
33

Description

When I use spark save parquet file, schema like this

```

optional group attref (LIST) {
repeated group list {
optional group element {
optional binary nid (UTF8);
optional binary nss (UTF8);
}
}
}
```

And then use parquet-pig-bundle to read this file, the read function can work, but when i need to access "nid" it have some problem

If I read other file save by pig-storer, and need nid list, pig command is:
```

B = foreach A generate value.addr.clientIp_bag.clientIp, value.guid , value.attref.nid;
```
but read spark save version I need use this:
```

B = foreach M generate value.addr.clientIp, value.guid , flatten(value.attref);
C = foreach B generate clientIp, guid, attref::element.nid;
```
and this command will flatten column

My question is pig loader have some problem when loading parquet file(save by spark)

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

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

Contributor guide

No contributing guide indexed for this repository

Research direction

The report names parquet-pig-bundle and contrasts a Spark-written LIST schema with Pig-storer output; begin by reproducing both reads and tracing how the loader exposes attref and nid. Done means the Spark-produced file permits the intended nid access without unwanted flattening, with coverage for the reported schema and commands.

Written by the indexing model from the issue text.

Assessment

Domain
data-engineering
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.