On Wed, Jun 18, 2008 at 07:13:58PM +0200, Niels Nes wrote:
On Wed, Jun 18, 2008 at 05:28:29PM +0100, Sam Mason wrote:
OK, how much of a change to the code do you think it would be to remove this behavior? I'm reasonably proficient in C, the thing that tends to take time is learning the structure of a new codebase.
Depends on how you want to solve it. Current code uses a hash solution a clustered hash or sorted solution would work better (less random io).
As in some sort of hash structure is persistently maintained?
The code for schema altering sql statements is layered as follows sql parser, semantic checks,generate a tree of the needed 'mal' instructions, optimizers, generate mal.
sounds like a bit of learning!
So adaption of the code in sql_schema/sql_updates would be needed possibly with a new index structure to support the more advanced key checks (clusters/ordered index).
When you say "more advanced key checks" do you pretty much mean anything more than equality?
This is not a task some one new at MonetDB should start at. There are better 'introductionary' tasks by which you could slowly learn the system. One such task would be the addition of new functions, ie c-functions which can be called from sql. From the feature requests for example I know we would like more advanced time/date output format functions.
Oracle and PG both provide a to_char function[1] that I could try implementing a subset of. I don't really like the formatting string of to_char, I prefer C's strftime more, but it could be a good compatible start. Sam [1] http://www.postgresql.org/docs/current/static/functions-formatting.html