mszurap opened a new pull request, #5701:
URL: https://github.com/apache/hive/pull/5701

   ### What changes were proposed in this pull request?
   In some environments we need to customize the 
javax.jdo.option.ConnectionURL, and typically with Oracle databases the JDBC 
connection URL might contain spaces, like
   
   jdbc:oracle:thin:@(DESCRIPTION = (ADDRESS_LIST=...
   
   This is not handled by beeline, so hive schema upgrades are failing.
   
   For the Oracle JDBC driver at least, the URL escaping does not work. The 
proposed solution is to remove the whitespaces from the connection url before 
passing the url to the Commands.java:
   
https://github.com/mszurap/hive/blob/2d528556b69c1ec011e83f69d2a2fdcfb78b356e/beeline/src/java/org/apache/hive/beeline/Commands.java#L1521.
   
   Spaces were not respected before in the connection url. However if spaces 
are needed in the connection URL (like in ";sslTrustStore=/path/to/mydir with 
spaces/truststore.jks" or "?tez.application.tags=A B") then the URL escaping 
with "%20" can be still used in those places, those are decoded properly back 
to spaces.
   
   ### Why are the changes needed?
   To make the upgades more robust, we should handle these situations.
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   ### Is the change a dependency upgrade?
   No
   
   ### How was this patch tested?
   Added a new beeline test "testSimpleArgsWithSpaceInUrl" to test the 
functionality that the spaces are now removed from the connection url ("-u" 
argument only).
   The beeline unit tests were successful.


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