[jira] [Commented] (HIVE-4211) Common column and partition column are defined the same type and union them, it will hints Schema of both sides of union should match.

2013-09-04 Thread Hive QA (JIRA)

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

Hive QA commented on HIVE-4211:
---



{color:red}Overall{color}: -1 no tests executed

Here are the results of testing the latest attachment:
https://issues.apache.org/jira/secure/attachment/12601307/HIVE-4211.patch

Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/607/testReport
Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/607/console

Messages:
{noformat}
Executing org.apache.hive.ptest.execution.PrepPhase
Tests failed with: NonZeroExitCodeException: Command 'bash 
/data/hive-ptest/working/scratch/source-prep.sh' failed with exit status 1 and 
output '+ [[ -n '' ]]
+ export 'ANT_OPTS=-Xmx1g -XX:MaxPermSize=256m -Dhttp.proxyHost=localhost 
-Dhttp.proxyPort=3128'
+ ANT_OPTS='-Xmx1g -XX:MaxPermSize=256m -Dhttp.proxyHost=localhost 
-Dhttp.proxyPort=3128'
+ cd /data/hive-ptest/working/
+ tee /data/hive-ptest/logs/PreCommit-HIVE-Build-607/source-prep.txt
+ mkdir -p maven ivy
+ [[ svn = \s\v\n ]]
+ [[ -n '' ]]
+ [[ -d apache-svn-trunk-source ]]
+ [[ ! -d apache-svn-trunk-source/.svn ]]
+ [[ ! -d apache-svn-trunk-source ]]
+ cd apache-svn-trunk-source
+ svn revert -R .
Reverted 'build-common.xml'
++ awk '{print $2}'
++ egrep -v '^X|^Performing status on external'
++ svn status --no-ignore
+ rm -rf build hcatalog/build hcatalog/core/build 
hcatalog/storage-handlers/hbase/build hcatalog/server-extensions/build 
hcatalog/webhcat/svr/build hcatalog/webhcat/java-client/build 
hcatalog/hcatalog-pig-adapter/build common/src/gen
+ svn update

Fetching external item into 'hcatalog/src/test/e2e/harness'
External at revision 1519988.

At revision 1519988.
+ patchCommandPath=/data/hive-ptest/working/scratch/smart-apply-patch.sh
+ patchFilePath=/data/hive-ptest/working/scratch/build.patch
+ [[ -f /data/hive-ptest/working/scratch/build.patch ]]
+ chmod +x /data/hive-ptest/working/scratch/smart-apply-patch.sh
+ /data/hive-ptest/working/scratch/smart-apply-patch.sh 
/data/hive-ptest/working/scratch/build.patch
The patch does not appear to apply with p0 to p2
+ exit 1
'
{noformat}

This message is automatically generated.

