Skip to main content

IC89781: AGGREGATE OPERATOR WITH COLLECTDISTINCT AND COUNTBYDISTINCT FUNCTIONS FAILS TO COMPILE


 

APAR status

  • Closed as program error.

Error description

  • If  you have an SPL application with an Aggregate operator that
    uses a tumbling window, a CollectDistinct aggregation function,
    and a CountByDistinct aggregation function, the program fails to
    compile.
    
    An example of the compilation error is as follows:
    src/operator/Aggregated.cpp:34: error: no matching function for
    call to ?SPL::TumblingAggregate::CountByDistinct<SPL::rstring,
    SPL::list<int>
    >::setCollectDistinct(SPL::TumblingAggregate::CollectDistinct<SP
    L::rstring, SPL::list<SPL::rstring> >&)
    

Local fix

  • To work around the problem, remove one of the calls to the
    aggregation functions.
    Alternatively, create a temporary tuple with different attribute
    names within the second aggregation function.
    
    For example, if you had the following SPL code:
    ...
    stream<AggrType> Aggr as O = Aggregate(Data as I)
    {
    logic onTuple I: { log(Sys.error, (rstring) I); }
    window I: tumbling, punct();
    param groupBy: a;
    output O: count = Count(), countDistinct = CountDistinct(b),
    countByDistinct = CountByDistinct({ C = c, D = d, E = e }),
    collection = CollectDistinct({ C = c, D = d, E = e });
    }
    ...
    You can work around the problem by changing it as follows:
    ...
    stream<AggrType> Aggr as O = Aggregate(Data as I)
    {
    logic onTuple I: { log(Sys.error, (rstring) I); }
    window I: tumbling, punct();
    param groupBy: a;
    output O: count = Count(), countDistinct = CountDistinct(b),
    countByDistinct = CountByDistinct({ X = c, Y = d, Z = e }),
    collection = CollectDistinct({ C = c, D = d, E = e });
    }
    ...
    

Problem summary

  • Users Affected:
    Developers who are trying to compile applications with an
    Aggregate operator that uses a tumbling window, a
    CollectDistinct aggregation function, and a CountByDistinct
    aggregation function.
    
    Problem Description: See Error Description.
    

Problem conclusion

  • This problem is fixed in Version 3.0 Fix Pack 1 and later fix
    packs.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IC89781

  • Reported component name

    INFOSPHERE STRE

  • Reported component ID

    5724Y95IS

  • Reported release

    300

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2013-01-23

  • Closed date

    2013-02-06

  • Last modified date

    2013-02-06

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    INFOSPHERE STRE

  • Fixed component ID

    5724Y95IS

Applicable component levels

  • R300 PSY

       UP

Rate this page:

(0 users)Average rating

Copyright and trademark information

IBM, the IBM logo and ibm.com are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml.

Rate this page:


(0 users)Average rating

Add comments

Document information

InfoSphere Streams


Software version:
300


Reference #:
IC89781


Modified date:
2013-02-06

Translate my page

Content navigation