Knowing my volatile memory, I think it is best that I take you up on
your suggestion of adding the explanation and examples in the javadoc.
I hope to have a patch with these comments by early tomorrow.
thanks,
Mamta
On 5/10/05, Daniel John Debrunner <djd@debrunners.com> wrote:
> Mamta Satoor wrote:
>
> > Hi Dan,
> >
> > Here is another patch with more comments on the getTable/SchemaName
> > and getSourceTable/SchemaName methods.
> >
> > As for your following question
> > "Then with this patch ColumnReference has a getSchemaName() and a
> > getSourceSchemaName(). I'm unclear on what the intended behaviour of
> > each is, and why we need two methods. If getTableName() means return the
> > "user" name or correlation name, then logically getSchemaName() would
> > follow the same pattern, but user names or correlation names don't have
> > schemas."
> > You are right that there is no way to provide a correlation name for
> > schema. But a user sql can look like following
> > select app1.t1.c1, app2.t1.c1 from app1.t1, app2.t1
> > For this sql, getSchemaName(and getSourceSchemaName) will return app1
> > for first column and app2 for second column.
> >
> > For select t1.c1 from t1, getSchemaName for first column will return
> > null but getSourceSchemaName will return app (assuming we are in the
> > schema app).
> >
> > Aggregate functions rely on ColumnReference.getSchemaName at generate time.
>
> The above comments and examples are really helpful, and would be even
> more helpful if they were added to the javadoc comments for these
> methods. :-)
>
> A third example would be 'select a.c1 from t1 a'
>
> I'll work on committing this patch.
>
> Dan.
>
>