This is an automated email from the ASF dual-hosted git repository. dmollitor pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/hive.git
The following commit(s) were added to refs/heads/master by this push: new c805207 HIVE-21636 ReplaceAll() -> replace() for non regex strings (Xia Li, reviewed by David Mollitor) c805207 is described below commit c80520771c5d39b1eb80668008e2f81e482af8ef Author: Xia Li <47727869+bd201...@users.noreply.github.com> AuthorDate: Thu Jun 11 12:05:04 2020 -0500 HIVE-21636 ReplaceAll() -> replace() for non regex strings (Xia Li, reviewed by David Mollitor) --- .../apache/hadoop/hive/accumulo/predicate/compare/StringCompare.java | 2 +- .../apache/hive/hcatalog/mapreduce/FileOutputCommitterContainer.java | 2 +- vector-code-gen/src/org/apache/hadoop/hive/tools/GenVectorCode.java | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/accumulo-handler/src/java/org/apache/hadoop/hive/accumulo/predicate/compare/StringCompare.java b/accumulo-handler/src/java/org/apache/hadoop/hive/accumulo/predicate/compare/StringCompare.java index 3d6d55c..1a235fa 100644 --- a/accumulo-handler/src/java/org/apache/hadoop/hive/accumulo/predicate/compare/StringCompare.java +++ b/accumulo-handler/src/java/org/apache/hadoop/hive/accumulo/predicate/compare/StringCompare.java @@ -67,7 +67,7 @@ public class StringCompare implements PrimitiveComparison { @Override public boolean like(byte[] value) { - String temp = new String(value).replaceAll("%", "[\\\\\\w]+?"); + String temp = new String(value).replace("%", "[\\\\\\w]+?"); Pattern pattern = Pattern.compile(temp); boolean match = pattern.matcher(constant).matches(); return match; diff --git a/hcatalog/core/src/main/java/org/apache/hive/hcatalog/mapreduce/FileOutputCommitterContainer.java b/hcatalog/core/src/main/java/org/apache/hive/hcatalog/mapreduce/FileOutputCommitterContainer.java index 5d0bef4..88f3ef7 100644 --- a/hcatalog/core/src/main/java/org/apache/hive/hcatalog/mapreduce/FileOutputCommitterContainer.java +++ b/hcatalog/core/src/main/java/org/apache/hive/hcatalog/mapreduce/FileOutputCommitterContainer.java @@ -681,7 +681,7 @@ class FileOutputCommitterContainer extends OutputCommitterContainer { // construct a path pattern (e.g., /*/*) to find all dynamically generated paths String dynPathSpec = loadPath.toUri().getPath(); - dynPathSpec = dynPathSpec.replaceAll("__HIVE_DEFAULT_PARTITION__", "*"); + dynPathSpec = dynPathSpec.replace("__HIVE_DEFAULT_PARTITION__", "*"); // LOG.info("Searching for "+dynPathSpec); Path pathPattern = new Path(dynPathSpec); diff --git a/vector-code-gen/src/org/apache/hadoop/hive/tools/GenVectorCode.java b/vector-code-gen/src/org/apache/hadoop/hive/tools/GenVectorCode.java index 54e06a5..b0b699d 100644 --- a/vector-code-gen/src/org/apache/hadoop/hive/tools/GenVectorCode.java +++ b/vector-code-gen/src/org/apache/hadoop/hive/tools/GenVectorCode.java @@ -3213,8 +3213,8 @@ public class GenVectorCode extends Task { // Read the template into a string; File templateFile = new File(joinPath(this.expressionTemplateDirectory, tdesc[0] + ".txt")); String templateString = readFile(templateFile); - templateString = templateString.replaceAll("<ClassName>", className); - templateString = templateString.replaceAll("<Operator>", operatorName.toLowerCase()); + templateString = templateString.replace("<ClassName>", className); + templateString = templateString.replace("<Operator>", operatorName.toLowerCase()); writeFile(templateFile.lastModified(), expressionOutputDirectory, expressionClassesDirectory, className, templateString);