Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullPointerException when using the AvroParquetReader.Builder with a LocalInputFile #2948

Closed
robin-xyzt-ai opened this issue Jul 9, 2024 · 2 comments · Fixed by #2949
Closed
Assignees

Comments

@robin-xyzt-ai
Copy link

Describe the bug, including details regarding any error messages, version, and platform.

import org.apache.parquet.io.InputFile;
import org.apache.parquet.io.LocalInputFile;
import org.apache.parquet.hadoop.ParquetReader;
import org.apache.avro.generic.GenericRecord;
import org.apache.parquet.avro.AvroParquetReader;

InputFile inputFile = new LocalInputFile(Paths.get('/path/to/parquet/file');
ParquetReader<GenericRecord> reader = AvroParquetReader.<GenericRecord>builder(inputFile).build();

This results in a NullPointerException in the org.apache.parquet.avro.AvroParquetReader.Builder#getReadSupport method where configuration is still null, because it is not set in the org.apache.parquet.hadoop.ParquetReader.Builder#Builder(org.apache.parquet.io.InputFile) constructor.

Versions:

<dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-common</artifactId>
      <version>3.4.0</version>
    </dependency>
    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-client</artifactId>
      <version>3.4.0</version>
    </dependency>
    <dependency>
      <groupId>org.apache.parquet</groupId>
      <artifactId>parquet-avro</artifactId>
      <version>1.14.1</version>
    </dependency>

Component(s)

Avro

@joyCurry30
Copy link
Contributor

I'm willing to fix this issue, please assign this to me.

@wgtmac
Copy link
Member

wgtmac commented Jul 10, 2024

Thanks for your interest! Assigned. @joyCurry30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants