diff --git a/parquet-hadoop/src/test/java/org/apache/parquet/hadoop/TestInputFormat.java b/parquet-hadoop/src/test/java/org/apache/parquet/hadoop/TestInputFormat.java index 02c80fccb2..697e8e2280 100644 --- a/parquet-hadoop/src/test/java/org/apache/parquet/hadoop/TestInputFormat.java +++ b/parquet-hadoop/src/test/java/org/apache/parquet/hadoop/TestInputFormat.java @@ -42,7 +42,6 @@ import java.util.List; import java.util.Map; -import org.apache.commons.lang.SystemUtils; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.BlockLocation; import org.apache.hadoop.fs.FileStatus; diff --git a/parquet-thrift/pom.xml b/parquet-thrift/pom.xml index 7f08ca6176..e30b5d43a3 100644 --- a/parquet-thrift/pom.xml +++ b/parquet-thrift/pom.xml @@ -174,6 +174,14 @@ test-jar test + + + com.google.re2j + re2j + 1.1 + provided + diff --git a/parquet-thrift/src/main/java/org/apache/parquet/thrift/projection/deprecated/PathGlobPattern.java b/parquet-thrift/src/main/java/org/apache/parquet/thrift/projection/deprecated/PathGlobPattern.java index ba5646dbe7..4d4136f11d 100644 --- a/parquet-thrift/src/main/java/org/apache/parquet/thrift/projection/deprecated/PathGlobPattern.java +++ b/parquet-thrift/src/main/java/org/apache/parquet/thrift/projection/deprecated/PathGlobPattern.java @@ -1,4 +1,4 @@ -/* +/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -20,8 +20,8 @@ import org.apache.hadoop.fs.GlobPattern; -import java.util.regex.Pattern; -import java.util.regex.PatternSyntaxException; +import com.google.re2j.Pattern; +import com.google.re2j.PatternSyntaxException; /** * Enhanced version of GlobPattern class that is defined in hadoop with extra capability of matching @@ -56,7 +56,7 @@ public static Pattern compile(String globPattern) { } private static void error(String message, String pattern, int pos) { - throw new PatternSyntaxException(message, pattern, pos); + throw new PatternSyntaxException(String.format("%1s at %2d", message, pos), pattern); } /** diff --git a/pom.xml b/pom.xml index d37afb6cf9..a9f23a5491 100644 --- a/pom.xml +++ b/pom.xml @@ -76,7 +76,7 @@ 2.13.2.2 0.14.2 shaded.parquet - 2.10.1 + 3.2.0 2.9.0 1.12.0 thrift @@ -519,6 +519,8 @@ change to fix a integer overflow issue. TODO: remove this after Parquet 1.13 release --> org.apache.parquet.column.values.dictionary.DictionaryValuesWriter#dictionaryByteSize + + org.apache.parquet.thrift.projection.deprecated.PathGlobPattern