Int accepting range of BigInt

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Int accepting range of BigInt

Pallavi Singh
Hi,

I would like to know when we execute the query : 
create table employee(id int, name String) stored by 'carbondata';
the table created is : 



the Int is converted into BigInt and Int supports range beyond (-2147483648 to 2147483647)
--
Regards | Pallavi Singh 

Reply | Threaded
Open this post in threaded view
|

Re: Int accepting range of BigInt

kumarvishal09
Hi Pallavi,
               Currently in carbon int data type is stored as big int. Can
u please re-upload the image.

-Regards
Kumar Vishal

On Thu, Nov 3, 2016 at 10:09 AM, Pallavi Singh <[hidden email]>
wrote:

> Hi,
>
> I would like to know when we execute the query :
> create table employee(id int, name String) stored by 'carbondata';
> the table created is :
>
> [image: Inline image 1]
>
> the Int is converted into BigInt and Int supports range beyond
> (-2147483648 to 2147483647)
> --
> Regards | Pallavi Singh
>
>
kumar vishal
Reply | Threaded
Open this post in threaded view
|

Re: Int accepting range of BigInt

manishgupta88
Hi Pallavi,

This is a bug in the system. We store Int as bigInt but value beyond the
integer range should not be allowed for storage in integer datatype column.
From my opinion you can raise a Jira issue for this.

Regards
Manish Gupta

On Thu, Nov 3, 2016 at 11:06 PM, Kumar Vishal <[hidden email]>
wrote:

> Hi Pallavi,
>                Currently in carbon int data type is stored as big int. Can
> u please re-upload the image.
>
> -Regards
> Kumar Vishal
>
> On Thu, Nov 3, 2016 at 10:09 AM, Pallavi Singh <[hidden email]>
> wrote:
>
> > Hi,
> >
> > I would like to know when we execute the query :
> > create table employee(id int, name String) stored by 'carbondata';
> > the table created is :
> >
> > [image: Inline image 1]
> >
> > the Int is converted into BigInt and Int supports range beyond
> > (-2147483648 to 2147483647)
> > --
> > Regards | Pallavi Singh
> >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Int accepting range of BigInt

Pallavi Singh
In reply to this post by kumarvishal09

please find the image you requested for.

On Thu, Nov 3, 2016 at 11:06 PM, Kumar Vishal <[hidden email]> wrote:
Hi Pallavi,
               Currently in carbon int data type is stored as big int. Can
u please re-upload the image.

-Regards
Kumar Vishal

On Thu, Nov 3, 2016 at 10:09 AM, Pallavi Singh <[hidden email]>
wrote:

> Hi,
>
> I would like to know when we execute the query :
> create table employee(id int, name String) stored by 'carbondata';
> the table created is :
>
> [image: Inline image 1]
>
> the Int is converted into BigInt and Int supports range beyond
> (-2147483648 to 2147483647)
> --
> Regards | Pallavi Singh
>
>



--
Regards | Pallavi Singh 
Software Consultant
Knoldus Software LLP
+91-9911235949
Reply | Threaded
Open this post in threaded view
|

Re: Int accepting range of BigInt

Pallavi Singh
In reply to this post by kumarvishal09
Please find the image as an attachment

On Thu, Nov 3, 2016 at 11:06 PM, Kumar Vishal <[hidden email]> wrote:
Hi Pallavi,
               Currently in carbon int data type is stored as big int. Can
u please re-upload the image.

-Regards
Kumar Vishal

On Thu, Nov 3, 2016 at 10:09 AM, Pallavi Singh <[hidden email]>
wrote:

> Hi,
>
> I would like to know when we execute the query :
> create table employee(id int, name String) stored by 'carbondata';
> the table created is :
>
> [image: Inline image 1]
>
> the Int is converted into BigInt and Int supports range beyond
> (-2147483648 to 2147483647)
> --
> Regards | Pallavi Singh
>
>



--
Regards | Pallavi Singh 
Software Consultant
Knoldus Software LLP
+91-9911235949
Reply | Threaded
Open this post in threaded view
|

Re: Int accepting range of BigInt

Sangeeta Gulia
Please find the image attached.

On Fri, Nov 4, 2016 at 1:24 PM, Pallavi Singh <[hidden email]> wrote:
Please find the image as an attachment

On Thu, Nov 3, 2016 at 11:06 PM, Kumar Vishal <[hidden email]> wrote:
Hi Pallavi,
               Currently in carbon int data type is stored as big int. Can
u please re-upload the image.

-Regards
Kumar Vishal

