Index: src/org/teiid/query/i18n.properties
===================================================================
--- src/org/teiid/query/i18n.properties	(revision 0)
+++ src/org/teiid/query/i18n.properties	(revision 0)
@@ -0,0 +1,908 @@
+#
+# JBoss, Home of Professional Open Source.
+# See the COPYRIGHT.txt file distributed with this work for information
+# regarding copyright ownership.  Some portions may be licensed
+# to Red Hat, Inc. under one or more contributor license agreements.
+# 
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+# 
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+# 
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301 USA.
+#
+
+# Error messages for query (015) project to address internationalization
+# Format:
+#
+
+# function (001)
+ERR.015.001.0002 = Cannot find implementation for known function {0}
+ERR.015.001.0003 = Error while evaluating function {0}
+ERR.015.001.0004 = Unable to access function implementation for [{0}]
+ERR.015.001.0005 = ERROR loading system functions: {0}
+ERR.015.001.0017 = Left count is invalid: {0}
+ERR.015.001.0025 = Pad length must be > 0.
+ERR.015.001.0027 = Pad string for lpad/rpad must have length greater than 0.
+ERR.015.001.0031 = Source and destination character lists must be the same length.
+ERR.015.001.0033 = Error converting [{0}] of type {1} to type {2}
+ERR.015.001.0035 = The context function may only be used in XML queries.
+ERR.015.001.0035a = The rowlimit and rowlimitexception functions may only be used in XML queries.
+ERR.015.001.0042 = Illegal argument for formating: {0}
+ERR.015.001.0043 = Parse Exception occurs for executing: {0} {1}
+ERR.015.001.0044 = Function metadata source is of invalid type: {0}
+ERR.015.001.0046 = The function "{0}" will not be added because a function with the same name and signature already exists.
+ERR.015.001.0047 = Unexpected exception while loading "{1}.{2}" for UDF "{0}"
+FunctionTree.not_void = UDF "{0}" method "{1}" must not return void.
+FunctionTree.not_public = UDF "{0}" method "{1}" must be public.
+FunctionTree.not_static = UDF "{0}" method "{1}" must be static.
+FunctionTree.no_class = Could not load UDF "{0}", since its invocation class "{1}" could not be found.
+FunctionTree.no_method = UDF "{0}" could not loaded, since no method on class "{1}" with name "{2}" has a matching type signature.
+ERR.015.001.0048 = Unable to represent average value from {0} / {1}
+ERR.015.001.0050 = Unable to compute aggregate function {0} on data of type {1}
+ERR.015.001.0052 = {0} must be non-null.
+ERR.015.001.0053 = Method parameter must be non-null.
+ERR.015.001.0054 = Type is unknown: {0}
+ERR.015.001.0055 = {0} exceeds maximum length of {1}
+ERR.015.001.0056 = {0} has invalid first character: {1}
+ERR.015.001.0057 = {0} has invalid character: {1}
+ERR.015.001.0058 = {0} cannot end with a ''.''
+ERR.015.001.0061 = <start> value of {0} is invalid, which should never be less than zero or bigger than the length of original string {1}
+ERR.015.001.0062 = <length> value of {0} is invalid, which should never less be than zero.
+ERR.015.001.0063 = Input String is an empty string but start value or/and length value is bigger than zero.
+ERR.015.001.0066 = Unknown type signature for evaluating function of: {0} ({1})
+ERR.015.001.0069 = Unknown type signature for evaluating function of: {0} ({1})
+
+# mapping (002)
+ERR.015.002.0009 = Search direction arg ''{0}'' is not one of the search constants defined in MappingNodeConstants.
+ERR.015.002.0010 = Value for property ''{0}'' is null.
+ERR.015.002.0011 = Invalid type: {0}
+
+
+# parser (005)
+QueryParser.emptysql=Parser cannot parse an empty sql statement.
+QueryParser.parsingError=Parsing error: {0}
+QueryParser.nullSqlCrit=Parser cannot parse a null sql criteria.
+QueryParser.lexicalError= Lexical error: {0}
+QueryParser.nullSqlExpr= Parser cannot parse a null sql expression.
+QueryParser.xqueryCompilation= Direct usage of XQuery is no longer supported, use XMLQUERY instead.
+
+# processor (006)
+ERR.015.006.0010= Unknown criteria type: {0}
+ERR.015.006.0011= Unable to evaluate {0} expression of {1}
+ERR.015.006.0012= Unknown compare criteria operator: {0}
+ERR.015.006.0014= Failed to create regular expression from match pattern: {0}. {1}
+ERR.015.006.0015= Unable to evaluate expression of {0}
+ERR.015.006.0016= Unknown expression type: {0}
+ERR.015.006.0033= Unable to evaluate {0}: {1}
+ERR.015.006.0055= Unable to evaluate LOOKUP function.
+ERR.015.006.0057= Unknown subquery comparison predicate quantifier: {0}
+ERR.015.006.0058= The command of this scalar subquery returned more than one value: {0}
+
+# resolver (008)
+ERR.015.008.0003= Only one XML document may be specified in the FROM clause of a query.
+ERR.015.008.0007= Incorrect number of parameters specified on the stored procedure {2} - expected {0} but got {1}
+ERR.015.008.0009= {1} is not allowed on the view {0}: a procedure must be defined to handle the {1}.
+ERR.015.008.0010= INSERT statement must have the same number of elements and values specified.  This statement has {0} elements and {1} values.
+ERR.015.008.0011= Error parsing query plan transformation for {0}
+ERR.015.008.0012= Unable to resolve update procedure as the virtual group context is ambiguous.
+ERR.015.008.0013= Error parsing query plan transformation for {0}
+ERR.015.008.0015= Unknown statement type: {0}
+ERR.015.008.0019= Unable to resolve element: {0}
+ERR.015.008.0020= Element is ambiguous and must be qualified: {0}
+ERR.015.008.0022= Failed parsing reference binding: {0}
+ERR.015.008.0025= Binding reference cannot be a function: {0}
+ERR.015.008.0026= Expression ''{0}'' has a parameter with non-determinable type information.  The use of an explicit convert may be necessary.
+ERR.015.008.0027= The expressions in this criteria are being compared but are of differing types ({0} and {1}) and no implicit conversion is available:  {2}
+ERR.015.008.0029= This criteria must have string or CLOB expressions on each side: {0}
+ERR.015.008.0030= Type cannot be null for expression: {0}
+ERR.015.008.0031= This criteria must have values only of the same type as the left expression: {0}
+ERR.015.008.0032= There must be exactly one projected symbol of the subquery: {0}
+ERR.015.008.0033= The left expression must have a type convertible to the type of the subquery projected symbol: {0}
+ERR.015.008.0035= Type was null for {0} in function {1}
+ERR.015.008.0036= The function ''{0}'' has more than one possible signature.
+ERR.015.008.0037= The conversion from {0} to {1} is not allowed.
+ERR.015.008.0039= The function ''{0}'' is an unknown form.  Check that the function name and number of arguments is correct.
+ERR.015.008.0040= The function ''{0}'' is a valid function form, but the arguments do not match a known type signature and cannot be converted using implicit type conversions.
+ERR.015.008.0041= Expected value of type ''{0}'' but ''{1}'' is of type ''{2}'' and no implicit conversion is available.
+ERR.015.008.0042= Element ''{0}'' in ORDER BY is ambiguous and may refer to more than one element of SELECT clause.
+ERR.015.008.0043= Element ''{0}'' in ORDER BY was not found in SELECT clause.
+ERR.015.008.0045= Failed parsing insert plan for {0}
+ERR.015.008.0046= The symbol {0} may only be used once in the FROM clause.
+ERR.015.008.0047= The symbol {0} refers to a group not defined in the FROM clause.
+ERR.015.008.0049= Bindings must be specified
+ERR.015.008.0051= Symbol {0} is specified with an unknown group context
+ERR.015.008.0053= Element "{0}" is ambiguous, it exists in two or more groups.
+ERR.015.008.0054= Element "{0}" is not defined by any relevant group.
+ERR.015.008.0055= Group specified is ambiguous, resubmit the query by fully qualifying the group name
+ambiguous_procedure= Procedure ''{0}'' is ambiguous, use the fully qualified name instead
+ERR.015.008.0056= Group does not exist
+ERR.015.008.0061= Unable to resolve stored procedure {0} the datatype for the parameter {1} is not specified.
+ERR.015.008.0062= Unable to resolve return element referred to by LOOKUP function: {0}
+ERR.015.008.0063= The first three arguments for the LOOKUP function must be specified as constants.
+ERR.015.008.0065= Group {0} is not allowed in LOOKUP function.
+ERR.015.008.0068= Could not find a common type to which all {0} expressions can be implicitly converted: {1}
+ERR.015.008.0070= Aliased Select Symbols are not valid in XML Queries.
+XMLQueryResolver.no_expressions_in_select=Expressions cannot be selected by XML Queries
+
+# sql (010)
+ERR.015.010.0001= Invalid compare operator: {0}
+ERR.015.010.0002= Invalid logical operator: {0}
+ERR.015.010.0003= Cannot set null collection of elements on GroupBy
+ERR.015.010.0006= Invalid parameter type [{0}] must be IN, OUT, INOUT, RETURN_VALUE, RESULT_SET
+ERR.015.010.0009= No columns exist.
+ERR.015.010.0010= Invalid column index: {0}
+ERR.015.010.0011= Parameter cannot be null
+ERR.015.010.0014= Constant type should never be null
+ERR.015.010.0015= Unknown constant type: {0}
+ERR.015.010.0016= A group symbol may not resolve to a null metadata ID.
+ERR.015.010.0017= The name of a symbol may not be null.
+ERR.015.010.0018= Inconsistent number of elements in transformation projected symbols and virtual group.
+ERR.015.010.0021= Elements cannot be null
+ERR.015.010.0022= Functions cannot be null
+ERR.015.010.0023= Groups cannot be null
+ERR.015.010.0029= Cannot create AliasSymbol wrapping AliasSymbol
+ERR.015.010.0031= Illegal variable name ''{1}''.  Variable names can only be prefixed with the special group name ''{0}''.
+ERR.015.010.0032= Variable {0} was previously declared.
+ERR.015.010.0035= The <expression> cannot be null in CASE <expression>
+ERR.015.010.0036= There must be at least one WHEN expression and one THEN expression. The number of WHEN and THEN expressions must be equal.
+ERR.015.010.0037= The WHEN part of the CASE expression must contain an expression.
+ERR.015.010.0038= The THEN part of the CASE expression must contain an expression
+ERR.015.010.0039= The WHEN part of the searched CASE expression must contain a criteria.
+
+# util (011)
+
+# validator (012)
+ERR.015.012.0001 = The updatable view query must be simple (containing a FROM clause and not using SELECT INTO) or a UNION ALL of simple queries.
+ERR.015.012.0002 = The updatable view query has a WITH clause, pass-through processing will not be used for UPDATE/DELETE operations.
+ERR.015.012.0003 = The updatable view query projects a column from a non-updatable group {0}.
+ERR.015.012.0004 = The updatable view query has a non key preserving group {0}, which cannot be targeted by INSERT/UPDATE/DELETE operations.
+ERR.015.012.0005 = The updatable view has no valid target for UPDATEs.
+ERR.015.012.0006 = The updatable view query must not use aggregates or grouping.
+ERR.015.012.0007 = The updatable view query has a non-updatable expression {0} for view column {1}.
+ERR.015.012.0008 = The updatable view query cannot use SELECT DISTINCT.
+ERR.015.012.0009 = The updatable view query has a join, pass-through processing will not be used for UPDATE/DELETE operations.
+ERR.015.012.0010 = The updatable view query does not project the column {0}, which is required to make {1} a target of INSERT operations.
+ERR.015.012.0011 = There must be exactly one projected symbol in the subcommand of an IN clause.
+ERR.015.012.0012 = An AssignmentStatement cannot change the value of a {0} or {1} variable.
+ERR.015.012.0013 = The query defining an updatable virtual group cannot use LIMIT.
+ERR.015.012.0014 = The non-simple query defining an updatable view does not have a valid key preserving delete target.
+ERR.015.012.0015 = The query defining an updatable view has no valid target for INSERTs.
+ERR.015.012.0016 = Variable {0} not assigned any value in this procedure.
+ERR.015.012.0017 = Variables declared the procedure''s DeclareStatement cannot be one of the special variables: {0}, {1} and {2}.
+ERR.015.012.0018 = Inherent INSERT is not possible on a view defined by a UNION.
+ERR.015.012.0019 = Translate/HasCriteria cannot be used in a non-update procedure.
+ERR.015.012.0021 = Element being translated in the WITH clause not among the elements on the ON clause of the TranslateCriteria.
+ERR.015.012.0022 = Unable to translate criteria on the update command against the virtual group, the element {0} is mapped to an aggregate symbol in the virtual group''s query transform, and cannot be translated.
+ERR.015.012.0023 = Unable to translate criteria on the update command against the virtual group, the element {0} is mapped to an expression whose elements are not present on the command in the procedure using the translated criteria.
+ERR.015.012.0024 = The following data elements are not supported in the SELECT clause: {0}.
+ERR.015.012.0025 = Command must project at least one symbol
+ERR.015.012.0026 = Expressions of type OBJECT, CLOB, BLOB, or XML cannot be used in SELECT DISTINCT, ORDER BY, GROUP BY, KEYS, or non-all set queries: [{0}]
+ERR.015.012.0027 = Expressions of type OBJECT, CLOB, BLOB, or XML cannot be used in comparison: {0}.
+ValidationVisitor.expression_requires_name = Non-column expressions require a name in XMLATTRIBUTES, XMLFOREST, QUERYSTRING, or TEXTAGG with HEADER
+ValidationVisitor.invalid_lookup_key=Expressions of type OBJECT, CLOB, BLOB, or XML cannot be used as LOOKUP key columns: {0}.
+ValidationVisitor.limit_not_valid_for_xml=The limit clause cannot be used on an XML document query.
+ValidationVisitor.union_insert = Select into is not allowed under a set operation: {0}.
+ValidationVisitor.multisource_insert = A multi-source table, {0}, cannot be used in an INSERT with query expression or SELECT INTO statement.
+ValidationVisitor.invalid_encoding = Invalid encoding: {0}.
+ValidationVisitor.nonUpdatable = The specified change set {0} against an inherently updatable view does not map to a key preserving group.
+ValidationVisitor.insert_qe_partition = Inserts with query expressions cannot be performed against a partitioned UNION view {0}.
+ValidationVisitor.insert_no_partition = Could not determine INSERT target for a partitioned UNION view {0} with values {1}.
+ValidationVisitor.multisource_constant = The multisource column or parameter {0} requires a literal value.
+ERR.015.012.0029 = INSERT, UPDATE, and DELETE not allowed on XML documents
+ERR.015.012.0030 = Commands used in stored procedure language not allowed on XML documents
+ERR.015.012.0031 = Queries against XML documents can not have a GROUP By clause
+ERR.015.012.0032 = Queries against XML documents can not have a HAVING clause
+ERR.015.012.0033 = Metadata does not allow updates on the group: {0}
+ERR.015.012.0034 = Queries involving UNIONs, INTERSECTs and EXCEPTs not allowed on XML documents
+ERR.015.012.0035 = Queries combined with the set operator {0} must have the same number of output elements.
+ERR.015.012.0037 = Invalid symbol: {0}. When an aggregate function is used in the SELECT clause and no GROUP BY clause is specified, the SELECT clause may contain only aggregate functions and constants.
+ERR.015.012.0038 = Invalid symbol: {0}. When a GROUP BY clause is used, all elements in the SELECT clause must be declared in the GROUP BY clause.
+ERR.015.012.0039 = Nested aggregate expressions are not allowed: {0}
+ERR.015.012.0041 = The aggregate function {0} cannot be used with non-numeric expressions: {1}
+AggregateValidationVisitor.non_comparable = The aggregate function {0} cannot be used with non-comparable expressions: {1}
+AggregateValidationVisitor.non_xml = The XMLAGG aggregate function {0} requires an expression of type XML: {1}
+AggregateValidationVisitor.non_boolean=The boolean aggregate functions ANY, SOME, EVERY require a boolean expression.
+AggregateValidationVisitor.invalid_distinct=The enhanced numeric aggregate functions STDDEV_POP, STDDEV_SAMP, VAR_POP, VAR_SAMP cannot have DISTINCT specified.
+ERR.015.012.0052 = The element [{0}] is in an INSERT but does not support updates.
+ERR.015.012.0053 = Element in the group {0}, for which value is not specified in the insert command is neither nullable nor has a default value: {1}
+ERR.015.012.0054 = Column variables do not reference columns on group "{0}": {1}
+ERR.015.012.0055 = Element {0} does not allow nulls.
+ERR.015.012.0059 = Left side of update expression must be an element that supports update: {0}
+ERR.015.012.0060 = Element {0} does not allow nulls.
+ERR.015.012.0061 = Views using update procedures must have update values that are constant expressions.  The expression ''{0}'' cannot be evaluated to a constant.
+ERR.015.012.0062 = Elements cannot appear more than once in a SET or USING clause.  The following elements are duplicated: {0}
+ERR.015.012.0063 = Multiple failures occurred during validation:
+ERR.015.012.0064 = Validation succeeded
+ERR.015.012.0065 = Nested Loop can not use the same cursor name as that of its parent.
+ERR.015.012.0067 = No scalar subqueries are allowed in the SELECT with no FROM clause.
+ERR.015.012.0069 = INTO clause can not be used in XML query.
+
+# optimizer (004)
+ERR.015.004.0007= Can''t convert plan node of type {0}
+ERR.015.004.0009= Error finding connectorBindingID for command
+ERR.015.004.0010= Unknown group specified in OPTION MAKEDEP/MAKENOTDEP: {0}
+ERR.015.004.0012= Group has an access pattern which has not been met: group(s) {0}; access pattern(s) {1}
+ERR.015.004.0020= Error getting model for {0}
+ERR.015.004.0023= Error rewriting criteria: {0}
+ERR.015.004.0024= Unable to create a query plan that sends a criteria to \"{0}\".  This connection factory requires criteria set to true indicating that a query against this model requires criteria.  
+ERR.015.004.0029= Could not resolve group symbol {0}
+ERR.015.004.0035= The criteria {0} has elements from the root staging table and the document nodes which is not allowed.
+ERR.015.004.0037= No mapping node found named, ''{0}', in use of ''context''
+ERR.015.004.0046= The XML document element(s) {0} are not mapped to data and cannot be used in the criteria \"{1}\".
+ERR.015.004.0054= Could not parse query transformation for {0}: {1}
+ERR.015.004.0068= Context functions within the same conjunct refer to different contexts: {0}
+
+# processor (006)
+ERR.015.006.0001= XMLPlan toString couldn''t print entire Program.
+ERR.015.006.0034= Unexpected symbol type while updating tuple: {0}
+ERR.015.006.0037= Tuple source does not exist: {0}
+ERR.015.006.0039= Instructed to abort processing when recursion limit reached.
+ERR.015.006.0042= No xml schema to validate document against
+ERR.015.006.0048= Fatal Error: {0}
+ERR.015.006.0049= Error: {0}
+ERR.015.006.0051= Invalid direction for MoveDocInstruction: {0}
+ERR.015.006.0054= Instructed to abort processing as default of choice.
+
+# rewriter (009)
+ERR.015.009.0001= Error evaluating criteria: {0}
+ERR.015.009.0002= Error translating criteria on the user''s command, the criteria translated to {0} is not valid
+ERR.015.009.0003= Error simplifying mathematical expression: {0}
+
+
+SQLParser.Unknown_join_type=Unknown join type: {0}
+SQLParser.Aggregate_only_top_level=Aggregate expressions are allowed only as top level functions in the SELECT and HAVING clauses.
+SQLParser.Unknown_agg_func=Unknown aggregate function: {0}
+SQLParser.Invalid_func=Invalid function name: [{0}]
+SQLParser.Integer_parse=Unable to parse integer literal: {0}
+SQLParser.Float_parse=Unable to parse floating point literal: {0}
+SQLParser.Invalid_id=Invalid metadata ID format: [{0}]
+SQLParser.Invalid_alias=Invalid alias format: [{0}]
+SQLParser.Invalid_short_name=Invalid simple identifier format: [{0}]
+SQLParser.Invalid_char={0} value must be a single character: [{1}].
+SQLParser.expected_non_reserved=Expected non-reserved word {0}, but was {1}.
+SystemSource.array_length_desc=Get the length of the given array value
+SystemSource.array_param1=Array
+SystemSource.array_length_result=The array length
+SystemSource.array_get_desc=Get the object value at the given array index
+SystemSource.array_get_param2=Array index
+SystemSource.array_get_result=The object value
+SystemSource.Add_desc=Converts escape sequences in the given string to their actual characters. 
+SystemSource.unescape_param1=String to be unescaped
+SystemSource.unescape_result=Unescaped string
+SystemSource.Add_desc=Add two numbers
+SystemSource.Add_result_desc=Left operand + right operand
+SystemSource.Subtract_desc=Subtract two numbers
+SystemSource.Subtract_result_desc=Left operand - right operand
+SystemSource.Multiply_desc=Multiply two numbers
+SystemSource.Multiply_result_desc=Left operand * right operand
+SystemSource.Divide_desc=Divide two numbers
+SystemSource.Divide_result_desc=Left operand / right operand
+SystemSource.Ceiling_desc=Ceiling of number
+SystemSource.Exp_desc=e^number
+SystemSource.Floor_desc=Floor of number
+SystemSource.Log_desc=Log (base e) of number
+SystemSource.Log10_desc=Log (base 10) of number
+SystemSource.Acos_desc=Arccosine of number
+SystemSource.Asin_desc=Arcsine of number
+SystemSource.Atan_desc=Arctan of number
+SystemSource.Atan2_desc=Arctan of number1 / number2
+SystemSource.Cos_desc=Cosine of number
+SystemSource.Cot_desc=Cotangent of number
+SystemSource.Degrees_desc=Convert from radians to degrees
+SystemSource.Pi_desc=Constant value for pi
+SystemSource.Radians_desc=Convert from degrees to radians
+SystemSource.Sin_desc=Sine of number
+SystemSource.Tan_desc=Tangent of number
+SystemSource.Bitand_desc=Bitwise AND of two integers
+SystemSource.Bitand_result_desc=integer1 AND integer2
+SystemSource.Bitor_desc=Bitwise inclusive OR of two integers
+SystemSource.Bitor_result_desc=integer1 OR integer2
+SystemSource.Bitxor_desc=Bitwise exclusive OR (XOR) of two integers
+SystemSource.Bitxor_result_desc=integer1 XOR integer2
+SystemSource.Bitnot_desc=Bitwise inversion (NOT) of a 32-bit integer. Equivalent to XOR(integer, 0xFFFFFFFF)
+SystemSource.Bitnot_result_desc=32-bit inverted integer
+SystemSource.Curdate_desc=Current date
+SystemSource.Curtime_desc=Current time
+SystemSource.Now_desc=Current timestamp
+SystemSource.Dayname_result_d_desc=Day name for date
+SystemSource.Dayname_result_ts_desc=Day name for timestamp
+SystemSource.Dayofmonth_result_d_desc=Day of month for date (1 = 1st)
+SystemSource.Dayofmonth_result_ts_desc=Day of month for timestamp (1 = 1st)
+SystemSource.Dayofweek_result_d_desc=Day of week for date (1 = Sunday)
+SystemSource.Dayofweek_result_ts_desc=Day of week for timestamp (1 = Sunday)
+SystemSource.Dayofyear_result_d_desc=Day of year for date (1 = Jan 1st)
+SystemSource.Dayofyear_result_ts_desc=Day of year for timestamp (1 = Jan 1st)
+SystemSource.Month_result_d_desc=Month for date (1 = January)
+SystemSource.Month_result_ts_desc=Month for timestamp (1 = January)
+SystemSource.Monthname_result_d_desc=Month name for date
+SystemSource.Monthname_result_ts_desc=Month name for timestamp
+SystemSource.Week_result_d_desc=Week of year for date
+SystemSource.Week_result_ts_desc=Week of year for timestamp
+SystemSource.Year_result_d_desc=Year for date
+SystemSource.Year_result_ts_desc=Year for timestamp
+SystemSource.Hour_result_t_desc=Hour for time
+SystemSource.Hour_result_ts_desc=Hour for timestamp
+SystemSource.Minute_result_t_desc=Minute for time
+SystemSource.Minute_result_ts_desc=Minute for timestamp
+SystemSource.Second_result_t_desc=Second for time
+SystemSource.Second_result_ts_desc=Second for timestamp
+SystemSource.Quarter_result_d_desc=Quarter for date (1=Jan/Feb/Mar)
+SystemSource.Quarter_result_ts_desc=Quarter for timestamp (1=Jan/Feb/Mar)
+SystemSource.Length_result=Length of string
+SystemSource.Ucase_result=Upper case of string
+SystemSource.Lcase_result=Lower case of string
+SystemSource.Lower_result=Lower case of string
+SystemSource.Upper_result=Upper case of string
+SystemSource.UcaseClob_result=Upper case of clob
+SystemSource.LcaseClob_result=Lower case of clob
+SystemSource.LowerClob_result=Lower case of clob
+SystemSource.UpperClob_result=Upper case of clob
+SystemSource.Left_result=Left trimmed string
+SystemSource.Right_result=Right trimmed string
+SystemSource.Formattime_desc=Convert to string
+SystemSource.Formattime_result_desc=Converted time
+SystemSource.Formatdate_desc=Convert to string
+SystemSource.Formatdate_result_desc=Converted date
+SystemSource.Formattimestamp_desc=Convert to string
+SystemSource.Formattimestamp_result_desc=Converted timestamp
+SystemSource.Parsetime_desc=Convert string to time
+SystemSource.Parsetime_result_desc=Time converted
+SystemSource.Parsedate_desc=Convert string to date
+SystemSource.Parsedate_result_desc=Date converted
+SystemSource.Parsetimestamp_desc=Convert string to timestamp
+SystemSource.Parsetimestamp_result_desc=Timestamp converted
+SystemSource.Formatinteger_desc=Convert to Integer
+SystemSource.Formatinteger_result_desc=Integer formatted
+SystemSource.Formatlong_desc=Convert to Long
+SystemSource.Formatlong_result_desc=Long formatted
+SystemSource.Formatdouble_desc=Convert to Double
+SystemSource.Formatdouble_result_desc=Double formatted
+SystemSource.Formatfloat_desc=Convert to Float
+SystemSource.Formatfloat_result_desc=Float formatted
+SystemSource.Formatbiginteger_desc=Convert to Big integer
+SystemSource.Formatbiginteger_result_desc=Big integer formatted
+SystemSource.Formatbigdecimal_desc=Convert to Big decimal
+SystemSource.Formatbigdecimal_result_desc=Big decimal formatted
+SystemSource.Parseinteger_desc=Parse to Integer
+SystemSource.Parseinteger_result_desc=Integer parsed
+SystemSource.Parselong_desc=Parse to Long
+SystemSource.Parselong_result_desc=Long parsed
+SystemSource.Parsedouble_desc=Parse to Double
+SystemSource.Parsedouble_result_desc=Double parsed
+SystemSource.Parsefloat_desc=Parse to Float
+SystemSource.Parsefloat_result_desc=Float parsed
+SystemSource.Parsebiginteger_desc=Parse to Biginteger
+SystemSource.Parsebiginteger_result_desc=Biginteger parsed
+SystemSource.Parsebigdecimal_desc=parse to Bigdecimal
+SystemSource.Parsebigdecimal_result_desc=Bigdecimal parsed
+SystemSource.Arith_left_op=Left operand
+SystemSource.Arith_right_op=Right operand
+SystemSource.Abs_desc=Absolute value of number
+SystemSource.Abs_arg=Number
+SystemSource.Abs_result_desc=Absolute value of number
+SystemSource.Rand_desc=Random Number
+SystemSource.Rand_arg=Number
+SystemSource.Rand_result_desc=Generated Random Number
+SystemSource.uuid_desc=UUID
+SystemSource.uuid_result_desc=type 4 UUID
+SystemSource.Double_arg2=Number
+SystemSource.Atan_arg1=Number parameter1 
+SystemSource.Atan_arg2=Number parameter2 
+SystemSource.Mod_desc=Modulus of two numbers
+SystemSource.Mod_result_desc=Left operand mod right operand
+SystemSource.Power_desc=Raise base to power
+SystemSource.Power_arg1=Base
+SystemSource.Power_arg2=Power
+SystemSource.Power_result_desc=Base ^ Power
+SystemSource.Round_desc=Round number to specified places
+SystemSource.Round_arg1=Numbers
+SystemSource.Round_arg2=Places
+SystemSource.Round_result_desc=Number rounded to specified places
+SystemSource.Sign_desc=Sign of number: 1 if number>0, 0 if number==0, -1 if number<0
+SystemSource.Sign_arg1=Number
+SystemSource.Sign_result_desc=Sign of number
+SystemSource.Sqrt_desc=Square root of number
+SystemSource.Sqrt_arg1=Number
+SystemSource.Sqrt_result_desc=Square root of number
+SystemSource.Timestampadd_d_desc=Add count number of interval type to date
+SystemSource.Timestampadd_d_arg1=Interval type
+SystemSource.Timestampadd_d_arg2=Count number
+SystemSource.Timestampadd_d_arg3=Date type
+SystemSource.Timestampadd_d_result_desc=Returned modified date
+SystemSource.Timestampadd_t_desc=Add count number of interval type to time
+SystemSource.Timestampadd_t_arg1=Interval type
+SystemSource.Timestampadd_t_arg2=Count number
+SystemSource.Timestampadd_t_arg3=Time type
+SystemSource.Timestampadd_t_result_desc=Returned modified time
+SystemSource.Timestampadd_ts_desc=Add count number of interval type to timestamp
+SystemSource.Timestampadd_ts_arg1=Interval type
+SystemSource.Timestampadd_ts_arg2=Count number
+SystemSource.Timestampadd_ts_arg3=Timestamp type
+SystemSource.Timestampadd_ts_result=Returned modified timestamp
+SystemSource.Timestampdiff_ts_desc=Calculate estimated number of intervals between start and end timestamp
+SystemSource.Timestampdiff_ts_arg1=Interval type
+SystemSource.Timestampdiff_ts_arg2=Start timestamp
+SystemSource.Timestampdiff_ts_arg3=End timestamp
+SystemSource.Timestampdiff_ts_result_desc=Returns estimated number of intervals between start and end timestamp
+SystemSource.TimestampCreate_desc=Create timestamp from a date and a time
+SystemSource.TimestampCreate_arg1=Date
+SystemSource.TimestampCreate_arg2=Time
+SystemSource.TimestampCreate_result_desc=Timestamp built from date and time
+SystemSource.Stringfunc_arg1=String
+SystemSource.Clobfunc_arg1=Clob
+SystemSource.Concat_desc=Concatenate left and right strings
+SystemSource.Concat_arg1=Left string
+SystemSource.Concat_arg2=Right string
+SystemSource.Concat_result_desc=Concatenated strings
+SystemSource.Concatop_desc=Concatenate left and right strings
+SystemSource.Concatop_arg1=Left string
+SystemSource.Concatop_arg2=Right string
+SystemSource.Concatop_result_desc=Concatenated strings
+SystemSource.Substring_desc=Substring of string, starting at index, of length
+SystemSource.Substring_arg1=String
+SystemSource.Substring_arg2=Starting index
+SystemSource.Substring_arg3=Length of substring
+SystemSource.Substring_result=Substring
+SystemSource.Susbstring2_desc=Substring of string, starting at index, to end of string
+SystemSource.Substring2_arg1=String
+SystemSource.Substring2_arg2=Starting index
+SystemSource.Substring2_result=Substring
+SystemSource.Left_desc=First length characters of string
+SystemSource.Left_arg1=String
+SystemSource.Left_arg2=Length of substring
+SystemSource.Left2_result=First length characters of string
+SystemSource.Right_desc=Last length characters of string
+SystemSource.Right_arg1=String
+SystemSource.Right_arg2=Length of substring
+SystemSource.Right2_result=Last length characters of string
+SystemSource.Locate_desc=Find index of substring in string starting at index
+SystemSource.Locate_arg1=Substring to find
+SystemSource.Locate_arg2=String
+SystemSource.Locate_arg3=Starting index
+SystemSource.Locate_result=Index of substring or -1 if not found
+SystemSource.Locate2_desc=Find index of substring in string
+SystemSource.Locate2_arg1=Substring to find
+SystemSource.Locate2_arg2=String
+SystemSource.Locate2_result=Index of substring or -1 if not found
+SystemSource.Replace_desc=Replace any substring in string with replacement
+SystemSource.Replace_arg1=String
+SystemSource.Replace_arg2=Substring to match
+SystemSource.Replace_arg3=Replacement string
+SystemSource.Replace_result=String with replacements
+SystemSource.Repeat_desc=Repeat string with count times
+SystemSource.Repeat_arg1=String
+SystemSource.Repeat_arg2=Count times to repeat
+SystemSource.Repeat_result=String repeated with count times
+SystemSource.Space_desc=Repeat space count times
+SystemSource.Space_arg1=Number of times to repeat
+SystemSource.Space_result=Space repeated count times
+SystemSource.Insert_desc=Insert string2 into string1 by deleting length characters at start and inserting string2
+SystemSource.Insert_arg1=Initial string
+SystemSource.Insert_arg2=Starting position
+SystemSource.Insert_arg3=Number of characters to delete at start
+SystemSource.Insert_arg4=String to insert
+SystemSource.Insert_result=Inserted string
+SystemSource.Ascii_desc=Takes a character and returns the ASCII or unicode integer representation
+SystemSource.Ascii_arg1=String
+SystemSource.Ascii_result=Character value
+SystemSource.Ascii2_desc=Takes a character and returns the ASCII or unicode integer representation
+SystemSource.Ascii2_arg1=Character
+SystemSource.Ascii2_result=Character value
+SystemSource.Chr_desc=Takes a unicode or ASCII value and returns the character representation
+SystemSource.Chr_arg1=Code value
+SystemSource.Chr_result=Character representation
+SystemSource.Char_desc=Takes a unicode or ASCII value and returns the character representation
+SystemSource.Char_arg1=Code value
+SystemSource.Char_result=Character representation
+SystemSource.Initcap_desc=Capitalizes each word (each letter after whitespace)
+SystemSource.Initcap_arg1=Input string
+SystemSource.Initcap_result=Result string
+SystemSource.Lpad_desc=Pad the input string on the left to length
+SystemSource.Lpad_arg1=String
+SystemSource.Lpad_arg2=Padded length
+SystemSource.Lpad_result=Padded string
+SystemSource.Lpad3_desc=Pad the input string on the left to length with pad character
+SystemSource.Lpad3_arg1=String
+SystemSource.Lpad3_arg2=Padded length
+SystemSource.Lpad3_arg3=Pad character
+SystemSource.Lpad3_result=Padded string
+SystemSource.Rpad1_desc=Pad the input string on the right to length
+SystemSource.Rpad1_arg1=String
+SystemSource.Rpad1_arg2=Padded length
+SystemSource.Rpad1_result=Padded string
+SystemSource.Rpad3_desc=Pad the input string on the right to length with pad character
+SystemSource.Rpad3_arg1=String
+SystemSource.Rpad3_arg2=Padded length
+SystemSource.Rpad3_arg3=Pad character
+SystemSource.Rpad3_result=Padded string
+SystemSource.Translate_desc=Translate the input string by converting characters in the source string to characters in the destination string
+SystemSource.Translate_arg1=String
+SystemSource.Translate_arg2=Source string
+SystemSource.Translate_arg3=Destination string
+SystemSource.Translate_result=Translated string
+SystemSource.Convert_arg1=Source value
+SystemSource.Convert_arg2=Target type
+SystemSource.Convert_result=Converted value
+SystemSource.Context_desc=Evaluate XML expression in the context of a different mapping level
+SystemSource.Context_arg1=XML context tag
+SystemSource.Context_arg2=XML element
+SystemSource.Context_result=Expression in higher context
+SystemSource.Rowlimit_desc=Limit the number of rows from an XML mapping class
+SystemSource.RowlimitException_desc=Limit the number of rows from an XML mapping class, throw Exception if passed
+SystemSource.Rowlimit_arg1=XML tag in the scope of a mapping class
+SystemSource.Rowlimit_result=Number of rows to be limited to
+SystemSource.Decode1_desc=Map the input value to a comma-separated list of allowed output values
+SystemSource.Decode1_arg1=Input column for decode
+SystemSource.Decode1_arg2=The comma delimited String that represents the mapping between input column value and output values.
+SystemSource.Decode1_result=The decoded value from the decode string.
+SystemSource.Decode2_desc=Map the input value to a delimiter-separated list of allowed output values
+SystemSource.Decode2_arg1=Input column for decode
+SystemSource.Decode2_arg2=The comma delimited String that represents the mapping between input column value and output values.
+SystemSource.Decode2_arg3=Decode String delimiter character(s)
+SystemSource.Decode2_result=The decoded value from the decode string.
+SystemSource.Lookup_desc=Look up a value in a cached code table
+SystemSource.Lookup_arg1=Full group name of code table
+SystemSource.Lookup_arg2=Short name of return element in code table
+SystemSource.Lookup_arg3=Short name of key element in code table
+SystemSource.Lookup_arg4=Key value to lookup
+SystemSource.Lookup_result=Return value for key as specified in code table
+SystemSource.User_desc=Get current user name 
+SystemSource.User_result=Return user name
+SystemSource.current_database_desc=Get current database name
+current_database_result=Returns the catalog name
+SystemSource.Env_desc=Get the value of an environment variable 
+SystemSource.Env_varname=Name of the environment variable
+SystemSource.Env_result=Return the string value of the environment variable
+SystemSource.Nvl_desc=Specifies a value to use instead if the input value is null
+SystemSource.Nvl_arg1=Value to check
+SystemSource.Nvl_arg2=Returned if value is null
+SystemSource.Nvl_result=Value or valueIfNull if value is null
+SystemSource.Ifnull_desc=Specifies a value to use instead if the input value is null
+SystemSource.Ifnull_arg1=Value to check
+SystemSource.Ifnull_arg2=Returned if value is null
+SystemSource.Ifnull_result=Value or valueIfNull if value is null
+SystemSource.Formattime_arg1=Time input
+SystemSource.Formattime_arg2=Time format
+SystemSource.Formatdate_arg1=Date input
+SystemSource.Formatdate_arg2=Date format
+SystemSource.Formattimestamp_arg1=Timestamp input
+SystemSource.Formattimestamp_arg2=Timestamp format
+SystemSource.Parsetime_arg1=String input
+SystemSource.Parsetime_arg2=Time format
+SystemSource.Parsedate_arg1=String input
+SystemSource.Parsedate_arg2=Date format
+SystemSource.Parsetimestamp_arg1=String input
+SystemSource.Parsetimestamp_arg2=Timestamp format
+SystemSource.Formatnumber_arg1=String input
+SystemSource.Formatnumber_arg2=Number format
+SystemSource.Parsenumber_arg1=String input
+SystemSource.Parsenumber_arg2=Parse format
+SystemSource.Bitfunc_arg1=Integer parameter
+SystemSource.Bitfunc2_arg1=First integer
+SystemSource.Bitfunc2_arg2=Second integer
+SystemSource.Convert_desc=Convert from {0} to target type
+SystemSource.xpathvalue_description=Retrieve the first match content for an XPath statement
+SystemSource.xpath_param1=Source document
+SystemSource.xpath_param2=XPath expression
+SystemSource.xpathvalue_result=Single result
+SystemSource.xsltransform_description=Transform the document with the given stylesheet. 
+SystemSource.xsltransform_param1=Source document
+SystemSource.xsltransform_param2=XSL stylesheet
+SystemSource.xsltransform_result=Clob result
+SystemSource.xmlconcat_description=Concat XML types. 
+SystemSource.xmlconcat_param1=First element
+SystemSource.xmlcomment_description=Create an XML comment. 
+SystemSource.xmlconcat_param1=String comment
+SystemSource.xmlconcat_result=XML result
+SystemSource.xmlpi_description=Create an XML processing instruction. 
+SystemSource.xmlpi_param1=Target
+SystemSource.xmlpi_param2=Content
+SystemSource.xmlpi_result=XML result
+SystemSource.jsonToXml_description=Create an XML document representing the given JSON. 
+SystemSource.jsonToXml_param1=Root element name
+SystemSource.jsonToXml_param2=JSON
+SystemSource.jsonToXml_result=XML result
+SystemSource.modifyTimeZone_description=Modify the time zone of this timestamp by adding or subtracting time
+SystemSource.modifyTimeZone_param1=Timestamp
+SystemSource.modifyTimeZone_param2=Starting time zone
+SystemSource.modifyTimeZone_param3=Ending time zone
+SystemSource.modifyTimeZone_result=Original timestamp with time added or subtracted to give the equivalent time in a different time zone
+SystemSource.CommandPayload_desc0=Retrieve the command payload as a string
+SystemSource.CommandPayload_desc1=Retrieve a property from the command payload, passed as a Properties object
+SystemSource.CommandPayload_result=The property value from the command payload 
+SystemSource.CommandPayload_property=The property name
+SystemSource.hasRole_description=Determine if the caller has the given role
+SystemSource.hasRole_param1=Role type
+SystemSource.hasRole_param2=Role name
+SystemSource.hasRole_result=whether the caller is in the given role
+SystemSource.from_unixtime_description=Return the Unix timestamp (in seconds) as a Timestamp value 
+SystemSource.from_unixtime_param1=Unix timestamp (in seconds)
+SystemSource.from_unixtime_result=Timestamp value
+SystemSource.nullif_description=Equivalent to case when (param1 = param2) then null else param1 
+SystemSource.nullif_param1=First parameter
+SystemSource.nullif_result=null if the parameters are equivalent else param1
+SystemSource.coalesce_description=Returns the first non-null parameter
+SystemSource.coalesce_param1=parameter
+SystemSource.coalesce_result=The first non-null parameter
+SystemSource.encode_desc=Converts a Blob to the appropriate chars
+SystemSource.encode_arg1=Blob
+SystemSource.encode_arg2=char representation Clob
+SystemSource.encode_result=Clob char rep
+SystemSource.decode_desc=Converts a Clob to the appropriate bytes
+SystemSource.decode_arg1=Clob
+SystemSource.decode_arg2=The encoding
+SystemSource.decode_result=byte representation Blob
+SystemSource.session_id_desc=Returns the session id of the currently logged in user 
+SystemSource.session_id_result=Returns the session id of the currently logged in user
+TempMetadataAdapter.Element_____{0}_____not_found._1=Element ''{0}'' not found.
+TempMetadataAdapter.Group_____{0}_____not_found._1=Group ''{0}'' not found.
+ExpressionEvaluator.Must_push=Function {0} is marked in the function metadata as a function that must be evaluated at the source.
+ExpressionEvaluator.Eval_failed=Unable to evaluate {0}: {1}
+XMLSerialize.resolvingError=XMLSerialize is valid only for XML expressions: {0}
+Evaluator.xmlserialize=XMLSerialize: data exception - not an xml document
+Evaluator.xmlquery=Error evaluating XMLQuery: {0}
+ExecResolver.Param_convert_fail=Unable to convert procedural parameter of type {0} to expected type {1}
+ExecResolver.return_expected=Procedure {0} does not have a return value.
+ExecResolver.out_type_mismatch=OUT/RETURN parameter {0} with type {1} cannot be converted to {2}
+DynamicCommandResolver.SQL_String=Expected dynamic command sql to be of type STRING instead of type {0}.
+UnionQueryResolver.type_conversion=The Expression {0} used in a nested UNION ORDER BY clause cannot be implicitly converted from type {1} to type {2}.
+ValidationVisitor.select_into_no_implicit_conversion=There is no implicit conversion between the source element type ({0}) and the target element type ({1}) at position {2} of the query: {3}
+ValidationVisitor.excpet_intersect_all=EXCEPT ALL and INTERSECT ALL are currently unsupported
+ValidationVisitor.element_updates_not_allowed=Metadata does not allow updates on the element: {0}
+ValidationVisitor.invalid_batch_command=Only INSERT, UPDATE, DELETE, and SELECT ... INTO statements are allowed within a batch.
+ValidationVisitor.badoffset2=The row offset in the LIMIT clause must be >= 0
+ValidationVisitor.badlimit2=The row limit in the LIMIT clause must be >= 0
+ValidationVisitor.invalid_scalar_group_reference=Cannot reference a scalar group as a table: {0}
+ValidationVisitor.select_into_wrong_elements=Wrong number of elements being SELECTed INTO the target table. Expected {0} elements, but was {1}.
+SimpleQueryResolver.Query_was_redirected_to_Mat_table=The query against {0} was redirected to the materialization table {1}.
+SimpleQueryResolver.ambiguous_all_in_group=The symbol {0} refers to more than one group defined in the FROM clause.
+SimpleQueryResolver.Proc_Relational_Name_conflict=Cannot access procedure {0} using table semantics since the parameter and result set column names are not all unique.
+SimpleQueryResolver.duplicate_with=Duplicate WITH clause item name {0}
+SimpleQueryResolver.mismatched_with_columns=The number of WITH clause columns for item {0} do not match the query expression
+QueryResolver.invalid_xpath=Invalid xpath value: {0}
+ResolveVariablesVisitor.reserved_word_for_temporary_used=Cursor names cannot begin with "#" as that indicates the name of a temporary table: {0}.
+SimpleQueryResolver.materialized_table_not_used=The query against {0} did not use materialization table {1} due to the use of OPTION NOCACHE.
+SimpleQueryResolver.cache_hint_used=Loading materialized view {1} for view {0} using cache hint {2}.
+SimpleQueryResolver.procedure_cache_used=Procedure caching will be used for {0}.
+SimpleQueryResolver.procedure_cache_not_usable=Procedure caching will not be used for {0} since the result set cache is disabled or the results/parameters cannot be cached.
+SimpleQueryResolver.procedure_cache_not_used=Procedure caching will not be used for {0} due to the use of OPTION NOCACHE.
+ValidationVisitor.groupby_subquery=Expressions used in a GROUP BY cannot be constant and must not contain subqueries: "{0}".
+ValidationVisitor.Procedure_has_group_self_reference=Procedure cannot have a Group reference to itself.
+ExpressionEvaluator.Expected_props_for_payload_function=Unable to evaluate {0}: expected Properties for command payload but got object of type {1}
+ValidationVisitor.The_rowlimit_function_cannot_be_used_in_a_non-XML_command=The ''rowlimit'' and ''rowlimitexception'' functions cannot be used in a non-XML command
+ValidationVisitor.The_context_function_cannot_be_used_in_a_non-XML_command=The ''context'' function cannot be used in a non-XML command
+ValidationVisitor.0=The ''rowlimit'' and ''rowlimitexception'' functions cannot be nested within other functions.
+ValidationVisitor.1=The ''rowlimit'' and ''rowlimitexception'' functions operand must be a constant nonnegative integer.
+ValidationVisitor.2=The ''rowlimit'' and ''rowlimitexception'' functions arg must be an XML node symbol
+ValidationVisitor.3=''Rowlimit'' and ''rowlimitexception'' functions can only be used within a compare criteria which is entirely a single conjunct.
+ValidationVisitor.Context_function_nested=Context functions cannot be nested
+ERR.015.004.0036= First argument in ''context'' must be the name of a node in the XML document model.  Found Object {0} of Class {1}
+ExecResolver.invalid_named_params=Invalid param name(s): {0}.  Name(s) of params without explicit values: {1}  
+ExecResolver.duplicate_named_params=Duplicate named param ''{0}''
+ResolverUtil.required_param=Required parameter ''{0}'' has no value was set or is an invalid parameter.
+ResolverUtil.duplicateName=Cannot create group ''{0}'' with multiple columns named ''{1}''
+ResolverUtil.error_converting_value_type=Exception converting value {0} of type {1} to expected type {2}
+ResolverUtil.setquery_order_expression=ORDER BY expression ''{0}'' cannot be used with a set query.
+ResolverUtil.invalid_unrelated=Unrelated order by column {0} cannot be used in a SET query, with SELECT DISTINCT, or GROUP BY
+XMLQueryResolver.xml_only_valid_alone=If any symbol in SELECT clause is ''xml'' or group.''xml'' , then no other element is allowed.
+ResolveVariablesVisitor.datatype_for_the_expression_not_resolvable=The datatype for the expression was not resolvable.
+TempTableResolver.unqualified_name_required=Cannot create temporary table "{0}". Local temporary tables must be created with unqualified names.
+TempTableResolver.table_already_exists=Cannot create temporary table "{0}". A table with the same name already exists.
+ValidationVisitor.drop_of_nontemptable=Cannot drop a non temporary table "{0}".							
+ValidationVisitor.orderby_expression_xml=XML queries cannot order by an expression.
+ValidationVisitor.text_table_invalid_width=For a fixed width text table, all columns must have width set.
+ValidationVisitor.text_table_width=Fixed width text tables should not have DELIMITER, QUOTE, ESCAPE, or HEADER specified.
+ValidationVisitor.text_table_negative=Text table WIDTH, HEADER, or SKIP values must not be negative. 
+ValidationVisitor.text_table_delimiter=Text DELIMITER cannot be the same as the QUOTE or ESCAPE characters.
+ValidationVisitor.text_table_newline=Text DELIMITER, QUOTE, and ESCAPE characters cannot be the new line character.
+ValidationVisitor.xml_namespaces=At most only one NO DEFAULT or DEFAULT namespace may be specified.
+ValidationVisitor.xml_namespaces_reserved=The namespaces xmlns and xml are reserved.
+ValidationVisitor.xml_namespaces_null_uri=The null uri, or empty string, is not allowed as the uri value.
+ValidationVisitor.xml_attributes_reserved=The namespace xmlns is reserved.
+ValidationVisitor.xml_content_type=The expression "{0}" is of OBJECT or BLOB type, which cannot be used as an XML or TEXT content value.
+ValidationVisitor.xml_invalid_qname=The qname "{0}" is invalid.
+ValidationVisitor.context_item_type=XMLTABLE or XMLQUERY PASSING context item must be an XML value.
+ValidationVisitor.passing_requires_name=XMLTABLE or XMLQUERY PASSING clause can only contain at most 1 unnamed item.
+ValidationVisitor.duplicate_passing=XMLTABLE or XMLQUERY PASSING clause duplicate item name "{0}".
+ValidationVisitor.one_ordinal=Only one FOR ORDINALITY column is allowed for an XMLTABLE.
+ValidationVisitor.invalid_default=XMLTABLE DEFAULT expression is invalid: "{0}"
+ValidationVisitor.context_required=The XQuery requires a context item, but none exists in the PASSING clause.
+ValidationVisitor.xmlparse_type=XMLPARSE expects a STRING, CLOB, or BLOB value.
+ValidationVisitor.invalid_encoding=Encoding {0} is not valid.
+ValidationVisitor.subquery_insert=SELECT INTO should not be used in a subquery.
+UpdateProcedureResolver.only_variables=Variable "{0}" is read only and cannot be assigned a value.
+MappingLoader.unknown_node_type=Unknown Node Type "{0}" being loaded by the XML mapping document.
+MappingLoader.invalid_criteria_node=Invalid criteria node found; A criteria node must have criteria specified or it must be a default node.
+WrongTypeChild=Wrong type of child node is being added.
+NoCriteria=Failed to add the node, because Criteria nodes must have "criteria" value set on them, or they need to be the default node.
+root_cannotbe_null=Root node assigned to a document can be null.
+invalid_recurive_node= Found recursive node {0} without recursive root node.
+SaxonXQueryExpression.bad_xquery=Failed to evaluate XQuery expression; Please check the query and correct errors in syntax or usage. 
+SaxonXQueryExpression.compile_failed=Could not compile XQuery; Please check the query for syntax or usage errors.
+SaxonXQueryExpression.invalid_path=Column "{0}" has an invalid path expression: {1} 
+SaxonXQueryExpression.bad_context=Error building Source for context item.
+MappingLoader.invalidName=Null or blank name found in the Mapping Document, Must have valid name. Re-build the VDB
+MatchCriteria.invalid_escape=Invalid escape sequence "{0}" with escape character "{1}"
+QueryUtil.wrong_number_of_values=The number of bound values ''{0}'' does not match the number of parameters ''{1}'' in the prepared statement.
+QueryUtil.Error_executing_conversion_function_to_convert_value=Error converting parameter number {0} with value "{1}" to expected type {2}.
+InsertResolver.cant_convert_query_type=Cannot convert insert query expression projected symbol ''{0}'' of type {1} to insert column ''{2}'' of type {3}
+SetClause.resolvingError=Cannot set symbol ''{1}'' with expected type {2} to expression ''{0}''
+NewCalculateCostUtil.badCost=Unexpected format encountered for max or min value
+
+WorkerPool.Max_thread=Reached maximum thread count "{0}" for worker pool "{1}" with a queue size of "{2}".
+WorkerPool.uncaughtException=Uncaught exception processing work
+
+
+TempTable.duplicate_key=Duplicate key
+TempTable.not_null=Null value is not allowed for column {0}
+ValidationVisitor.group_in_both_dep=Table specified in both dependent and independent queries '{0}'
+XMLQuery.resolvingError=Failed to resolve the query '{0}'
+SQLParser.non_position_constant=Invalid order by at {0} 
+
+
+QueryRewriter.infinite_while=Infinite loop detected, procedure will not be executed.
+
+BatchedUpdatePlanner.unrecognized_command=The batch contained an unrecognized command: {0}
+ProcedurePlanner.bad_stmt=Error while planning update procedure, unknown statement type encountered: {0}
+RulePushSelectCriteria.Error_getting_modelID=Error getting modelID
+XMLPlanner.no_uri=Cannot find namespace URI for namespace {0} of element {1}
+
+XMLPlanner.The_XML_document_element_{0}_is_not_mapped_to_data_and_cannot_be_used_in_the_ORDER_BY_clause__{1}_1=The XML document element {0} is not mapped to data and cannot be used in the ORDER BY clause: {1}
+XMLPlanner.The_rowlimit_parameter_{0}_is_not_in_the_scope_of_any_mapping_class=The ''rowlimit'' or ''rowlimitexception'' function parameter ''{0}'' is not an XML node within the scope of any mapping class.
+XMLPlanner.Criteria_{0}_contains_conflicting_row_limits=The criteria ''{0}'' contains conflicting row limits for an XML mapping class.
+AccessNode.rewrite_failed=Failed to rewrite the command: {0}
+BatchedUpdateNode.unexpected_end_of_batch=Unexpectedly reached the end of the batched update counts at {0}, expected {1}.
+row_limit_passed=The row limit {0} has been exceeded for XML mapping class {1}.
+AddNodeInstruction.element__1=element
+AddNodeInstruction.Unable_to_add_xml_{0}_{1},_namespace_{2},_namespace_declarations_{3}_3=Unable to add xml {0} {1}, namespace {2}, namespace declarations {3}
+QueryProcessor.request_cancelled=The request {0} has been cancelled.
+VariableSubstitutionVisitor.Input_vars_should_have_same_changing_state=INPUT variables used in the expression should all have same CHANGING state: {0}
+
+ExecDynamicSqlInstruction.0=Evaluated dynamic SQL expression value was null.
+ExecDynamicSqlInstruction.3=There is a recursive invocation of group ''{0}''. Please correct the SQL.
+ExecDynamicSqlInstruction.4=The dynamic sql string contains an incorrect number of elements.
+ExecDynamicSqlInstruction.6=The datatype ''{0}'' for element ''{1}'' in the dynamic SQL cannot be implicitly converted to ''{2}''.
+ExecDynamicSqlInstruction.couldnt_execute=Couldn''t execute the dynamic SQL command "{0}" with the SQL statement "{1}" due to: {2}
+
+RulePlanJoins.cantSatisfy=Join region with unsatisfied access patterns cannot be satisfied by the join criteria, Access patterns: {0} 
+TempTableStore.table_exist_error=Temporary table "{0}" already exists.
+TempTableStore.table_doesnt_exist_error=Temporary table "{0}" does not exist.
+
+XMLQueryPlanner.cannot_plan=Cannot create a query for MappingClass with user criteria {0}
+CriteriaPlanner.staging_context=Staging table criteria cannot contian context functions
+CriteriaPlanner.multiple_staging=Staging table criteria {0} was not specified against a single staging table
+CriteriaPlanner.invalid_context=Element {0} is not in the scope of the context {1}
+CriteriaPlanner.invalid_element=Element {0} is not a valid data node
+results_not_found=Results for the mapping class {0} are not found; 
+RulePlanProcedures.no_values=No valid criteria specified for procedure parameter {0}
+ProcedurePlan.nonNullableParam=The procedure parameter {0} is not nullable, but is set to null.
+ 
+FileStoreageManager.error_creating=Error creating {0}
+FileStoreageManager.error_reading=Error reading {0}
+FileStoreageManager.no_directory=No directory specified for the file storage manager.
+FileStoreageManager.not_a_directory={0} is not a valid storage manager directory.
+FileStoreageManager.space_exhausted=Max buffer space of {0} bytes has been exceed.  The current operation will be aborted.
+
+TextTableNode.no_value=No value found for column {0} in the row ending on text line {1} in {2}.
+TextTableNode.conversion_error=Could not convert value for column {0} in the row ending on text line {1} in {2}.
+TextTableNode.header_missing=HEADER entry missing for column name {0} in {1}. 
+TextTableNode.unclosed=Text parse error: Unclosed qualifier at end of text in {0}.
+TextTableNode.character_not_allowed=Text parse error: Non-whitespace character found between the qualifier and the delimiter in text line {0} in {1}.
+TextTableNode.unknown_escape=Text parse error: Unknown escape sequence \\{0} in text line {1} in {2}.
+TextTableNode.invalid_width=Text parse error: Fixed width line width {0} is smaller than the expected {1} on text line {2} in {3}.
+
+XMLTableNode.error=Error evaluating XQuery row context for XMLTable: {0}
+XMLTableNode.path_error=Error evaluating XMLTable column path expression for column: {0}
+XMLTableName.multi_value=Unexpected multi-valued result was returned for XMLTable column "{0}".  Path expressions for non-XML type columns should return at most a single result.
+
+TempTableDataManager.failed_load=Failed to load materialized view table {0}.
+TempTableDataManager.loaded=Loaded materialized view table {0} with row count {1}.
+TempTableDataManager.loading=Loading materialized view table {0}
+TempTableDataManager.not_implicit_matview={0} does not target an internal materialized view.
+TempTableDataManager.row_refresh_pk=Materialized view {0} cannot have a row refreshed since there is no primary key.
+TempTableDataManager.row_refresh_composite=Materialized view {0} cannot have a row refreshed because it uses a composite key.
+TempTableDataManager.row_refresh_updatable=Materialized view {0} cannot have a row refreshed because it's cache hint did not specify \"updatable\".
+TempTableDataManager.row_refresh=Refreshing row {1} for materialized view {0}.
+CriteriaPlanner.no_context=No root node found.
+
+BasicInterceptor.ProcessTree_for__4=ProcessTree for
+
+
+ConnectorManager.not_in_valid_state=Connector is not in OPEN state
+
+ConnectorManagerImpl.Initializing_connector=Initializing connector {0}
+Cancel_request_failed=AtomicRequest {0} failed to cancel.
+
+ConnectorWorker.MaxResultRowsExceed=The number of result rows has exceeded the maximum result rows "{0}"
+ConnectorWorker.zero_size_non_last_batch=Connector returned a 0 row non-last batch: {0}.
+ConnectorWorker.process_failed=Connector worker process failed for atomic-request={0}
+ConnectorWorker.ConnectorWorker_result_set_unexpected_columns=Could not process stored procedure results for {0}.  Expected {1} result set columns, but was {2}.  Please update your models to allow for stored procedure results batching.
+
+
+DataTierManager.could_not_obtain_connector_binding=Could not obtain connection factory for model {0} in VDB name= {1}, version {2}
+
+
+DQPCore.Unable_to_load_metadata_for_VDB_name__{0},_version__{1}=Unable to load metadata for VDB name= {0}, version= {1}
+DQPCore.Unknown_query_metadata_exception_while_registering_query__{0}.=Unknown query metadata exception while registering query: {0}.
+DQPCore.Clearing_prepared_plan_cache=Clearing prepared plan cache
+DQPCore.clearing_resultset_cache=Clearing the resultset cache for vdb {0}.{1}
+DQPCore.The_request_has_been_closed.=The request {0} has been closed.
+DQPCore.The_atomic_request_has_been_cancelled=The atomic request {0} has been canceled.
+DQPCore.failed_to_cancel=Failed to Cancel request, as request already finished processing
+
+ProcessWorker.failed_rollback=Failed to properly rollback autowrap transaction properly
+ProcessWorker.error=Unexpected exception for request {0}
+ProcessWorker.processing_error=Processing exception ''{0}'' for request {1}.  Exception type {2} thrown from {3}. Enable more detailed logging to see the entire stacktrace.
+
+
+# #query (018.005)
+ERR.018.005.0095 = User <{0}> is not entitled to action <{1}> for 1 or more of the groups/elements/procedures.
+
+# services (003)
+
+Request.Invalid_character_in_query=Bind variables (represented as "?") were found but are allowed only in prepared or callable statements.
+Request.no_result_set=The query does not return an update count.
+Request.result_set=The query does not return a result set.
+
+ProcessWorker.wrongdata=Wrong type of data found or no data found; expecting streamable object from the buffer manager.
+ProcessWorker.LobError=An error occurred during streaming of Lob Chunks to Client.
+
+TransactionServer.existing_transaction=Client thread already involved in a transaction. Transaction nesting is not supported. The current transaction must be completed first.
+TransactionServer.no_transaction=No transaction found for client {0}.
+TransactionServer.concurrent_transaction=Concurrent enlistment in global transaction {0} is not supported.
+TransactionServer.no_global_transaction=Expected an existing global transaction {0} but there was none for client {1}
+TransactionServer.unknown_flags=Unknown flags
+TransactionServer.no_global_transaction=No global transaction found for {0}.
+TransactionServer.wrong_transaction=Client is not currently enlisted in transaction {0}.
+TransactionServer.resume_failed=Cannot resume, transaction {0} was not suspended by client {1}.
+TransactionServer.existing_global_transaction=Global transaction {0} already exists.
+TransactionServer.suspended_exist=Suspended work still exists on transaction {0}.
+
+TransformationMetadata.does_not_exist._1=does not exist.
+TransformationMetadata.Error_trying_to_read_virtual_document_{0},_with_body__n{1}_1=Error trying to read virtual document {0}, with body \n{1}
+TransformationMetadata.Unknown_support_constant___12=Unknown support constant: 
+TransformationMetadata.QueryPlan_could_not_be_found_for_physical_group__6=QueryPlan could not be found for physical group 
+TransformationMetadata.InsertPlan_could_not_be_found_for_physical_group__8=InsertPlan could not be found for physical group 
+TransformationMetadata.InsertPlan_could_not_be_found_for_physical_group__10=InsertPlan could not be found for physical group 
+TransformationMetadata.DeletePlan_could_not_be_found_for_physical_group__12=DeletePlan could not be found for physical group 
+TransformationMetadata.Error_trying_to_read_schemas_for_the_document/table____1=Error trying to read schemas for the document/table : 
+TransformationMetadata.Invalid_type=Invalid type: {0}.
+TransformationMetadata.does_not_exist._1=does not exist.
+TransformationMetadata.0={0} ambiguous, more than one entity matching the same name
+TransformationMetadata.Error_trying_to_read_virtual_document_{0},_with_body__n{1}_1=Error trying to read virtual document {0}, with body \n{1}
+TransformationMetadata.Unknown_support_constant___12=Unknown support constant: 
+TransformationMetadata.QueryPlan_could_not_be_found_for_physical_group__6=QueryPlan could not be found for physical group 
+TransformationMetadata.InsertPlan_could_not_be_found_for_physical_group__8=InsertPlan could not be found for physical group 
+TransformationMetadata.InsertPlan_could_not_be_found_for_physical_group__10=InsertPlan could not be found for physical group 
+TransformationMetadata.DeletePlan_could_not_be_found_for_physical_group__12=DeletePlan could not be found for physical group 
+TransformationMetadata.Error_trying_to_read_schemas_for_the_document/table____1=Error trying to read schemas for the document/table : 
+TransformationMetadata.Invalid_type=Invalid type: {0}.
+
+CachedFinder.no_connector_found=No connector with jndi-name {0} found for Model {1} with source name {2} 
+translator_not_found=Translator {0} not accessible.
+datasource_not_found=Data Source {0} not accessible.
+
+RequestWorkItem.cache_nondeterministic=Caching command "{0}" at a session level, but less deterministic functions were evaluated. 
+not_found_cache=Results not found in cache
+failed_to_cache=Failed to store the result set contents to disk.
+failed_to_unwrap_connection=Failed to unwrap the source connection.
+connection_factory_not_found=Failed to find the Connection Factory with JNDI name {0}. Please check the name or deploy the Connection Factory with specified name.
+
+RelationalPlanner.nonpushdown_command=Source UPDATE or DELETE command "{0}" contains non-pushdown constructs and no compensating action can be taken as the table lacks a unique key or the source does not support equality predicates. 
+
+Translate.error=Cannot translate criteria "{0}", it is not matched by selector "{1}"
+
+MultiSource.out_procedure=The multisource plan must execute a procedure returning parameter values exactly 1: {0}
+
+FunctionMethods.not_array_value=Expected a java.sql.Array, or java array type, but got: {0}
+FunctionMethods.array_index=Array index out of range: {0}
+ArrayTableNode.conversion_error=Could not convert value for column: {0}
\ No newline at end of file
Index: src/org/teiid/query/validator/UpdateValidator.java
===================================================================
--- src/org/teiid/query/validator/UpdateValidator.java	(revision 0)
+++ src/org/teiid/query/validator/UpdateValidator.java	(revision 0)
@@ -0,0 +1,528 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership.  Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ * 
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ * 
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.query.validator;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.teiid.api.exception.query.QueryMetadataException;
+import org.teiid.api.exception.query.QueryValidatorException;
+import org.teiid.core.TeiidComponentException;
+import org.teiid.query.QueryPlugin;
+import org.teiid.query.metadata.QueryMetadataInterface;
+import org.teiid.query.metadata.SupportConstants;
+import org.teiid.query.optimizer.relational.PartitionAnalyzer;
+import org.teiid.query.resolver.util.ResolverUtil;
+import org.teiid.query.sql.lang.Command;
+import org.teiid.query.sql.lang.Insert;
+import org.teiid.query.sql.lang.Query;
+import org.teiid.query.sql.lang.SetQuery;
+import org.teiid.query.sql.lang.UnaryFromClause;
+import org.teiid.query.sql.symbol.Constant;
+import org.teiid.query.sql.symbol.ElementSymbol;
+import org.teiid.query.sql.symbol.Expression;
+import org.teiid.query.sql.symbol.GroupSymbol;
+import org.teiid.query.sql.symbol.SingleElementSymbol;
+import org.teiid.query.sql.util.SymbolMap;
+
+/**
+ * <p> This visitor is used to validate updates through virtual groups. The command defining
+ * the virtual group is always a <code>Query</code>. This object visits various parts of
+ * this <code>Query</code> and verifies if the virtual group definition will allows it to be
+ * updated.</p>
+ */
+public class UpdateValidator {
+	
+	public enum UpdateType {
+		/**
+		 * The default handling should be used
+		 */
+		INHERENT, 
+		/**
+		 * A procedure handler has been defined
+		 */
+		UPDATE_PROCEDURE,
+		/**
+		 * An instead of trigger (TriggerAction) has been defined
+		 */
+		INSTEAD_OF
+	}
+	
+	public static class UpdateMapping {
+		private GroupSymbol group;
+		private GroupSymbol correlatedName;
+		private Map<ElementSymbol, ElementSymbol> updatableViewSymbols = new HashMap<ElementSymbol, ElementSymbol>();
+		private boolean insertAllowed = false;
+		private boolean updateAllowed = false;
+		
+		public Map<ElementSymbol, ElementSymbol> getUpdatableViewSymbols() {
+			return updatableViewSymbols;
+		}
+		
+		public boolean isInsertAllowed() {
+			return insertAllowed;
+		}
+		
+		public boolean isUpdateAllowed() {
+			return updateAllowed;
+		}
+		
+		public GroupSymbol getGroup() {
+			return group;
+		}
+		
+		public GroupSymbol getCorrelatedName() {
+			return correlatedName;
+		}
+	}
+	
+	public static class UpdateInfo {
+		private Map<String, UpdateMapping> updatableGroups = new HashMap<String, UpdateMapping>();
+		private boolean isSimple = true;
+		private UpdateMapping deleteTarget;
+		private UpdateType updateType;
+		private boolean updateValidationError;
+		private UpdateType deleteType;
+		private boolean deleteValidationError;
+		private UpdateType insertType;
+		private boolean insertValidationError;
+		private Query view;
+		private Map<ElementSymbol, List<Set<Constant>>> partitionInfo;
+		private List<UpdateInfo> unionBranches = new LinkedList<UpdateInfo>();
+		
+		public Map<ElementSymbol, List<Set<Constant>>> getPartitionInfo() {
+			return partitionInfo;
+		}
+		 
+		public boolean isSimple() {
+			return isSimple;
+		}
+		
+		public UpdateMapping getDeleteTarget() {
+			return deleteTarget;
+		}
+		
+		public boolean isInherentDelete() {
+			return deleteType == UpdateType.INHERENT;
+		}
+		
+		public boolean isInherentInsert() {
+			return insertType == UpdateType.INHERENT;
+		}
+		
+		public boolean isInherentUpdate() {
+			return updateType == UpdateType.INHERENT;
+		}
+		
+		public UpdateType getUpdateType() {
+			return updateType;
+		}
+		
+		public UpdateType getDeleteType() {
+			return deleteType;
+		}
+		
+		public boolean hasValidUpdateMapping(Collection<ElementSymbol> updateCols) {
+			if (findUpdateMapping(updateCols, false) == null) {
+				return false;
+			}
+			for (UpdateInfo info : this.unionBranches) {
+				if (info.findUpdateMapping(updateCols, false) == null) {
+					return false;
+				}
+			}
+			return true;
+		}
+		
+		public UpdateMapping findUpdateMapping(Collection<ElementSymbol> updateCols, boolean insert) {
+			if (updateCols.isEmpty() && this.updatableGroups.size() > 1) {
+				return null;
+			}
+			for (UpdateMapping entry : this.updatableGroups.values()) {
+				if (((insert && entry.insertAllowed) || (!insert && entry.updateAllowed)) && entry.updatableViewSymbols.keySet().containsAll(updateCols)) {
+					return entry;
+				}
+			}
+			return null;
+		}
+		
+		public UpdateMapping findInsertUpdateMapping(Insert insert, boolean rewrite) throws QueryValidatorException {
+			if (getUnionBranches().isEmpty()) {
+				return findUpdateMapping(insert.getVariables(), true);	
+			}
+			if (insert.getQueryExpression() != null) {
+				//TODO: this could be done in a loop, see about adding a validation
+				throw new QueryValidatorException(QueryPlugin.Util.getString("ValidationVisitor.insert_qe_partition", insert.getGroup())); //$NON-NLS-1$
+			}
+			int partition = -1;
+			List<ElementSymbol> filteredColumns = new LinkedList<ElementSymbol>();
+			for (Map.Entry<ElementSymbol, List<Set<Constant>>> entry : partitionInfo.entrySet()) {
+				int index = insert.getVariables().indexOf(entry.getKey());
+				if (index == -1) {
+					continue;
+				}
+				Expression value = (Expression)insert.getValues().get(index);
+				if (!(value instanceof Constant)) {
+					continue;
+				}
+				for (int i = 0; i < entry.getValue().size(); i++) {
+					if (entry.getValue().get(i).contains(value)) {
+						if (entry.getValue().get(i).size() == 1) {
+							filteredColumns.add(entry.getKey());
+						}
+						if (partition == -1) {
+							partition = i;
+						} else if (partition != i) {
+							throw new QueryValidatorException(QueryPlugin.Util.getString("ValidationVisitor.insert_no_partition", insert.getGroup(), insert.getVariables())); //$NON-NLS-1$
+						}
+					}
+				}
+			}
+			if (partition == -1) {
+				throw new QueryValidatorException(QueryPlugin.Util.getString("ValidationVisitor.insert_no_partition", insert.getGroup(), insert.getVariables())); //$NON-NLS-1$
+			}
+			UpdateInfo info = this;
+			if (partition > 0) {
+				info = info.getUnionBranches().get(partition - 1);
+			}
+			List<ElementSymbol> variables = rewrite?insert.getVariables():new ArrayList<ElementSymbol>(insert.getVariables());
+			for (ElementSymbol elementSymbol : filteredColumns) {
+				int index = insert.getVariables().indexOf(elementSymbol);
+				variables.remove(index);
+				if (rewrite) {
+					insert.getValues().remove(index);
+				}
+			}
+			return info.findUpdateMapping(variables, true);
+		}
+		
+		public Query getViewDefinition() {
+			return view;
+		}
+		
+		public boolean isDeleteValidationError() {
+			return deleteValidationError;
+		}
+		
+		public boolean isInsertValidationError() {
+			return insertValidationError;
+		}
+		
+		public boolean isUpdateValidationError() {
+			return updateValidationError;
+		}
+		
+		public List<UpdateInfo> getUnionBranches() {
+			return unionBranches;
+		}
+		
+	}
+	
+	private QueryMetadataInterface metadata;
+	private UpdateInfo updateInfo = new UpdateInfo();
+	
+	private ValidatorReport report = new ValidatorReport();
+	private ValidatorReport insertReport = new ValidatorReport();
+	private ValidatorReport updateReport = new ValidatorReport();
+	private ValidatorReport deleteReport = new ValidatorReport();
+	
+	public UpdateValidator(QueryMetadataInterface qmi, UpdateType insertType, UpdateType updateType, UpdateType deleteType) {
+		this.metadata = qmi;
+		this.updateInfo.deleteType = deleteType;
+		this.updateInfo.insertType = insertType;
+		this.updateInfo.updateType = updateType;
+	}
+		
+	public UpdateInfo getUpdateInfo() {
+		return updateInfo;
+	}
+	
+	public ValidatorReport getReport() {
+		return report;
+	}
+	
+	public ValidatorReport getDeleteReport() {
+		return deleteReport;
+	}
+	
+	public ValidatorReport getInsertReport() {
+		return insertReport;
+	}
+	
+	public ValidatorReport getUpdateReport() {
+		return updateReport;
+	}
+	
+	private void handleValidationError(String error, boolean update, boolean insert, boolean delete) {
+		if (update && insert && delete) {
+			report.handleValidationError(error);
+		} else {
+			if (update) {
+				updateReport.handleValidationError(error);
+			}
+			if (insert) {
+				insertReport.handleValidationError(error);
+			}
+			if (delete) {
+				deleteReport.handleValidationError(error);
+			}
+		}
+		updateInfo.updateValidationError |= update;
+		updateInfo.insertValidationError |= insert;
+		updateInfo.deleteValidationError |= delete;
+	}
+	
+    public void validate(Command command, List<ElementSymbol> viewSymbols) throws QueryMetadataException, TeiidComponentException {
+    	if (this.updateInfo.deleteType != UpdateType.INHERENT && this.updateInfo.updateType != UpdateType.INHERENT && this.updateInfo.insertType != UpdateType.INHERENT) {
+    		return;
+    	}
+    	if (command instanceof SetQuery) {
+    		SetQuery setQuery = (SetQuery)command;
+        	if (setQuery.getLimit() != null) {
+        		handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0013"), true, true, true); //$NON-NLS-1$
+        		return;
+        	}
+    		LinkedList<Query> queries = new LinkedList<Query>();
+    		if (!PartitionAnalyzer.extractQueries((SetQuery)command, queries)) {
+    			handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0001"), true, true, true); //$NON-NLS-1$
+        		return;    			
+    		}
+        	Map<ElementSymbol, List<Set<Constant>>> partitions = PartitionAnalyzer.extractPartionInfo((SetQuery)command, viewSymbols);
+        	this.updateInfo.partitionInfo = partitions;
+        	if (partitions.isEmpty()) {
+        		handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0018"), false, true, false); //$NON-NLS-1$
+        	}
+        	boolean first = true;
+        	for (Query query : queries) {
+        		UpdateInfo ui = this.updateInfo;
+        		if (!first) {
+	        		this.updateInfo = new UpdateInfo();
+	        		this.updateInfo.deleteType = ui.deleteType;
+	        		this.updateInfo.insertType = ui.insertType;
+	        		this.updateInfo.updateType = ui.updateType;
+        		}
+            	internalValidate(query, viewSymbols);
+        		//accumulate the errors on the first branch - will be checked at resolve time
+        		ui.deleteValidationError |= this.updateInfo.deleteValidationError;
+        		ui.updateValidationError |= this.updateInfo.updateValidationError;
+        		ui.insertValidationError |= this.updateInfo.insertValidationError;
+        		if (!first) {
+        			ui.unionBranches.add(this.updateInfo);
+        			this.updateInfo = ui;
+        		} else {
+        			first = false;
+        		}
+			}
+        	return;
+    	}
+    	internalValidate(command, viewSymbols);
+    	if (this.updateInfo.deleteType != UpdateType.INHERENT) {
+    		this.deleteReport.getItems().clear();
+    	}
+    	if (this.updateInfo.updateType != UpdateType.INHERENT) {
+    		this.updateReport.getItems().clear();
+    	}
+    	if (this.updateInfo.insertType != UpdateType.INHERENT) {
+    		this.insertReport.getItems().clear();
+    	}
+    }
+	
+    private void internalValidate(Command command, List<ElementSymbol> viewSymbols) throws QueryMetadataException, TeiidComponentException {
+    	if (!(command instanceof Query)) {
+    		handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0001"), true, true, true); //$NON-NLS-1$
+    		return;
+        }
+    	
+    	Query query = (Query)command;
+
+    	if (query.getFrom() == null || query.getInto() != null) {
+    		handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0001"), true, true, true); //$NON-NLS-1$
+    		return;
+    	}
+    	
+    	if (query.getWith() != null) {
+    		String warning = QueryPlugin.Util.getString("ERR.015.012.0002"); //$NON-NLS-1$
+    		updateReport.handleValidationWarning(warning);
+    		deleteReport.handleValidationWarning(warning); 
+    		updateInfo.isSimple = false;
+    	}
+
+    	if (query.hasAggregates()) {
+    		handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0006"), true, true, true); //$NON-NLS-1$
+    		return;
+    	}
+    	
+    	if (query.getLimit() != null) {
+    		handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0013"), true, true, true); //$NON-NLS-1$
+    		return;
+    	}
+    	
+    	if (query.getSelect().isDistinct()) {
+    		handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0008"), true, true, true); //$NON-NLS-1$
+    		return;
+    	} 
+    	
+    	updateInfo.view = query;
+    	
+    	List<SingleElementSymbol> projectedSymbols = query.getSelect().getProjectedSymbols();
+    	
+    	for (int i = 0; i < projectedSymbols.size(); i++) {
+            SingleElementSymbol symbol = projectedSymbols.get(i);
+            Expression ex = SymbolMap.getExpression(symbol);
+            
+            if (!metadata.elementSupports(viewSymbols.get(i).getMetadataID(), SupportConstants.Element.UPDATE)) {
+            	continue;
+            }
+            if (ex instanceof ElementSymbol) {
+            	ElementSymbol es = (ElementSymbol)ex;
+            	String groupName = es.getGroupSymbol().getCanonicalName();
+        		UpdateMapping info = updateInfo.updatableGroups.get(groupName);
+        		if (es.getGroupSymbol().getDefinition() != null) {
+            		ElementSymbol clone = (ElementSymbol)es.clone();
+            		clone.setName(es.getGroupSymbol().getDefinition() + ElementSymbol.SEPARATOR + es.getShortName());
+            		clone.getGroupSymbol().setName(clone.getGroupSymbol().getNonCorrelationName());
+            		clone.getGroupSymbol().setDefinition(null);
+            		es = clone;
+            	}
+            	if (info == null) {
+            		info = new UpdateMapping();
+            		info.group = es.getGroupSymbol();
+            		info.correlatedName = ((ElementSymbol)ex).getGroupSymbol();
+            		updateInfo.updatableGroups.put(groupName, info);
+            	}
+            	//TODO: warn if mapped twice
+            	info.updatableViewSymbols.put(viewSymbols.get(i), es);
+            } else {
+            	//TODO: look for reversable widening conversions
+            	
+                report.handleValidationWarning(QueryPlugin.Util.getString("ERR.015.012.0007", viewSymbols.get(i), symbol)); //$NON-NLS-1$
+            }
+    	}
+    	
+    	if (query.getFrom().getClauses().size() > 1 || (!(query.getFrom().getClauses().get(0) instanceof UnaryFromClause))) {
+    	    String warning = QueryPlugin.Util.getString("ERR.015.012.0009", query.getFrom());
+    		updateReport.handleValidationWarning(warning); //$NON-NLS-1$
+    		deleteReport.handleValidationWarning(warning); //$NON-NLS-1$
+    		updateInfo.isSimple = false;
+    	}
+    	List<GroupSymbol> allGroups = query.getFrom().getGroups();
+    	HashSet<GroupSymbol> keyPreservingGroups = new HashSet<GroupSymbol>();
+    	
+		ResolverUtil.findKeyPreserved(query, keyPreservingGroups, metadata);
+    	
+		for (GroupSymbol groupSymbol : keyPreservingGroups) {
+			setUpdateFlags(groupSymbol);
+		}
+
+		allGroups.removeAll(keyPreservingGroups);
+		if (updateInfo.isSimple) {
+			if (!allGroups.isEmpty()) {
+				setUpdateFlags(allGroups.iterator().next());
+			}
+		} else {
+			for (GroupSymbol groupSymbol : allGroups) {
+				UpdateMapping info = updateInfo.updatableGroups.get(groupSymbol.getCanonicalName());
+				if (info == null) {
+					continue; // not projected
+				}
+	    		String warning = QueryPlugin.Util.getString("ERR.015.012.0004", info.correlatedName); //$NON-NLS-1$
+	    		report.handleValidationWarning(warning);
+			}
+		}
+
+    	boolean updatable = false;
+    	boolean insertable = false;
+    	for (UpdateMapping info : updateInfo.updatableGroups.values()) {
+    		if (info.updateAllowed) {
+    			if (!updatable) {
+    				this.updateInfo.deleteTarget = info;
+    			} else if (!info.getGroup().equals(this.updateInfo.deleteTarget.getGroup())){
+    				//TODO: warning about multiple
+    				this.updateInfo.deleteTarget = null;
+    			}
+    		}
+    		updatable |= info.updateAllowed;
+    		insertable |= info.insertAllowed;
+    	}
+    	if ((this.updateInfo.insertType == UpdateType.INHERENT && !insertable)) {
+    		handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0015"), false, true, false); //$NON-NLS-1$
+    	} 
+    	if (this.updateInfo.updateType == UpdateType.INHERENT && !updatable) {
+    		handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0005"), true, false, false); //$NON-NLS-1$
+    	}
+    	if (this.updateInfo.deleteType == UpdateType.INHERENT && this.updateInfo.deleteTarget == null) {
+    		if (this.updateInfo.isSimple && updatable) {
+    			this.updateInfo.deleteTarget = this.updateInfo.updatableGroups.values().iterator().next();
+    		} else {
+    			handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0014"), false, false, true); //$NON-NLS-1$
+    		}
+    	}
+    }
+
+    private void setUpdateFlags(GroupSymbol groupSymbol) throws QueryMetadataException, TeiidComponentException {
+    	UpdateMapping info = updateInfo.updatableGroups.get(groupSymbol.getCanonicalName());
+
+		if (info == null) {
+			return; // not projected
+		}
+
+		if (!metadata.groupSupports(groupSymbol.getMetadataID(), SupportConstants.Group.UPDATE)) {
+			report.handleValidationWarning(QueryPlugin.Util.getString("ERR.015.012.0003", groupSymbol)); //$NON-NLS-1$
+			return;
+		}
+
+		info.insertAllowed = true;
+		for (ElementSymbol es : ResolverUtil.resolveElementsInGroup(info.group, metadata)) {
+			if (!info.updatableViewSymbols.values().contains(es) && !validateInsertElement(es)) {
+				info.insertAllowed = false;
+			}
+		}
+		info.updateAllowed = true;
+    }
+
+	/**
+	 * <p> This method validates an elements present in the group specified in the
+	 * FROM clause of the query but not specified in its SELECT clause</p>
+	 * @param element The <code>ElementSymbol</code> being validated
+	 * @throws TeiidComponentException 
+	 * @throws QueryMetadataException 
+	 */
+	private boolean validateInsertElement(ElementSymbol element) throws QueryMetadataException, TeiidComponentException {
+		// checking if the elements not specified in the query are required.
+		if(metadata.elementSupports(element.getMetadataID(), SupportConstants.Element.NULL) 
+			|| metadata.elementSupports(element.getMetadataID(), SupportConstants.Element.DEFAULT_VALUE) 
+			|| metadata.elementSupports(element.getMetadataID(), SupportConstants.Element.AUTO_INCREMENT)) {
+			return true;
+		}
+		if (this.updateInfo.insertType == UpdateType.INHERENT) {
+			insertReport.handleValidationWarning(QueryPlugin.Util.getString("ERR.015.012.0010", element, element.getGroupSymbol())); //$NON-NLS-1$
+		}
+	    return false;
+	}
+}
