SourabhBadhya commented on code in PR #4112:
URL: https://github.com/apache/hive/pull/4112#discussion_r1142035681
##########
ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java:
##########
@@ -2589,15 +2589,17 @@ private boolean isPathEncrypted(Path path) throws
HiveException {
* @throws HiveException If an error occurs while comparing key strengths.
*/
private int comparePathKeyStrength(Path p1, Path p2) throws HiveException {
- HadoopShims.HdfsEncryptionShim hdfsEncryptionShim;
+ try {
+ HadoopShims.HdfsEncryptionShim hdfsEncryptionShim1;
+ HadoopShims.HdfsEncryptionShim hdfsEncryptionShim2;
+ hdfsEncryptionShim1 =
SessionState.get().getHdfsEncryptionShim(p1.getFileSystem(conf), conf);
+ hdfsEncryptionShim2 =
SessionState.get().getHdfsEncryptionShim(p2.getFileSystem(conf), conf);
Review Comment:
Declaration and initialization of the variables can be done in the same line.
`HadoopShims.HdfsEncryptionShim hdfsEncryptionShim1 =
SessionState.get().getHdfsEncryptionShim(p1.getFileSystem(conf), conf);`
`HadoopShims.HdfsEncryptionShim hdfsEncryptionShim2 =
SessionState.get().getHdfsEncryptionShim(p2.getFileSystem(conf), conf);`
--
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]