I think I ran into that issue before and (someone will correct me if I am
wrong) the issue is that current_date is only materialized AFTER planning.
Thus the pruning, which occurs during planning doesn't happen.  Is this a
programatic query or just something that is being done for users? I know my
issue was I wanted a view that showed only the current date, and I
struggled to come up with a good solution to that.

John


On Wed, Jul 20, 2016 at 6:06 AM, Oscar Morante <spacep...@gmail.com> wrote:

> I'm trying to trigger partition prunning like this:
>
>    select *
>    from dfs.`json/by-date`
>    where dir0 = cast(current_date as varchar);
>
> But apparently, it only works when passing a literal.  Am I missing
> something?
>
> Thanks,
>
> --
> Oscar Morante
> "Self-education is, I firmly believe, the only kind of education there is."
>                                                          -- Isaac Asimov.
>

Reply via email to