| # Licensed to the Apache Software Foundation (ASF) under one or more |
| # contributor license agreements. See the NOTICE file distributed with |
| # this work for additional information regarding copyright ownership. |
| # The ASF licenses this file to you under the Apache License, Version 2.0 |
| # (the "License"); you may not use this file except in compliance with |
| # the License. You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| data: { |
| # Data declarations for this parser. |
| # |
| # Default declarations are in default_config.fmpp; if you do not include a |
| # declaration ('imports' or 'nonReservedKeywords', for example) in this file, |
| # FMPP will use the declaration from default_config.fmpp. |
| parser: { |
| # Generated parser implementation class package and name |
| package: "org.apache.ignite.internal.generated.query.calcite.sql", |
| class: "IgniteSqlParserImpl", |
| |
| # List of additional classes and packages to import. |
| # Example: "org.apache.calcite.sql.*", "java.util.List". |
| imports: [ |
| "org.apache.ignite.internal.sql.engine.prepare.ddl.ZoneOptionEnum", |
| "org.apache.calcite.sql.SqlCreate", |
| "org.apache.calcite.sql.SqlDrop", |
| "org.apache.calcite.sql.SqlDdl", |
| "org.apache.calcite.sql.SqlLiteral", |
| "org.apache.calcite.schema.ColumnStrategy", |
| "org.apache.calcite.sql.ddl.SqlDdlNodes", |
| "org.apache.ignite.internal.sql.engine.sql.IgniteSqlAlterTableAddColumn", |
| "org.apache.ignite.internal.sql.engine.sql.IgniteSqlAlterTableDropColumn", |
| "org.apache.ignite.internal.sql.engine.sql.IgniteSqlAlterTableSetProperties", |
| "org.apache.ignite.internal.sql.engine.sql.IgniteSqlAlterColumn", |
| "org.apache.ignite.internal.sql.engine.sql.IgniteSqlCreateTable", |
| "org.apache.ignite.internal.sql.engine.sql.IgniteSqlTableProperty", |
| "org.apache.ignite.internal.sql.engine.sql.IgniteSqlTablePropertyKey", |
| "org.apache.ignite.internal.sql.engine.sql.IgniteSqlCreateIndex", |
| "org.apache.ignite.internal.sql.engine.sql.IgniteSqlExplain", |
| "org.apache.ignite.internal.sql.engine.sql.IgniteSqlPrimaryKeyConstraint", |
| "org.apache.ignite.internal.sql.engine.sql.IgniteSqlPrimaryKeyIndexType", |
| "org.apache.ignite.internal.sql.engine.sql.IgniteSqlCreateZone", |
| "org.apache.ignite.internal.sql.engine.sql.IgniteSqlCreateSchema", |
| "org.apache.ignite.internal.sql.engine.sql.IgniteSqlZoneOption", |
| "org.apache.ignite.internal.sql.engine.sql.IgniteSqlZoneOptionMode", |
| "org.apache.ignite.internal.sql.engine.sql.IgniteSqlExplainMode", |
| "org.apache.ignite.internal.sql.engine.sql.IgniteSqlDropIndex", |
| "org.apache.ignite.internal.sql.engine.sql.IgniteSqlDropTable", |
| "org.apache.ignite.internal.sql.engine.sql.IgniteSqlDropZone", |
| "org.apache.ignite.internal.sql.engine.sql.IgniteSqlDropSchema", |
| "org.apache.ignite.internal.sql.engine.sql.IgniteSqlDropSchemaBehavior", |
| "org.apache.ignite.internal.sql.engine.sql.IgniteSqlStartTransaction", |
| "org.apache.ignite.internal.sql.engine.sql.IgniteSqlStartTransactionMode", |
| "org.apache.ignite.internal.sql.engine.sql.IgniteSqlCommitTransaction", |
| "org.apache.ignite.internal.sql.engine.sql.IgniteSqlIntervalTypeNameSpec", |
| "org.apache.ignite.internal.sql.engine.sql.IgniteSqlIndexType", |
| "org.apache.ignite.internal.sql.engine.sql.IgniteSqlAlterZoneSet", |
| "org.apache.ignite.internal.sql.engine.sql.IgniteSqlAlterZoneRenameTo", |
| "org.apache.ignite.internal.sql.engine.sql.IgniteSqlAlterZoneSetDefault", |
| "org.apache.ignite.internal.sql.engine.sql.IgniteSqlKill", |
| "org.apache.ignite.internal.sql.engine.sql.IgniteSqlKillObjectType", |
| "org.apache.ignite.internal.sql.engine.util.IgniteResource", |
| ] |
| |
| # List of new keywords. Example: "DATABASES", "TABLES". If the keyword is |
| # not a reserved keyword, add it to the 'nonReservedKeywords' section. |
| keywords: [ |
| "OFF" |
| "AUTO" |
| "DOWN" |
| "PARTITIONS" |
| "REPLICAS" |
| "QUORUM" |
| "DISTRIBUTION" |
| "ALGORITHM" |
| "NODES" |
| "CONSISTENCY" |
| "MODE" |
| "COLOCATE" |
| "STORAGE" |
| "PROFILE" |
| "PROFILES" |
| "IF" |
| "INDEX" |
| "ENGINE" |
| "SORTED" |
| "HASH" |
| "RENAME" |
| "UP" |
| "KILL" |
| "QUERY" |
| "COMPUTE" |
| "MAPPING" |
| "WAIT" |
| "STALE" |
| "FRACTION" |
| ] |
| |
| # List of non-reserved keywords to add; |
| # items in this list become non-reserved. |
| nonReservedKeywordsToAdd: [ |
| # Keywords introduced by Ignite |
| "OFF" |
| "AUTO" |
| "DOWN" |
| "PARTITIONS" |
| "REPLICAS" |
| "QUORUM" |
| "DISTRIBUTION" |
| "ALGORITHM" |
| "NODES" |
| "CONSISTENCY" |
| "MODE" |
| "PROFILES" |
| "UP" |
| "ENGINE" |
| "STORAGE" |
| "PROFILE" |
| "SORTED" |
| "HASH" |
| "QUERY" |
| "COMPUTE" |
| "MAPPING" |
| "WAIT" |
| "KILL" |
| "STALE" |
| "FRACTION" |
| |
| # Keywords reserved by Calcite, but not required to be reserved in Ignite. |
| "ALLOCATE" |
| "ALLOW" |
| "ARE" |
| "ASENSITIVE" |
| "AT" |
| "ATOMIC" |
| "AUTHORIZATION" |
| "BEGIN" |
| "BEGIN_FRAME" |
| "BEGIN_PARTITION" |
| "BIGINT" |
| "BINARY" |
| "BIT" |
| "BLOB" |
| "BOOLEAN" |
| "CALLED" |
| "CASCADED" |
| "CEIL" |
| "CHECK" |
| "CLASSIFIER" |
| "CLOB" |
| "CLOSE" |
| "COLLATE" |
| "COLOCATE" |
| "COMMIT" |
| "CONDITION" |
| "CONNECT" |
| "CONTAINS" |
| "CORR" |
| "CORRESPONDING" |
| "CURSOR" |
| "CYCLE" |
| "DAY" |
| "DEALLOCATE" |
| "DEC" |
| "DECLARE" |
| "DEFINE" |
| "DEREF" |
| "DETERMINISTIC" |
| "DISALLOW" |
| "DISCONNECT" |
| "DOUBLE" |
| "DYNAMIC" |
| "EACH" |
| "EMPTY" |
| "END" |
| "END_EXEC" |
| "END_FRAME" |
| "END_PARTITION" |
| "EQUALS" |
| "ESCAPE" |
| "EXEC" |
| "EXECUTE" |
| "EXTERNAL" |
| "FLOAT" |
| "FOREIGN" |
| "FRAME_ROW" |
| "FREE" |
| "FUNCTION" |
| "GET" |
| "GLOBAL" |
| "GRANT" |
| "GROUPS" |
| "HOLD" |
| "IDENTITY" |
| "IMPORT" |
| "INDICATOR" |
| "INITIAL" |
| "INOUT" |
| "INSENSITIVE" |
| "INT" |
| "INTEGER" |
| "JSON_ARRAY" |
| "JSON_ARRAYAGG" |
| "JSON_EXISTS" |
| "JSON_OBJECT" |
| "JSON_OBJECTAGG" |
| "JSON_QUERY" |
| "JSON_VALUE" |
| "LANGUAGE" |
| "LARGE" |
| "LATERAL" |
| "LIKE_REGEX" |
| "LOCAL" |
| "MATCH" |
| "MATCHES" |
| "MATCH_NUMBER" |
| "MEASURES" |
| "MEMBER" |
| "METHOD" |
| "MODIFIES" |
| "MODULE" |
| "NATIONAL" |
| "NCHAR" |
| "NCLOB" |
| "NO" |
| "NONE" |
| "NORMALIZE" |
| "NUMERIC" |
| "OCCURRENCES_REGEX" |
| "OF" |
| "OLD" |
| "OMIT" |
| "ONE" |
| "ONLY" |
| "OPEN" |
| "ORDINAL" |
| "OUT" |
| "OVERLAPS" |
| "OVERLAY" |
| "PARAMETER" |
| "PATTERN" |
| "PER" |
| "PERCENT" |
| "PORTION" |
| "POSITION" |
| "POSITION_REGEX" |
| "PRECEDES" |
| "PREPARE" |
| "PREV" |
| "PROCEDURE" |
| "RANGE" |
| "READS" |
| "REAL" |
| "RECURSIVE" |
| "REF" |
| "REFERENCES" |
| "REFERENCING" |
| "REGR_AVGX" |
| "REGR_AVGY" |
| "REGR_INTERCEPT" |
| "REGR_R2" |
| "REGR_SLOPE" |
| "REGR_SXY" |
| "RELEASE" |
| "RESULT" |
| "RETURN" |
| "RETURNS" |
| "REVOKE" |
| "ROLLBACK" |
| "ROWS" |
| "RUNNING" |
| "SAFE_CAST" |
| "SAFE_OFFSET" |
| "SAFE_ORDINAL" |
| "SAVEPOINT" |
| "SCOPE" |
| "SCROLL" |
| "SEARCH" |
| "SEEK" |
| "SENSITIVE" |
| "SHOW" |
| "SIMILAR" |
| "SKIP_" |
| "SMALLINT" |
| "SPECIFICTYPE" |
| "SQL" |
| "SQLEXCEPTION" |
| "SQLSTATE" |
| "SQLWARNING" |
| "START" |
| "STATIC" |
| "SUBMULTISET" |
| "SUBSET" |
| "SUBSTRING_REGEX" |
| "SUCCEEDS" |
| "SYSTEM" |
| "TIMEZONE_HOUR" |
| "TIMEZONE_MINUTE" |
| "TINYINT" |
| "TRANSLATE" |
| "TRANSLATE_REGEX" |
| "TRANSLATION" |
| "TREAT" |
| "TRIGGER" |
| "TRIM" |
| "TRIM_ARRAY" |
| "TRY_CAST" |
| "UNIQUE" |
| "UNNEST" |
| "VALUE_OF" |
| "VARBINARY" |
| "VARCHAR" |
| "VARYING" |
| "VERSIONING" |
| "WHENEVER" |
| "WIDTH_BUCKET" |
| "WITHOUT" |
| ] |
| |
| # List of non-reserved keywords to remove; |
| # items in this list become reserved. |
| nonReservedKeywordsToRemove: [ |
| ] |
| |
| # List of additional join types. Each is a method with no arguments. |
| # Example: "LeftSemiJoin". |
| joinTypes: [ |
| # "LeftSemiJoin" |
| ] |
| |
| # List of methods for parsing builtin function calls. |
| # Return type of method implementation should be "SqlNode". |
| # Example: "DateTimeConstructorCall()". |
| builtinFunctionCallMethods: [ |
| # "DateFunctionCall()" |
| # "DateaddFunctionCall()" |
| ] |
| |
| # List of methods for parsing custom SQL statements. |
| # Return type of method implementation should be 'SqlNode'. |
| # Example: "SqlShowDatabases()", "SqlShowTables()". |
| statementParserMethods: [ |
| "SqlIgniteDescribe()", |
| "SqlIgniteExplain()", |
| "SqlAlterTable()", |
| "SqlAlterZone()", |
| "SqlStartTransaction()", |
| "SqlCommitTransaction()", |
| "SqlKill()", |
| ] |
| |
| # List of methods for parsing extensions to "CREATE [OR REPLACE]" calls. |
| # Each must accept arguments "(SqlParserPos pos, boolean replace)". |
| # Example: "SqlCreateForeignSchema". |
| createStatementParserMethods: [ |
| "SqlCreateTable", |
| "SqlCreateIndex", |
| "SqlCreateZone", |
| "SqlCreateSchema" |
| ] |
| |
| # List of methods for parsing extensions to "DROP" calls. |
| # Each must accept arguments "(SqlParserPos pos)". |
| # Example: "SqlDropSchema". |
| dropStatementParserMethods: [ |
| "SqlDropTable", |
| "SqlDropIndex", |
| "SqlDropZone", |
| "SqlDropSchema" |
| ] |
| |
| # List of methods for parsing extensions to "DROP" calls. |
| # Each must accept arguments "(SqlParserPos pos)". |
| # Example: "SqlDropSchema". |
| alterStatementParserMethods: [ |
| ] |
| |
| # List of methods for parsing custom literals. |
| # Return type of method implementation should be "SqlNode". |
| # Example: ParseJsonLiteral(). |
| literalParserMethods: [ |
| ] |
| |
| # List of methods for parsing custom data types. |
| # Return type of method implementation should be "SqlTypeNameSpec". |
| # Example: SqlParseTimeStampZ(). |
| dataTypeParserMethods: [ |
| "IgniteDateTimeTypeName()" |
| ] |
| |
| # Binary operators tokens. |
| # Example: "< INFIX_CAST: \"::\" >". |
| binaryOperatorsTokens: [ |
| "< INFIX_CAST: \"::\" >" |
| ] |
| |
| # Binary operators initialization. |
| # Example: "InfixCast". |
| extraBinaryExpressions: [ |
| "InfixCast" |
| ] |
| |
| # List of files in @includes directory that have parser method |
| # implementations for parsing custom SQL statements, literals or types |
| # given as part of "statementParserMethods", "literalParserMethods" or |
| # "dataTypeParserMethods". |
| # Example: "parserImpls.ftl". |
| implementationFiles: [ |
| "parserImpls.ftl" |
| ] |
| |
| includePosixOperators: true |
| includeCompoundIdentifier: true |
| includeBraces: true |
| includeAdditionalDeclarations: false |
| includeParsingStringLiteralAsArrayLiteral: false |
| } |
| } |
| |
| freemarkerLinks: { |
| includes: includes/ |
| } |