> Common column and partition column are defined the same type and union them, 
> it will hints Schema of both sides of union should match. 
> ---
>
> Key: HIVE-4211
> URL: https://issues.apache.org/jira/browse/HIVE-4211
> Project: Hive
>  Issue Type: Bug
>  Components: SQL
>Affects Versions: 0.9.0, 0.11.0
>Reporter: Daisy.Yuan
>  Labels: patch
> Attachments: HIVE-4211.patch, PartitionColumnTypInfo.patch
>
>
> create table UnionBoolA (id boolean, no boolean) row format delimited fields 
> terminated by ' ';
> load data local inpath '/opt/files/unionboola.txt' into table UnionBoolA;
> create table UnionPartionBool (id int) partitioned by (no boolean) row format 
> delimited fields terminated by ' ';
> load data local inpath '/opt/files/unionpartint.txt' into table 
> UnionPartionBool partition(no=true);
> unionboola.txt:
> true true
> false true
> true true
> false true
> unionpartint.txt:
> 111
> 444
> 1122
> 44
> when I execute
> "select * from( select no from UnionBoolA union all select no from 
> UnionPartionBool) unionResult", it is failed. The exception info is as 
> follows:
> FAILED: Error in semantic analysis: 1:66 Schema of both sides of union should 
> match: Column no is of type boolean on first table and type string on second 
> table. Error encountered near token 'UnionPartionBool'
> org.apache.hadoop.hive.ql.parse.SemanticException: 1:66 Schema of both sides 
> of union should match: Column no is of type boolean on first table and type 
> string on second table. Error encountered near token 'UnionPartionBool'
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genUnionPlan(SemanticAnalyzer.java:6295)
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:6733)
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:6748)
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:7556)
> at 
> org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:244)
> at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:621)
> at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:525)
> at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1153)
> at 
> org.apache.hadoop.hive.service.HiveServer$HiveServerHandler.execute(HiveServer.java:226)
> at 
> org.apache.hadoop.hive.service.ThriftHive$Processor$execute.getResult(Thr

[jira] [Commented] (HIVE-4211) Common column and partition column are defined the same type and union them, it will hints Schema of both sides of union should match.

2013-09-03 Thread Daisy.Yuan (JIRA)

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

Daisy.Yuan commented on HIVE-4211:
--

I think it is possible not a problem. Partition column as a part of path name 
should be string type, or its type can be converted to string type. When 
genUnionPlan, FunctionRegistry.getCommonClassForUnionAll(TypeInfo a, TypeInfo 
b) will check the type of both side and set the foward type. In 
FunctionRegistry.getCommonClassForUnionAll, it will call 
FunctionRegistry.implicitConvertable(TypeInfo from, TypeInfo to) to check 
whether it is possible to implicitly convert an object of Class from to Class 
to. At present, it allows implicit String to Double, String to Timestamp, 
String to Numeric Types,and Void Type to any type conversion. The problem in 
the Description is actually  a problem that it dose not allow Boolean to string 
conversion. So is there the scenario that union the boolean
partition column and the boolean column?

> Common column and partition column are defined the same type and union them, 
> it will hints Schema of both sides of union should match. 
> ---
>
> Key: HIVE-4211
> URL: https://issues.apache.org/jira/browse/HIVE-4211
> Project: Hive
>  Issue Type: Bug
>  Components: SQL
>Affects Versions: 0.9.0, 0.11.0
>Reporter: Daisy.Yuan
>  Labels: patch
> Attachments: HIVE-4211.patch, PartitionColumnTypInfo.patch
>
>
> create table UnionBoolA (id boolean, no boolean) row format delimited fields 
> terminated by ' ';
> load data local inpath '/opt/files/unionboola.txt' into table UnionBoolA;
> create table UnionPartionBool (id int) partitioned by (no boolean) row format 
> delimited fields terminated by ' ';
> load data local inpath '/opt/files/unionpartint.txt' into table 
> UnionPartionBool partition(no=true);
> unionboola.txt:
> true true
> false true
> true true
> false true
> unionpartint.txt:
> 111
> 444
> 1122
> 44
> when I execute
> "select * from( select no from UnionBoolA union all select no from 
> UnionPartionBool) unionResult", it is failed. The exception info is as 
> follows:
> FAILED: Error in semantic analysis: 1:66 Schema of both sides of union should 
> match: Column no is of type boolean on first table and type string on second 
> table. Error encountered near token 'UnionPartionBool'
> org.apache.hadoop.hive.ql.parse.SemanticException: 1:66 Schema of both sides 
> of union should match: Column no is of type boolean on first table and type 
> string on second table. Error encountered near token 'UnionPartionBool'
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genUnionPlan(SemanticAnalyzer.java:6295)
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:6733)
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:6748)
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:7556)
> at 
> org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:244)
> at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:621)
> at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:525)
> at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1153)
> at 
> org.apache.hadoop.hive.service.HiveServer$HiveServerHandler.execute(HiveServer.java:226)
> at 
> org.apache.hadoop.hive.service.ThriftHive$Processor$execute.getResult(ThriftHive.java:630)
> at 
> org.apache.hadoop.hive.service.ThriftHive$Processor$execute.getResult(ThriftHive.java:618)
> at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32)
> at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34)
> at 
> org.apache.hadoop.hive.thrift.HadoopThriftAuthBridge20S$Server$TUGIAssumingProcessor$1.run(HadoopThriftAuthBridge20S.java:535)
> at 
> org.apache.hadoop.hive.thrift.HadoopThriftAuthBridge20S$Server$TUGIAssumingProcessor$1.run(HadoopThriftAuthBridge20S.java:532)
> at java.security.AccessController.doPrivileged(Native Method)
> at javax.security.auth.Subject.doAs(Subject.java:396)
> at 
> org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1232)
> at 
> org.apache.hadoop.hive.thrift.HadoopThriftAuthBridge20S$Server$TUGIAssumingProcessor.process(HadoopThriftAuthBridge20S.java:532)
> at 
> org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:176)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at 
> java.util.concu

