Skip to content

Commit 817731c

Browse files
committed
comments
1 parent 26444c8 commit 817731c

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

parquet-cli/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,13 @@
9797
<groupId>com.google.protobuf</groupId>
9898
<artifactId>protobuf-java</artifactId>
9999
<version>3.25.6</version>
100-
<scope>test</scope>
100+
<scope>${deps.scope}</scope>
101101
</dependency>
102102
<dependency>
103103
<groupId>org.apache.parquet</groupId>
104104
<artifactId>parquet-protobuf</artifactId>
105105
<version>${project.version}</version>
106-
<scope>test</scope>
106+
<scope>${deps.scope}</scope>
107107
</dependency>
108108
<dependency>
109109
<groupId>org.apache.parquet</groupId>

parquet-cli/src/main/java/org/apache/parquet/cli/BaseCommand.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ public abstract class BaseCommand implements Command, Configurable {
6666

6767
private static final String RESOURCE_URI_SCHEME = "resource";
6868
private static final String STDIN_AS_SOURCE = "stdin";
69+
public static final String PARQUET_CLI_ENABLE_GROUP_READER = "parquet.enable.fallback-simple-reader";
6970

7071
/**
7172
* Note for dev: Due to legancy reasons, parquet-cli used the avro schema reader which
@@ -364,7 +365,8 @@ protected <D> Iterable<D> openDataFile(final String source, Schema projection) t
364365
switch (format) {
365366
case PARQUET:
366367
boolean isProtobufStyle = isProtobufStyleSchema(source);
367-
if (isProtobufStyle) {
368+
boolean useGroupReader = getConf().getBoolean(PARQUET_CLI_ENABLE_GROUP_READER, false);
369+
if (isProtobufStyle || useGroupReader) {
368370
final ParquetReader<Group> grp = ParquetReader.<Group>builder(
369371
new GroupReadSupport(), qualifiedPath(source))
370372
.withConf(getConf())

0 commit comments

Comments
 (0)