Close the hive db connection when exiting
varition offset by 1 bug
Merging postreleasefix/78 to master

* postreleasefix/78:
  varition offset by 1 bug
  Close the hive db connection when exiting