You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2016/09/12 21:42:20 UTC

[jira] [Commented] (GEODE-1881) CompactMapRangeIndex doesn't handle null map keys

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

ASF subversion and git services commented on GEODE-1881:
--------------------------------------------------------

Commit 4f2a51acc660f1d49400c8d90471e10e91b09fb8 in incubator-geode's branch refs/heads/develop from [~upthewaterspout]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-geode.git;h=4f2a51a ]

GEODE-1881: Support null map keys in CompactMapRangeIndex

Allow indexing maps with null keys by storing the keys as
IndexManager.NULL.


> CompactMapRangeIndex doesn't handle null map keys
> -------------------------------------------------
>
>                 Key: GEODE-1881
>                 URL: https://issues.apache.org/jira/browse/GEODE-1881
>             Project: Geode
>          Issue Type: Bug
>          Components: querying
>            Reporter: Dan Smith
>
> When indexing map fields that have null keys, geode throws an NPE.
> Steps to reproduce:
> 1. Create an index on a map field eg
> {code}
> create index --name="idx_positions" --expression="positions[*]" --region="region"
> {code}
> 2. Add entries with null keys in the the indexed map
> {code}
> entry.positions  = new HashMap()
> entry.positions.put(null, "somevalue);
> region.put(entry);
> {code}
> You will get an NPE
> {noformat}
> Caused by: java.lang.NullPointerException
> 	at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936)
> 	at com.gemstone.gemfire.cache.query.internal.index.CompactMapRangeIndex.saveIndexAddition(CompactMapRangeIndex.java:184)
> 	at com.gemstone.gemfire.cache.query.internal.index.CompactMapRangeIndex.saveMapping(CompactMapRangeIndex.java:111)
> 	at com.gemstone.gemfire.cache.query.internal.index.AbstractIndex$IMQEvaluator.applyProjection(AbstractIndex.java:1354)
> 	at com.gemstone.gemfire.cache.query.internal.index.AbstractIndex$IMQEvaluator.doNestedIterations(AbstractIndex.java:1304)
> 	at com.gemstone.gemfire.cache.query.internal.index.AbstractIndex$IMQEvaluator.doNestedIterations(AbstractIndex.java:1315)
> 	at com.gemstone.gemfire.cache.query.internal.index.AbstractIndex$IMQEvaluator.evaluate(AbstractIndex.java:1132)
> 	... 44 more
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)