Hive query parser in ruby