Home Forums Hive / HCatalog Hive Partitions of datatype 'int' accepts a string entry

This topic contains 1 reply, has 2 voices, and was last updated by  Seth Lyubich 1 year, 9 months ago.

  • Creator
    Topic
  • #12277

    Hi,
    Could somebody explain why a ‘partition in hive table’ that is of datatype ‘int’ can also accept ‘string’ entries.
    e.g., I create a table with partitions:
    >>> CREATE TABLE tab1 (id1 int,id2 string) PARTITIONED BY(month string,day int) ROW FORMAT DELIMITED FIELDS TERMINATED BY ‘,’ ;
    Here the partition day of datatype ‘int’ can also accept string entries while data insertions.(here, i tried inputting day=’second’)
    >>> LOAD DATA LOCAL INPATH ‘/var/foo/blah/doc/test.txt’ overwrite into table tab1 PARTITION(month=’June’,day=’second’);

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.

  • Author
    Replies
  • #12329

    Seth Lyubich
    Keymaster

    Hi Nabadeep,

    This appears to be a bug. I will file internal bug to address the issue.

    Thank you for help in identifying this issue.

    Seth

    Collapse
Viewing 1 replies (of 1 total)