You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by Jarek Cecho <ja...@apache.org> on 2013/02/07 03:00:45 UTC

Review Request: HIVE-3995 PostgreSQL upgrade scripts are not valid

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/9349/
-----------------------------------------------------------

Review request for hive.


Description
-------

I found issues in three files:

* 010-HIVE-3072.postgres.sql

Just escaping double quotes were missing.

* 011-HIVE-3649.postgres.sql

This alter statement tries to add new "not null" column without any default value. The statement will fail if the table already contains some data. I've checked similar script in mysql/ folder and that script is allowing null values. Thus I've allowed null values also here.

* 012-HIVE-1362.postgres

Just syntax fixes.


This addresses bug HIVE-3995.
    https://issues.apache.org/jira/browse/HIVE-3995


Diffs
-----

  /trunk/metastore/scripts/upgrade/postgres/010-HIVE-3072.postgres.sql 1443292 
  /trunk/metastore/scripts/upgrade/postgres/011-HIVE-3649.postgres.sql 1443292 
  /trunk/metastore/scripts/upgrade/postgres/012-HIVE-1362.postgres.sql 1443292 

Diff: https://reviews.apache.org/r/9349/diff/


Testing
-------

I've tested the upgrade scripts by loading file hive-schema-0.9.0.postgres.sql with some data and executing upgrade-0.9.0-to-0.10.0.postgres.sql on top of that.


Thanks,

Jarek Cecho


Re: Review Request: HIVE-3995 PostgreSQL upgrade scripts are not valid

Posted by Mark Grover <gr...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/9349/#review16333
-----------------------------------------------------------

Ship it!


Ship It!

- Mark Grover


On Feb. 7, 2013, 4:22 p.m., Jarek Cecho wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/9349/
> -----------------------------------------------------------
> 
> (Updated Feb. 7, 2013, 4:22 p.m.)
> 
> 
> Review request for hive.
> 
> 
> Description
> -------
> 
> I found issues in three files:
> 
> * 010-HIVE-3072.postgres.sql
> 
> Just escaping double quotes were missing.
> 
> * 011-HIVE-3649.postgres.sql
> 
> This alter statement tries to add new "not null" column without any default value. The statement will fail if the table already contains some data. I've checked similar script in mysql/ folder and that script is allowing null values. Thus I've allowed null values also here.
> 
> * 012-HIVE-1362.postgres
> 
> Just syntax fixes.
> 
> 
> This addresses bug HIVE-3995.
>     https://issues.apache.org/jira/browse/HIVE-3995
> 
> 
> Diffs
> -----
> 
>   /trunk/metastore/scripts/upgrade/postgres/010-HIVE-3072.postgres.sql 1443292 
>   /trunk/metastore/scripts/upgrade/postgres/011-HIVE-3649.postgres.sql 1443292 
>   /trunk/metastore/scripts/upgrade/postgres/012-HIVE-1362.postgres.sql 1443292 
> 
> Diff: https://reviews.apache.org/r/9349/diff/
> 
> 
> Testing
> -------
> 
> I've tested the upgrade scripts by loading file hive-schema-0.9.0.postgres.sql with some data and executing upgrade-0.9.0-to-0.10.0.postgres.sql on top of that.
> 
> 
> Thanks,
> 
> Jarek Cecho
> 
>


Re: Review Request: HIVE-3995 PostgreSQL upgrade scripts are not valid

Posted by Mark Grover <gr...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/9349/#review16332
-----------------------------------------------------------



/trunk/metastore/scripts/upgrade/postgres/011-HIVE-3649.postgres.sql
<https://reviews.apache.org/r/9349/#comment34802>

    For the record, "false" seems like the right value for existing records in SDS table. 
    
    Context: CreateTableDesc.java in HIVE-3649.patch.9


- Mark Grover