On Thu, Nov 3, 2016 at 10:09 AM, Pallavi Singh <[hidden email]>
wrote:

> Hi,
>
> I would like to know when we execute the query :
> create table employee(id int, name String) stored by 'carbondata';
> the table created is :
>
> [image: Inline image 1]
>
> the Int is converted into BigInt and Int supports range beyond
> (-2147483648 to 2147483647)
> --
> Regards | Pallavi Singh
>
>



--
Regards | Pallavi Singh 
Software Consultant
Knoldus Software LLP
+91-9911235949



--
Warm Regards,

Sangeeta Gulia 
Software Consultant
Knoldus Software LLP
Reply | Threaded
Open this post in threaded view
|

Re: Int accepting range of BigInt

anuragknoldus
Please find Image.




On Fri, Nov 4, 2016 at 1:31 PM, Pallavi Singh <[hidden email]> wrote:



On Fri, Nov 4, 2016 at 1:28 PM, Sangeeta Gulia <[hidden email]> wrote:
Please find the image attached.

On Fri, Nov 4, 2016 at 1:24 PM, Pallavi Singh <[hidden email]> wrote:
Please find the image as an attachment

On Thu, Nov 3, 2016 at 11:06 PM, Kumar Vishal <[hidden email]> wrote:
Hi Pallavi,
               Currently in carbon int data type is stored as big int. Can
u please re-upload the image.

-Regards
Kumar Vishal

On Thu, Nov 3, 2016 at 10:09 AM, Pallavi Singh <[hidden email]>
wrote:

> Hi,
>
> I would like to know when we execute the query :
> create table employee(id int, name String) stored by 'carbondata';
> the table created is :
>
> [image: Inline image 1]
>
> the Int is converted into BigInt and Int supports range beyond
> (-2147483648 to 2147483647)
> --
> Regards | Pallavi Singh
>
>



--
Regards | Pallavi Singh 
Software Consultant
Knoldus Software LLP
+91-9911235949



--
Warm Regards,

Sangeeta Gulia 
Software Consultant
Knoldus Software LLP



--
Regards | Pallavi Singh 
Software Consultant
Knoldus Software LLP
+91-9911235949



--
Thanks&regards
Anurag Srivastava

Software Consultant 
Knoldus Software LLP

India - US - Canada

 Twitter | FB | LinkedIn
Reply | Threaded
Open this post in threaded view
|

Re: Int accepting range of BigInt

anuragknoldus
In reply to this post by manishgupta88
Hello everyone,

I am working on resolving jira bug
https://issues.apache.org/jira/browse/CARBONDATA-370
While resolving this I found that when I create a table with Int as one of
the columns and then if I do Desc table, it shows the Int column being
created as BigInt :-

So, the Int column is created as BigInt in CarbonData.

Query :

cc.sql("""
       CREATE TABLE IF NOT EXISTS t3
       (ID BigInt, date Timestamp, country String,
       name String, phonetype String, serialname char(10), salary Int)
       STORED BY 'carbondata'
       """)



Output :

+---------------+---------------+--------------+
|  col_name | data_type | comment|
+---------------+---------------+--------------+
|        id      |   bigint      |               |
|      date    | timestamp |               |
|   country  |   string       |               |
|      name  |   string       |               |
| phonetype|   string       |               |
|serialname|   string       |               |
|    salary   |   bigint       |               |
+--------------+-----------------+-------------+


My query is that to resolve the issue of out of range values being accepted
for Int, should we be creating the Int column as Int and not BigInt.

Thanks and Regards
Anurag Srivastava

On Fri, Nov 4, 2016 at 11:58 AM, manish gupta <[hidden email]>
wrote:

> Hi Pallavi,
>
> This is a bug in the system. We store Int as bigInt but value beyond the
> integer range should not be allowed for storage in integer datatype column.
> From my opinion you can raise a Jira issue for this.
>
> Regards
> Manish Gupta
>
> On Thu, Nov 3, 2016 at 11:06 PM, Kumar Vishal <[hidden email]>
> wrote:
>
> > Hi Pallavi,
> >                Currently in carbon int data type is stored as big int.
> Can
> > u please re-upload the image.
> >
> > -Regards
> > Kumar Vishal
> >
> > On Thu, Nov 3, 2016 at 10:09 AM, Pallavi Singh <[hidden email]
> >
> > wrote:
> >
> > > Hi,
> > >
> > > I would like to know when we execute the query :
> > > create table employee(id int, name String) stored by 'carbondata';
> > > the table created is :
> > >
> > > [image: Inline image 1]
> > >
> > > the Int is converted into BigInt and Int supports range beyond
> > > (-2147483648 to 2147483647)
> > > --
> > > Regards | Pallavi Singh
> > >
> > >
> >
>



