Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.4.6
-
None
-
None
Description
I've noticed that SystemImportTest is constantly failing in my environment. I've dig into the problem and I've noticed that we're no longer able to import URITYPE from Oracle (it's always imported as NULL.
The test started failing after we made changes back in SQOOP-2723 - the generated select queries has changed from:
SELECT /*+ NO_INDEX(t) */ ID,BD,BF,B,C,CL,D,F,L,NC,NCL,N,NVC,R,uritype.geturl(U),IYM,IDS,T,TZ,TLTZ,RAWCOL,'6_2' data_chunk_id FROM oraoop_test t WHERE
To something like:
SELECT /*+ NO_INDEX(t) */ "ID","BD","BF","B","C","CL","D","F","L","NC","NCL","N","NVC","R","U","IYM","IDS","T","TZ","TLTZ","RAWCOL",'6_1' data_chunk_id FROM oraoop_test t WHERE
Notice how the column U is selected as uritype.getUrl() in first example and as simple U in the second one. The problem is that we're doing special magic based on type in OraOopDBRecordReader. The reason why this magic got broken is that we're building a list of all columns with types from the database and then searching for each individual column during select query generation. However the list contains unescaped columns whereas the "work column" is escaped. Hence the find here always fails.