dynamobi/dynamobi — Issue #444: [FRG-371] support subqueries in UDFs
Author: dynamobi-build
Created: 2011-12-30 03:14:00+00:00
State: open
Labels: FRG, UDF

[reporter="hersker", created="Tue, 17 Mar 2009 01:57:53 -0500 (GMT-05:00)"]
The following UDF declaration generates an assertion, "Error: java.lang.AssertionError: Internal error: Not a query: ...".

CREATE OR REPLACE SCHEMA UDF_SUBQUERY;

SET SCHEMA 'UDF_SUBQUERY';

CREATE OR REPLACE FUNCTION "currentSchema"()

RETURNS VARCHAR(50)

CONTAINS SQL

RETURN first_value(select PARAM_VALUE

from table(sys_boot.mgmt.session_parameters())

where PARAM_NAME='schemaName');