On Feb. 7, 2013, 4:22 p.m., Jarek Cecho wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/9349/
> -----------------------------------------------------------
> 
> (Updated Feb. 7, 2013, 4:22 p.m.)
> 
> 
> Review request for hive.
> 
> 
> Description
> -------
> 
> I found issues in three files:
> 
> * 010-HIVE-3072.postgres.sql
> 
> Just escaping double quotes were missing.
> 
> * 011-HIVE-3649.postgres.sql
> 
> This alter statement tries to add new "not null" column without any default value. The statement will fail if the table already contains some data. I've checked similar script in mysql/ folder and that script is allowing null values. Thus I've allowed null values also here.
> 
> * 012-HIVE-1362.postgres
> 
> Just syntax fixes.
> 
> 
> This addresses bug HIVE-3995.
>     https://issues.apache.org/jira/browse/HIVE-3995
> 
> 
> Diffs
> -----
> 
>   /trunk/metastore/scripts/upgrade/postgres/010-HIVE-3072.postgres.sql 1443292 
>   /trunk/metastore/scripts/upgrade/postgres/011-HIVE-3649.postgres.sql 1443292 
>   /trunk/metastore/scripts/upgrade/postgres/012-HIVE-1362.postgres.sql 1443292 
> 
> Diff: https://reviews.apache.org/r/9349/diff/
> 
> 
> Testing
> -------
> 
> I've tested the upgrade scripts by loading file hive-schema-0.9.0.postgres.sql with some data and executing upgrade-0.9.0-to-0.10.0.postgres.sql on top of that.
> 
> 
> Thanks,
> 
> Jarek Cecho
> 
>


Re: Review Request: HIVE-3995 PostgreSQL upgrade scripts are not valid

Posted by Jarek Cecho <ja...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/9349/
-----------------------------------------------------------

(Updated Feb. 7, 2013, 4:22 p.m.)


Review request for hive.


Changes
-------

I've incorporated Mark's notes.


Description
-------

I found issues in three files:

* 010-HIVE-3072.postgres.sql

Just escaping double quotes were missing.

* 011-HIVE-3649.postgres.sql

This alter statement tries to add new "not null" column without any default value. The statement will fail if the table already contains some data. I've checked similar script in mysql/ folder and that script is allowing null values. Thus I've allowed null values also here.

* 012-HIVE-1362.postgres

Just syntax fixes.


This addresses bug HIVE-3995.
    https://issues.apache.org/jira/browse/HIVE-3995


Diffs (updated)
-----

  /trunk/metastore/scripts/upgrade/postgres/010-HIVE-3072.postgres.sql 1443292 
  /trunk/metastore/scripts/upgrade/postgres/011-HIVE-3649.postgres.sql 1443292 
  /trunk/metastore/scripts/upgrade/postgres/012-HIVE-1362.postgres.sql 1443292 

Diff: https://reviews.apache.org/r/9349/diff/


Testing
-------

I've tested the upgrade scripts by loading file hive-schema-0.9.0.postgres.sql with some data and executing upgrade-0.9.0-to-0.10.0.postgres.sql on top of that.


Thanks,

Jarek Cecho


Re: Review Request: HIVE-3995 PostgreSQL upgrade scripts are not valid

Posted by Jarek Cecho <ja...@apache.org>.

> On Feb. 7, 2013, 2:23 a.m., Mark Grover wrote:
> >

Hi Mark,
thank you very much for your review, I appreciate your time!


> On Feb. 7, 2013, 2:23 a.m., Mark Grover wrote:
> > /trunk/metastore/scripts/upgrade/postgres/011-HIVE-3649.postgres.sql, line 1
> > <https://reviews.apache.org/r/9349/diff/1/?file=256425#file256425line1>
> >
> >     I was looking at derby's upgrade script and it seems to be using NOT NULL.
> >     Does "NOT NULL" result in a syntax error?
> >     If so, perhaps we should add this column without null qualifier and then later set this column as "not null" as listed at http://www.postgresql.org/docs/8.0/static/sql-altertable.html

I've look around and you're right. Other scripts are also setting this column as not null - even the scripts for creating entire schema.. It seems that it's the MySQL script that is "different". I'll fix this as proposed and I'll open another jira for the MySQL script and Oracle as I've noticed that they have similar issues as postgre's scripts.


