Fix bogus error message in IDEA 13
Fix handling of Hive bucketed tables
Add missing license header