Merge branch 'master' of u01:src/cantera-table into v1.0
Removed unused variable from ca_sql_ts_sample

The new time series representation, offset/score, implicitly stores length, so
we no longer need the "end" variable.

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>
ca-load: Pointlessly initialize variable to satisfy compiler

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>
Merge branch 'v1.0' of github.com:mortehu/cantera-table into v1.0

Conflicts:
	ca-load.c
Remove the ca-sort program, since we're relying on GNU sort now

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>
Makefile.am: Add -lpthread for tests/fifo-00

When using binutils-gold, -lpthread is not automatically pulled in the
libca-table.so.

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>
ca-load: Add support for summaries

With this in place, we should have the necessary tools to build and query an
inverted index.

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>
tests/wo-sort-00: Replace assertion with error message

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>
writeonce: Use hashing instead of binary search

So far we've been using binary search to look up items in writeonce tables.
However, some of the inverted index tables have tens of millions of rows,
resulting in more than 20 seeks per lookup.  This commit replaces the sorted
array of offsets with a hash table with a load factor of 50%.  Furthermore, we
allow offset values to be either 16, 32 or 64 bits.

We use thte X31 hash[1], an open addressing scheme and fibonacci chaining.

Also, lookups into summary tables have required an access to the sorted array
of offsets in order to find the size of the row.  After this change, row sizes
are store inline in the table, so that we can seek directly to the desired
position.

The one major optimization we can do beyond this commit, is storing inverted
index keys in hash order, so that colliding entries are guaranteed to be stored
physically adjacent, eliminating any extranous seeks during lookup.

1. https://mail.gnome.org/archives/gtk-devel-list/2000-February/msg00057.html

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>
Get rid of the requirement to use absolute paths for schemas

Requiring absolute paths is not user-friendly, and does not accomplish
anything.  We chdir into the directory containing the schema definition in
order to survive lazy unmounts and directory renaming.

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>
query-lexer: Re-add TIME which was accidentally removed earlier

This token is needed for SET TIME FORMAT.

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>