--
*Thanks&regards*


*Anurag Srivastava**Software Consultant*
*Knoldus Software LLP*

*India - US - Canada*
* Twitter <http://www.twitter.com/anuragknoldus> | FB
<http://www.facebook.com/anuragsrivastava.06> | LinkedIn
<https://in.linkedin.com/pub/anurag-srivastava/5a/b6/441>*
Reply | Threaded
Open this post in threaded view
|

Re: Int accepting range of BigInt

sraghunandan
Dear anurag,
Not required to be stored as int.if we validate the data based on the
schema definition would suffice
On Mon, 26 Dec 2016 at 1:10 PM, Anurag Srivastava <[hidden email]>
wrote:

> Hello everyone,
>
> I am working on resolving jira bug
> https://issues.apache.org/jira/browse/CARBONDATA-370
> While resolving this I found that when I create a table with Int as one of
> the columns and then if I do Desc table, it shows the Int column being
> created as BigInt :-
>
> So, the Int column is created as BigInt in CarbonData.
>
> Query :
>
> cc.sql("""
>        CREATE TABLE IF NOT EXISTS t3
>        (ID BigInt, date Timestamp, country String,
>        name String, phonetype String, serialname char(10), salary Int)
>        STORED BY 'carbondata'
>        """)
>
>
>
> Output :
>
> +---------------+---------------+--------------+
> |  col_name | data_type | comment|
> +---------------+---------------+--------------+
> |        id      |   bigint      |               |
> |      date    | timestamp |               |
> |   country  |   string       |               |
> |      name  |   string       |               |
> | phonetype|   string       |               |
> |serialname|   string       |               |
> |    salary   |   bigint       |               |
> +--------------+-----------------+-------------+
>
>
> My query is that to resolve the issue of out of range values being accepted
> for Int, should we be creating the Int column as Int and not BigInt.
>
> Thanks and Regards
> Anurag Srivastava
>
> On Fri, Nov 4, 2016 at 11:58 AM, manish gupta <[hidden email]>
> wrote:
>
> > Hi Pallavi,
> >
> > This is a bug in the system. We store Int as bigInt but value beyond the
> > integer range should not be allowed for storage in integer datatype
> column.
> > From my opinion you can raise a Jira issue for this.
> >
> > Regards
> > Manish Gupta
> >
> > On Thu, Nov 3, 2016 at 11:06 PM, Kumar Vishal <[hidden email]
> >
> > wrote:
> >
> > > Hi Pallavi,
> > >                Currently in carbon int data type is stored as big int.
> > Can
> > > u please re-upload the image.
> > >
> > > -Regards
> > > Kumar Vishal
> > >
> > > On Thu, Nov 3, 2016 at 10:09 AM, Pallavi Singh <
> [hidden email]
> > >
> > > wrote:
> > >
> > > > Hi,
> > > >
> > > > I would like to know when we execute the query :
> > > > create table employee(id int, name String) stored by 'carbondata';
> > > > the table created is :
> > > >
> > > > [image: Inline image 1]
> > > >
> > > > the Int is converted into BigInt and Int supports range beyond
> > > > (-2147483648 to 2147483647)
> > > > --
> > > > Regards | Pallavi Singh
> > > >
> > > >
> > >
> >
>
>
>
> --
> *Thanks&regards*
>
>
> *Anurag Srivastava**Software Consultant*
> *Knoldus Software LLP*
>
> *India - US - Canada*
> * Twitter <http://www.twitter.com/anuragknoldus> | FB
> <http://www.facebook.com/anuragsrivastava.06> | LinkedIn
> <https://in.linkedin.com/pub/anurag-srivastava/5a/b6/441>*
>
Reply | Threaded
Open this post in threaded view
|

Re: Int accepting range of BigInt

anuragknoldus
Hello Raghu,

We can not validate data on the basis of schema because when we give "Int"
data type it stores in schema as a "BigInt" data type and then it starts
taking range of "BigInt". When we provide "BigInt" data type, it also
stores as a "BigInt". That time it will not be possible to differentiate
between "Int" and "BigInt".

Thanks.

Anurag Srivastava

On Tue, Dec 27, 2016 at 1:02 AM, Raghunandan S <
[hidden email]> wrote:

