Name resolution for predefined table mapping functions may need to be improved
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Trafodion |
Fix Released
|
Wishlist
|
Hans Zeller |
Bug Description
Right now, predefined table mapping functions like LOG_READER eclipse any user-defined functions with the same name, if the name in the query is unqualified. Example:
create table mapping function trafodion.
set schema trafodion.sch;
select * from udf(log_reader()); -- uses predefined function
select * from udf(trafodion.
set schema trafodion.othersch;
select * from udf(log_reader()); -- uses predefined function
select * from udf(trafodion.
select * from udf(trafodion.
This is ANSI standard compliant, I think. The standard says that we need to have a list of schemata to search for the function. In this implementation, the (yet unnamed) schema for predefined functions comes first, then the current default schema. Some people might prefer to search the current default schema first.
Pros for the current solution:
- Easy to understand
- No need to refer to the name of the internal schema of predefined functions explicitly
- Simple workaround if a new predefined function eclipses a TMUDF
Cons of the current solution:
- New predefined functions can potentially eclipse existing functions, though that should be relatively rare
summary: |
- Name resolution for predefined table mapping functions needs to be + Name resolution for predefined table mapping functions may need to be improved |
Changed in trafodion: | |
status: | New → In Progress |
milestone: | none → r1.1 |
A fix was committed to the R1.1 branch on 3/31/15. /review. trafodion. org/1415
https:/