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

[email protected] commented on SQOOP-445:
-----------------------------------------------------



bq.  On 2012-04-27 06:07:54, Bilung Lee wrote:
bq.  > Look good to me.
bq.  > 
bq.  > It would be even better if you could have a test case to
bq.  > 1. create a table
bq.  > 2. drop a column
bq.  > 3. perform sqoop import
bq.  > 4. would succeed with the fix and fail without
bq.  >

Hi Bilung,

Thanks for reviewing the patch. Yes, I can add a test for this too. I will open 
a subtask to add a test. 


- Cheolsoo


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


On 2012-04-17 06:12:11, Cheolsoo Park wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/4752/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2012-04-17 06:12:11)
bq.  
bq.  
bq.  Review request for Sqoop.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  When querying for column available in a postgres table from postgres 
catalog, it returns also the dropped columns from the table in object. It can 
be easily fixed adding the extra constraint "AND col.ATTISDROPPED = 'f'" at the 
end of the query which sort out the dropped columns.
bq.  
bq.  
bq.  This addresses bug SQOOP-445.
bq.      https://issues.apache.org/jira/browse/SQOOP-445
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    /src/java/org/apache/sqoop/manager/PostgresqlManager.java 1326931 
bq.  
bq.  Diff: https://reviews.apache.org/r/4752/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  ant test, ant test -Dthirdparty=true, ant checkstyle.
bq.  
bq.  In addition, I manually tested the constraint "col.ATTISDROPPED = 'f'" as 
follows:
bq.  
bq.  
bq.  sqooptest=# create table foo (i integer);
bq.  CREATE TABLE
bq.  
bq.  sqooptest=# alter table foo drop column i;
bq.  ALTER TABLE
bq.  
bq.  
bq.  <without col.ATTISDROPPED = 'f'>
bq.  
bq.  sqooptest=# SELECT col.ATTNAME FROM PG_CATALOG.PG_NAMESPACE sch,  
PG_CATALOG.PG_CLASS tab, PG_CATALOG.PG_ATTRIBUTE col WHERE sch.OID = 
tab.RELNAMESPACE   AND tab.OID = col.ATTRELID   AND sch.NSPNAME = (SELECT 
CURRENT_SCHEMA())   AND tab.RELNAME = 'foo' AND col.ATTNUM >= 1;
bq.             attname            
bq.  ------------------------------
bq.   ........pg.dropped.1........
bq.  (1 row)
bq.  
bq.  
bq.  <with col.ATTISDROPPED = 'f'>
bq.  
bq.  sqooptest=# SELECT col.ATTNAME FROM PG_CATALOG.PG_NAMESPACE sch,  
PG_CATALOG.PG_CLASS tab, PG_CATALOG.PG_ATTRIBUTE col WHERE sch.OID = 
tab.RELNAMESPACE   AND tab.OID = col.ATTRELID   AND sch.NSPNAME = (SELECT 
CURRENT_SCHEMA())   AND tab.RELNAME = 'foo' AND col.ATTNUM >= 1  AND 
col.ATTISDROPPED = 'f';
bq.   attname 
bq.  ---------
bq.  (0 rows)
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Cheolsoo
bq.  
bq.


                
> Wrong query for getListColumnsQuery in PostgresqlManager
> --------------------------------------------------------
>
>                 Key: SQOOP-445
>                 URL: https://issues.apache.org/jira/browse/SQOOP-445
>             Project: Sqoop
>          Issue Type: Bug
>          Components: connectors/postgresql
>    Affects Versions: 1.4.0-incubating, 1.4.1-incubating
>         Environment: PostgreSQL 9.1
>            Reporter: Davide Grohmann
>            Assignee: Cheolsoo Park
>         Attachments: SQOOP-445.patch, SQOOP-445.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> When querying for column available in a postgres table from postgres catalog, 
> it returns also the dropped columns from the table in object. It can be 
> easily fixed adding the extra constraint "AND col.ATTISDROPPED = 'f'" at the 
> end of the query which sort out the dropped columns.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to