You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Swapnil Bawaskar (JIRA)" <ji...@apache.org> on 2016/10/01 22:23:27 UTC

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

     [ https://issues.apache.org/jira/browse/GEODE-1881?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Swapnil Bawaskar updated GEODE-1881:
------------------------------------
    Fix Version/s: 1.0.0-incubating

> 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
>            Assignee: Dan Smith
>             Fix For: 1.0.0-incubating
>
>
> 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)