Hi Guillaume,

First of all we should probably refactor this code in a
cleanQuotedIdentifiers or trimQuotes method or something like that :).
It will prevent failures if the support of a new funky database system
with its own syntax to quote identifiers is added in the future.
You are right, I committed a refactored version of the code for this.
IMHO, we should store in the hashmap the clean version of the table
name because we currently have two differents behaviours:
- in the case when we create the table directly in Sequoia, the schema
is updated with "tablename",
- when we stop and restart the controller, we store tablename in the
schema and not "tablename".
The problem is that we don't know what will be the case used by the database if quotes are not used. And going through a full schema refresh on DDL execution is too costly in general. So I think that the table lookup mechanism should be flexible enough to accommodate both.
Another question is to know if we can afford the added clean (we
should then clean directly the table name before looking in the
hashmap) in certain cases.
As long as all entries point to the same DatabaseTable object, locking will work. We just have to be careful with database that have case sensitive table names and aliases so that we don't end up messing up with these features.

What do you think?
Emmanuel

--
Emmanuel Cecchet
Chief Scientific Officer, Continuent

Blog: http://emanux.blogspot.com/
Open source: http://www.continuent.org
Corporate: http://www.continuent.com
Skype: emmanuel_cecchet
Cell: +33 687 342 685


_______________________________________________
Sequoia mailing list
Sequoia@lists.forge.continuent.org
https://forge.continuent.org/mailman/listinfo/sequoia

Reply via email to