我有以下非常简单的查询。
SELECT "test" FROM mydb.mytable
INNER JOIN yourdb.yourtable
ON yourtable.id = mytable.id LIMIT 10;
由于以下错误(表示语法错误)而失败: -
Error while compiling statement: FAILED: SemanticException MetaException(message:Exception thrown when executing query)
列ID是bigdata类型。
令人惊讶的是,如果我按原样保留查询,但只使用不同的表代替mytable,它与mytable具有完全相同的模式。看起来Hive没有在这里显示有意义的错误。有人在这里有线索吗?
为了进一步增加混乱,请检查以下内容: -
-- SUCCESS – All the data up to 24th Sep 2016
SELECT "test" AS col FROM mydb.mytable INNER JOIN yourdb.yourtable ON yourtable.id = mytable.id where mytable.id <= 2016092423 LIMIT 1;
-- SUCCESS – All the data after 24Th Sep 2016
SELECT "test" AS col FROM mydb.mytable INNER JOIN yourdb.yourtable ON yourtable.id = mytable.id where mytable.id >= 2016092423 LIMIT 1;
-- ERROR – All the data up to 25th Sep 2016
SELECT "test" AS col FROM mydb.mytable INNER JOIN yourdb.yourtable ON yourtable.id = mytable.id where mytable.id <= 2016092523 LIMIT 1;
这是完全矛盾的行为。前两个查询涵盖整个空间。考虑到前两个查询成功,第三个查询失败就完全出乎意料了。
让我用图片描绘它: -