> Dear anurag,
> Not required to be stored as int.if we validate the data based on the
> schema definition would suffice
> On Mon, 26 Dec 2016 at 1:10 PM, Anurag Srivastava <[hidden email]>
> wrote:
>
> > Hello everyone,
> >
> > I am working on resolving jira bug
> > https://issues.apache.org/jira/browse/CARBONDATA-370
> > While resolving this I found that when I create a table with Int as one
> of
> > the columns and then if I do Desc table, it shows the Int column being
> > created as BigInt :-
> >
> > So, the Int column is created as BigInt in CarbonData.
> >
> > Query :
> >
> > cc.sql("""
> >        CREATE TABLE IF NOT EXISTS t3
> >        (ID BigInt, date Timestamp, country String,
> >        name String, phonetype String, serialname char(10), salary Int)
> >        STORED BY 'carbondata'
> >        """)
> >
> >
> >
> > Output :
> >
> > +---------------+---------------+--------------+
> > |  col_name | data_type | comment|
> > +---------------+---------------+--------------+
> > |        id      |   bigint      |               |
> > |      date    | timestamp |               |
> > |   country  |   string       |               |
> > |      name  |   string       |               |
> > | phonetype|   string       |               |
> > |serialname|   string       |               |
> > |    salary   |   bigint       |               |
> > +--------------+-----------------+-------------+
> >
> >
> > My query is that to resolve the issue of out of range values being
> accepted
> > for Int, should we be creating the Int column as Int and not BigInt.
> >
> > Thanks and Regards
> > Anurag Srivastava
> >
> > On Fri, Nov 4, 2016 at 11:58 AM, manish gupta <[hidden email]
> >
> > wrote:
> >
> > > Hi Pallavi,
> > >
> > > This is a bug in the system. We store Int as bigInt but value beyond
> the
> > > integer range should not be allowed for storage in integer datatype
> > column.
> > > From my opinion you can raise a Jira issue for this.
> > >
> > > Regards
> > > Manish Gupta
> > >
> > > On Thu, Nov 3, 2016 at 11:06 PM, Kumar Vishal <
> [hidden email]
> > >
> > > wrote:
> > >
> > > > Hi Pallavi,
> > > >                Currently in carbon int data type is stored as big
> int.
> > > Can
> > > > u please re-upload the image.
> > > >
> > > > -Regards
> > > > Kumar Vishal
> > > >
> > > > On Thu, Nov 3, 2016 at 10:09 AM, Pallavi Singh <
> > [hidden email]
> > > >
> > > > wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > I would like to know when we execute the query :
> > > > > create table employee(id int, name String) stored by 'carbondata';
> > > > > the table created is :
> > > > >
> > > > > [image: Inline image 1]
> > > > >
> > > > > the Int is converted into BigInt and Int supports range beyond
> > > > > (-2147483648 to 2147483647)
> > > > > --
> > > > > Regards | Pallavi Singh
> > > > >
> > > > >
> > > >
> > >
> >
> >
> >
> > --
> > *Thanks&regards*
> >
> >
> > *Anurag Srivastava**Software Consultant*
> > *Knoldus Software LLP*
> >
> > *India - US - Canada*
> > * Twitter <http://www.twitter.com/anuragknoldus> | FB
> > <http://www.facebook.com/anuragsrivastava.06> | LinkedIn
> > <https://in.linkedin.com/pub/anurag-srivastava/5a/b6/441>*
> >
>



--
*Thanks&regards*


*Anurag Srivastava**Software Consultant*
*Knoldus Software LLP*

*India - US - Canada*
* Twitter <http://www.twitter.com/anuragknoldus> | FB
<http://www.facebook.com/anuragsrivastava.06> | LinkedIn
<https://in.linkedin.com/pub/anurag-srivastava/5a/b6/441>*
Reply | Threaded
Open this post in threaded view
|

Re: Int accepting range of BigInt

kumarvishal09
Hi Anurag,
Carbon has value based compression for storing the measure column data, in
store it will be stored as int.
I think only the bug is in desc table as we are updating the data type in
schmea.

My query is that to resolve the issue of out of range values being accepted
for Int, should we be creating the Int column as Int and not BigInt.

Already one discussion is going on for this
[Discussion] Parsing values during data load should adopt a strict check or
lenient check mechanism

-Regards
Kumar Vishal

On Tue, Dec 27, 2016 at 2:15 PM, Anurag Srivastava <[hidden email]>
wrote:

