Hotfixes

Note that from this PR **hive 0.12.0 or later** became our target Hive environment.

Hive 0.12.0 or later is required for the compilation though the jar package and the basic features would be compatible with hive version 0.9, 0.10, and 0.11.