This is an automated email from the ASF dual-hosted git repository.
dkuzmenko 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 ba4daa34841 HIVE-26926: SHOW PARTITIONS for a non-partitioned table
should throw just the execution error instead of full stack trace (Tanishq
Chugh, reviewed by Ayush Saxena, Denys Kuzmenko)
ba4daa34841 is described below
commit ba4daa348410b75607464b068372e9cc8ca18373
Author: tanishq-chugh <[email protected]>
AuthorDate: Mon May 27 18:38:40 2024 +0530
HIVE-26926: SHOW PARTITIONS for a non-partitioned table should throw just
the execution error instead of full stack trace (Tanishq Chugh, reviewed by
Ayush Saxena, Denys Kuzmenko)
Closes #5164
---
.../hive/ql/ddl/table/partition/show/ShowPartitionsOperation.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
a/ql/src/java/org/apache/hadoop/hive/ql/ddl/table/partition/show/ShowPartitionsOperation.java
b/ql/src/java/org/apache/hadoop/hive/ql/ddl/table/partition/show/ShowPartitionsOperation.java
index de122915f8e..e0f7b7bdf69 100644
---
a/ql/src/java/org/apache/hadoop/hive/ql/ddl/table/partition/show/ShowPartitionsOperation.java
+++
b/ql/src/java/org/apache/hadoop/hive/ql/ddl/table/partition/show/ShowPartitionsOperation.java
@@ -58,7 +58,8 @@ public class ShowPartitionsOperation extends
DDLOperation<ShowPartitionsDesc> {
if (tbl.isNonNative() &&
tbl.getStorageHandler().supportsPartitionTransform()) {
parts = tbl.getStorageHandler().showPartitions(context, tbl);
} else if (!tbl.isPartitioned()) {
- throw new HiveException(ErrorMsg.TABLE_NOT_PARTITIONED,
desc.getTabName());
+ context.getTask().setException(new
HiveException(ErrorMsg.TABLE_NOT_PARTITIONED, desc.getTabName()));
+ return ErrorMsg.TABLE_NOT_PARTITIONED.getErrorCode();
} else if (desc.getCond() != null || desc.getOrder() != null) {
parts = getPartitionNames(tbl);
} else if (desc.getPartSpec() != null) {