[jira] [Commented] (HIVE-4211) Common column and partition column are defined the same type and union them, it will hints Schema of both sides of union should match.

2013-04-09 Thread Namit Jain (JIRA)

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

Namit Jain commented on HIVE-4211:
--

Seems like a old bug - dont remember the exact reason.
Can you fix it ?

> Common column and partition column are defined the same type and union them, 
> it will hints Schema of both sides of union should match. 
> ---
>
> Key: HIVE-4211
> URL: https://issues.apache.org/jira/browse/HIVE-4211
> Project: Hive
>  Issue Type: Bug
>  Components: SQL
>Affects Versions: 0.9.0, 0.11.0
>Reporter: Daisy.Yuan
>  Labels: patch
> Attachments: PartitionColumnTypInfo.patch
>
>
> create table UnionBoolA (id boolean, no boolean) row format delimited fields 
> terminated by ' ';
> load data local inpath '/opt/files/unionboola.txt' into table UnionBoolA;
> create table UnionPartionBool (id int) partitioned by (no boolean) row format 
> delimited fields terminated by ' ';
> load data local inpath '/opt/files/unionpartint.txt' into table 
> UnionPartionBool partition(no=true);
> unionboola.txt:
> true true
> false true
> true true
> false true
> unionpartint.txt:
> 111
> 444
> 1122
> 44
> when I execute
> "select * from( select no from UnionBoolA union all select no from 
> UnionPartionBool) unionResult", it is failed. The exception info is as 
> follows:
> FAILED: Error in semantic analysis: 1:66 Schema of both sides of union should 
> match: Column no is of type boolean on first table and type string on second 
> table. Error encountered near token 'UnionPartionBool'
> org.apache.hadoop.hive.ql.parse.SemanticException: 1:66 Schema of both sides 
> of union should match: Column no is of type boolean on first table and type 
> string on second table. Error encountered near token 'UnionPartionBool'
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genUnionPlan(SemanticAnalyzer.java:6295)
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:6733)
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:6748)
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:7556)
> at 
> org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:244)
> at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:621)
> at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:525)
> at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1153)
> at 
> org.apache.hadoop.hive.service.HiveServer$HiveServerHandler.execute(HiveServer.java:226)
> at 
> org.apache.hadoop.hive.service.ThriftHive$Processor$execute.getResult(ThriftHive.java:630)
> at 
> org.apache.hadoop.hive.service.ThriftHive$Processor$execute.getResult(ThriftHive.java:618)
> at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32)
> at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34)
> at 
> org.apache.hadoop.hive.thrift.HadoopThriftAuthBridge20S$Server$TUGIAssumingProcessor$1.run(HadoopThriftAuthBridge20S.java:535)
> at 
> org.apache.hadoop.hive.thrift.HadoopThriftAuthBridge20S$Server$TUGIAssumingProcessor$1.run(HadoopThriftAuthBridge20S.java:532)
> at java.security.AccessController.doPrivileged(Native Method)
> at javax.security.auth.Subject.doAs(Subject.java:396)
> at 
> org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1232)
> at 
> org.apache.hadoop.hive.thrift.HadoopThriftAuthBridge20S$Server$TUGIAssumingProcessor.process(HadoopThriftAuthBridge20S.java:532)
> at 
> org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:176)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:662)
> So I execute "explain select no from  UnionPartionBool" to see the partition 
> column, and find the partition column type is string.
> And all the partition column type is changed to be 
> TypeInfoFactory.stringTypeInfo. It is in 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genTablePlan(). And it is 
> todo task. Now I modify it to be 
> TypeInfoFactory.getPrimitiveTypeInfo(part_col.getType()).It can fix this bug. 
> And you can see what I modified in the patch.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/softw

