Aggarwal-Raghav commented on code in PR #5943:
URL: https://github.com/apache/hive/pull/5943#discussion_r2231757233


##########
ql/src/java/org/apache/hadoop/hive/ql/exec/FileSinkOperator.java:
##########
@@ -1241,6 +1227,8 @@ public void process(Object row, int tag) throws 
HiveException {
     } catch (SerDeException e) {
       closeWriters(true);
       throw new HiveException(e);
+    } catch (MetaException ex) {
+      throw new RuntimeException(ex);

Review Comment:
   ```
   } catch (SerDeException | MetaException e) {
         closeWriters(true);
         throw new HiveException(e);
       }
   ```
   
   Doing so can result in error in q file in dynamic_partitions_with_whitelist.q
   ```
   < Caused by: java.lang.NullPointerException: Cannot invoke 
"org.apache.hadoop.hive.ql.exec.FileSinkOperator$FSPaths.closeWriters(boolean, 
java.util.List)" because "this.fpaths" is null
   ---
   > Caused by: java.lang.RuntimeException: MetaException(message:Partition 
value 'val_129' contains a character not matched by whitelist pattern '[^9]*'. 
Configure with hive.metastore.partition.name.whitelist.pattern for dynamic 
partitioning otherwise use metaconf:metastore.partition.name.whitelist.pattern)
   37a38,39
   ```
   
   Earlier it was `HiveFatalException`, let's contiue that what do you think?
   ```
    } catch (SerDeException e) {
         closeWriters(true);
         throw new HiveException(e);
       } catch (MetaException e) {
         throw new HiveFatalException(e);
       }
   ```
   CC @deniskuzZ 



-- 
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]

Reply via email to