did you try the form:
where columns[2] > date '2010-01-01'

On Thu, Feb 12, 2015 at 2:28 PM, Aditya <[email protected]> wrote:

> In a CSV file, every field is a VARCHAR.
>
> On Thu, Feb 12, 2015 at 12:47 PM, Minnow Noir <[email protected]>
> wrote:
>
> > I'm trying to write a WHERE clause that returns rows from a CSV file
> where
> > the value of the date column is greater or less than a comparison value
> > (e.g., where columns[2] > '2010-01-01').
> >
> > It looks like Drill cannot automatically infer date values in CSV files,
> > and that one must manually/explicitly tell Drill that both the value in
> the
> > date column and the comparison value in the where clause predicate are
> > dates, so that it can correctly compare values.
> >
> > OTOH, select <fields> from <plugin> WHERE to_date(<column>, <format>) <
> > to_date(<value>, <format>) seems to work, although it's verbose.
> >
> > Do I have this right, and is there a less verbose way to handle this?
> >
> > Thanks
> >
>



-- 
 Steven Phillips
 Software Engineer

 mapr.com

Reply via email to