> Hello Raghu,
>
> We can not validate data on the basis of schema because when we give "Int"
> data type it stores in schema as a "BigInt" data type and then it starts
> taking range of "BigInt". When we provide "BigInt" data type, it also
> stores as a "BigInt". That time it will not be possible to differentiate
> between "Int" and "BigInt".
>
> Thanks.
>
> Anurag Srivastava
>
> On Tue, Dec 27, 2016 at 1:02 AM, Raghunandan S <
> [hidden email]> wrote:
>
> > Dear anurag,
> > Not required to be stored as int.if we validate the data based on the
> > schema definition would suffice
> > On Mon, 26 Dec 2016 at 1:10 PM, Anurag Srivastava <[hidden email]>
> > wrote:
> >
> > > Hello everyone,
> > >
> > > I am working on resolving jira bug
> > > https://issues.apache.org/jira/browse/CARBONDATA-370
> > > While resolving this I found that when I create a table with Int as one
> > of
> > > the columns and then if I do Desc table, it shows the Int column being
> > > created as BigInt :-
> > >
> > > So, the Int column is created as BigInt in CarbonData.
> > >
> > > Query :
> > >
> > > cc.sql("""
> > >        CREATE TABLE IF NOT EXISTS t3
> > >        (ID BigInt, date Timestamp, country String,
> > >        name String, phonetype String, serialname char(10), salary Int)
> > >        STORED BY 'carbondata'
> > >        """)
> > >
> > >
> > >
> > > Output :
> > >
> > > +---------------+---------------+--------------+
> > > |  col_name | data_type | comment|
> > > +---------------+---------------+--------------+
> > > |        id      |   bigint      |               |
> > > |      date    | timestamp |               |
> > > |   country  |   string       |               |
> > > |      name  |   string       |               |
> > > | phonetype|   string       |               |
> > > |serialname|   string       |               |
> > > |    salary   |   bigint       |               |
> > > +--------------+-----------------+-------------+
> > >
> > >
> > > My query is that to resolve the issue of out of range values being
> > accepted
> > > for Int, should we be creating the Int column as Int and not BigInt.
> > >
> > > Thanks and Regards
> > > Anurag Srivastava
> > >
> > > On Fri, Nov 4, 2016 at 11:58 AM, manish gupta <
> [hidden email]
> > >
> > > wrote:
> > >
> > > > Hi Pallavi,
> > > >
> > > > This is a bug in the system. We store Int as bigInt but value beyond
> > the
> > > > integer range should not be allowed for storage in integer datatype
> > > column.
> > > > From my opinion you can raise a Jira issue for this.
> > > >
> > > > Regards
> > > > Manish Gupta
> > > >
> > > > On Thu, Nov 3, 2016 at 11:06 PM, Kumar Vishal <
> > [hidden email]
> > > >
> > > > wrote:
> > > >
> > > > > Hi Pallavi,
> > > > >                Currently in carbon int data type is stored as big
> > int.
> > > > Can
> > > > > u please re-upload the image.
> > > > >
> > > > > -Regards
> > > > > Kumar Vishal
> > > > >
> > > > > On Thu, Nov 3, 2016 at 10:09 AM, Pallavi Singh <
> > > [hidden email]
> > > > >
> > > > > wrote:
> > > > >
> > > > > > Hi,
> > > > > >
> > > > > > I would like to know when we execute the query :
> > > > > > create table employee(id int, name String) stored by
> 'carbondata';
> > > > > > the table created is :
> > > > > >
> > > > > > [image: Inline image 1]
> > > > > >
> > > > > > the Int is converted into BigInt and Int supports range beyond
> > > > > > (-2147483648 to 2147483647)
> > > > > > --
> > > > > > Regards | Pallavi Singh
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > *Thanks&regards*
> > >
> > >
> > > *Anurag Srivastava**Software Consultant*
> > > *Knoldus Software LLP*
> > >
> > > *India - US - Canada*
> > > * Twitter <http://www.twitter.com/anuragknoldus> | FB
> > > <http://www.facebook.com/anuragsrivastava.06> | LinkedIn
> > > <https://in.linkedin.com/pub/anurag-srivastava/5a/b6/441>*
> > >
> >
>
>
>
> --
> *Thanks&regards*
>
>
> *Anurag Srivastava**Software Consultant*
> *Knoldus Software LLP*
>
> *India - US - Canada*
> * Twitter <http://www.twitter.com/anuragknoldus> | FB
> <http://www.facebook.com/anuragsrivastava.06> | LinkedIn
> <https://in.linkedin.com/pub/anurag-srivastava/5a/b6/441>*
>
kumar vishal