On Fri, Nov 18, 2011 at 9:21 AM, Josh Moore <josh.mo...@gmx.de> wrote: > > On Nov 17, 2011, at 10:35 PM, Alan Marchiori wrote: > >> I am attempting to use PyTables (v2.3.1) to store timestamped data and >> things were going well until I added a column index. While the column >> is indexed no data is returned from a table.where call! >> > > I've reproduced with a number of different index configurations. If I change > the column type to Float64, then the index works as expected. > > BEFORE: > Initial index: verbose has_index= True use_index= > frozenset(['Awhen']) where= 0 readWhere= 0 > remove index has_index= False use_index= > frozenset([]) where= 5 readWhere= 5 > re-add index (non-verbose) has_index= True use_index= > frozenset(['Awhen']) where= 0 readWhere= 0 > remove again has_index= False use_index= > frozenset([]) where= 5 readWhere= 5 > re-add index (with flush) has_index= True use_index= > frozenset(['Awhen']) where= 0 readWhere= 0 > re-add index (full) has_index= True use_index= > frozenset(['Awhen']) where= 0 readWhere= 0 > re-add index (ultralight) has_index= True use_index= > frozenset(['Awhen']) where= 0 readWhere= 0 > re-add index (o=0) has_index= True use_index= > frozenset(['Awhen']) where= 0 readWhere= 0 > re-add index (o=9) has_index= True use_index= > frozenset(['Awhen']) where= 0 readWhere= 0 > re-index has_index= True use_index= > frozenset(['Awhen']) where= 0 readWhere= 0 > also index value has_index= True use_index= > frozenset(['Awhen']) where= 0 readWhere= 0 > > > AFTER: > Initial index: verbose has_index= True use_index= > frozenset(['Awhen']) where= 5 readWhere= 5 > remove index has_index= False use_index= > frozenset([]) where= 5 readWhere= 5 > re-add index (non-verbose) has_index= True use_index= > frozenset(['Awhen']) where= 5 readWhere= 5 > remove again has_index= False use_index= > frozenset([]) where= 5 readWhere= 5 > re-add index (with flush) has_index= True use_index= > frozenset(['Awhen']) where= 5 readWhere= 5 > re-add index (full) has_index= True use_index= > frozenset(['Awhen']) where= 5 readWhere= 5 > re-add index (ultralight) has_index= True use_index= > frozenset(['Awhen']) where= 5 readWhere= 5 > re-add index (o=0) has_index= True use_index= > frozenset(['Awhen']) where= 5 readWhere= 5 > re-add index (o=9) has_index= True use_index= > frozenset(['Awhen']) where= 5 readWhere= 5 > re-index has_index= True use_index= > frozenset(['Awhen']) where= 5 readWhere= 5 > also index value has_index= True use_index= > frozenset(['Awhen']) where= 5 readWhere= 5 >
Josh, Thanks for confirming this. It would seem indexing is broken on Time64's (also the pytables unit tests do not catch this and unit tests should probably be added for all indexable Col datatypes and/or an error raised if you try to index on a non-indexable column). Switching to Float64 works (floating point time since epoch) I just have to ensure that gives sufficient precision for my data. Thanks, problem solved and hopefully can be better handled in the next release. Alan ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d _______________________________________________ Pytables-users mailing list Pytables-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pytables-users