Name resolution for predefined table mapping functions may need to be improved

Bug #1400812 reported by Hans Zeller on 2014-12-09
6
This bug affects 1 person
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.sch.log_reader ...;

set schema trafodion.sch;
select * from udf(log_reader()); -- uses predefined function
select * from udf(trafodion.sch.log_reader()); -- uses user-defined function

set schema trafodion.othersch;
select * from udf(log_reader()); -- uses predefined function
select * from udf(trafodion.sch.log_reader()); -- uses user-defined function
select * from udf(trafodion.othersch.log_reader()); -- error, UDF not found

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
Hans Zeller (hans-zeller) wrote :

A fix was committed to the R1.1 branch on 3/31/15.
https://review.trafodion.org/1415

Changed in trafodion:
status: In Progress → Fix Committed
Hans Zeller (hans-zeller) wrote :

Fix was released in March.

Changed in trafodion:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers