FAQ
Hello,

Can you please clarify if the following is correct behavior (same thing
happens for FLOAT type):

create table table1 (
    col INT
);

insert into table1 values (1+1);

Query: insert into table1 values (1+1)
ERROR: AnalysisException: Inserting into target table 'table1' may result
in loss of precision.
Would need to cast '<slot 0>' to 'INT'.

I' would expect impala to perform an implicit conversion in some cases
otherwise one would end up using lots cast()

Thanks,
Andrei.

Search Discussions

  • Marcel Kornacker at Aug 1, 2013 at 9:12 pm
    Hi Andrei, indeed Impala is a little too eager in this case to assign
    a BIGINT type to the result of an addition.

    Could you file a jira?
    On Thu, Aug 1, 2013 at 2:03 PM, Andrei wrote:
    Hello,

    Can you please clarify if the following is correct behavior (same thing
    happens for FLOAT type):

    create table table1 (
    col INT
    );

    insert into table1 values (1+1);

    Query: insert into table1 values (1+1)
    ERROR: AnalysisException: Inserting into target table 'table1' may result in
    loss of precision.
    Would need to cast '<slot 0>' to 'INT'.

    I' would expect impala to perform an implicit conversion in some cases
    otherwise one would end up using lots cast()

    Thanks,
    Andrei.
  • Andrei at Aug 1, 2013 at 9:32 pm
    Created: IMPALA-509
    On Thursday, August 1, 2013 5:12:56 PM UTC-4, Marcel Kornacker wrote:

    Hi Andrei, indeed Impala is a little too eager in this case to assign
    a BIGINT type to the result of an addition.

    Could you file a jira?

    On Thu, Aug 1, 2013 at 2:03 PM, Andrei <ase...@gmail.com <javascript:>>
    wrote:
    Hello,

    Can you please clarify if the following is correct behavior (same thing
    happens for FLOAT type):

    create table table1 (
    col INT
    );

    insert into table1 values (1+1);

    Query: insert into table1 values (1+1)
    ERROR: AnalysisException: Inserting into target table 'table1' may result in
    loss of precision.
    Would need to cast '<slot 0>' to 'INT'.

    I' would expect impala to perform an implicit conversion in some cases
    otherwise one would end up using lots cast()

    Thanks,
    Andrei.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupimpala-user @
categorieshadoop
postedAug 1, '13 at 9:03p
activeAug 1, '13 at 9:32p
posts3
users2
websitecloudera.com
irc#hadoop

2 users in discussion

Andrei: 2 posts Marcel Kornacker: 1 post

People

Translate

site design / logo © 2022 Grokbase