This is an automated email from the ASF dual-hosted git repository.
gsaihemanth 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 be4a9c6d0f9 HIVE-27071: Select query with LIMIT clause can fail if
there are marker files like _SUCCESS and _MANIFEST. (#4056)(Ayush Saxena,
reviewed by Sai Hemanth Gantasala))
be4a9c6d0f9 is described below
commit be4a9c6d0f906cf31cf438ad58451e4764cba938
Author: Ayush Saxena <[email protected]>
AuthorDate: Tue Feb 14 02:20:36 2023 +0530
HIVE-27071: Select query with LIMIT clause can fail if there are marker
files like _SUCCESS and _MANIFEST. (#4056)(Ayush Saxena, reviewed by Sai
Hemanth Gantasala))
---
ql/src/java/org/apache/hadoop/hive/ql/optimizer/SamplePruner.java | 3 ++-
ql/src/test/queries/clientpositive/global_limit.q | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/SamplePruner.java
b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/SamplePruner.java
index b3aac5c1b29..c7fc24cb487 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/SamplePruner.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/SamplePruner.java
@@ -27,6 +27,7 @@ import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Stack;
+import org.apache.hadoop.hive.common.FileUtils;
import org.apache.hadoop.hive.metastore.TableType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -260,7 +261,7 @@ public class SamplePruner extends Transform {
Collection<Path> retPathList)
throws IOException {
LOG.info("Path pattern = " + pathPattern);
- FileStatus srcs[] = fs.globStatus(new Path(pathPattern));
+ FileStatus srcs[] = fs.globStatus(new Path(pathPattern),
FileUtils.HIDDEN_FILES_PATH_FILTER);
Arrays.sort(srcs);
boolean hasFile = false, allFile = true;
diff --git a/ql/src/test/queries/clientpositive/global_limit.q
b/ql/src/test/queries/clientpositive/global_limit.q
index eefaffda094..16748583f31 100644
--- a/ql/src/test/queries/clientpositive/global_limit.q
+++ b/ql/src/test/queries/clientpositive/global_limit.q
@@ -15,6 +15,7 @@ load data local inpath '../../data/files/srcbucket20.txt'
INTO TABLE gl_src1;
load data local inpath '../../data/files/srcbucket20.txt' INTO TABLE gl_src1;
load data local inpath '../../data/files/srcbucket20.txt' INTO TABLE gl_src1;
+dfs -touchz ${hiveconf:hive.metastore.warehouse.dir}/gl_src1/_SUCCESS;