zhangbutao commented on code in PR #4549:
URL: https://github.com/apache/hive/pull/4549#discussion_r1284075310
##########
ql/src/java/org/apache/hadoop/hive/ql/HiveQueryLifeTimeHook.java:
##########
@@ -75,13 +75,15 @@ private void checkAndRollbackCTAS(QueryLifeTimeHookContext
ctx) {
PrivateHookContext pCtx = (PrivateHookContext) ctx.getHookContext();
Path tblPath = pCtx.getContext().getLocation();
- try {
- FileSystem fs = tblPath.getFileSystem(conf);
- if (!fs.exists(tblPath)) {
- return;
+ if (tblPath != null) {
+ try {
+ FileSystem fs = tblPath.getFileSystem(conf);
+ if (!fs.exists(tblPath)) {
+ return;
+ }
+ } catch (Exception e) {
+ throw new RuntimeException("Not able to check whether the CTAS table
directory exists due to: ", e);
Review Comment:
I am not sure if the error message is reasonable, as some failed queries may
not be `CTAS ` type. Welcome to come up with comment here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]