hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gopal Vijayaraghavan <>
Subject Re: Question about partition pruning when there's a type mismatch
Date Mon, 28 Nov 2016 23:04:23 GMT

> I'm wondering why Hive tries to scan all partitions when the quotes are omitted. Without
the quotes, shouldn't 2016-11-28-00 get evaluated as an arithmetic expression, then get cast
to a string, and then partitioning pruning still occur?

The order of evaluation is different - String = Integer becomes UDFToDouble(String) = UDFToDouble(Integer)
(because that keeps the >= behavior consistent with =).

The version you're running is very relevant here.

Not all versions of hive have a constant folding optimization & even with that, only recent
versions of hive perform partition pruning when the partition column is wrapped in a UDF.

Posting the output of an "explain <query>" would also help.


View raw message