Add TimestampPrefixTree
Fix crashing bug when run with sparse data