phoenix-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Toshihiro Suzuki (JIRA)" <>
Subject [jira] [Commented] (PHOENIX-1614) ALTER TABLE ADD IF NOT EXISTS doesn't work as expected
Date Thu, 21 Mar 2019 07:50:00 GMT


Toshihiro Suzuki commented on PHOENIX-1614:

Thank you for reviewing the patch. [~gjacoby] [~Jaanai]

A little tip, I think we can use meta information to check off that the additional columns
whether exists within the table on the client side, then to decide throw exceptions or go
into next steps. The coding will be simpler and the client is good for backward compatible.
[~Jaanai] I attached a new patch where I implemented it on the client side. It seems much
simpler than the previous patches.

Looks like we decided throw exceptions or go into next steps only when the table is an append-only
schema for some reason:

I think we can always do it, so I modified this part to do it. Could you please review the
latest patch?

> ALTER TABLE ADD IF NOT EXISTS doesn't work as expected
> ------------------------------------------------------
>                 Key: PHOENIX-1614
>                 URL:
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Gabriel Reid
>            Assignee: Toshihiro Suzuki
>            Priority: Major
>              Labels: argus
>             Fix For: 4.15.0
>         Attachments: PHOENIX-1614-v2.patch, PHOENIX-1614-v3.patch, PHOENIX-1614-v4.patch,
> On an existing table table, executing "ALTER TABLE ADD IF NOT EXISTS
> thisColAlreadyExists varchar, thisColDoesNotExist varchar", then
> nothing will be changed in the table because thisColAlreadyExists
> already exists.
> Omitting the already-existing column from the statement, all new columns
> do get created.
> The general expectation would be that when you use ADD IF NOT EXISTS, all
> non-existent columns will be added, and all existing columns in the
> statement will just be ignored. There is already an integration test
> (AlterTableIT#testAddVarCols) that actually demonstrates the current
> behavior, although this is probably not correct.
> As pointed out in the related mailing list thread [1], ALTER TABLE DROP COLUMN likely
suffers from the same issue.
> 1. 

This message was sent by Atlassian JIRA

View raw message