[
https://issues.apache.org/jira/browse/TRAFODION-3177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16571014#comment-16571014
]
ASF GitHub Bot commented on TRAFODION-3177:
-------------------------------------------
GitHub user zellerh opened a pull request:
https://github.com/apache/trafodion/pull/1682
[TRAFODION-3177] Error when selecting count(*) from event_log_reader UDF
See the JIRA for a description of the issues.
- Removed code that required usage of a set of output columns
to evaluate code. This check caused the error described in the
test case, and I think it is no longer necessary. Removing it
can speed up some cases where we now evaluate predicates in the
UDF, for example:
```
select count(*)
from udf("_LIBMGR_".event_log_reader('f'))
where log_file_node = 0;
```
- Added predicate evaluation code for MESSAGE, LOG_FILE_NODE,
LOG_FILE_LINE, and PARSE_STATUS columns.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/zellerh/trafodion bug/R23a
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/trafodion/pull/1682.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1682
----
commit 5ecb6890cb9fc381bca7c4f5c93ea8a28ed9fd31
Author: Hans Zeller <hzeller@...>
Date: 2018-08-07T01:20:09Z
[TRAFODION-3177] Error when selecting count(*) from event_log_reader UDF
See the JIRA for a description of the issues.
- Removed code that required usage of a set of output columns
to evaluate code. This check caused the error described in the
test case, and I think it is no longer necessary. Removing it
can speed up some cases where we now evaluate predicates in the
UDF, for example:
select count(*)
from udf("_LIBMGR_".event_log_reader('f'))
where log_file_node = 0;
- Added predicate evaluation code for MESSAGE, LOG_FILE_NODE,
LOG_FILE_LINE, and PARSE_STATUS columns.
----
> 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)