dynamobi/dynamobi — Issue #575: [FRG-297] cannot create method within udt without calling SET SCHEMA first
Author: dynamobi-build
Created: 2011-12-30 03:36:11+00:00
State: open
Labels: DDL, FRG

[reporter="jhyde", created="Sat, 29 Sep 2007 23:39:03 -0500 (GMT-05:00)"]
Cannot create method within a user-defined type you have not called SET SCHEMA first.

For example,

> CREATE SCHEMA ddlgen;

> CREATE TYPE ddlgen.playing_card AS (

> card_suit char(1),

> card_rank integer

> ) FINAL

> CONSTRUCTOR METHOD ddlgen.playing_card.playing_card (

> card_suit_init char(1),card_rank_init integer)

> RETURNS ddlgen.playing_card

> SELF AS RESULT

> CONTAINS SQL

> SPECIFIC ddlgen.playing_card;

Error: org.eigenbase.sql.parser.SqlParseException: No default schema specified; execute SET SCHEMA or use fully qualified names (state=,code=0)

It's possible that this is intentional in the UDT spec, or I don't understand the METHOD DDL syntax.

Note that method name is parsed using SimpleIdentifier() so it is impossible to pass in the schema name as part of the method name.

Please remove 'set schema ddlgen' from allTypes.sql when this bug is fixed.