calcite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jesus Camacho Rodriguez <jcamachorodrig...@hortonworks.com>
Subject Re: New Defects reported by Coverity Scan for Apache Calcite
Date Fri, 28 Apr 2017 07:47:40 GMT
Julian, thanks for letting me know.

I am looking into it, I will upload a fix shortly.

--
Jesús



On 4/27/17, 7:16 PM, "Julian Hyde" <jhyde@apache.org> wrote:

>Jesus,
>
>Coverity found a possible bug in code you just added. Can you take a look please.
>
>Julian
>
>
>> Begin forwarded message:
>> 
>> From: scan-admin@coverity.com
>> Subject: New Defects reported by Coverity Scan for Apache Calcite
>> Date: April 26, 2017 at 8:54:21 PM PDT
>> To: jhyde@apache.org
>> 
>> 
>> 
>> ________________________________________________________________________________________________________
>> *** CID 144066:  API usage errors  (INVALIDATE_ITERATOR)
>> /core/src/main/java/org/apache/calcite/rel/rules/AbstractMaterializedViewRule.java:
950 in org.apache.calcite.rel.rules.AbstractMaterializedViewRule.generateTableMappings(com.google.common.collect.Multimap)()
>> 944         }
>> 945         result.add(HashBiMap.<RelTableRef, RelTableRef>create());
>> 946         for (Entry<RelTableRef, Collection<RelTableRef>> e : multiMapTables.asMap().entrySet())
{
>> 947           boolean added = false;
>> 948           for (RelTableRef target : e.getValue()) {
>> 949             if (added) {
>>>>>    CID 144066:  API usage errors  (INVALIDATE_ITERATOR)
>>>>>    Attempting to obtain another element from "result" after it's been
modified.
>> 950               for (BiMap<RelTableRef, RelTableRef> m : result) {
>> 951                 final BiMap<RelTableRef, RelTableRef> newM =
>> 952                     HashBiMap.<RelTableRef, RelTableRef>create(m);
>> 953                 newM.put(e.getKey(), target);
>> 954                 result.add(newM);
>> 955               }
>> 
>
Mime
View raw message