[
https://issues.apache.org/jira/browse/HIVE-18143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16266632#comment-16266632
]
Hive QA commented on HIVE-18143:
--------------------------------
Here are the results of testing the latest attachment:
https://issues.apache.org/jira/secure/attachment/12899343/HIVE-18143.patch
{color:red}ERROR:{color} -1 due to no test(s) being added or modified.
{color:red}ERROR:{color} -1 due to 7 failed/errored test(s), 11410 tests
executed
*Failed tests:*
{noformat}
org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[hybridgrace_hashjoin_2]
(batchId=154)
org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[insert_values_orig_table_use_metadata]
(batchId=162)
org.apache.hadoop.hive.cli.TestMiniSparkOnYarnCliDriver.testCliDriver[schemeAuthority]
(batchId=175)
org.apache.hadoop.hive.ql.parse.TestReplicationScenarios.testConstraints
(batchId=224)
org.apache.hive.jdbc.TestSSL.testConnectionMismatch (batchId=230)
org.apache.hive.jdbc.TestSSL.testConnectionWrongCertCN (batchId=230)
org.apache.hive.jdbc.TestSSL.testMetastoreConnectionWrongCertCN (batchId=230)
{noformat}
Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/8001/testReport
Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/8001/console
Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-8001/
Messages:
{noformat}
Executing org.apache.hive.ptest.execution.TestCheckPhase
Executing org.apache.hive.ptest.execution.PrepPhase
Executing org.apache.hive.ptest.execution.YetusPhase
Executing org.apache.hive.ptest.execution.ExecutionPhase
Executing org.apache.hive.ptest.execution.ReportingPhase
Tests exited with: TestsFailedException: 7 tests failed
{noformat}
This message is automatically generated.
ATTACHMENT ID: 12899343 - PreCommit-HIVE-Build
> LazySimpleSerDe.LazyMap doesn't handle the condition of when map key is
> another column value
> --------------------------------------------------------------------------------------------
>
> Key: HIVE-18143
> URL: https://issues.apache.org/jira/browse/HIVE-18143
> Project: Hive
> Issue Type: Bug
> Components: Serializers/Deserializers
> Affects Versions: 0.14.0, 1.2.2, 2.3.0
> Reporter: wei
> Assignee: wei
> Fix For: 2.3.0
>
> Attachments: HIVE-18143.patch
>
>
> LazySimpleSerDe.LazyMap doesn't handle the condition of when map key is
> another column value.
> eg:
> CREATE TABLE `demo`(
>
> `create_timestamp` bigint,
> `ctime` string,
> `event_data` map<string,string>
> )
> ROW FORMAT SERDE
> 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
> STORED AS INPUTFORMAT
> 'org.apache.hadoop.mapred.TextInputFormat'
> OUTPUTFORMAT
> 'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
> add data
> INSERT INTO TABLE demo
> select
> 1511192567909,
> '1511192567909',
> map('1511192567909', '05020918127a82816437ba9edac17fca42601');
> Do query:
> SELECT
> create_timestamp,
> ctime,
> event_data,
> event_data[create_timestamp],
> event_data[ctime]
> FROM demo;
> RES:
> | create_timestamp | ctime | event_data
> | _c3 | _c4 |
> +-------------------+----------------+------------------------------------------------------------+----------------------------------------+-------+--+
> | 1511192567909 | 1511192567909 |
> {"1511192567909":"05020918127a82816437ba9edac17fca42601"} |
> 05020918127a82816437ba9edac17fca42601 | NULL |
> event_data[ctime] get value NULL
> _______________________________________
> In LazyMap.getMapValueElement method.
> {code:java}
> // Some comments here
> public Object getMapValueElement(Object key) {
> if (!parsed) {
> parse();
> }
> // search for the key
> for (int i = 0; i < mapSize; i++) {
> LazyPrimitive<?, ?> lazyKeyI = uncheckedGetKey(i);
> if (lazyKeyI == null) {
> continue;
> }
> // getWritableObject() will convert LazyPrimitive to actual primitive
> // writable objects.
> Object keyI = lazyKeyI.getWritableObject();
> if (keyI == null) {
> continue;
> }
> if (keyI.equals(key)) {
> // Got a match, return the value
> return uncheckedGetValue(i);
> }
> }
> return null;
> }
> {code}
> When the key is a cloumn and don't need convert, the key will be a
> LazyPrimitive object.
> keyI = lazyKeyI.getWritableObject() is actual primitive writable objects.
> keyI.equals(key) will be false.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)