[ https://issues.apache.org/jira/browse/HIVE-4995?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13728916#comment-13728916 ]
Hive QA commented on HIVE-4995: ------------------------------- {color:red}Overall{color}: -1 at least one tests failed Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12595810/HIVE-4995.1.patch.txt {color:red}ERROR:{color} -1 due to 1 failed/errored test(s), 2759 tests executed *Failed tests:* {noformat} org.apache.hcatalog.mapreduce.TestSequenceFileReadWrite.testTextTableWriteReadMR {noformat} Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/301/testReport Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/301/console Messages: {noformat} Executing org.apache.hive.ptest.execution.PrepPhase Executing org.apache.hive.ptest.execution.ExecutionPhase Executing org.apache.hive.ptest.execution.ReportingPhase Tests failed with: TestsFailedException: 1 tests failed {noformat} This message is automatically generated. > select * may incorrectly return empty fields with hbase-handler > --------------------------------------------------------------- > > Key: HIVE-4995 > URL: https://issues.apache.org/jira/browse/HIVE-4995 > Project: Hive > Issue Type: Bug > Components: HBase Handler > Affects Versions: 0.11.0 > Reporter: Swarnim Kulkarni > Assignee: Swarnim Kulkarni > Attachments: HIVE-4995.1.patch.txt > > > HIVE-3725 added capability to pull hbase columns with prefixes. However the > way the current logic to add columns stands in HiveHBaseTableInput format, it > might cause some columns to incorrectly display empty fields. > Consider the following query: > {noformat} > CREATE EXTERNAL TABLE test_table(key string, value1 map<string,string>, > value2 string) > ROW FORMAT SERDE 'org.apache.hadoop.hive.hbase.HBaseSerDe' > STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler' > WITH SERDEPROPERTIES > ("hbase.columns.mapping" = ":key,cf-a:prefix.*,cf-a:another_col") > TBLPROPERTIES ("hbase.table.name" = "test_table"); > {noformat} > Given the existing logic in HiveHBaseTableInputFormat: > {code} > for (int i = 0; i < columnsMapping.size(); i++) > { > ColumnMapping colMap = columnsMapping.get(i); > if (colMap.hbaseRowKey) { > continue; > } > if (colMap.qualifierName == null) { > scan.addFamily(colMap.familyNameBytes); > } else { > scan.addColumn(colMap.familyNameBytes, colMap.qualifierNameBytes); > } > } > {code} > So for the above query, the 'addFamily' will be called first followed by > 'addColumn' for the column family "cf-a". This will wipe away whatever we had > set with the 'addFamily' call in the previous step resulting in an empty > column when queried. -- 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/software/jira