Hi,

  Can the patch i proposed for this be accepted? I see no activity
hapeening on this ( no comments apart from Amit's).

thanks
Shreyas

thanks
Shreyas

Amit Handa wrote:
> Daniel John Debrunner wrote:
> 
>>-----BEGIN PGP SIGNED MESSAGE-----
>>Hash: SHA1
>>
>>I think we need to reset on Derby-13, and also look at Derby-18 at the
>>same time. I was confused over the exposed correlation name, thinking it
>>had a schema, but it doesn't.
>>
>>A table in a list either has an exposed table name or an exposed
>>correlation name. The correlation name is defined by the AS clause and
>>can not have a schema.
>>
>>Thus with
>>
>>set current schema A
>>select ... FROM T1, B.T2, T3 AS TC
>>
>>there should be three exposed names
>>
>>A.T1 as an exposed <table name>
>>B.T2 as an exposed <table name>
>>TC as an exposed <correlation name>
>>
>>The SQL standard rules are then (for table references in the same scope)
>>
>>1) No duplicates can exist among the exposed <table name>s
>>2) No duplicates can exist among the exposed <correlation name>s
>>3) Any <correlation name> must not be the same as the unqualifed part of
>>any exposed <table name>
>>
>>
>>One option in the code might be to have
>>
>>// Returns the exposed table name,
>>// returns null if the table has a correlation name
>>TableName getExposedTableName()
>>
>>// Returns the exposed correlation name,
>>// returns null if the table does not have a correlation name
>>String getExposedCorrelationName()
>>
>>Thus to keep the two concepts separate (since they are), rather than
>>trying to shoehorn them into a single value (as the current code does).
>>Then the duplicate checking would have to be smarter.
>>
> 
> 
> I get what you are saying. Note that we already have the above two methods
> in a subclass of FromTable(FromVTI.java, getExposedName() and 
> getExposedTableName() )
> I am wondering was it intended to be that way i.e. to introduce the (above) 
> methods
> in a subclass and not in base class. Is it by design ?
> And if we go by what is suggested we may be breaking something else.
> The subclasses will now over ride from FromTable.java insted fo FromVTI.java.
> 
> But we can always give a shot at the proposed change.
> Just my thoughts after looking at the issue.
> 
> 
>>I think this would also enable the dubious null schema handling in
>>TableName to be removed, as TableNames should always have a schema.
>>
>>Dan.
>>
>>
>>
>>
>>-----BEGIN PGP SIGNATURE-----
>>Version: GnuPG v1.2.5 (MingW32)
>>Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>>
>>iD8DBQFB3E7SIv0S4qsbfuQRAkxJAKCZUIFXnm/+zsqO1MUnqqfMEyOPNQCg5gTa
>>C/ri7UZzL80BtsaKM2gi59Y=
>>=9aTO
>>-----END PGP SIGNATURE-----
>>
> 
> 
> 
> 
> 
> 

Reply via email to