[ 
https://issues.apache.org/jira/browse/TRAFODION-3177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16571002#comment-16571002
 ] 

Hans Zeller commented on TRAFODION-3177:
----------------------------------------

Also found a few additional issues while looking at this UDF:

* The UDF accepts any predicates, but it does not have the code to evaluate 
predicates on all columns (evaluation code for MESSAGE,  LOG_FILE_NODE, 
LOG_FILE_LINE, and PARSE_STATUS was missing.
* I've seen incorrect predicate evaluation in some cases, involving trailing 
blanks.
* The UDF upshifts strings for comparison. This is probably not always legal 
SQL semantics (so the result changes whether we evaluate the predicate in the 
UDF or not), but I'm leaving this behavior for now.
* The UDF didn't evaluate any predicates if none of a list of columns were 
retrieved. This check may have been left over from an earlier version that 
might have had some shortcut logic, but I don't see such logic now, so I 
changed it to always evaluate predicates in the UDF, when possible, e.g. for a 
select count( * ) from udf, which did not work before.

> Error when selecting count(*) from event_log_reader UDF
> -------------------------------------------------------
>
>                 Key: TRAFODION-3177
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-3177
>             Project: Apache Trafodion
>          Issue Type: Bug
>          Components: sql-general
>    Affects Versions: 2.1-incubating
>            Reporter: Hans Zeller
>            Assignee: Hans Zeller
>            Priority: Major
>             Fix For: 2.4
>
>
> When selecting no columns from the event_log_reader UDF, like in a select 
> count( * ), I am getting the following error:
> {quote}>>prepare s from select count( * ) from udf(event_log_reader());
>  * 
>  ** 
>  *** ERROR[11252] Trying to access column number 11 but column list has only 
> 10 elements (SQLSTATE 38900){quote}
> This is the same for both the predefined UDF or the one in schema "_LIBMGR_".



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to