You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by Mix Nin <pi...@gmail.com> on 2013/07/02 16:47:23 UTC
Number format exception : For input string
Data = LOAD 'part-r-00000' AS (session_start_gmt:long)
FilterData = FILTER Data BY session_start_gmt=1369546091667
I get below error
2013-07-01 22:48:06,510 [main] ERROR org.apache.pig.tools.grunt.Grunt -
ERROR 1200: For input string: "1369546091667"
In detail log it says number format exception.
When I give
x = group Data ALL;
y = FOREACH GENERATE MIN(Data.session_start_gmt) as
min_session_start_time,MAX(Data.session_start_gmt) as
max_session_start_time;
I get below output
(1369546091667,1369638849418)
When just give session_start_gmt=1369546091 (3 digits less) it works fine
So, why is the first error coming when I compare with exact value.?
Thanks
Fwd: Number format exception : For input string
Posted by Mix Nin <pi...@gmail.com>.
I wrote a script as below.
Data = LOAD 'part-r-00000' AS (session_start_gmt:long)
FilterData = FILTER Data BY session_start_gmt=1369546091667
I get below error
2013-07-01 22:48:06,510 [main] ERROR org.apache.pig.tools.grunt.Grunt -
ERROR 1200: For input string: "1369546091667"
In detail log it says number format exception.
When I give
x = group Data ALL;
y = FOREACH GENERATE MIN(Data.session_start_gmt) as
min_session_start_time,MAX(Data.session_start_gmt) as
max_session_start_time;
I get below output
(1369546091667,1369638849418)
When just give session_start_gmt=1369546091 (3 digits less) it works fine
So, why is the first error coming when I compare with exact value.?
Thanks
Fwd: Number format exception : For input string
Posted by Mix Nin <pi...@gmail.com>.
I wrote a script as below.
Data = LOAD 'part-r-00000' AS (session_start_gmt:long)
FilterData = FILTER Data BY session_start_gmt=1369546091667
I get below error
2013-07-01 22:48:06,510 [main] ERROR org.apache.pig.tools.grunt.Grunt -
ERROR 1200: For input string: "1369546091667"
In detail log it says number format exception.
When I give
x = group Data ALL;
y = FOREACH GENERATE MIN(Data.session_start_gmt) as
min_session_start_time,MAX(Data.session_start_gmt) as
max_session_start_time;
I get below output
(1369546091667,1369638849418)
When just give session_start_gmt=1369546091 (3 digits less) it works fine
So, why is the first error coming when I compare with exact value.?
Thanks
Fwd: Number format exception : For input string
Posted by Mix Nin <pi...@gmail.com>.
I wrote a script as below.
Data = LOAD 'part-r-00000' AS (session_start_gmt:long)
FilterData = FILTER Data BY session_start_gmt=1369546091667
I get below error
2013-07-01 22:48:06,510 [main] ERROR org.apache.pig.tools.grunt.Grunt -
ERROR 1200: For input string: "1369546091667"
In detail log it says number format exception.
When I give
x = group Data ALL;
y = FOREACH GENERATE MIN(Data.session_start_gmt) as
min_session_start_time,MAX(Data.session_start_gmt) as
max_session_start_time;
I get below output
(1369546091667,1369638849418)
When just give session_start_gmt=1369546091 (3 digits less) it works fine
So, why is the first error coming when I compare with exact value.?
Thanks
Fwd: Number format exception : For input string
Posted by Mix Nin <pi...@gmail.com>.
I wrote a script as below.
Data = LOAD 'part-r-00000' AS (session_start_gmt:long)
FilterData = FILTER Data BY session_start_gmt=1369546091667
I get below error
2013-07-01 22:48:06,510 [main] ERROR org.apache.pig.tools.grunt.Grunt -
ERROR 1200: For input string: "1369546091667"
In detail log it says number format exception.
When I give
x = group Data ALL;
y = FOREACH GENERATE MIN(Data.session_start_gmt) as
min_session_start_time,MAX(Data.session_start_gmt) as
max_session_start_time;
I get below output
(1369546091667,1369638849418)
When just give session_start_gmt=1369546091 (3 digits less) it works fine
So, why is the first error coming when I compare with exact value.?
Thanks
Re: Number format exception : For input string
Posted by Abhinav Neelam <ab...@gmail.com>.
FYI - I think Jose just put the asterisks for emphasis. I believe it should
be -
1369546091667L (to indicate a long constant)
On 2 July 2013 21:07, jose moreno <jo...@unicaen.fr> wrote:
> Hi,
>
> I not sure if this is the right channel for this question. Anyway, the
> issue is related with the number format. Pig does not recognized long
> format numbers by default (that is why it works with the 3 digits less).
> Please try with:
> Data = LOAD 'part-r-00000' AS (session_start_gmt:long)
> FilterData = FILTER Data BY session_start_gmt=1369546091667*L*
>
> P.S.: I didn't test the code, sorry if it does not work.
>
>
> 2013/7/2 Mix Nin <pi...@gmail.com>
>
> > Data = LOAD 'part-r-00000' AS (session_start_gmt:long)
> > FilterData = FILTER Data BY session_start_gmt=1369546091667
> >
> >
> > I get below error
> >
> > 2013-07-01 22:48:06,510 [main] ERROR org.apache.pig.tools.grunt.Grunt -
> > ERROR 1200: For input string: "1369546091667"
> > In detail log it says number format exception.
> >
> > When I give
> > x = group Data ALL;
> > y = FOREACH GENERATE MIN(Data.session_start_gmt) as
> > min_session_start_time,MAX(Data.session_start_gmt) as
> > max_session_start_time;
> >
> > I get below output
> > (1369546091667,1369638849418)
> >
> > When just give session_start_gmt=1369546091 (3 digits less) it works fine
> >
> > So, why is the first error coming when I compare with exact value.?
> >
> >
> > Thanks
> >
>
Re: Number format exception : For input string
Posted by jose moreno <jo...@unicaen.fr>.
Hi,
I not sure if this is the right channel for this question. Anyway, the
issue is related with the number format. Pig does not recognized long
format numbers by default (that is why it works with the 3 digits less).
Please try with:
Data = LOAD 'part-r-00000' AS (session_start_gmt:long)
FilterData = FILTER Data BY session_start_gmt=1369546091667*L*
P.S.: I didn't test the code, sorry if it does not work.
2013/7/2 Mix Nin <pi...@gmail.com>
> Data = LOAD 'part-r-00000' AS (session_start_gmt:long)
> FilterData = FILTER Data BY session_start_gmt=1369546091667
>
>
> I get below error
>
> 2013-07-01 22:48:06,510 [main] ERROR org.apache.pig.tools.grunt.Grunt -
> ERROR 1200: For input string: "1369546091667"
> In detail log it says number format exception.
>
> When I give
> x = group Data ALL;
> y = FOREACH GENERATE MIN(Data.session_start_gmt) as
> min_session_start_time,MAX(Data.session_start_gmt) as
> max_session_start_time;
>
> I get below output
> (1369546091667,1369638849418)
>
> When just give session_start_gmt=1369546091 (3 digits less) it works fine
>
> So, why is the first error coming when I compare with exact value.?
>
>
> Thanks
>