[jira] [Commented] (HIVE-4211) Common column and partition column are defined the same type and union them, it will hints Schema of both sides of union should match.

2013-04-06 Thread Ashutosh Chauhan (JIRA)

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

Ashutosh Chauhan commented on HIVE-4211:


I remember this TODO was added by [~namit] while trying to fix something with 
partition column types handling. He will have more insights on how to handle 
these kind of scenarios.

> Common column and partition column are defined the same type and union them, 
> it will hints Schema of both sides of union should match. 
> ---
>
> Key: HIVE-4211
> URL: https://issues.apache.org/jira/browse/HIVE-4211
> Project: Hive
>  Issue Type: Bug
>  Components: SQL
>Affects Versions: 0.9.0, 0.11.0
>Reporter: Daisy.Yuan
>  Labels: patch
> Attachments: PartitionColumnTypInfo.patch
>
>
> create table UnionBoolA (id boolean, no boolean) row format delimited fields 
> terminated by ' ';
> load data local inpath '/opt/files/unionboola.txt' into table UnionBoolA;
> create table UnionPartionBool (id int) partitioned by (no boolean) row format 
> delimited fields terminated by ' ';
> load data local inpath '/opt/files/unionpartint.txt' into table 
> UnionPartionBool partition(no=true);
> unionboola.txt:
> true true
> false true
> true true
> false true
> unionpartint.txt:
> 111
> 444
> 1122
> 44
> when I execute
> "select * from( select no from UnionBoolA union all select no from 
> UnionPartionBool) unionResult", it is failed. The exception info is as 
> follows:
> FAILED: Error in semantic analysis: 1:66 Schema of both sides of union should 
> match: Column no is of type boolean on first table and type string on second 
> table. Error encountered near token 'UnionPartionBool'
> org.apache.hadoop.hive.ql.parse.SemanticException: 1:66 Schema of both sides 
> of union should match: Column no is of type boolean on first table and type 
> string on second table. Error encountered near token 'UnionPartionBool'
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genUnionPlan(SemanticAnalyzer.java:6295)
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:6733)
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:6748)
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:7556)
> at 
> org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:244)
> at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:621)
> at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:525)
> at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1153)
> at 
> org.apache.hadoop.hive.service.HiveServer$HiveServerHandler.execute(HiveServer.java:226)
> at 
> org.apache.hadoop.hive.service.ThriftHive$Processor$execute.getResult(ThriftHive.java:630)
> at 
> org.apache.hadoop.hive.service.ThriftHive$Processor$execute.getResult(ThriftHive.java:618)
> at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32)
> at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34)
> at 
> org.apache.hadoop.hive.thrift.HadoopThriftAuthBridge20S$Server$TUGIAssumingProcessor$1.run(HadoopThriftAuthBridge20S.java:535)
> at 
> org.apache.hadoop.hive.thrift.HadoopThriftAuthBridge20S$Server$TUGIAssumingProcessor$1.run(HadoopThriftAuthBridge20S.java:532)
> at java.security.AccessController.doPrivileged(Native Method)
> at javax.security.auth.Subject.doAs(Subject.java:396)
> at 
> org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1232)
> at 
> org.apache.hadoop.hive.thrift.HadoopThriftAuthBridge20S$Server$TUGIAssumingProcessor.process(HadoopThriftAuthBridge20S.java:532)
> at 
> org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:176)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:662)
> So I execute "explain select no from  UnionPartionBool" to see the partition 
> column, and find the partition column type is string.
> And all the partition column type is changed to be 
> TypeInfoFactory.stringTypeInfo. It is in 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genTablePlan(). And it is 
> todo task. Now I modify it to be 
> TypeInfoFactory.getPrimitiveTypeInfo(part_col.getType()).It can fix this bug. 
> And you can see what I modified in the patch.

--
This message is automatically generated by JIRA.
If you think it was s