John1Tang commented on pull request #967:
URL: https://github.com/apache/hive/pull/967#issuecomment-641412921


   > I'm looking at the corresponding MySQL scripts and they do not include `IF 
NOT EXISTS` statement. If the tool is failing on a simple upgrade, that's a 
bigger problem than just ignoring some table and indexes. It shouldn't include 
anything that is already present. Need more context of the problem.
   
   Actually, this is how it all began: I was going to do Hive metadata 
migration from 3.0.0 to 3.1.2 and when I executed the "bin/schematool -dbType 
postgres -upgradeSchemaFrom 3.0.0", the new Hive 3.1.2 was not able to start. 
Then I just found that the previous Hive 3.0.0 remained an older schema, in 
other words,  the previous maintainer didn't upgrade schema from 2.3.0.  So 
when I did "bin/schematool -dbType postgres -upgradeSchemaFrom 2.3.0"  it 
reported all those "exists"/"not exists" error, so i would suggest to keep the 
idempotence of those scripts, we can use  IF NOT EXISTS to avoid those error.


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

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