Created
September 8, 2011 09:58
-
-
Save mpictor/1203053 to your computer and use it in GitHub Desktop.
Small schema with "Query expression source must be an aggregate" error
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- $ ../bin/fedex_plus ../../data/test_schema.exp | |
-- ../../data/test_schema.exp:34: --ERROR: Query expression source must be an aggregate. | |
-- Errors in input | |
SCHEMA test_schema; | |
ENTITY representation_item | |
SUPERTYPE OF (ONEOF (binary_representation_item, compound_representation_item)); | |
name : label; | |
--WHERE | |
-- WR1 : SIZEOF(using_representations(SELF)) > 0; | |
END_ENTITY; | |
TYPE list_representation_item = LIST [1:?] OF representation_item; | |
END_TYPE; | |
TYPE set_representation_item = SET [1:?] OF representation_item; | |
END_TYPE; | |
TYPE compound_item_definition = SELECT ( | |
list_representation_item, | |
set_representation_item); | |
END_TYPE; | |
ENTITY compound_representation_item | |
SUPERTYPE OF (ONEOF (point_and_vector, table_representation_item)) | |
SUBTYPE OF (representation_item); | |
item_element : compound_item_definition; | |
END_ENTITY; | |
ENTITY table_representation_item | |
SUBTYPE OF (compound_representation_item); | |
WHERE | |
WR1 : SIZEOF(QUERY(itet <* SELF\compound_representation_item.item_element | | |
NOT('TEST_SCHEMA.ROW_REPRESENTATION_ITEM' IN TYPEOF(itet)) | |
)) = 0; | |
END_ENTITY; | |
-- | |
ENTITY row_representation_item | |
SUBTYPE OF (compound_representation_item); | |
SELF\compound_representation_item.item_element : list_representation_item; | |
END_ENTITY; | |
ENTITY binary_representation_item | |
SUBTYPE OF (representation_item); | |
binary_value : BINARY; | |
END_ENTITY; | |
ENTITY point_and_vector | |
SUBTYPE OF (compound_representation_item); --, geometric_representation_item); | |
SELF\compound_representation_item.item_element : point_and_vector_members; | |
END_ENTITY; | |
TYPE point_and_vector_members = LIST [2:3] OF identifier; | |
END_TYPE; | |
TYPE label = STRING; | |
END_TYPE; | |
TYPE identifier = STRING; | |
END_TYPE; | |
END_SCHEMA; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment