You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "luoyuxia (Jira)" <ji...@apache.org> on 2022/11/16 02:12:00 UTC

[jira] [Commented] (HIVE-26741) Unexpect behavior for insert when table name is like `db.tab`

    [ https://issues.apache.org/jira/browse/HIVE-26741?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17634599#comment-17634599 ] 

luoyuxia commented on HIVE-26741:
---------------------------------

After a look at the code, I fond .

for the table `default.t1`, it will record the table.

!image-2022-11-16-10-09-40-766.png|width=830,height=137!

Note: in here, the table name will be default.default.t1,  so put "default.default.t1" as key into it.

 

then when check whether it's for overwriting or not

!image-2022-11-16-10-03-08-559.png|width=874,height=203!

It'll use "default.t1" as key to check the key exists or not. But it won't exist since actually we put "default.default.t1" to it in the previous step.

So, it will mistake it for overwrite.

 

So, I wonder what's the expect behavior? Should it throw exception directly or  work normally.

> Unexpect behavior for insert when table name is like `db.tab`
> -------------------------------------------------------------
>
>                 Key: HIVE-26741
>                 URL: https://issues.apache.org/jira/browse/HIVE-26741
>             Project: Hive
>          Issue Type: Bug
>          Components: SQL
>            Reporter: luoyuxia
>            Priority: Major
>         Attachments: image-2022-11-16-09-57-57-461.png, image-2022-11-16-10-03-08-559.png, image-2022-11-16-10-08-31-699.png, image-2022-11-16-10-09-40-766.png
>
>
> Just meet a strange problem with following sql, it'll overwrite the data instead of appending data.
> {code:java}
> insert into table `default.t1` values (1, 2){code}
> The result is as follows:
> !image-2022-11-16-09-57-57-461.png|width=397,height=362!
> is it a bug or some other things?



--
This message was sent by Atlassian Jira
(v8.20.10#820010)