- Jarek


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/9349/#review16246
-----------------------------------------------------------


On Feb. 7, 2013, 2 a.m., Jarek Cecho wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/9349/
> -----------------------------------------------------------
> 
> (Updated Feb. 7, 2013, 2 a.m.)
> 
> 
> Review request for hive.
> 
> 
> Description
> -------
> 
> I found issues in three files:
> 
> * 010-HIVE-3072.postgres.sql
> 
> Just escaping double quotes were missing.
> 
> * 011-HIVE-3649.postgres.sql
> 
> This alter statement tries to add new "not null" column without any default value. The statement will fail if the table already contains some data. I've checked similar script in mysql/ folder and that script is allowing null values. Thus I've allowed null values also here.
> 
> * 012-HIVE-1362.postgres
> 
> Just syntax fixes.
> 
> 
> This addresses bug HIVE-3995.
>     https://issues.apache.org/jira/browse/HIVE-3995
> 
> 
> Diffs
> -----
> 
>   /trunk/metastore/scripts/upgrade/postgres/010-HIVE-3072.postgres.sql 1443292 
>   /trunk/metastore/scripts/upgrade/postgres/011-HIVE-3649.postgres.sql 1443292 
>   /trunk/metastore/scripts/upgrade/postgres/012-HIVE-1362.postgres.sql 1443292 
> 
> Diff: https://reviews.apache.org/r/9349/diff/
> 
> 
> Testing
> -------
> 
> I've tested the upgrade scripts by loading file hive-schema-0.9.0.postgres.sql with some data and executing upgrade-0.9.0-to-0.10.0.postgres.sql on top of that.
> 
> 
> Thanks,
> 
> Jarek Cecho
> 
>


Re: Review Request: HIVE-3995 PostgreSQL upgrade scripts are not valid

Posted by Mark Grover <gr...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/9349/#review16246
-----------------------------------------------------------



/trunk/metastore/scripts/upgrade/postgres/011-HIVE-3649.postgres.sql
<https://reviews.apache.org/r/9349/#comment34697>

    I was looking at derby's upgrade script and it seems to be using NOT NULL.
    Does "NOT NULL" result in a syntax error?
    If so, perhaps we should add this column without null qualifier and then later set this column as "not null" as listed at http://www.postgresql.org/docs/8.0/static/sql-altertable.html


- Mark Grover


On Feb. 7, 2013, 2 a.m., Jarek Cecho wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/9349/
> -----------------------------------------------------------
> 
> (Updated Feb. 7, 2013, 2 a.m.)
> 
> 
> Review request for hive.
> 
> 
> Description
> -------
> 
> I found issues in three files:
> 
> * 010-HIVE-3072.postgres.sql
> 
> Just escaping double quotes were missing.
> 
> * 011-HIVE-3649.postgres.sql
> 
> This alter statement tries to add new "not null" column without any default value. The statement will fail if the table already contains some data. I've checked similar script in mysql/ folder and that script is allowing null values. Thus I've allowed null values also here.
> 
> * 012-HIVE-1362.postgres
> 
> Just syntax fixes.
> 
> 
> This addresses bug HIVE-3995.
>     https://issues.apache.org/jira/browse/HIVE-3995
> 
> 
> Diffs
> -----
> 
>   /trunk/metastore/scripts/upgrade/postgres/010-HIVE-3072.postgres.sql 1443292 
>   /trunk/metastore/scripts/upgrade/postgres/011-HIVE-3649.postgres.sql 1443292 
>   /trunk/metastore/scripts/upgrade/postgres/012-HIVE-1362.postgres.sql 1443292 
> 
> Diff: https://reviews.apache.org/r/9349/diff/
> 
> 
> Testing
> -------
> 
> I've tested the upgrade scripts by loading file hive-schema-0.9.0.postgres.sql with some data and executing upgrade-0.9.0-to-0.10.0.postgres.sql on top of that.
> 
> 
> Thanks,
> 
> Jarek Cecho
> 
>