diffix / explorer

Tool to automatically explore and generate stats on data anonymized using Diffix
MIT License
2 stars 1 forks source link

KeyNotFoundException for group by grouping sets #380

Open sentry-io[bot] opened 3 years ago

sentry-io[bot] commented 3 years ago

In some cases adding lots of grouping sets to a group by grouping sets query can alter the expected output in even completely suppress a column grouping. This in turn raises a KeyNotFoundException when the expected column grouping is absent during correlation analysis.

I think this an issue with Aircloak's handling of grouping set and have raised an issue with Aircloak to track this.

An explicit log message for this particular issue will also be added to Explorer for when this occurs.

System.Collections.Generic.KeyNotFoundException: The given key '17' was not present in the dictionary.
  File "/build/src/explorer/Components/ColumnCorrelationComponent.cs", line 242, in Explore { <lambda> }
  File "/build/src/explorer/Components/ResultTypes/JointProbabilityMatrix.cs", line 35, in .ctor
  File "/build/src/explorer/Components/ColumnCorrelationComponent.cs", line 242, in Explore { <lambda> }
  File "/build/src/explorer/Components/ColumnCorrelationComponent.cs", line 261, in .ctor
  File "/build/src/explorer/Components/ColumnCorrelationComponent.cs", line 252, in Explore
...
(39 additional frame(s) were not displayed)

Error in MultiColumnExploration for NAV_W1_TENANT_WS001/SalesCrMemoLine/Document No_,Line No_,Type,No_,Location Code,Posting Group,Shipment Date,Unit of Measure,Quantity,Unit Cost (LCY),VAT _,Line Discount _,Line Discount Amount,Allow Invoice Disc_,Gross Weight,Net Weight,Units per Parcel,Unit Volume,Appl_-to Item Entry,Shortcut Dimension 1 Code,Shortcut Dimension 2 Code,Customer Price Group,Job No_,Work Type Code,Inv_ Discount Amount,Gen_ Bus_ Posting Group,Gen_ Prod_ Posting Group,VAT Calculation Type,Transaction Type,Transport Method,Attached to Line No_,Exit Point,Area,Transaction Specification,Tax Category,Tax Area Code,Tax Liable,Tax Group Code,VAT Clause Code,VAT Bus_ Posting Group,VAT Prod_ Posting Group,Blanket Order No_,Blanket Order Line No_,Unit Cost,System-Created Entry,VAT Difference,VAT Identifier,IC Partner Ref_ Type,IC Partner Reference,Prepayment Line,IC Partner Code,Posting Date,Line Discount Calculation,Dimension Set ID,Job Task No_,Job Contract Entry No_,Deferral Code,Variant Code,Bin Code,Qty_ per Unit of Measure,Unit of Measure Code,Quantity (Base),FA Posting Date,Depreciation Book Code,Depr_ until FA Posting Date,Duplicate in Depreciation Book,Use Duplication List,Responsibility Center,Cross-Reference No_,Unit of Measure (Cross Ref_),Cross-Reference Type,Cross-Reference Type No_,Item Category Code,Nonstock,Purchasing Code,Product Group Code,Return Receipt No_,Return Receipt Line No_,Return Reason Code,Allow Line Disc_,Customer Disc_ Group,Center of Distribution,Do not print line,Do not print price,Do not print quantity,Read Only,Combined Item Header,BOM Explosion Type,Dimension Source,Service Package Header,Qty_ per Header,Call Center,Manual BOM,Allow Payment Discount,Manual Not Print Line,Manual Not Print Price,Manual Not Print Quantity,Group Number,Credit Memo Rate _,Fastfit Discount,Fixed Price,Representative Code,CB-Price,Consignment,Amount (Std_),Price Change From User,Price Change Date,Bonus Allowed,Bonus _,Bonus Code,Bonusable Amount,Bonusable Amount (CB),Bonus Amount (Expected),Null Position,Price Locked,Discount 1 _,Text Discount 1,Discount 2 _,Text Discount 2,Discount 3 _,Text Discount 3,Discount 4 (LCY),Text Discount 4,Discount 5 _,Text Discount 5,BAH Option,Text Item No_,Text Quantity,Text Unit Price,Text Amount,Text CB-Price,Text Line Discount _,Qty_ Transferred From BAH,Remaining Qty on BAH,Minimum Price,Discount 1 Code,Discount 2 Code,Discount 3 Code,Discount 4 Code,Discount 5 Code,Location Name,Central Maintenance,Price UOM,Unit Price per Price UOM,Net Price per Price UOM,Has Additional Items,Additional Item Type,Appl_-to Exch_ Part Entry No_,Tire Hotel No_,Vehicle No_,Licence-Plate No_ Short,Tour Code,Tour Placement,Noise Performance,Noise Class Type,Fuel Efficiency,Service Center,EC_Vehicle Class,EU Directive Number,Wet Grip,Customer Commission Code,Product Commission Code,Salesperson Code,Salesperson Code 2,Fitter 1,Fitter 2,Fitter 3,Commission Posted,DatEuropa code,Engine Codes,EurotaxNat Code,Mileage(KM),National Code,License No_,TecDoc ID,VIN,Interface Description,Promotion Condition No_,Promotion Bonus Line No_,Discount Operation 2,Discount Operation 3,Discount Operation 5,Internal Comment,Deleted By HQ,Replication Date,Repl_ Post Run Finished,Replication Filter,Additional Sale,Prevent Synchronization,Prevent Replication.
sebastian commented 3 years ago

This is a bug I have seen quite a number of times since yesterday I believe. Is it the result of a last minute change?

dandanlen commented 3 years ago

I don't think so. It may be that fixing another issue has revealed this particular bug.

In any case, there have been no changes to the queries issues to Aircloak...

Is this behaviour expected? Ie. grouping sets sub-groups depending on other (unrelated) sub-groups?