# 10.0.2 another Dataset type system (inference?) warning

Bug introduced in 10.0.2

The warning below seems unrelated to these issues: Did 10.0.2 break some forms for named slots? and 10.0.2 mapping Association to Dataset warning.

First noticed w/ TimeObject but that turns out a red herring:

data = List[Association[Rule["WEBCAM_TIME",TimeObject[List[0,12,27.9]]],Rule["VisitStartTime",TimeObject[List[0,12,15.]]]],Association[Rule["WEBCAM_TIME",TimeObject[List[0,12,28.]]],Rule["VisitStartTime",TimeObject[List[0,12,15.]]]]];

Dataset[data]


Below, named Slot lookup syntax makes no difference, eg #[x] versus #x, nor <|...|> versus Association:

Dataset[data][All,
Association[#, "time" -> #["WEBCAM_TIME"] - #["VisitStartTime"]] &]


Keys::invrl: The argument Keys[Association[Struct[{WEBCAM_TIME,Atom[String]},{Atom[TimeObject],Atom[TimeObject]}],time->-Struct[{WEBCAM_TIME,VisitStartTime},{Atom[<<1>>],Atom[<<1>>]}][VisitStartTime]+Struct[{WEBCAM_TIME,VisitStartTime},{Atom[TimeObject],Atom[TimeObject]}][WEBCAM_TIME]]] is not a valid Association or a list of rules. >>

and similarly for Values::invrl, even though "time" is handled correctly:

Finally, casting TimeObject to AbsoluteTime makes no diff either, eg:

Dataset[data][All, All, AbsoluteTime][All,
Association[#, "time" -> #["WEBCAM_TIME"] - #["VisitStartTime"]] &]


Gives a similar warning but refers to Atom[Real] and Atom[Integer] as per AbsoluteTime.

Is this another type inference fault?

This is a bug, although I cannot confirm if it is directly related to the named slot issues previously mentioned.

This is fixed in our latest internal development builds, though. I'll make sure we add this to our suite of tests for Dataset.

• Stefan, was this bug introduced in 10.0.2? – Mr.Wizard Dec 22 '14 at 23:25
• @Mr.Wizard I just tried the use case in 10.0.1 and it worked. So it appears to be a regression in 10.0.2. – WReach Dec 23 '14 at 0:16
• @Mr.Wizard, concur w/ WReach, worked in 10.0.1. – alancalvitti Dec 23 '14 at 15:25
• @Stefan, +1 for quick recognition of the issue. Will your dev team consider more thorough testing w/ Dataset because of its type system complications? Titanic and Planets are toy models. – alancalvitti Dec 23 '14 at 15:29
• @Mr.Wizard yes this appears to be a bug introduced in 10.0.2. – Stefan R Dec 23 '14 at 21:28

Seems to related to the bug mentioned here: Appending in Dataset.

Up to a fix only a workaround might help