diff --git a/presto-analyzer/src/main/java/com/facebook/presto/sql/analyzer/Analysis.java b/presto-analyzer/src/main/java/com/facebook/presto/sql/analyzer/Analysis.java index 1ca66de2d0e62..1bbdc38731ec5 100644 --- a/presto-analyzer/src/main/java/com/facebook/presto/sql/analyzer/Analysis.java +++ b/presto-analyzer/src/main/java/com/facebook/presto/sql/analyzer/Analysis.java @@ -22,6 +22,7 @@ import com.facebook.presto.spi.ColumnMetadata; import com.facebook.presto.spi.ConnectorId; import com.facebook.presto.spi.MaterializedViewDefinition; +import com.facebook.presto.spi.NewTableLayout; import com.facebook.presto.spi.TableHandle; import com.facebook.presto.spi.analyzer.AccessControlInfo; import com.facebook.presto.spi.analyzer.AccessControlInfoForTable; @@ -34,6 +35,7 @@ import com.facebook.presto.spi.function.FunctionKind; import com.facebook.presto.spi.function.table.Argument; import com.facebook.presto.spi.function.table.ConnectorTableFunctionHandle; +import com.facebook.presto.spi.plan.PartitioningHandle; import com.facebook.presto.spi.procedure.DistributedProcedure; import com.facebook.presto.spi.security.AccessControl; import com.facebook.presto.spi.security.AccessControlContext; @@ -41,6 +43,7 @@ import com.facebook.presto.spi.security.Identity; import com.facebook.presto.sql.tree.ExistsPredicate; import com.facebook.presto.sql.tree.Expression; +import com.facebook.presto.sql.tree.FieldReference; import com.facebook.presto.sql.tree.FunctionCall; import com.facebook.presto.sql.tree.GroupingOperation; import com.facebook.presto.sql.tree.Identifier; @@ -197,6 +200,7 @@ public class Analysis private Optional analyzeTarget = Optional.empty(); private Optional> updatedColumns = Optional.empty(); + private Optional mergeAnalysis = Optional.empty(); // for describe input and describe output private final boolean isDescribe; @@ -233,6 +237,9 @@ public class Analysis private final Set> aliasedRelations = new LinkedHashSet<>(); private final Set> polymorphicTableFunctions = new LinkedHashSet<>(); + // Row id field used for MERGE INTO command. + private final Map, FieldReference> rowIdField = new LinkedHashMap<>(); + public Analysis(@Nullable Statement root, Map, Expression> parameters, boolean isDescribe) { this.root = root; @@ -445,6 +452,16 @@ public Expression getJoinCriteria(Join join) return joins.get(NodeRef.of(join)); } + public void setRowIdField(Table table, FieldReference field) + { + rowIdField.put(NodeRef.of(table), field); + } + + public FieldReference getRowIdField(Table table) + { + return rowIdField.get(NodeRef.of(table)); + } + public void recordSubqueries(Node node, ExpressionAnalysis expressionAnalysis) { NodeRef key = NodeRef.of(node); @@ -778,6 +795,16 @@ public Optional> getUpdatedColumns() return updatedColumns; } + public Optional getMergeAnalysis() + { + return mergeAnalysis; + } + + public void setMergeAnalysis(MergeAnalysis mergeAnalysis) + { + this.mergeAnalysis = Optional.of(mergeAnalysis); + } + public void setRefreshMaterializedViewAnalysis(RefreshMaterializedViewAnalysis refreshMaterializedViewAnalysis) { this.refreshMaterializedViewAnalysis = Optional.of(refreshMaterializedViewAnalysis); @@ -1817,4 +1844,108 @@ public ConnectorTransactionHandle getTransactionHandle() return transactionHandle; } } + + public static class MergeAnalysis + { + private final Table targetTable; + private final List targetColumnsMetadata; + private final List targetColumnHandles; + private final List targetRedistributionColumnHandles; + private final List> mergeCaseColumnHandles; + private final Set nonNullableColumnHandles; + private final Map columnHandleFieldNumbers; + private final List insertPartitioningArgumentIndexes; + private final Optional insertLayout; + private final Optional updateLayout; + private final Scope targetTableScope; + private final Scope joinScope; + + public MergeAnalysis( + Table targetTable, + List targetColumnsMetadata, + List targetColumnHandles, + List targetRedistributionColumnHandles, + List> mergeCaseColumnHandles, + Set nonNullableTargetColumnHandles, + Map targetColumnHandleFieldNumbers, + List insertPartitioningArgumentIndexes, + Optional insertLayout, + Optional updateLayout, + Scope targetTableScope, + Scope joinScope) + { + this.targetTable = requireNonNull(targetTable, "targetTable is null"); + this.targetColumnsMetadata = requireNonNull(targetColumnsMetadata, "targetColumnsMetadata is null"); + this.targetColumnHandles = requireNonNull(targetColumnHandles, "targetColumnHandles is null"); + this.targetRedistributionColumnHandles = requireNonNull(targetRedistributionColumnHandles, "targetRedistributionColumnHandles is null"); + this.mergeCaseColumnHandles = requireNonNull(mergeCaseColumnHandles, "mergeCaseColumnHandles is null"); + this.nonNullableColumnHandles = requireNonNull(nonNullableTargetColumnHandles, "nonNullableTargetColumnHandles is null"); + this.columnHandleFieldNumbers = requireNonNull(targetColumnHandleFieldNumbers, "targetColumnHandleFieldNumbers is null"); + this.insertLayout = requireNonNull(insertLayout, "insertLayout is null"); + this.updateLayout = requireNonNull(updateLayout, "updateLayout is null"); + this.insertPartitioningArgumentIndexes = (requireNonNull(insertPartitioningArgumentIndexes, "insertPartitioningArgumentIndexes is null")); + this.targetTableScope = requireNonNull(targetTableScope, "targetTableScope is null"); + this.joinScope = requireNonNull(joinScope, "joinScope is null"); + } + + public Table getTargetTable() + { + return targetTable; + } + + public List getTargetColumnsMetadata() + { + return targetColumnsMetadata; + } + + public List getTargetColumnHandles() + { + return targetColumnHandles; + } + + public List getTargetRedistributionColumnHandles() + { + return targetRedistributionColumnHandles; + } + + public List> getMergeCaseColumnHandles() + { + return mergeCaseColumnHandles; + } + + public Set getNonNullableColumnHandles() + { + return nonNullableColumnHandles; + } + + public Map getColumnHandleFieldNumbers() + { + return columnHandleFieldNumbers; + } + + public List getInsertPartitioningArgumentIndexes() + { + return insertPartitioningArgumentIndexes; + } + + public Optional getInsertLayout() + { + return insertLayout; + } + + public Optional getUpdateLayout() + { + return updateLayout; + } + + public Scope getJoinScope() + { + return joinScope; + } + + public Scope getTargetTableScope() + { + return targetTableScope; + } + } } diff --git a/presto-blackhole/src/main/java/com/facebook/presto/plugin/blackhole/BlackHoleNodePartitioningProvider.java b/presto-blackhole/src/main/java/com/facebook/presto/plugin/blackhole/BlackHoleNodePartitioningProvider.java index b125957fe7898..584e137c1c1db 100644 --- a/presto-blackhole/src/main/java/com/facebook/presto/plugin/blackhole/BlackHoleNodePartitioningProvider.java +++ b/presto-blackhole/src/main/java/com/facebook/presto/plugin/blackhole/BlackHoleNodePartitioningProvider.java @@ -26,6 +26,7 @@ import com.facebook.presto.spi.connector.ConnectorTransactionHandle; import java.util.List; +import java.util.Optional; import java.util.function.ToIntFunction; import static com.facebook.presto.spi.StandardErrorCode.NOT_SUPPORTED; @@ -43,10 +44,10 @@ public BlackHoleNodePartitioningProvider(NodeManager nodeManager) } @Override - public ConnectorBucketNodeMap getBucketNodeMap(ConnectorTransactionHandle transactionHandle, ConnectorSession session, ConnectorPartitioningHandle partitioningHandle, List sortedNodes) + public Optional getBucketNodeMap(ConnectorTransactionHandle transactionHandle, ConnectorSession session, ConnectorPartitioningHandle partitioningHandle, List sortedNodes) { // create one bucket per node - return createBucketNodeMap(nodeManager.getRequiredWorkerNodes().size()); + return Optional.of(createBucketNodeMap(nodeManager.getRequiredWorkerNodes().size())); } @Override diff --git a/presto-common/src/main/java/com/facebook/presto/common/block/BlockUtil.java b/presto-common/src/main/java/com/facebook/presto/common/block/BlockUtil.java index f2d9b3505d4fb..c7eeed336c1d2 100644 --- a/presto-common/src/main/java/com/facebook/presto/common/block/BlockUtil.java +++ b/presto-common/src/main/java/com/facebook/presto/common/block/BlockUtil.java @@ -307,4 +307,27 @@ static Block[] ensureBlocksAreLoaded(Block[] blocks) // No newly loaded blocks return blocks; } + + static boolean[] copyIsNullAndAppendNull(@Nullable boolean[] isNull, int offsetBase, int positionCount) + { + int desiredLength = offsetBase + positionCount + 1; + boolean[] newIsNull = new boolean[desiredLength]; + if (isNull != null) { + checkArrayRange(isNull, offsetBase, positionCount); + System.arraycopy(isNull, 0, newIsNull, 0, desiredLength - 1); + } + // mark the last element to append null + newIsNull[desiredLength - 1] = true; + return newIsNull; + } + + static int[] copyOffsetsAndAppendNull(int[] offsets, int offsetBase, int positionCount) + { + int desiredLength = offsetBase + positionCount + 2; + checkArrayRange(offsets, offsetBase, positionCount + 1); + int[] newOffsets = Arrays.copyOf(offsets, desiredLength); + // Null element does not move the offset forward + newOffsets[desiredLength - 1] = newOffsets[desiredLength - 2]; + return newOffsets; + } } diff --git a/presto-common/src/main/java/com/facebook/presto/common/block/DictionaryBlock.java b/presto-common/src/main/java/com/facebook/presto/common/block/DictionaryBlock.java index 9587f6c8bfc6d..49e7d2497549c 100644 --- a/presto-common/src/main/java/com/facebook/presto/common/block/DictionaryBlock.java +++ b/presto-common/src/main/java/com/facebook/presto/common/block/DictionaryBlock.java @@ -508,6 +508,33 @@ public Block getLoadedBlock() return new DictionaryBlock(idsOffset, getPositionCount(), loadedDictionary, ids, false, randomDictionaryId()); } + public Block createProjection(Block newDictionary) + { + if (newDictionary.getPositionCount() != dictionary.getPositionCount()) { + throw new IllegalArgumentException("newDictionary must have the same position count"); + } + + // if the new dictionary is lazy be careful to not materialize it + if (newDictionary instanceof LazyBlock) { + return new LazyBlock(positionCount, (block) -> { + Block newDictionaryBlock = newDictionary.getBlock(0); + Block newBlock = createProjection(newDictionaryBlock); + block.setBlock(newBlock); + }); + } + if (newDictionary instanceof RunLengthEncodedBlock) { + RunLengthEncodedBlock rle = (RunLengthEncodedBlock) newDictionary; + return new RunLengthEncodedBlock(rle.getValue(), positionCount); + } + + // unwrap dictionary in dictionary + int[] newIds = new int[positionCount]; + for (int position = 0; position < positionCount; position++) { + newIds[position] = getIdUnchecked(position); + } + return new DictionaryBlock(0, positionCount, newDictionary, newIds, false, randomDictionaryId()); + } + public Block getDictionary() { return dictionary; @@ -533,6 +560,11 @@ public int getId(int position) return ids[position + idsOffset]; } + private int getIdUnchecked(int position) + { + return ids[position + idsOffset]; + } + public DictionaryId getDictionarySourceId() { return dictionarySourceId; diff --git a/presto-common/src/main/java/com/facebook/presto/common/block/RowBlock.java b/presto-common/src/main/java/com/facebook/presto/common/block/RowBlock.java index 8fde479c047ca..42ce04160cb20 100644 --- a/presto-common/src/main/java/com/facebook/presto/common/block/RowBlock.java +++ b/presto-common/src/main/java/com/facebook/presto/common/block/RowBlock.java @@ -17,9 +17,11 @@ import org.openjdk.jol.info.ClassLayout; import java.util.Arrays; +import java.util.List; import java.util.Objects; import java.util.Optional; import java.util.function.ObjLongConsumer; +import java.util.stream.Collectors; import static com.facebook.presto.common.block.BlockUtil.ensureBlocksAreLoaded; import static io.airlift.slice.SizeOf.sizeOf; @@ -248,6 +250,39 @@ public void retainedBytesForEachPart(ObjLongConsumer consumer) consumer.accept(this, INSTANCE_SIZE); } + /** + * Returns the row fields from the specified block. The block maybe a LazyBlock, RunLengthEncodedBlock, or + * DictionaryBlock, but the underlying block must be a RowBlock. The returned field blocks will be the same + * length as the specified block, which means they are not null suppressed. + */ + public static List getRowFieldsFromBlock(Block block) + { + // if the block is lazy, be careful to not materialize the nested blocks + if (block instanceof LazyBlock) { + LazyBlock lazyBlock = (LazyBlock) block; + block = lazyBlock.getBlock(0); + } + + if (block instanceof RunLengthEncodedBlock) { + RunLengthEncodedBlock runLengthEncodedBlock = (RunLengthEncodedBlock) block; + RowBlock rowBlock = (RowBlock) runLengthEncodedBlock.getValue(); + return Arrays.stream(rowBlock.fieldBlocks) + .map(fieldBlock -> new RunLengthEncodedBlock(fieldBlock, runLengthEncodedBlock.getPositionCount())) + .collect(Collectors.toList()); + } + if (block instanceof DictionaryBlock) { + DictionaryBlock dictionaryBlock = (DictionaryBlock) block; + RowBlock rowBlock = (RowBlock) dictionaryBlock.getDictionary(); + return Arrays.stream(rowBlock.fieldBlocks) + .map(dictionaryBlock::createProjection) + .collect(Collectors.toList()); + } + if (block instanceof RowBlock) { + return Arrays.asList(((RowBlock) block).fieldBlocks); + } + throw new IllegalArgumentException("Unexpected block type: " + block.getClass().getSimpleName()); + } + @Override public String toString() { diff --git a/presto-common/src/main/java/com/facebook/presto/common/type/AbstractType.java b/presto-common/src/main/java/com/facebook/presto/common/type/AbstractType.java index f13fe5552d852..e52c73981fa2a 100644 --- a/presto-common/src/main/java/com/facebook/presto/common/type/AbstractType.java +++ b/presto-common/src/main/java/com/facebook/presto/common/type/AbstractType.java @@ -92,6 +92,12 @@ public void writeBoolean(BlockBuilder blockBuilder, boolean value) throw new UnsupportedOperationException(getClass().getName()); } + @Override + public byte getByte(Block block, int position) + { + throw new UnsupportedOperationException(getClass().getName()); + } + @Override public long getLong(Block block, int position) { diff --git a/presto-common/src/main/java/com/facebook/presto/common/type/FunctionType.java b/presto-common/src/main/java/com/facebook/presto/common/type/FunctionType.java index 611cbde38db63..7da315cd4b6ca 100644 --- a/presto-common/src/main/java/com/facebook/presto/common/type/FunctionType.java +++ b/presto-common/src/main/java/com/facebook/presto/common/type/FunctionType.java @@ -144,6 +144,12 @@ public void writeBoolean(BlockBuilder blockBuilder, boolean value) throw new UnsupportedOperationException(getClass().getName()); } + @Override + public byte getByte(Block block, int position) + { + throw new UnsupportedOperationException(getClass().getName()); + } + @Override public long getLong(Block block, int position) { diff --git a/presto-common/src/main/java/com/facebook/presto/common/type/TinyintType.java b/presto-common/src/main/java/com/facebook/presto/common/type/TinyintType.java index b151f9291e61f..76103c3372af6 100644 --- a/presto-common/src/main/java/com/facebook/presto/common/type/TinyintType.java +++ b/presto-common/src/main/java/com/facebook/presto/common/type/TinyintType.java @@ -133,6 +133,12 @@ public long getLong(Block block, int position) return (long) block.getByte(position); } + @Override + public byte getByte(Block block, int position) + { + return block.getByte(position); + } + @Override public long getLongUnchecked(UncheckedBlock block, int internalPosition) { diff --git a/presto-common/src/main/java/com/facebook/presto/common/type/Type.java b/presto-common/src/main/java/com/facebook/presto/common/type/Type.java index 251b3b11c055d..e4e2c24a5ca11 100644 --- a/presto-common/src/main/java/com/facebook/presto/common/type/Type.java +++ b/presto-common/src/main/java/com/facebook/presto/common/type/Type.java @@ -98,6 +98,11 @@ default boolean equalValuesAreIdentical() */ boolean getBooleanUnchecked(UncheckedBlock block, int internalPosition); + /** + * Gets the value at the {@code block} {@code position} as a byte. + */ + byte getByte(Block block, int position); + /** * Gets the value at the {@code block} {@code position} as a long. */ diff --git a/presto-common/src/main/java/com/facebook/presto/common/type/TypeWithName.java b/presto-common/src/main/java/com/facebook/presto/common/type/TypeWithName.java index 06d718115d20f..903b31d3e8478 100644 --- a/presto-common/src/main/java/com/facebook/presto/common/type/TypeWithName.java +++ b/presto-common/src/main/java/com/facebook/presto/common/type/TypeWithName.java @@ -145,6 +145,12 @@ public boolean getBooleanUnchecked(UncheckedBlock block, int internalPosition) return type.getBooleanUnchecked(block, internalPosition); } + @Override + public byte getByte(Block block, int position) + { + return type.getByte(block, position); + } + @Override public long getLong(Block block, int position) { diff --git a/presto-docs/src/main/sphinx/connector/iceberg.rst b/presto-docs/src/main/sphinx/connector/iceberg.rst index 4339f54b6c61a..358b1f6ba6a5b 100644 --- a/presto-docs/src/main/sphinx/connector/iceberg.rst +++ b/presto-docs/src/main/sphinx/connector/iceberg.rst @@ -1277,6 +1277,8 @@ SQL Operation Presto Java Presto C++ Comments ``DESCRIBE`` Yes Yes ``UPDATE`` Yes No + +``MERGE`` Yes No ============================== ============= ============ ============================================================================ The Iceberg connector supports querying and manipulating Iceberg tables and schemas @@ -1727,11 +1729,11 @@ For example, ``DESCRIBE`` from the partitioned Iceberg table ``customer``: comment | varchar | | (3 rows) -UPDATE -^^^^^^ +UPDATE and MERGE +^^^^^^^^^^^^^^^^ -The Iceberg connector supports :doc:`../sql/update` operations on Iceberg -tables. Only some tables support updates. These tables must be at minimum format +The Iceberg connector supports :doc:`../sql/update` and :doc:`../sql/merge` operations on Iceberg +tables. Only some tables support them. These tables must be at minimum format version 2, and the ``write.update.mode`` must be set to `merge-on-read`. .. code-block:: sql @@ -1751,6 +1753,16 @@ updates. Query 20250204_010445_00022_ymwi5 failed: Iceberg table updates require at least format version 2 and update mode must be merge-on-read +Iceberg tables do not support running multiple ``MERGE`` statements on the same table in parallel. If two or more ``MERGE`` operations are executed concurrently on the same Iceberg table: + +* The first operation to complete will succeed. +* Subsequent operations will fail due to conflicting writes and will return the following error: + +.. code-block:: text + + Failed to commit Iceberg update to table: + Found conflicting files that can contain records matching true + Schema Evolution ---------------- diff --git a/presto-docs/src/main/sphinx/sql.rst b/presto-docs/src/main/sphinx/sql.rst index 1d9e2006bf715..042bcfea7ad35 100644 --- a/presto-docs/src/main/sphinx/sql.rst +++ b/presto-docs/src/main/sphinx/sql.rst @@ -38,6 +38,7 @@ This chapter describes the SQL syntax used in Presto. sql/grant sql/grant-roles sql/insert + sql/merge sql/prepare sql/refresh-materialized-view sql/reset-session diff --git a/presto-docs/src/main/sphinx/sql/merge.rst b/presto-docs/src/main/sphinx/sql/merge.rst new file mode 100644 index 0000000000000..92607b3877869 --- /dev/null +++ b/presto-docs/src/main/sphinx/sql/merge.rst @@ -0,0 +1,71 @@ +===== +MERGE +===== + +Synopsis +-------- + +.. code-block:: text + + MERGE INTO target_table [ [ AS ] target_alias ] + USING { source_table | query } [ [ AS ] source_alias ] + ON search_condition + WHEN MATCHED THEN + UPDATE SET ( column = expression [, ...] ) + WHEN NOT MATCHED THEN + INSERT [ column_list ] + VALUES (expression, ...) + +Description +----------- + +The ``MERGE`` statement inserts or updates rows in a ``target_table`` based on the contents of the ``source_table``. +The ``search_condition`` defines a relation between the source and target tables. +When the condition is met, the target row is updated. When the condition is not met, a new row is inserted into the target table. +In the ``MATCHED`` case, the ``UPDATE`` column value expressions can depend on any field of the target or the source. +In the ``NOT MATCHED`` case, the ``INSERT`` expressions can depend on any field of the source. + +The ``MERGE`` command requires each target row to match at most one source row. An exception is raised when a single target table row matches more than one source row. +If a source row is not matched by the ``WHEN`` clause and there is no ``WHEN NOT MATCHED`` clause, the source row is ignored. + +The ``MERGE`` statement is commonly used to integrate data from two tables with different contents but similar structures. +For example, the source table could be part of a production transactional system, while the target table might be located in a data warehouse for analytics. +Regularly, MERGE operations are performed to update the analytics warehouse with the latest production data. +You can also use MERGE with tables that have different structures, as long as you can define a condition to match the rows between them. + +MERGE Command Privileges +------------------------ + +The ``MERGE`` statement does not have a dedicated privilege. Instead, executing a ``MERGE`` statement requires the privileges associated with the individual actions it performs: + +* ``UPDATE`` actions: require the ``UPDATE`` privilege on the target table columns referenced in the ``SET`` clause. +* ``INSERT`` actions: require the ``INSERT`` privilege on the target table. + +Each privilege must be granted to the user executing the ``MERGE`` command, based on the specific operations included in the statement. + +Example +------- + +Update the sales information for existing products and insert the sales information for the new products in the market. + +.. code-block:: text + + MERGE INTO product_sales AS s + USING monthly_sales AS ms + ON s.product_id = ms.product_id + WHEN MATCHED THEN + UPDATE SET + sales = sales + ms.sales + , last_sale = ms.sale_date + , current_price = ms.price + WHEN NOT MATCHED THEN + INSERT (product_id, sales, last_sale, current_price) + VALUES (ms.product_id, ms.sales, ms.sale_date, ms.price) + +Limitations +----------- + +Any connector can be used as a source table for a ``MERGE`` statement. +Only connectors which support the ``MERGE`` statement can be the target of a merge operation. +See the :doc:`connector documentation ` for more information. +The ``MERGE`` statement is currently supported only by the iceberg connector. diff --git a/presto-hive/src/main/java/com/facebook/presto/hive/HiveNodePartitioningProvider.java b/presto-hive/src/main/java/com/facebook/presto/hive/HiveNodePartitioningProvider.java index d98ca4ac37323..77d47b2db800d 100644 --- a/presto-hive/src/main/java/com/facebook/presto/hive/HiveNodePartitioningProvider.java +++ b/presto-hive/src/main/java/com/facebook/presto/hive/HiveNodePartitioningProvider.java @@ -27,6 +27,7 @@ import com.facebook.presto.spi.schedule.NodeSelectionStrategy; import java.util.List; +import java.util.Optional; import java.util.function.ToIntFunction; import java.util.stream.IntStream; import java.util.stream.Stream; @@ -64,7 +65,7 @@ public BucketFunction getBucketFunction( } @Override - public ConnectorBucketNodeMap getBucketNodeMap(ConnectorTransactionHandle transactionHandle, ConnectorSession session, ConnectorPartitioningHandle partitioningHandle, List sortedNodes) + public Optional getBucketNodeMap(ConnectorTransactionHandle transactionHandle, ConnectorSession session, ConnectorPartitioningHandle partitioningHandle, List sortedNodes) { HivePartitioningHandle handle = (HivePartitioningHandle) partitioningHandle; NodeSelectionStrategy nodeSelectionStrategy = getNodeSelectionStrategy(session); @@ -72,9 +73,9 @@ public ConnectorBucketNodeMap getBucketNodeMap(ConnectorTransactionHandle transa switch (nodeSelectionStrategy) { case HARD_AFFINITY: case SOFT_AFFINITY: - return createBucketNodeMap(Stream.generate(() -> sortedNodes).flatMap(List::stream).limit(bucketCount).collect(toImmutableList()), nodeSelectionStrategy); + return Optional.of(createBucketNodeMap(Stream.generate(() -> sortedNodes).flatMap(List::stream).limit(bucketCount).collect(toImmutableList()), nodeSelectionStrategy)); case NO_PREFERENCE: - return createBucketNodeMap(bucketCount); + return Optional.of(createBucketNodeMap(bucketCount)); default: throw new PrestoException(NODE_SELECTION_NOT_SUPPORTED, format("Unsupported node selection strategy %s", nodeSelectionStrategy)); } diff --git a/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergAbstractMetadata.java b/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergAbstractMetadata.java index 1a5db48f80051..36a77ce049198 100644 --- a/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergAbstractMetadata.java +++ b/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergAbstractMetadata.java @@ -36,6 +36,7 @@ import com.facebook.presto.spi.ColumnMetadata; import com.facebook.presto.spi.ConnectorDeleteTableHandle; import com.facebook.presto.spi.ConnectorInsertTableHandle; +import com.facebook.presto.spi.ConnectorMergeTableHandle; import com.facebook.presto.spi.ConnectorNewTableLayout; import com.facebook.presto.spi.ConnectorOutputTableHandle; import com.facebook.presto.spi.ConnectorSession; @@ -54,9 +55,11 @@ import com.facebook.presto.spi.TableNotFoundException; import com.facebook.presto.spi.connector.ConnectorMetadata; import com.facebook.presto.spi.connector.ConnectorOutputMetadata; +import com.facebook.presto.spi.connector.ConnectorPartitioningHandle; import com.facebook.presto.spi.connector.ConnectorTableVersion; import com.facebook.presto.spi.connector.ConnectorTableVersion.VersionOperator; import com.facebook.presto.spi.connector.ConnectorTableVersion.VersionType; +import com.facebook.presto.spi.connector.RowChangeParadigm; import com.facebook.presto.spi.function.StandardFunctionResolution; import com.facebook.presto.spi.plan.FilterStatsCalculatorService; import com.facebook.presto.spi.relation.RowExpression; @@ -83,8 +86,10 @@ import org.apache.iceberg.FileFormat; import org.apache.iceberg.FileMetadata; import org.apache.iceberg.IsolationLevel; +import org.apache.iceberg.MetadataColumns; import org.apache.iceberg.MetricsConfig; import org.apache.iceberg.MetricsModes.None; +import org.apache.iceberg.PartitionField; import org.apache.iceberg.PartitionSpec; import org.apache.iceberg.RowDelta; import org.apache.iceberg.RowLevelOperationMode; @@ -102,13 +107,16 @@ import org.apache.iceberg.types.Type; import org.apache.iceberg.types.TypeUtil; import org.apache.iceberg.types.Types; +import org.apache.iceberg.types.Types.IntegerType; import org.apache.iceberg.types.Types.NestedField; +import org.apache.iceberg.types.Types.StringType; import org.apache.iceberg.util.CharSequenceSet; import org.apache.iceberg.view.View; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; +import java.util.Comparator; import java.util.List; import java.util.Map; import java.util.Objects; @@ -145,6 +153,9 @@ import static com.facebook.presto.iceberg.IcebergMetadataColumn.DELETE_FILE_PATH; import static com.facebook.presto.iceberg.IcebergMetadataColumn.FILE_PATH; import static com.facebook.presto.iceberg.IcebergMetadataColumn.IS_DELETED; +import static com.facebook.presto.iceberg.IcebergMetadataColumn.MERGE_PARTITION_DATA; +import static com.facebook.presto.iceberg.IcebergMetadataColumn.MERGE_PARTITION_SPEC_ID; +import static com.facebook.presto.iceberg.IcebergMetadataColumn.MERGE_TARGET_ROW_ID_DATA; import static com.facebook.presto.iceberg.IcebergMetadataColumn.UPDATE_ROW_DATA; import static com.facebook.presto.iceberg.IcebergPartitionType.ALL; import static com.facebook.presto.iceberg.IcebergSessionProperties.getCompressionCodec; @@ -194,6 +205,7 @@ import static com.facebook.presto.iceberg.util.StatisticsUtil.calculateBaseTableStatistics; import static com.facebook.presto.iceberg.util.StatisticsUtil.calculateStatisticsConsideringLayout; import static com.facebook.presto.spi.StandardErrorCode.NOT_SUPPORTED; +import static com.facebook.presto.spi.connector.RowChangeParadigm.DELETE_ROW_AND_INSERT_ROW; import static com.facebook.presto.spi.statistics.TableStatisticType.ROW_COUNT; import static com.google.common.base.Strings.isNullOrEmpty; import static com.google.common.base.Verify.verify; @@ -203,6 +215,7 @@ import static java.lang.String.format; import static java.util.Collections.singletonList; import static java.util.Objects.requireNonNull; +import static java.util.function.Function.identity; import static org.apache.iceberg.MetadataColumns.ROW_POSITION; import static org.apache.iceberg.RowLevelOperationMode.MERGE_ON_READ; import static org.apache.iceberg.SnapshotSummary.DELETED_RECORDS_PROP; @@ -706,6 +719,98 @@ public Optional getDeleteRowIdColumn(ConnectorSession session, Con return Optional.of(IcebergColumnHandle.create(ROW_POSITION, typeManager, REGULAR)); } + /** + * Return the row change paradigm supported by the connector on the table. + */ + @Override + public RowChangeParadigm getRowChangeParadigm(ConnectorSession session, ConnectorTableHandle tableHandle) + { + return DELETE_ROW_AND_INSERT_ROW; + } + + @Override + public ColumnHandle getMergeTargetTableRowIdColumnHandle(ConnectorSession session, ConnectorTableHandle tableHandle) + { + Types.StructType type = Types.StructType.of(ImmutableList.builder() + .add(MetadataColumns.FILE_PATH) + .add(MetadataColumns.ROW_POSITION) + .add(NestedField.required(MERGE_PARTITION_SPEC_ID.getId(), MERGE_PARTITION_SPEC_ID.getColumnName(), IntegerType.get())) + .add(NestedField.required(MERGE_PARTITION_DATA.getId(), MERGE_PARTITION_DATA.getColumnName(), StringType.get())) + .build()); + + NestedField field = NestedField.required(MERGE_TARGET_ROW_ID_DATA.getId(), MERGE_TARGET_ROW_ID_DATA.getColumnName(), type); + return IcebergColumnHandle.create(field, typeManager, SYNTHESIZED); + } + + @Override + public Optional getMergeUpdateLayout(ConnectorSession session, ConnectorTableHandle tableHandle) + { +// return Optional.of(IcebergUpdateHandle.INSTANCE); + // TODO #20578: Using the IcebergUpdateHandle.INSTANCE causes the following error: + // java.lang.IllegalArgumentException: com.facebook.presto.sql.planner.PlanFragment could not be converted to JSON + // Caused by: com.fasterxml.jackson.databind.JsonMappingException: + // No connector for handle: MERGE [update = iceberg:INSTANCE] (through reference chain: + // com.facebook.presto.sql.planner.PlanFragment["partitioningScheme"]-> + // com.facebook.presto.spi.plan.PartitioningScheme["partitioning"]-> + // com.facebook.presto.spi.plan.Partitioning["handle"]-> + // com.facebook.presto.spi.plan.PartitioningHandle["connectorHandle"]) + + // TODO #20578: Temporary workaround: + return Optional.empty(); + + // TODO #20578: Zac Blanco's suggestion +// IcebergTableHandle icebergTableHandle = (IcebergTableHandle) tableHandle; +// Table icebergTable = getIcebergTable(session, icebergTableHandle.getSchemaTableName()); +// return tryGetSchema(icebergTable) +// .flatMap(schema -> getWriteLayout(schema, icebergTable.spec(), false)) +// .map(ConnectorNewTableLayout::getPartitioning); + } + + @Override + public ConnectorMergeTableHandle beginMerge(ConnectorSession session, ConnectorTableHandle tableHandle) + { + IcebergTableHandle icebergTableHandle = (IcebergTableHandle) tableHandle; + Table icebergTable = getIcebergTable(session, icebergTableHandle.getSchemaTableName()); + int formatVersion = ((BaseTable) icebergTable).operations().current().formatVersion(); + + if (formatVersion < MIN_FORMAT_VERSION_FOR_DELETE || + !Optional.ofNullable(icebergTable.properties().get(TableProperties.UPDATE_MODE)) + .map(mode -> mode.equals(MERGE_ON_READ.modeName())) + .orElse(false)) { + throw new RuntimeException("Iceberg table updates require at least format version 2 and update mode must be merge-on-read"); + } + validateTableMode(session, icebergTable); + transaction = icebergTable.newTransaction(); + + IcebergInsertTableHandle insertHandle = new IcebergInsertTableHandle( + icebergTableHandle.getSchemaName(), + icebergTableHandle.getIcebergTableName(), + toPrestoSchema(icebergTable.schema(), typeManager), + // TODO #20578: Do we need to use "icebergTable.spec()" or "icebergTable.specs()"? + toPrestoPartitionSpec(icebergTable.spec(), typeManager), + getColumns(icebergTable.schema(), icebergTable.spec(), typeManager), + icebergTable.location(), + getFileFormat(icebergTable), + getCompressionCodec(session), + icebergTable.properties(), + getSupportedSortFields(icebergTable.schema(), icebergTable.sortOrder())); + + return new IcebergMergeTableHandle(icebergTableHandle, insertHandle); + } + + @Override + public void finishMerge( + ConnectorSession session, + ConnectorMergeTableHandle tableHandle, + Collection fragments, + Collection computedStatistics) + { + IcebergWritableTableHandle insertTableHandle = + ((IcebergMergeTableHandle) tableHandle).getInsertTableHandle(); + + finishWrite(session, insertTableHandle, fragments, UPDATE_AFTER); + } + @Override public boolean isLegacyGetLayoutSupported(ConnectorSession session, ConnectorTableHandle tableHandle) { @@ -725,6 +830,7 @@ protected List getColumnMetadata(ConnectorSession session, Table .setExtraInfo(partitionFields.containsKey(column.name()) ? columnExtraInfo(partitionFields.get(column.name())) : null) + .setNullable(column.isOptional()) .build()) .collect(toImmutableList()); } @@ -923,6 +1029,45 @@ public void renameColumn(ConnectorSession session, ConnectorTableHandle tableHan transaction.commitTransaction(); } + @Override + public Optional getInsertLayout(ConnectorSession session, ConnectorTableHandle tableHandle) + { + IcebergTableHandle table = (IcebergTableHandle) tableHandle; + Table icebergTable = getIcebergTable(session, table.getSchemaTableName()); + return getWriteLayout(icebergTable.schema(), icebergTable.spec(), false); + } + + private Optional getWriteLayout(Schema tableSchema, PartitionSpec partitionSpec, boolean forceRepartitioning) + { + if (partitionSpec.isUnpartitioned()) { + return Optional.empty(); + } + + if (true) { // TODO #20578: WIP: partitioning not yet supported, so it returns an empty Optional. + return Optional.empty(); + } + + Map columnById = getColumns(tableSchema, partitionSpec, typeManager).stream() + .collect(toImmutableMap(IcebergColumnHandle::getId, identity())); + + List partitioningColumns = partitionSpec.fields().stream() + .sorted(Comparator.comparing(PartitionField::sourceId)) + .map(field -> requireNonNull(columnById.get(field.sourceId()), () -> "Cannot find source column for partitioning field " + field)) + .distinct() + .collect(toImmutableList()); + List partitioningColumnNames = partitioningColumns.stream() + .map(IcebergColumnHandle::getName) + .collect(toImmutableList()); + + if (!forceRepartitioning && partitionSpec.fields().stream().allMatch(field -> field.transform().isIdentity())) { + // Do not set partitioningHandle, to let engine determine whether to repartition data or not, on stat-based basis. + return Optional.of(new ConnectorNewTableLayout(partitioningColumnNames)); + } + + IcebergPartitioningHandle partitioningHandle = new IcebergPartitioningHandle(toPartitionFields(partitionSpec), partitioningColumns); + return Optional.of(new ConnectorNewTableLayout(partitioningHandle, partitioningColumnNames)); + } + @Override public ConnectorInsertTableHandle beginInsert(ConnectorSession session, ConnectorTableHandle tableHandle) { diff --git a/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergBucketFunction.java b/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergBucketFunction.java new file mode 100644 index 0000000000000..9334748841521 --- /dev/null +++ b/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergBucketFunction.java @@ -0,0 +1,149 @@ +/* + * Licensed 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. + */ +package com.facebook.presto.iceberg; + +import com.facebook.presto.common.Page; +import com.facebook.presto.common.type.Type; +import com.facebook.presto.hive.HiveBucketing; +import com.facebook.presto.iceberg.PartitionTransforms.ValueTransform; +import com.facebook.presto.spi.BucketFunction; +import org.apache.iceberg.PartitionSpec; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import static com.facebook.presto.iceberg.PartitionTransforms.getColumnTransform; +import static com.google.common.base.Preconditions.checkArgument; +import static com.google.common.base.Preconditions.checkState; +import static com.google.common.collect.ImmutableList.toImmutableList; +import static java.util.Objects.requireNonNull; + +// TODO #20578: WIP - Class implementation under development. + +public class IcebergBucketFunction + implements BucketFunction +{ + private final int bucketCount; + + private final List partitionColumns; +// private final List hashCodeInvokers; // TODO #20578: attribute used by Trino. + private final List types; // TODO #20578: implementation based on HiveBucketFunction code. + + public IcebergBucketFunction( +// TypeOperators typeOperators, // TODO #20578: attribute used by Trino. + List types, // TODO #20578: implementation based on HiveBucketFunction code. + PartitionSpec partitionSpec, + List partitioningColumns, + int bucketCount) + { + this.types = requireNonNull(types, "types is null"); // TODO #20578: implementation based on HiveBucketFunction code. + requireNonNull(partitionSpec, "partitionSpec is null"); + checkArgument(!partitionSpec.isUnpartitioned(), "empty partitionSpec"); + requireNonNull(partitioningColumns, "partitioningColumns is null"); +// requireNonNull(typeOperators, "typeOperators is null"); // TODO #20578: parameter used by Trino. + checkArgument(bucketCount > 0, "Invalid bucketCount: %s", bucketCount); + + this.bucketCount = bucketCount; + + Map fieldIdToInputChannel = new HashMap<>(); + for (int i = 0; i < partitioningColumns.size(); i++) { + Integer previous = fieldIdToInputChannel.put(partitioningColumns.get(i).getId(), i); + checkState(previous == null, "Duplicate id %s in %s at %s and %s", partitioningColumns.get(i).getId(), partitioningColumns, i, previous); + } + partitionColumns = partitionSpec.fields().stream() + .map(field -> { + Integer channel = fieldIdToInputChannel.get(field.sourceId()); + checkArgument(channel != null, "partition field not found: %s", field); + Type inputType = partitioningColumns.get(channel).getType(); + PartitionTransforms.ColumnTransform transform = getColumnTransform(field, inputType); + return new PartitionColumn(channel, transform.getValueTransform(), transform.getType()); + }) + .collect(toImmutableList()); + + // TODO #20578: used by Trino. +// hashCodeInvokers = partitionColumns.stream() +// .map(PartitionColumn::getResultType) +// .map(type -> typeOperators.getHashCodeOperator(type, simpleConvention(FAIL_ON_NULL, NEVER_NULL))) +// .collect(toImmutableList()); + } + + @Override + public int getBucket(Page page, int position) + { + return HiveBucketing.getBucket(bucketCount, types, page, position); + + // TODO #20578: Trino. +// long hash = 0; +// +// for (int i = 0; i < partitionColumns.size(); i++) { +// PartitionColumn partitionColumn = partitionColumns.get(i); +// Block block = page.getBlock(partitionColumn.getSourceChannel()); +// Object value = partitionColumn.getValueTransform().apply(block, position); +// long valueHash = hashValue(hashCodeInvokers.get(i), value); +// hash = (31 * hash) + valueHash; +// } +// +// return (int) ((hash & Long.MAX_VALUE) % bucketCount); + } + + // TODO #20578: Trino. +// private static long hashValue(MethodHandle method, Object value) +// { +// if (value == null) { +// return NULL_HASH_CODE; +// } +// try { +// return (long) method.invoke(value); +// } +// catch (Throwable throwable) { +// if (throwable instanceof Error) { +// throw (Error) throwable; +// } +// if (throwable instanceof RuntimeException) { +// throw (RuntimeException) throwable; +// } +// throw new RuntimeException(throwable); +// } +// } + + private static class PartitionColumn + { + private final int sourceChannel; + private final ValueTransform valueTransform; + private final Type resultType; + + public PartitionColumn(int sourceChannel, ValueTransform valueTransform, Type resultType) + { + this.sourceChannel = sourceChannel; + this.valueTransform = requireNonNull(valueTransform, "valueTransform is null"); + this.resultType = requireNonNull(resultType, "resultType is null"); + } + + public int getSourceChannel() + { + return sourceChannel; + } + + public Type getResultType() + { + return resultType; + } + + public ValueTransform getValueTransform() + { + return valueTransform; + } + } +} diff --git a/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergColumnHandle.java b/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergColumnHandle.java index 62fafea0d48d8..3afa99d710d72 100644 --- a/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergColumnHandle.java +++ b/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergColumnHandle.java @@ -37,6 +37,7 @@ import static com.facebook.presto.iceberg.IcebergMetadataColumn.DELETE_FILE_PATH; import static com.facebook.presto.iceberg.IcebergMetadataColumn.FILE_PATH; import static com.facebook.presto.iceberg.IcebergMetadataColumn.IS_DELETED; +import static com.facebook.presto.iceberg.IcebergMetadataColumn.MERGE_TARGET_ROW_ID_DATA; import static com.facebook.presto.iceberg.IcebergMetadataColumn.UPDATE_ROW_DATA; import static com.facebook.presto.iceberg.TypeConverter.toPrestoType; import static com.google.common.base.Preconditions.checkArgument; @@ -109,6 +110,12 @@ public boolean isUpdateRowIdColumn() return columnIdentity.getId() == UPDATE_ROW_DATA.getId(); } + @JsonIgnore + public boolean isMergeTargetTableRowIdColumn() + { + return columnIdentity.getId() == MERGE_TARGET_ROW_ID_DATA.getId(); + } + @Override public ColumnHandle withRequiredSubfields(List subfields) { diff --git a/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergCommonModule.java b/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergCommonModule.java index 0967a0f7c2c52..f14b2ff51dd99 100644 --- a/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergCommonModule.java +++ b/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergCommonModule.java @@ -29,7 +29,6 @@ import com.facebook.presto.hive.HdfsEnvironment; import com.facebook.presto.hive.HiveDwrfEncryptionProvider; import com.facebook.presto.hive.HiveHdfsConfiguration; -import com.facebook.presto.hive.HiveNodePartitioningProvider; import com.facebook.presto.hive.MetastoreClientConfig; import com.facebook.presto.hive.OrcFileWriterConfig; import com.facebook.presto.hive.OrcFileWriterFactory; @@ -162,7 +161,8 @@ protected void setup(Binder binder) binder.bind(OrcFileWriterFactory.class).in(Scopes.SINGLETON); binder.bind(SortParameters.class).in(Scopes.SINGLETON); binder.bind(ConnectorPageSinkProvider.class).to(IcebergPageSinkProvider.class).in(Scopes.SINGLETON); - binder.bind(ConnectorNodePartitioningProvider.class).to(HiveNodePartitioningProvider.class).in(Scopes.SINGLETON); + // TODO #20578: Verify if the new partition provider works as expected for all queries and commands. + binder.bind(ConnectorNodePartitioningProvider.class).to(IcebergNodePartitioningProvider.class).in(Scopes.SINGLETON); configBinder(binder).bindConfig(ParquetFileWriterConfig.class); diff --git a/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergHandleResolver.java b/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergHandleResolver.java index 199939c6b7985..fce1c0715e22e 100644 --- a/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergHandleResolver.java +++ b/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergHandleResolver.java @@ -18,10 +18,12 @@ import com.facebook.presto.spi.ConnectorDeleteTableHandle; import com.facebook.presto.spi.ConnectorHandleResolver; import com.facebook.presto.spi.ConnectorInsertTableHandle; +import com.facebook.presto.spi.ConnectorMergeTableHandle; import com.facebook.presto.spi.ConnectorOutputTableHandle; import com.facebook.presto.spi.ConnectorSplit; import com.facebook.presto.spi.ConnectorTableHandle; import com.facebook.presto.spi.ConnectorTableLayoutHandle; +import com.facebook.presto.spi.connector.ConnectorPartitioningHandle; import com.facebook.presto.spi.connector.ConnectorTransactionHandle; public class IcebergHandleResolver @@ -63,6 +65,11 @@ public Class getInsertTableHandleClass() return IcebergInsertTableHandle.class; } + public Class getMergeTableHandleClass() + { + return IcebergMergeTableHandle.class; + } + @Override public Class getDeleteTableHandleClass() { @@ -74,4 +81,10 @@ public Class getTransactionHandleClass() { return HiveTransactionHandle.class; } + + @Override + public Class getPartitioningHandleClass() + { + return IcebergPartitioningHandle.class; + } } diff --git a/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergMergeSink.java b/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergMergeSink.java new file mode 100644 index 0000000000000..37608e4369a88 --- /dev/null +++ b/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergMergeSink.java @@ -0,0 +1,230 @@ +/* + * Licensed 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. + */ +package com.facebook.presto.iceberg; + +import com.facebook.airlift.json.JsonCodec; +import com.facebook.presto.common.Page; +import com.facebook.presto.common.PageBuilder; +import com.facebook.presto.common.block.ColumnarRow; +import com.facebook.presto.common.type.VarcharType; +import com.facebook.presto.hive.HdfsContext; +import com.facebook.presto.hive.HdfsEnvironment; +import com.facebook.presto.iceberg.delete.IcebergDeletePageSink; +import com.facebook.presto.spi.ConnectorMergeSink; +import com.facebook.presto.spi.ConnectorPageSink; +import com.facebook.presto.spi.ConnectorSession; +import com.facebook.presto.spi.connector.MergePage; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import io.airlift.slice.Slice; +import org.apache.iceberg.PartitionSpec; +import org.apache.iceberg.Schema; +import org.apache.iceberg.io.LocationProvider; +import org.roaringbitmap.longlong.ImmutableLongBitmapDataProvider; +import org.roaringbitmap.longlong.LongBitmapDataProvider; +import org.roaringbitmap.longlong.Roaring64Bitmap; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; + +import static com.facebook.presto.common.block.ColumnarRow.toColumnarRow; +import static com.facebook.presto.common.type.BigintType.BIGINT; +import static com.facebook.presto.common.type.IntegerType.INTEGER; +import static com.facebook.presto.plugin.base.util.Closables.closeAllSuppress; +import static com.facebook.presto.spi.connector.MergePage.createDeleteAndInsertPages; +import static java.lang.Math.toIntExact; +import static java.util.Objects.requireNonNull; +import static java.util.concurrent.CompletableFuture.completedFuture; + +public class IcebergMergeSink + implements ConnectorMergeSink +{ + private final LocationProvider locationProvider; + private final IcebergFileWriterFactory fileWriterFactory; + private final HdfsEnvironment hdfsEnvironment; + private final JsonCodec jsonCodec; + private final ConnectorSession session; + private final FileFormat fileFormat; + private final Map storageProperties; + private final Schema schema; +// private final Map partitionsSpecs; // TODO #20578: Should we use "partitionsSpec" or "partitionsSpecs" like Trino does? + private final PartitionSpec partitionsSpec; + private final ConnectorPageSink insertPageSink; + private final int columnCount; + private final Map fileDeletions = new HashMap<>(); + + public IcebergMergeSink( + LocationProvider locationProvider, + IcebergFileWriterFactory fileWriterFactory, + HdfsEnvironment hdfsEnvironment, + JsonCodec jsonCodec, + ConnectorSession session, + FileFormat fileFormat, + Map storageProperties, + Schema schema, + PartitionSpec partitionsSpec, + ConnectorPageSink insertPageSink, + int columnCount) + { + this.locationProvider = requireNonNull(locationProvider, "locationProvider is null"); + this.fileWriterFactory = requireNonNull(fileWriterFactory, "fileWriterFactory is null"); + this.hdfsEnvironment = requireNonNull(hdfsEnvironment, "hdfsEnvironment is null"); + this.jsonCodec = requireNonNull(jsonCodec, "jsonCodec is null"); + this.session = requireNonNull(session, "session is null"); + this.fileFormat = requireNonNull(fileFormat, "fileFormat is null"); + this.storageProperties = ImmutableMap.copyOf(requireNonNull(storageProperties, "storageProperties is null")); + this.schema = requireNonNull(schema, "schema is null"); +// this.partitionsSpec = ImmutableMap.copyOf(requireNonNull(partitionsSpec, "partitionsSpecs is null")); // TODO #20578: Should we use "partitionsSpec" or "partitionsSpecs" like Trino does? + this.partitionsSpec = requireNonNull(partitionsSpec, "partitionsSpecs is null"); + this.insertPageSink = requireNonNull(insertPageSink, "insertPageSink is null"); + this.columnCount = columnCount; + } + + /** + * @param page It has N + 2 channels/blocks, where N is the number of columns in the source table.
+ * 1: Source table column 1.
+ * 2: Source table column 2.
+ * N: Source table column N.
+ * N + 1: Operation: INSERT(1), DELETE(2), UPDATE(3). More info: {@link ConnectorMergeSink}
+ * N + 2: Target Table Row ID (_file:varchar, _pos:bigint, partition_spec_id:integer, partition_data:varchar). + */ + @Override + public void storeMergedRows(Page page) + { + MergePage mergePage = createDeleteAndInsertPages(page, columnCount); + + mergePage.getInsertionsPage().ifPresent(insertPageSink::appendPage); + + mergePage.getDeletionsPage().ifPresent(deletions -> { + ColumnarRow rowIdRow = toColumnarRow(deletions.getBlock(deletions.getChannelCount() - 1)); + + for (int position = 0; position < rowIdRow.getPositionCount(); position++) { + Slice filePath = VarcharType.VARCHAR.getSlice(rowIdRow.getField(0), position); + long rowPosition = BIGINT.getLong(rowIdRow.getField(1), position); + + int index = position; + FileDeletion deletion = fileDeletions.computeIfAbsent(filePath, ignored -> { + int partitionSpecId = toIntExact(INTEGER.getLong(rowIdRow.getField(2), index)); + String partitionData = VarcharType.VARCHAR.getSlice(rowIdRow.getField(3), index).toStringUtf8(); + return new FileDeletion(partitionSpecId, partitionData); + }); + + deletion.rowsToDelete().addLong(rowPosition); + } + }); + } + + @Override + public CompletableFuture> finish() + { + List fragments = new ArrayList<>(insertPageSink.finish().join()); + + fileDeletions.forEach((dataFilePath, deletion) -> { + ConnectorPageSink sink = createPositionDeletePageSink( + dataFilePath.toStringUtf8(), +// partitionsSpecs.get(deletion.partitionSpecId()), // TODO #20578: original Trino method parameter value. + partitionsSpec, + deletion.partitionDataJson()); + + fragments.addAll(writePositionDeletes(sink, deletion.rowsToDelete())); + }); + + return completedFuture(fragments); + } + + @Override + public void abort() + { + insertPageSink.abort(); + } + + private ConnectorPageSink createPositionDeletePageSink(String dataFilePath, PartitionSpec partitionSpec, String partitionDataJson) + { + return new IcebergDeletePageSink( + partitionSpec, + Optional.of(partitionDataJson), + locationProvider, + fileWriterFactory, + hdfsEnvironment, + new HdfsContext(session), + jsonCodec, + session, + dataFilePath, + fileFormat); + } + + private static Collection writePositionDeletes(ConnectorPageSink sink, ImmutableLongBitmapDataProvider rowsToDelete) + { + try { + return doWritePositionDeletes(sink, rowsToDelete); + } + catch (Throwable t) { + closeAllSuppress(t, sink::abort); + throw t; + } + } + + private static Collection doWritePositionDeletes(ConnectorPageSink sink, ImmutableLongBitmapDataProvider rowsToDelete) + { + PageBuilder pageBuilder = new PageBuilder(ImmutableList.of(BIGINT)); + + rowsToDelete.forEach(rowPosition -> { + BIGINT.writeLong(pageBuilder.getBlockBuilder(0), rowPosition); + pageBuilder.declarePosition(); + if (pageBuilder.isFull()) { + sink.appendPage(pageBuilder.build()); + pageBuilder.reset(); + } + }); + + if (!pageBuilder.isEmpty()) { + sink.appendPage(pageBuilder.build()); + } + + return sink.finish().join(); + } + + private static class FileDeletion + { + private final int partitionSpecId; + private final String partitionDataJson; + private final LongBitmapDataProvider rowsToDelete = new Roaring64Bitmap(); + + public FileDeletion(int partitionSpecId, String partitionDataJson) + { + this.partitionSpecId = partitionSpecId; + this.partitionDataJson = requireNonNull(partitionDataJson, "partitionDataJson is null"); + } + + public int partitionSpecId() + { + return partitionSpecId; + } + + public String partitionDataJson() + { + return partitionDataJson; + } + + public LongBitmapDataProvider rowsToDelete() + { + return rowsToDelete; + } + } +} diff --git a/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergMergeTableHandle.java b/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergMergeTableHandle.java new file mode 100644 index 0000000000000..743e05e15ab4b --- /dev/null +++ b/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergMergeTableHandle.java @@ -0,0 +1,56 @@ +/* + * Licensed 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. + */ +package com.facebook.presto.iceberg; + +import com.facebook.drift.annotations.ThriftConstructor; +import com.facebook.drift.annotations.ThriftField; +import com.facebook.drift.annotations.ThriftStruct; +import com.facebook.presto.spi.ConnectorMergeTableHandle; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; + +import static java.util.Objects.requireNonNull; + +@ThriftStruct +public class IcebergMergeTableHandle + implements ConnectorMergeTableHandle +{ + private final IcebergTableHandle tableHandle; + private final IcebergInsertTableHandle insertTableHandle; + + @JsonCreator + @ThriftConstructor + public IcebergMergeTableHandle( + @JsonProperty("tableHandle") IcebergTableHandle tableHandle, + @JsonProperty("insertTableHandle") IcebergInsertTableHandle insertTableHandle) + { + this.tableHandle = requireNonNull(tableHandle, "tableHandle is null"); + this.insertTableHandle = requireNonNull(insertTableHandle, "insertTableHandle is null"); + } + + @Override + @JsonProperty + @ThriftField(1) + public IcebergTableHandle getTableHandle() + { + return tableHandle; + } + + @JsonProperty + @ThriftField(2) + public IcebergInsertTableHandle getInsertTableHandle() + { + return insertTableHandle; + } +} diff --git a/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergMetadataColumn.java b/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergMetadataColumn.java index 5862fba4975f8..d6ff581485143 100644 --- a/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergMetadataColumn.java +++ b/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergMetadataColumn.java @@ -23,6 +23,7 @@ import static com.facebook.presto.common.type.BigintType.BIGINT; import static com.facebook.presto.common.type.BooleanType.BOOLEAN; +import static com.facebook.presto.common.type.IntegerType.INTEGER; import static com.facebook.presto.common.type.UnknownType.UNKNOWN; import static com.facebook.presto.common.type.VarcharType.VARCHAR; import static com.facebook.presto.iceberg.ColumnIdentity.TypeCategory.PRIMITIVE; @@ -39,7 +40,10 @@ public enum IcebergMetadataColumn * Iceberg reserved row ids begin at INTEGER.MAX_VALUE and count down. Starting with MIN_VALUE here to avoid conflicts. * Inner type for row is not known until runtime. */ - UPDATE_ROW_DATA(Integer.MIN_VALUE, "$row_id", RowType.anonymous(ImmutableList.of(UNKNOWN)), STRUCT) + UPDATE_ROW_DATA(Integer.MIN_VALUE, "$row_id", RowType.anonymous(ImmutableList.of(UNKNOWN)), STRUCT), + MERGE_TARGET_ROW_ID_DATA(Integer.MIN_VALUE + 1, "$row_id", RowType.anonymous(ImmutableList.of(UNKNOWN)), STRUCT), + MERGE_PARTITION_SPEC_ID(Integer.MIN_VALUE + 2, "partition_spec_id", INTEGER, PRIMITIVE), + MERGE_PARTITION_DATA(Integer.MIN_VALUE + 3, "partition_data", VARCHAR, PRIMITIVE) /**/; private static final Set COLUMN_IDS = Stream.of(values()) diff --git a/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergNodePartitioningProvider.java b/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergNodePartitioningProvider.java new file mode 100644 index 0000000000000..1ff2bf46283c5 --- /dev/null +++ b/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergNodePartitioningProvider.java @@ -0,0 +1,91 @@ +/* + * Licensed 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. + */ +package com.facebook.presto.iceberg; + +import com.facebook.presto.common.type.Type; +import com.facebook.presto.spi.BucketFunction; +import com.facebook.presto.spi.ConnectorSession; +import com.facebook.presto.spi.ConnectorSplit; +import com.facebook.presto.spi.Node; +import com.facebook.presto.spi.connector.ConnectorBucketNodeMap; +import com.facebook.presto.spi.connector.ConnectorNodePartitioningProvider; +import com.facebook.presto.spi.connector.ConnectorPartitioningHandle; +import com.facebook.presto.spi.connector.ConnectorTransactionHandle; +import org.apache.iceberg.Schema; + +import java.util.List; +import java.util.Optional; +import java.util.function.ToIntFunction; + +import static com.facebook.presto.iceberg.IcebergUtil.schemaFromHandles; +import static com.facebook.presto.iceberg.PartitionFields.parsePartitionFields; +import static com.google.common.collect.ImmutableList.toImmutableList; + +// TODO #20578: WIP - Class implementation under development. Check Trino's IcebergNodePartitioningProvider for reference. + +public class IcebergNodePartitioningProvider + implements ConnectorNodePartitioningProvider +{ + @Override + public Optional getBucketNodeMap( + ConnectorTransactionHandle transactionHandle, + ConnectorSession session, + ConnectorPartitioningHandle partitioningHandle, + List sortedNodes) + { + return Optional.empty(); + } + + @Override + public BucketFunction getBucketFunction( + ConnectorTransactionHandle transactionHandle, + ConnectorSession session, + ConnectorPartitioningHandle partitioningHandle, + List partitionChannelTypes, + int bucketCount) + { + if (partitioningHandle instanceof IcebergUpdateHandle) { + return new IcebergUpdateBucketFunction(bucketCount); + } + + IcebergPartitioningHandle handle = (IcebergPartitioningHandle) partitioningHandle; + Schema schema = schemaFromHandles(handle.getPartitioningColumns()); + return new IcebergBucketFunction( + // TODO #20578: Check if the value of the following line and compare it with the value contained in the parameter "partitionChannelTypes". + handle.getPartitioningColumns().stream() + .map(IcebergColumnHandle::getType) + .collect(toImmutableList()), + parsePartitionFields(schema, handle.getPartitioning()), + handle.getPartitioningColumns(), + bucketCount); + } + + @Override + public int getBucketCount(ConnectorTransactionHandle transactionHandle, ConnectorSession session, ConnectorPartitioningHandle partitioningHandle) + { + return 0; + } + + @Override + public ToIntFunction getSplitBucketFunction( + ConnectorTransactionHandle transactionHandle, + ConnectorSession session, + ConnectorPartitioningHandle partitioningHandle) + { + return split -> { + // Not currently used, likely because IcebergMetadata.getTableProperties currently does not expose partitioning. + throw new UnsupportedOperationException(); + }; + } +} diff --git a/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergPageSinkProvider.java b/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergPageSinkProvider.java index e8e8db1163aed..1cfb4949fe89d 100644 --- a/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergPageSinkProvider.java +++ b/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergPageSinkProvider.java @@ -17,6 +17,8 @@ import com.facebook.presto.hive.HdfsContext; import com.facebook.presto.hive.HdfsEnvironment; import com.facebook.presto.spi.ConnectorInsertTableHandle; +import com.facebook.presto.spi.ConnectorMergeSink; +import com.facebook.presto.spi.ConnectorMergeTableHandle; import com.facebook.presto.spi.ConnectorOutputTableHandle; import com.facebook.presto.spi.ConnectorPageSink; import com.facebook.presto.spi.ConnectorSession; @@ -102,4 +104,33 @@ private ConnectorPageSink createPageSink(ConnectorSession session, IcebergWritab tableHandle.getSortOrder(), sortParameters); } + + @Override + public ConnectorMergeSink createMergeSink(ConnectorTransactionHandle transactionHandle, ConnectorSession session, ConnectorMergeTableHandle mergeHandle) + { + IcebergMergeTableHandle merge = (IcebergMergeTableHandle) mergeHandle; + IcebergWritableTableHandle tableHandle = merge.getInsertTableHandle(); + SchemaTableName schemaTableName = new SchemaTableName(tableHandle.getSchemaName(), tableHandle.getTableName().getTableName()); + LocationProvider locationProvider = getLocationProvider(schemaTableName, tableHandle.getOutputPath(), tableHandle.getStorageProperties()); + + Schema schema = toIcebergSchema(tableHandle.getSchema()); + PartitionSpec partitionSpec = toIcebergPartitionSpec(tableHandle.getPartitionSpec()).toUnbound().bind(schema); + // TODO #20578: In Trino, they use "Map" instead of "PartitionSpec". Should Presto do the same? + // Map partitionsSpecs = transformValues(tableHandle.getPartitionsSpecsAsJson(), json -> PartitionSpecParser.fromJson(schema, json)); + + ConnectorPageSink pageSink = createPageSink(session, tableHandle); + + return new IcebergMergeSink( + locationProvider, + fileWriterFactory, + hdfsEnvironment, + jsonCodec, + session, + tableHandle.getFileFormat(), + tableHandle.getStorageProperties(), + schema, + partitionSpec, + pageSink, + tableHandle.getInputColumns().size()); + } } diff --git a/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergPageSourceProvider.java b/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergPageSourceProvider.java index c99e5b8034c3a..deb0eb75dc0b4 100644 --- a/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergPageSourceProvider.java +++ b/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergPageSourceProvider.java @@ -97,6 +97,7 @@ import org.apache.iceberg.Table; import org.apache.iceberg.io.LocationProvider; import org.apache.iceberg.types.Conversions; +import org.apache.iceberg.types.Types; import org.apache.iceberg.types.Types.NestedField; import org.apache.parquet.column.ColumnDescriptor; import org.apache.parquet.crypto.InternalFileDecryptor; @@ -150,6 +151,8 @@ import static com.facebook.presto.iceberg.IcebergErrorCode.ICEBERG_CANNOT_OPEN_SPLIT; import static com.facebook.presto.iceberg.IcebergErrorCode.ICEBERG_MISSING_COLUMN; import static com.facebook.presto.iceberg.IcebergErrorCode.ICEBERG_MISSING_DATA; +import static com.facebook.presto.iceberg.IcebergMetadataColumn.MERGE_PARTITION_DATA; +import static com.facebook.presto.iceberg.IcebergMetadataColumn.MERGE_PARTITION_SPEC_ID; import static com.facebook.presto.iceberg.IcebergOrcColumn.ROOT_COLUMN_ID; import static com.facebook.presto.iceberg.IcebergUtil.getColumns; import static com.facebook.presto.iceberg.IcebergUtil.getLocationProvider; @@ -181,6 +184,7 @@ import static com.google.common.collect.ImmutableMap.toImmutableMap; import static com.google.common.collect.ImmutableSet.toImmutableSet; import static com.google.common.collect.Maps.uniqueIndex; +import static io.airlift.slice.Slices.EMPTY_SLICE; import static io.airlift.slice.Slices.utf8Slice; import static java.lang.String.format; import static java.time.ZoneOffset.UTC; @@ -188,6 +192,7 @@ import static java.util.Objects.requireNonNull; import static org.apache.iceberg.MetadataColumns.DELETE_FILE_PATH; import static org.apache.iceberg.MetadataColumns.DELETE_FILE_POS; +import static org.apache.iceberg.MetadataColumns.FILE_PATH; import static org.apache.iceberg.MetadataColumns.ROW_POSITION; import static org.apache.parquet.io.ColumnIOConverter.constructField; import static org.apache.parquet.io.ColumnIOConverter.findNestedColumnIO; @@ -248,6 +253,9 @@ private static ConnectorPageSourceWithRowPositions createParquetPageSource( Path path, long start, long length, + /* TODO #20578: Add these parameters to the method signature if necessary. + int partitionSpecId, + String partitionData,*/ List regularColumns, TupleDomain effectivePredicate, FileFormatDataSourceStats fileFormatDataSourceStats, @@ -356,7 +364,8 @@ private static ConnectorPageSourceWithRowPositions createParquetPageSource( Type prestoType = column.getType(); prestoTypes.add(prestoType); - if (column.getColumnType() == IcebergColumnHandle.ColumnType.SYNTHESIZED && !column.isUpdateRowIdColumn()) { + if (column.getColumnType() == IcebergColumnHandle.ColumnType.SYNTHESIZED && + !column.isUpdateRowIdColumn() && !column.isMergeTargetTableRowIdColumn()) { Subfield pushedDownSubfield = getPushedDownSubfield(column); List nestedColumnPath = nestedColumnPath(pushedDownSubfield); Optional columnIO = findNestedColumnIO(lookupColumnByName(messageColumnIO, pushedDownSubfield.getRootName()), nestedColumnPath); @@ -751,10 +760,10 @@ public ConnectorPageSource createPageSource( Map partitionKeys = split.getPartitionKeys(); - // the update row isn't a valid column that can be read from storage. + // The update row id and merge target table row id aren't valid columns that can be read from storage. // Filter it out from columns passed to the storage page source. Set columnsToReadFromStorage = icebergColumns.stream() - .filter(not(IcebergColumnHandle::isUpdateRowIdColumn)) + .filter(not(column -> column.isUpdateRowIdColumn() || column.isMergeTargetTableRowIdColumn())) .collect(Collectors.toSet()); // add any additional columns which may need to be read from storage @@ -765,22 +774,39 @@ public ConnectorPageSource createPageSource( .filter(not(icebergColumns::contains)) .forEach(columnsToReadFromStorage::add); - // finally, add the fields that the update column requires. - Optional updateRow = icebergColumns.stream() - .filter(IcebergColumnHandle::isUpdateRowIdColumn) + // finally, add the fields that the UPDATE and MERGE column requires. + Optional rowIdColumnHandle = icebergColumns.stream() + .filter(column -> column.isUpdateRowIdColumn() || column.isMergeTargetTableRowIdColumn()) .findFirst(); - updateRow.ifPresent(updateRowIdColumn -> { + rowIdColumnHandle.ifPresent(rowIdColumn -> { Set alreadyRequiredColumnIds = columnsToReadFromStorage.stream() .map(IcebergColumnHandle::getId) .collect(toImmutableSet()); - updateRowIdColumn.getColumnIdentity().getChildren() + rowIdColumn.getColumnIdentity().getChildren() .stream() .filter(colId -> !alreadyRequiredColumnIds.contains(colId.getId())) .forEach(colId -> { - if (colId.getId() == ROW_POSITION.fieldId()) { + if (colId.getId() == FILE_PATH.fieldId()) { + IcebergColumnHandle handle = IcebergColumnHandle.create(FILE_PATH, typeManager, REGULAR); + columnsToReadFromStorage.add(handle); + } + else if (colId.getId() == ROW_POSITION.fieldId()) { IcebergColumnHandle handle = IcebergColumnHandle.create(ROW_POSITION, typeManager, REGULAR); columnsToReadFromStorage.add(handle); } + else if (colId.getId() == MERGE_PARTITION_SPEC_ID.getId()) { + NestedField mergePartitionSpecId = NestedField.required( + MERGE_PARTITION_SPEC_ID.getId(), MERGE_PARTITION_SPEC_ID.getColumnName(), + Types.IntegerType.get()); + IcebergColumnHandle handle = IcebergColumnHandle.create(mergePartitionSpecId, typeManager, REGULAR); + columnsToReadFromStorage.add(handle); + } + else if (colId.getId() == MERGE_PARTITION_DATA.getId()) { + NestedField mergePartitionData = NestedField.required(MERGE_PARTITION_DATA.getId(), + MERGE_PARTITION_DATA.getColumnName(), Types.StringType.get()); + IcebergColumnHandle handle = IcebergColumnHandle.create(mergePartitionData, typeManager, REGULAR); + columnsToReadFromStorage.add(handle); + } else { NestedField column = tableSchema.findField(colId.getId()); if (column == null) { @@ -802,6 +828,9 @@ public ConnectorPageSource createPageSource( split.getStart(), split.getLength(), split.getFileFormat(), + // TODO #20578: Add the following parameters to the IcebergPageSourceProvider class constructor. + // partitionSpec.specId(), + // split.getPartitionDataJson(), columnList, icebergLayout.getValidPredicate(), splitContext.isCacheable()); @@ -814,6 +843,20 @@ public ConnectorPageSource createPageSource( else if (icebergColumn.isDataSequenceNumberColumn()) { metadataValues.put(icebergColumn.getColumnIdentity().getId(), split.getDataSequenceNumber()); } + else if (icebergColumn.isMergeTargetTableRowIdColumn()) { + for (ColumnIdentity subColumn : icebergColumn.getColumnIdentity().getChildren()) { + if (subColumn.getId() == FILE_PATH.fieldId()) { + metadataValues.put(subColumn.getId(), utf8Slice(split.getPath())); + } + else if (subColumn.getId() == MERGE_PARTITION_SPEC_ID.getId()) { + metadataValues.put(subColumn.getId(), (long) partitionSpec.specId()); + } + else if (subColumn.getId() == MERGE_PARTITION_DATA.getId()) { + Optional partitionDataJson = split.getPartitionDataJson(); + metadataValues.put(subColumn.getId(), partitionDataJson.isPresent() ? utf8Slice(partitionDataJson.get()) : EMPTY_SLICE); + } + } + } } List delegateColumns = columnsToReadFromStorage.stream().collect(toImmutableList()); @@ -830,8 +873,7 @@ else if (icebergColumn.isDataSequenceNumberColumn()) { LocationProvider locationProvider = getLocationProvider(table.getSchemaTableName(), outputPath.get(), storageProperties.get()); Supplier deleteSinkSupplier = () -> new IcebergDeletePageSink( - tableSchema, - split.getPartitionSpecAsJson(), + partitionSpec, split.getPartitionDataJson(), locationProvider, fileWriterFactory, @@ -893,7 +935,7 @@ else if (icebergColumn.isDataSequenceNumberColumn()) { deleteFilters, updatedRowPageSinkSupplier, table.getUpdatedColumns(), - updateRow); + rowIdColumnHandle); if (split.getChangelogSplitInfo().isPresent()) { dataSource = new ChangelogPageSource(dataSource, split.getChangelogSplitInfo().get(), (List) (List) desiredColumns, icebergColumns); @@ -1027,7 +1069,9 @@ private ConnectorPageSourceWithRowPositions createDataPageSource( FileFormat fileFormat, List dataColumns, TupleDomain predicate, - boolean isCacheable) + boolean isCacheable/*, TODO #20578: Add these parameters to the method signature: + int partitionSpecId, + String partitionData,*/) { switch (fileFormat) { case PARQUET: diff --git a/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergPartitioningHandle.java b/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergPartitioningHandle.java new file mode 100644 index 0000000000000..4bbbd7afc91dc --- /dev/null +++ b/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergPartitioningHandle.java @@ -0,0 +1,60 @@ +/* + * Licensed 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. + */ +package com.facebook.presto.iceberg; + +import com.facebook.presto.spi.connector.ConnectorPartitioningHandle; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.google.common.collect.ImmutableList; + +import java.util.List; + +import static com.google.common.base.MoreObjects.toStringHelper; +import static java.util.Objects.requireNonNull; + +public class IcebergPartitioningHandle + implements ConnectorPartitioningHandle +{ + private final List partitioning; + private final List partitioningColumns; + + @JsonCreator + public IcebergPartitioningHandle( + @JsonProperty("partitioning") List partitioning, + @JsonProperty("partitioningColumns") List partitioningColumns) + { + this.partitioning = ImmutableList.copyOf(requireNonNull(partitioning, "partitioning is null")); + this.partitioningColumns = ImmutableList.copyOf(requireNonNull(partitioningColumns, "partitioningColumns is null")); + } + + @JsonProperty + public List getPartitioning() + { + return partitioning; + } + + @JsonProperty + public List getPartitioningColumns() + { + return partitioningColumns; + } + + @Override + public String toString() + { + return toStringHelper(this) + .add("partitioning", partitioning) + .toString(); + } +} diff --git a/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergUpdateBucketFunction.java b/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergUpdateBucketFunction.java new file mode 100644 index 0000000000000..2ccac4d61c201 --- /dev/null +++ b/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergUpdateBucketFunction.java @@ -0,0 +1,40 @@ +/* + * Licensed 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. + */ +package com.facebook.presto.iceberg; + +import com.facebook.presto.common.Page; +import com.facebook.presto.common.block.Block; +import com.facebook.presto.spi.BucketFunction; +import io.airlift.slice.Slice; + +import static com.facebook.presto.common.type.VarcharType.VARCHAR; + +public class IcebergUpdateBucketFunction + implements BucketFunction +{ + private final int bucketCount; + + public IcebergUpdateBucketFunction(int bucketCount) + { + this.bucketCount = bucketCount; + } + + @Override + public int getBucket(Page page, int position) + { + Block row = page.getBlock(0).getBlock(position); // TODO #20578: WIP - temporary implementation + Slice value = VARCHAR.getSlice(row, 0); // file path field of row ID + return (value.hashCode() & Integer.MAX_VALUE) % bucketCount; + } +} diff --git a/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergUpdateHandle.java b/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergUpdateHandle.java new file mode 100644 index 0000000000000..1f57f236ccbfc --- /dev/null +++ b/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergUpdateHandle.java @@ -0,0 +1,22 @@ +/* + * Licensed 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. + */ +package com.facebook.presto.iceberg; + +import com.facebook.presto.spi.connector.ConnectorPartitioningHandle; + +public enum IcebergUpdateHandle + implements ConnectorPartitioningHandle +{ + INSTANCE +} diff --git a/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergUpdateablePageSource.java b/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergUpdateablePageSource.java index 7d8d4bb1500fd..14793941e665a 100644 --- a/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergUpdateablePageSource.java +++ b/presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergUpdateablePageSource.java @@ -90,6 +90,7 @@ public class IcebergUpdateablePageSource private final int[] updateRowIdChildColumnIndexes; // The $row_id's index in 'outputColumns', or -1 if there isn't one private final int updateRowIdColumnIndex; + private final int mergeTargetTableRowIdColumnIndex; // Maps the Iceberg field ids of unmodified columns to their indexes in updateRowIdChildColumnIndexes private final Map columnIdToRowIdColumnIndex = new HashMap<>(); // Maps the Iceberg field ids of modified columns to their indexes in the updatedColumns columnValueAndRowIdChannels array @@ -113,7 +114,7 @@ public IcebergUpdateablePageSource( Supplier updatedRowPageSinkSupplier, // the columns that this page source is supposed to update List updatedColumns, - Optional updateRowIdColumn) + Optional rowIdColumn) { requireNonNull(partitionKeys, "partitionKeys is null"); this.tableSchema = requireNonNull(tableSchema, "tableSchema is null"); @@ -128,14 +129,15 @@ public IcebergUpdateablePageSource( this.updatedRowPageSinkSupplier = requireNonNull(updatedRowPageSinkSupplier, "updatedRowPageSinkSupplier is null"); this.updatedColumns = requireNonNull(updatedColumns, "updatedColumns is null"); this.outputColumnToDelegateMapping = new int[columns.size()]; - this.updateRowIdColumnIndex = updateRowIdColumn.map(columns::indexOf).orElse(-1); - this.updateRowIdChildColumnIndexes = updateRowIdColumn + this.updateRowIdColumnIndex = rowIdColumn.map(columns::indexOf).orElse(-1); + this.mergeTargetTableRowIdColumnIndex = getDelegateColumnId(IcebergColumnHandle::isMergeTargetTableRowIdColumn); + this.updateRowIdChildColumnIndexes = rowIdColumn .map(column -> new int[column.getColumnIdentity().getChildren().size()]) .orElse(new int[0]); Map columnToIndex = IntStream.range(0, delegateColumns.size()) .boxed() .collect(toImmutableMap(index -> delegateColumns.get(index).getColumnIdentity(), identity())); - updateRowIdColumn.ifPresent(column -> { + rowIdColumn.ifPresent(column -> { List rowIdFields = column.getColumnIdentity().getChildren(); for (int i = 0; i < rowIdFields.size(); i++) { ColumnIdentity columnIdentity = rowIdFields.get(i); @@ -151,15 +153,16 @@ public IcebergUpdateablePageSource( } } for (int i = 0; i < outputColumnToDelegateMapping.length; i++) { - if (outputColumns.get(i).isUpdateRowIdColumn()) { + IcebergColumnHandle outputColumn = outputColumns.get(i); + if (outputColumn.isUpdateRowIdColumn() || outputColumn.isMergeTargetTableRowIdColumn()) { continue; } - if (!columnToIndex.containsKey(outputColumns.get(i).getColumnIdentity())) { - throw new PrestoException(ICEBERG_MISSING_COLUMN, format("Column %s not found in delegate column map", outputColumns.get(i))); + if (!columnToIndex.containsKey(outputColumn.getColumnIdentity())) { + throw new PrestoException(ICEBERG_MISSING_COLUMN, format("Column %s not found in delegate column map", outputColumn)); } else { - outputColumnToDelegateMapping[i] = columnToIndex.get(outputColumns.get(i).getColumnIdentity()); + outputColumnToDelegateMapping[i] = columnToIndex.get(outputColumn.getColumnIdentity()); } } this.isDeletedColumnId = getDelegateColumnId(IcebergColumnHandle::isDeletedColumn); @@ -198,7 +201,7 @@ public boolean isFinished() * {@link IcebergPartitionInsertingPageSource}. * 2. Using the newly retrieved page, apply any necessary delete filters. * 3. Finally, take the necessary channels from the page with the delete filters applied and - * nest them into the updateRowId channel in {@link #setUpdateRowIdBlock(Page)} + * nest them into the updateRowId channel in {@link #setRowIdBlock(Page)} */ @Override public Page getNextPage() @@ -229,7 +232,7 @@ else if (deleteFilterPredicate.isPresent()) { dataPage = deleteFilterPredicate.get().filterPage(dataPage); } - return setUpdateRowIdBlock(dataPage); + return setRowIdBlock(dataPage); } catch (RuntimeException e) { closeWithSuppression(e); @@ -247,6 +250,14 @@ public void deleteRows(Block rowIds) positionDeleteSink.appendPage(new Page(rowIds)); } + /** + * @param page This page contains the following channels: + *
    + *
  • One channel for the row ID, which includes the position number of this row within the file and the values of the unmodified columns.
  • + *
  • One additional channel for each updated column. These channels contain the new values for the updated columns.
  • + *
+ * @param columnValueAndRowIdChannels Channel numbers of the column values and the row ID's channel number at the end of the list. + */ @Override public void updateRows(Page page, List columnValueAndRowIdChannels) { @@ -268,6 +279,7 @@ public void updateRows(Page page, List columnValueAndRowIdChannels) Set updatedColumnFieldIds = columnIdentityToUpdatedColumnIndex.keySet(); List tableColumns = tableSchema.columns(); Block[] fullPage = new Block[tableColumns.size()]; + // Build a page that will contain the values of the updated rows. The rows stored in the "fullPage" include both updated and non-updated field values. for (int targetChannel = 0; targetChannel < tableColumns.size(); targetChannel++) { Types.NestedField column = tableColumns.get(targetChannel); ColumnIdentity columnIdentity = ColumnIdentity.createColumnIdentity(column); @@ -309,18 +321,18 @@ public void abort() } /** - * The $row_id column used for updates is a composite column of at least one other column in the Page. + * The $row_id column used for updates and merge is a composite column of at least one other column in the Page. * The indexes of the columns needed for the $row_id are in the updateRowIdChildColumnIndexes array. * * @param page The raw Page from the Parquet/ORC reader. * @return A Page where the $row_id channel has been populated. */ - private Page setUpdateRowIdBlock(Page page) + private Page setRowIdBlock(Page page) { Block[] fullPage = new Block[columns.size()]; Block[] rowIdFields; Consumer loopFunc; - if (updateRowIdColumnIndex == -1 || updatedColumns.isEmpty()) { + if ((updateRowIdColumnIndex == -1 || updatedColumns.isEmpty()) && mergeTargetTableRowIdColumnIndex == -1) { loopFunc = (channel) -> fullPage[channel] = page.getBlock(outputColumnToDelegateMapping[channel]); } else { diff --git a/presto-iceberg/src/main/java/com/facebook/presto/iceberg/delete/IcebergDeletePageSink.java b/presto-iceberg/src/main/java/com/facebook/presto/iceberg/delete/IcebergDeletePageSink.java index ac7ee1aa9bbcf..9d735f40d409a 100644 --- a/presto-iceberg/src/main/java/com/facebook/presto/iceberg/delete/IcebergDeletePageSink.java +++ b/presto-iceberg/src/main/java/com/facebook/presto/iceberg/delete/IcebergDeletePageSink.java @@ -36,7 +36,6 @@ import org.apache.hadoop.mapred.JobConf; import org.apache.iceberg.MetricsConfig; import org.apache.iceberg.PartitionSpec; -import org.apache.iceberg.PartitionSpecParser; import org.apache.iceberg.Schema; import org.apache.iceberg.io.LocationProvider; @@ -81,8 +80,7 @@ public class IcebergDeletePageSink private static final MetricsConfig FULL_METRICS_CONFIG = MetricsConfig.fromProperties(ImmutableMap.of(DEFAULT_WRITE_METRICS_MODE, "full")); public IcebergDeletePageSink( - Schema outputSchema, - String partitionSpecAsJson, + PartitionSpec partitionSpec, Optional partitionDataAsJson, LocationProvider locationProvider, IcebergFileWriterFactory fileWriterFactory, @@ -101,7 +99,7 @@ public IcebergDeletePageSink( this.session = requireNonNull(session, "session is null"); this.dataFile = requireNonNull(dataFile, "dataFile is null"); this.fileFormat = requireNonNull(fileFormat, "fileFormat is null"); - this.partitionSpec = PartitionSpecParser.fromJson(outputSchema, partitionSpecAsJson); + this.partitionSpec = requireNonNull(partitionSpec, "partitionSpec is null"); this.partitionData = partitionDataFromJson(partitionSpec, partitionDataAsJson); String fileName = fileFormat.addExtension(String.format("delete_file_%s", randomUUID().toString())); this.outputPath = partitionData.map(partition -> new Path(locationProvider.newDataLocation(partitionSpec, partition, fileName))) @@ -182,6 +180,9 @@ public IcebergPositionDeleteWriter() this.writer = createWriter(); } + /** + * @param page Only one channel. It contains the list of row positions to delete. + */ public void appendPage(Page page) { if (page.getChannelCount() == 1) { diff --git a/presto-iceberg/src/test/java/com/facebook/presto/iceberg/IcebergDistributedTestBase.java b/presto-iceberg/src/test/java/com/facebook/presto/iceberg/IcebergDistributedTestBase.java index 1acc165f4199c..ad2295dbc8ff2 100644 --- a/presto-iceberg/src/test/java/com/facebook/presto/iceberg/IcebergDistributedTestBase.java +++ b/presto-iceberg/src/test/java/com/facebook/presto/iceberg/IcebergDistributedTestBase.java @@ -165,7 +165,9 @@ import static com.facebook.presto.sql.planner.assertions.PlanMatchPattern.output; import static com.facebook.presto.sql.planner.assertions.PlanMatchPattern.tableScan; import static com.facebook.presto.testing.MaterializedResult.resultBuilder; +import static com.facebook.presto.testing.TestingAccessControlManager.TestingPrivilegeType.INSERT_TABLE; import static com.facebook.presto.testing.TestingAccessControlManager.TestingPrivilegeType.SELECT_COLUMN; +import static com.facebook.presto.testing.TestingAccessControlManager.TestingPrivilegeType.UPDATE_TABLE; import static com.facebook.presto.testing.TestingAccessControlManager.privilege; import static com.facebook.presto.testing.TestingConnectorSession.SESSION; import static com.facebook.presto.testing.assertions.Assert.assertEquals; @@ -174,6 +176,7 @@ import static com.google.common.collect.ImmutableMap.toImmutableMap; import static java.lang.String.format; import static java.nio.file.Files.createTempDirectory; +import static java.util.Locale.ENGLISH; import static java.util.Locale.ROOT; import static java.util.Objects.requireNonNull; import static java.util.UUID.randomUUID; @@ -2740,6 +2743,795 @@ public void testUpdateOnPartitionTable() assertQuery("SELECT a, b FROM " + tableName, "VALUES (3,'first'), (4,'4th'), (3,'third')"); } + @DataProvider + public Object[][] partitionedProvider() + { + return new Object[][] { + {""}, // Without partitions. + {"WITH (partitioning = ARRAY['address'])"} + }; + } + + @Test(dataProvider = "partitionedProvider") + public void testMergeSimpleQuery(String partitioning) + { + String targetTable = "merge_query_" + randomTableSuffix(); + assertUpdate(format("CREATE TABLE %s (customer VARCHAR, purchases INT, address VARCHAR) %s", targetTable, partitioning)); + assertUpdate(format("INSERT INTO %s (customer, purchases, address) VALUES ('Aaron', 5, 'Antioch'), ('Bill', 7, 'Buena'), ('Carol', 3, 'Cambridge'), ('Dave', 11, 'Devon')", targetTable), 4); + + @Language("SQL") String sqlMergeCommand = + format("MERGE INTO %s t USING ", targetTable) + + "(VALUES ('Aaron', 6, 'Arches'), ('Carol', 9, 'Centreville'), ('Dave', 11, 'Darbyshire'), ('Ed', 7, 'Etherville')) AS s(customer, purchases, address) " + + "ON (t.customer = s.customer) " + + "WHEN MATCHED THEN" + + " UPDATE SET purchases = s.purchases + t.purchases, address = s.address " + + "WHEN NOT MATCHED THEN" + + " INSERT (customer, purchases, address) VALUES(s.customer, s.purchases, s.address)"; + + assertUpdate(sqlMergeCommand, 4); + + assertQuery("SELECT * FROM " + targetTable, + "VALUES ('Aaron', 11, 'Arches'), ('Bill', 7, 'Buena'), ('Carol', 12, 'Centreville'), ('Dave', 22, 'Darbyshire'), ('Ed', 7, 'Etherville')"); + + assertUpdate("DROP TABLE " + targetTable); + } + + @Test + public void testMergeSimpleQueryPartitioned() + { + String targetTable = "merge_simple_" + randomTableSuffix(); + + assertUpdate(format("CREATE TABLE %s (customer VARCHAR, purchases INT, address VARCHAR) WITH (partitioning = ARRAY['customer'])", targetTable)); + assertUpdate(format("INSERT INTO %s (customer, purchases, address) VALUES ('Aaron', 5, 'Antioch'), ('Bill', 7, 'Buena'), ('Carol', 3, 'Cambridge'), ('Dave', 11, 'Devon')", targetTable), 4); + + @Language("SQL") String sqlMergeCommand = + format("MERGE INTO %s t USING ", targetTable) + + "(SELECT * FROM (VALUES ('Aaron', 6, 'Arches'), ('Carol', 9, 'Centreville'), ('Dave', 11, 'Darbyshire'), ('Ed', 7, 'Etherville'))) AS s(customer, purchases, address) " + + "ON (t.customer = s.customer) " + + "WHEN MATCHED THEN" + + " UPDATE SET purchases = s.purchases + t.purchases, address = s.address " + + "WHEN NOT MATCHED THEN" + + " INSERT (customer, purchases, address) VALUES(s.customer, s.purchases, s.address)"; + + assertUpdate(sqlMergeCommand, 4); + + assertQuery("SELECT * FROM " + targetTable, + "VALUES ('Aaron', 11, 'Arches'), ('Bill', 7, 'Buena'), ('Carol', 12, 'Centreville'), ('Dave', 22, 'Darbyshire'), ('Ed', 7, 'Etherville')"); + + assertUpdate("DROP TABLE " + targetTable); + } + + @Test + public void testMergeWithoutTablesAliases() + { + String targetTable = "test_without_aliases_target_" + randomTableSuffix(); + String sourceTable = "test_without_aliases_source_" + randomTableSuffix(); + + assertUpdate(format("CREATE TABLE %s (customer VARCHAR, purchases INT, address VARCHAR)", targetTable)); + assertUpdate(format("CREATE TABLE %s (customer VARCHAR, purchases INT, address VARCHAR)", sourceTable)); + + assertUpdate(format("INSERT INTO %s (customer, purchases, address) VALUES ('Aaron', 5, 'Antioch'), ('Bill', 7, 'Buena'), ('Carol', 3, 'Cambridge'), ('Dave', 11, 'Devon')", targetTable), 4); + assertUpdate(format("INSERT INTO %s (customer, purchases, address) VALUES ('Aaron', 6, 'Arches'), ('Ed', 7, 'Etherville'), ('Carol', 9, 'Centreville'), ('Dave', 11, 'Darbyshire')", sourceTable), 4); + + @Language("SQL") String sqlMergeCommand = + format("MERGE INTO %s USING %s ", targetTable, sourceTable) + + format("ON (%s.customer = %s.customer) ", targetTable, sourceTable) + + format("WHEN MATCHED THEN" + + " UPDATE SET purchases = %s.purchases + %s.purchases, address = %s.address ", sourceTable, targetTable, sourceTable) + + format("WHEN NOT MATCHED THEN" + + " INSERT (customer, purchases, address) VALUES(%s.customer, %s.purchases, %s.address)", sourceTable, sourceTable, sourceTable); + + assertUpdate(sqlMergeCommand, 4); + + assertQuery("SELECT * FROM " + targetTable, + "VALUES ('Aaron', 11, 'Arches'), ('Bill', 7, 'Buena'), ('Carol', 12, 'Centreville'), ('Dave', 22, 'Darbyshire'), ('Ed', 7, 'Etherville')"); + + assertUpdate("DROP TABLE " + sourceTable); + assertUpdate("DROP TABLE " + targetTable); + } + + @Test + public void testMergeUsingUpdateAndInsert() + { + String targetTable = "merge_simple_target_" + randomTableSuffix(); + String sourceTable = "merge_simple_source_" + randomTableSuffix(); + + assertUpdate(format("CREATE TABLE %s (customer VARCHAR, purchases INT, address VARCHAR)", targetTable)); + assertUpdate(format("CREATE TABLE %s (customer VARCHAR, purchases INT, address VARCHAR)", sourceTable)); + + assertUpdate(format("INSERT INTO %s (customer, purchases, address) VALUES ('Aaron', 5, 'Antioch'), ('Bill', 7, 'Buena'), ('Carol', 3, 'Cambridge'), ('Dave', 11, 'Devon')", targetTable), 4); + assertUpdate(format("INSERT INTO %s (customer, purchases, address) VALUES ('Aaron', 6, 'Arches'), ('Ed', 7, 'Etherville'), ('Carol', 9, 'Centreville'), ('Dave', 11, 'Darbyshire')", sourceTable), 4); + + @Language("SQL") String sqlMergeCommand = + format("MERGE INTO %s t USING %s s ", targetTable, sourceTable) + + "ON (t.customer = s.customer) " + + "WHEN MATCHED THEN" + + " UPDATE SET purchases = s.purchases + t.purchases, address = s.address " + + "WHEN NOT MATCHED THEN" + + " INSERT (customer, purchases, address) VALUES(s.customer, s.purchases, s.address)"; + + assertUpdate(sqlMergeCommand, 4); + + assertQuery("SELECT * FROM " + targetTable, + "VALUES ('Aaron', 11, 'Arches'), ('Ed', 7, 'Etherville'), ('Bill', 7, 'Buena'), ('Carol', 12, 'Centreville'), ('Dave', 22, 'Darbyshire')"); + + assertUpdate("DROP TABLE " + sourceTable); + assertUpdate("DROP TABLE " + targetTable); + } + + @Test + public void testMergeOnlyInsertNewRows() + { + String targetTable = "merge_inserts_" + randomTableSuffix(); + assertUpdate(format("CREATE TABLE %s (customer VARCHAR, purchases INT, address VARCHAR)", targetTable)); + assertUpdate(format("INSERT INTO %s (customer, purchases, address) VALUES ('Aaron', 11, 'Antioch'), ('Bill', 7, 'Buena')", targetTable), 2); + + @Language("SQL") String sqlMergeCommand = + format("MERGE INTO %s t USING ", targetTable) + + "(VALUES ('Carol', 9, 'Centreville'), ('Dave', 22, 'Darbyshire')) AS s(customer, purchases, address)" + + "ON (t.customer = s.customer)" + + "WHEN NOT MATCHED THEN" + + " INSERT (customer, purchases, address) VALUES(s.customer, s.purchases, s.address)"; + + assertUpdate(sqlMergeCommand, 2); + + assertQuery("SELECT * FROM " + targetTable, + "VALUES ('Aaron', 11, 'Antioch'), ('Bill', 7, 'Buena'), ('Carol', 9, 'Centreville'), ('Dave', 22, 'Darbyshire')"); + + assertUpdate("DROP TABLE " + targetTable); + } + + @Test + public void testMergeOnlyUpdateExistingRows() + { + String targetTable = "merge_all_columns_updated_target_" + randomTableSuffix(); + String sourceTable = "merge_all_columns_updated_source_" + randomTableSuffix(); + + assertUpdate(format("CREATE TABLE %s (customer VARCHAR, purchases INT, address VARCHAR)", targetTable)); + assertUpdate(format("CREATE TABLE %s (customer VARCHAR, purchases INT, address VARCHAR)", sourceTable)); + + assertUpdate(format("INSERT INTO %s (customer, purchases, address) VALUES ('Dave', 11, 'Devon'), ('Aaron', 5, 'Antioch'), ('Bill', 7, 'Buena'), ('Carol', 3, 'Cambridge')", targetTable), 4); + assertUpdate(format("INSERT INTO %s (customer, purchases, address) VALUES ('Dave', 11, 'Darbyshire'), ('Aaron', 6, 'Arches'), ('Carol', 9, 'Centreville'), ('Ed', 7, 'Etherville')", sourceTable), 4); + + @Language("SQL") String sqlMergeCommand = + format("MERGE INTO %s t USING %s s ", targetTable, sourceTable) + + "ON (t.customer = s.customer) " + + "WHEN MATCHED THEN" + + " UPDATE SET customer = CONCAT(t.customer, '_updated'), purchases = s.purchases + t.purchases, address = s.address"; + + assertUpdate(sqlMergeCommand, 3); + + assertQuery("SELECT * FROM " + targetTable, + "VALUES ('Dave_updated', 22, 'Darbyshire'), ('Aaron_updated', 11, 'Arches'), ('Bill', 7, 'Buena'), ('Carol_updated', 12, 'Centreville')"); + + assertUpdate("DROP TABLE " + sourceTable); + assertUpdate("DROP TABLE " + targetTable); + } + + @DataProvider + public Object[][] partitionedAndBucketedProvider() + { + return new Object[][] { + {""}, // Without partitions. + {"WITH (partitioning = ARRAY['customer'])"}, + {"WITH (partitioning = ARRAY['purchases'])"}, + {"WITH (partitioning = ARRAY['bucket(customer, 3)'])"}, + {"WITH (partitioning = ARRAY['bucket(purchases, 4)'])"}, + }; + } + + @Test(dataProvider = "partitionedAndBucketedProvider") + public void testMergeUsingSelectQuery(String partitioning) + { + String targetTable = "merge_various_target_" + randomTableSuffix(); + String sourceTable = "merge_various_source_" + randomTableSuffix(); + + assertUpdate(format("CREATE TABLE %s (customer VARCHAR, purchases VARCHAR) %s", targetTable, partitioning)); + assertUpdate(format("CREATE TABLE %s (customer VARCHAR, purchases VARCHAR)", sourceTable)); + + assertUpdate(format("INSERT INTO %s (customer, purchases) VALUES ('Dave', 'dates'), ('Lou', 'limes'), ('Carol', 'candles')", targetTable), 3); + assertUpdate(format("INSERT INTO %s (customer, purchases) VALUES ('Craig', 'candles'), ('Len', 'limes'), ('Joe', 'jellybeans')", sourceTable), 3); + + @Language("SQL") String sqlMergeCommand = + format("MERGE INTO %s t USING (SELECT customer, purchases FROM %s) s ", targetTable, sourceTable) + + "ON (t.purchases = s.purchases) " + + "WHEN MATCHED THEN" + + " UPDATE SET customer = CONCAT(t.customer, '_', s.customer) " + + "WHEN NOT MATCHED THEN" + + " INSERT (customer, purchases) VALUES(s.customer, s.purchases)"; + + assertUpdate(sqlMergeCommand, 3); + + assertQuery("SELECT * FROM " + targetTable, + "VALUES ('Dave', 'dates'), ('Carol_Craig', 'candles'), ('Lou_Len', 'limes'), ('Joe', 'jellybeans')"); + + assertUpdate("DROP TABLE " + sourceTable); + assertUpdate("DROP TABLE " + targetTable); + } + + @Test(dataProvider = "partitionedAndBucketedProvider") + public void testMultipleMergeCommands(String partitioning) + { + int targetCustomerCount = 32; + String targetTable = "merge_multiple_" + randomTableSuffix(); + assertUpdate(format("CREATE TABLE %s (customer VARCHAR, purchases INT, zipcode INT, spouse VARCHAR, address VARCHAR) %s", targetTable, partitioning)); + + // joe_1, 1000, 91000, jan_1, 1 Poe Ct + // ... + // joe_15, 1000, 91000, jan_15, 15 Poe Ct + String originalInsertFirstHalf = IntStream.range(1, targetCustomerCount / 2) + .mapToObj(intValue -> format("('joe_%s', %s, %s, 'jan_%s', '%s Poe Ct')", intValue, 1000, 91000, intValue, intValue)) + .collect(Collectors.joining(", ")); + + // joe_16, 2000, 92000, jan_16, 16 Poe Ct + // ... + // joe_32, 2000, 92000, jan_32, 32 Poe Ct + String originalInsertSecondHalf = IntStream.range(targetCustomerCount / 2, targetCustomerCount) + .mapToObj(intValue -> format("('joe_%s', %s, %s, 'jan_%s', '%s Poe Ct')", intValue, 2000, 92000, intValue, intValue)) + .collect(Collectors.joining(", ")); + + assertUpdate(format("INSERT INTO %s (customer, purchases, zipcode, spouse, address) " + + "VALUES %s, %s", targetTable, originalInsertFirstHalf, originalInsertSecondHalf), targetCustomerCount - 1); + + // joe_16, 3000, 83000, jan_16, 16 Eop Ct + // ... + // joe_32, 3000, 83000, jan_32, 32 Eop Ct + String firstMergeSource = IntStream.range(targetCustomerCount / 2, targetCustomerCount) + .mapToObj(intValue -> format("('joe_%s', %s, %s, 'jill_%s', '%s Eop Ct')", intValue, 3000, 83000, intValue, intValue)) + .collect(Collectors.joining(", ")); + + @Language("SQL") String sqlMergeCommand = + format("MERGE INTO %s t USING (VALUES %s) AS s(customer, purchases, zipcode, spouse, address)", targetTable, firstMergeSource) + + "ON t.customer = s.customer " + + "WHEN MATCHED THEN" + + " UPDATE SET purchases = s.purchases, zipcode = s.zipcode, spouse = s.spouse, address = s.address"; + + assertUpdate(sqlMergeCommand, targetCustomerCount / 2); + + assertQuery( + format("SELECT customer, purchases, zipcode, spouse, address FROM %s", targetTable), + format("VALUES %s, %s", originalInsertFirstHalf, firstMergeSource)); + + // jack_32, 4000, 74000, jan_32, 32 Poe Ct + // ... + // jack_48, 4000, 74000, jan_48, 48 Poe Ct + String nextInsert = IntStream.range(targetCustomerCount, targetCustomerCount * 3 / 2) + .mapToObj(intValue -> format("('jack_%s', %s, %s, 'jan_%s', '%s Poe Ct')", intValue, 4000, 74000, intValue, intValue)) + .collect(Collectors.joining(", ")); + + assertUpdate(format("INSERT INTO %s (customer, purchases, zipcode, spouse, address) VALUES %s", targetTable, nextInsert), targetCustomerCount / 2); + + // joe_1, 5000, 85000, jen_32, 32 Poe Ct + // ... + // joe_48, 5000, 85000, jen_48, 48 Poe Ct + String secondMergeSource = IntStream.range(1, targetCustomerCount * 3 / 2) + .mapToObj(intValue -> format("('joe_%s', %s, %s, 'jen_%s', '%s Poe Ct')", intValue, 5000, 85000, intValue, intValue)) + .collect(Collectors.joining(", ")); + + // Note that the following MERGE INTO does not update the "purchases" column. + sqlMergeCommand = + format("MERGE INTO %s t USING (VALUES %s) AS s(customer, purchases, zipcode, spouse, address)", targetTable, secondMergeSource) + + "ON t.customer = s.customer " + + "WHEN MATCHED THEN" + + " UPDATE SET zipcode = s.zipcode, spouse = s.spouse, address = s.address " + + "WHEN NOT MATCHED THEN" + + " INSERT (customer, purchases, zipcode, spouse, address) VALUES(s.customer, s.purchases, s.zipcode, s.spouse, s.address)"; + + assertUpdate(sqlMergeCommand, targetCustomerCount * 3 / 2 - 1); + + // joe_1, 1000, 85000, jen_1, 1 Poe Ct + // ... + // joe_15, 1000, 85000, jen_15, 15 Poe Ct + String updatedFirstHalf = IntStream.range(1, targetCustomerCount / 2) + .mapToObj(intValue -> format("('joe_%s', %s, %s, 'jen_%s', '%s Poe Ct')", intValue, 1000, 85000, intValue, intValue)) + .collect(Collectors.joining(", ")); + + // joe_16, 3000, 85000, jen_16, 16 Poe Ct + // ... + // joe_32, 3000, 85000, jen_32, 32 Poe Ct + String updatedSecondHalf = IntStream.range(targetCustomerCount / 2, targetCustomerCount) + .mapToObj(intValue -> format("('joe_%s', %s, %s, 'jen_%s', '%s Poe Ct')", intValue, 3000, 85000, intValue, intValue)) + .collect(Collectors.joining(", ")); + + // jack_32, 4000, 74000, jan_32, 32 Poe Ct + // ... + // jack_48, 4000, 74000, jan_48, 48 Poe Ct + String nonUpdatedRows = nextInsert; + + // joe_32, 5000, 85000, jen_32, 32 Poe Ct + // ... + // joe_48, 5000, 85000, jen_48, 48 Poe Ct + String insertedRows = IntStream.range(targetCustomerCount, targetCustomerCount * 3 / 2) + .mapToObj(intValue -> format("('joe_%s', %s, %s, 'jen_%s', '%s Poe Ct')", intValue, 5000, 85000, intValue, intValue)) + .collect(Collectors.joining(", ")); + + assertQuery( + format("SELECT customer, purchases, zipcode, spouse, address FROM %s", targetTable), + format("VALUES %s, %s, %s, %s", updatedFirstHalf, updatedSecondHalf, nonUpdatedRows, insertedRows)); + + assertUpdate("DROP TABLE " + targetTable); + } + + @Test + public void testMergeMillionRows() + { + String tableName = "test_merge_" + randomTableSuffix(); + + assertUpdate(format("CREATE TABLE %s (orderkey BIGINT, custkey BIGINT, totalprice DOUBLE)", tableName)); + + // Initialize the merge target table with data: + // When "mod(orderkey, 3) = 0" -> copy rows, when "mod(orderkey, 3) = 1" -> double price, when "mod(orderkey, 3) = 2" -> rows with new orderkey + assertUpdate( + format("INSERT INTO %s " + + "SELECT orderkey, custkey, totalprice FROM tpch.sf1.orders WHERE mod(orderkey, 3) = 0 " + // rows copied + "UNION ALL " + + "SELECT orderkey, custkey, 2*totalprice as totalprice FROM tpch.sf1.orders WHERE mod(orderkey, 3) = 1 " + // rows with updated price + "UNION ALL " + + "SELECT orderkey + 100000002 as orderkey, custkey, totalprice as totalprice FROM tpch.sf1.orders WHERE mod(orderkey, 3) = 2", // rows with new orderkey + tableName), + (long) computeActual("SELECT count(*) FROM tpch.sf1.orders").getOnlyValue()); + + // verify copied rows: same total price + assertEquals( + computeActual("SELECT count(*), round(sum(totalprice)) FROM " + tableName + " WHERE mod(orderkey, 3) = 0"), + computeActual("SELECT count(*), round(sum(totalprice)) FROM tpch.sf1.orders WHERE mod(orderkey, 3) = 0")); + + // verify rows will be updated: double total price + assertEquals( + computeActual("SELECT count(*), round(sum(totalprice)) FROM " + tableName + " WHERE mod(orderkey, 3) = 1"), + computeActual("SELECT count(*), round(2*sum(totalprice)) FROM tpch.sf1.orders WHERE mod(orderkey, 3) = 1")); + + // verify rows will be inserted: same total price and different orderkey. + assertEquals( + computeActual("SELECT count(*), round(sum(totalprice)) FROM " + tableName + " WHERE mod(orderkey, 3) = 2"), + computeActual("SELECT count(*), round(sum(totalprice)) FROM tpch.sf1.orders WHERE mod(orderkey, 3) = 2")); + + // MERGE INTO command to update the price of the existing orders and insert new orders, multiplying the original price by 3. + @Language("SQL") String sqlMergeCommand = + format("MERGE INTO %s t USING (SELECT * FROM tpch.sf1.orders) s ", tableName) + + "ON (t.orderkey = s.orderkey) " + + "WHEN MATCHED THEN" + + " UPDATE SET totalprice = s.totalprice " + + "WHEN NOT MATCHED THEN" + + " INSERT (orderkey, custkey, totalprice) VALUES (s.orderkey, s.custkey, 3*s.totalprice)"; + + assertUpdate(sqlMergeCommand, 1_500_000); + + // verify unmodified rows: same total price + assertEquals( + computeActual("SELECT count(*), round(sum(totalprice)) FROM " + tableName + " WHERE mod(orderkey, 3) = 0"), + computeActual("SELECT count(*), round(sum(totalprice)) FROM tpch.sf1.orders WHERE mod(orderkey, 3) = 0")); + assertEquals( + computeActual("SELECT count(*), round(sum(totalprice)) FROM " + tableName + " WHERE mod(orderkey, 3) = 2 AND orderkey > 100000002"), + computeActual("SELECT count(*), round(sum(totalprice)) FROM tpch.sf1.orders WHERE mod(orderkey, 3) = 2")); + + // verify updated rows: same total price (these rows originally had double total price in the target table) + assertEquals( + computeActual("SELECT count(*), round(sum(totalprice)) FROM " + tableName + " WHERE mod(orderkey, 3) = 1"), + computeActual("SELECT count(*), round(sum(totalprice)) FROM tpch.sf1.orders WHERE mod(orderkey, 3) = 1")); + + // verify inserted rows: triple original price + assertEquals( + computeActual("SELECT count(*), round(sum(totalprice)) FROM " + tableName + " WHERE mod(orderkey, 3) = 2 AND orderkey < 100000002"), + computeActual("SELECT count(*), round(3*sum(totalprice)) FROM tpch.sf1.orders WHERE mod(orderkey, 3) = 2")); + + assertUpdate("DROP TABLE " + tableName); + } + + @Test + public void testMergeQueryWithWeirdColumnsCapitalization() + { + String targetTable = "merge_weird_capitalization_" + randomTableSuffix(); + assertUpdate(format("CREATE TABLE %s (customer VARCHAR, purchases INT, address VARCHAR)", targetTable)); + assertUpdate(format("INSERT INTO %s (customer, purchases, address) VALUES ('Aaron', 5, 'Antioch'), ('Bill', 7, 'Buena'), ('Carol', 3, 'Cambridge'), ('Dave', 11, 'Devon')", targetTable), 4); + + @Language("SQL") String sqlMergeCommand = + format("MERGE INTO %s t USING ", targetTable.toUpperCase(ENGLISH)) + + "(VALUES ('Aaron', 6, 'Arches'), ('Carol', 9, 'Centreville'), ('Dave', 11, 'Darbyshire'), ('Ed', 7, 'Etherville')) AS s(customer, purchases, address) " + + "ON (t.customer = s.customer) " + + "WHEN MATCHED THEN" + + " UPDATE SET purCHases = s.PurchaseS + t.pUrchases, aDDress = s.addrESs " + + "WHEN NOT MATCHED THEN" + + " INSERT (CUSTOMER, purchases, addRESS) VALUES(s.custoMer, s.Purchases, s.ADDress)"; + + assertUpdate(sqlMergeCommand, 4); + + assertQuery("SELECT * FROM " + targetTable, + "VALUES ('Aaron', 11, 'Arches'), ('Bill', 7, 'Buena'), ('Carol', 12, 'Centreville'), ('Dave', 22, 'Darbyshire'), ('Ed', 7, 'Etherville')"); + + assertUpdate("DROP TABLE " + targetTable); + } + + @Test + public void testMergeWithMultipleConditions() + { + String targetTable = "merge_predicates_target_" + randomTableSuffix(); + String sourceTable = "merge_predicates_source_" + randomTableSuffix(); + + assertUpdate(format("CREATE TABLE %s (id INT, customer VARCHAR, purchases INT, address VARCHAR)", targetTable)); + assertUpdate(format("CREATE TABLE %s (id INT, customer VARCHAR, purchases INT, address VARCHAR)", sourceTable)); + + assertUpdate(format("INSERT INTO %s (id, customer, purchases, address) VALUES (1, 'Dave', 10, 'Devon'), (2, 'Dave', 20, 'Darbyshire')", targetTable), 2); + assertUpdate(format("INSERT INTO %s (id, customer, purchases, address) VALUES (3, 'Dave', 2, 'Madrid'), (4, 'Dave', 15, 'Barcelona')", sourceTable), 2); + + @Language("SQL") String sqlMergeCommand = + format("MERGE INTO %s t USING %s s ", targetTable, sourceTable) + + "ON t.customer = s.customer AND s.purchases < 6 " + + "WHEN MATCHED THEN" + + " UPDATE SET purchases = s.purchases + t.purchases, address = concat(t.address, '/', s.address) " + + "WHEN NOT MATCHED THEN" + + " INSERT (id, customer, purchases, address) VALUES (s.id, s.customer, s.purchases, s.address)"; + + assertUpdate(sqlMergeCommand, 3); + + assertQuery("SELECT * FROM " + targetTable, + "VALUES (1, 'Dave', 12, 'Devon/Madrid'), (2, 'Dave', 22, 'Darbyshire/Madrid'), (4, 'Dave', 15, 'Barcelona')"); + + assertUpdate("DROP TABLE " + sourceTable); + assertUpdate("DROP TABLE " + targetTable); + } + + @Test + public void testMergeCasts() + { + String targetTable = "merge_cast_target_" + randomTableSuffix(); + String sourceTable = "merge_cast_source_" + randomTableSuffix(); + + assertUpdate(format("CREATE TABLE %s (col1 INT, col2 BIGINT, col3 REAL, col4 DOUBLE, col5 DOUBLE)", targetTable)); + assertUpdate(format("CREATE TABLE %s (col1 INT, col2 INT, col3 INT, col4 INT, col5 REAL)", sourceTable)); + + assertUpdate(format("INSERT INTO %s VALUES (1, 2, 3, 4, 5)", targetTable), 1); + assertUpdate(format("INSERT INTO %s VALUES (2, 3, 4, 5, 6)", sourceTable), 1); + + @Language("SQL") String sqlMergeCommand = + format("MERGE INTO %s t USING %s s ", targetTable, sourceTable) + + "ON (t.col1 + 1 = s.col1) " + // Note that the merge condition contains a sum. + "WHEN MATCHED THEN" + + " UPDATE SET col1 = s.col1, col2 = s.col2, col3 = s.col3, col4 = s.col4, col5 = s.col5"; + + assertUpdate(sqlMergeCommand, 1); + + assertQuery("SELECT * FROM " + targetTable, "VALUES (2, 3, 4.0, 5.0, 6.0)"); + + assertUpdate("DROP TABLE " + sourceTable); + assertUpdate("DROP TABLE " + targetTable); + } + + @Test + public void testMergeSubqueries() + { + String targetTable = "merge_nation_target_" + randomTableSuffix(); + String sourceTable = "merge_nation_source_" + randomTableSuffix(); + + assertUpdate(format("CREATE TABLE %s (nation_name VARCHAR, region_name VARCHAR)", targetTable)); + assertUpdate(format("CREATE TABLE %s (nation_name VARCHAR, region_name VARCHAR)", sourceTable)); + + assertUpdate(format("INSERT INTO %s (nation_name, region_name) VALUES ('GERMANY', 'EUROPE'), ('ALGERIA', 'AFRICA'), ('FRANCE', 'EUROPE')", targetTable), 3); + assertUpdate(format("INSERT INTO %s VALUES ('ALGERIA', 'AFRICA'), ('FRANCE', 'EUROPE'), ('EGYPT', 'MIDDLE EAST'), ('RUSSIA', 'EUROPE')", sourceTable), 4); + + @Language("SQL") String sqlMergeCommand = + format("MERGE INTO %s t USING %s s ", targetTable, sourceTable) + + "ON (t.nation_name = s.nation_name) " + + "WHEN MATCHED THEN" + + " UPDATE SET region_name = (SELECT CONCAT(name, '_UPDATED') FROM tpch.tiny.region WHERE name = t.region_name) " + + "WHEN NOT MATCHED THEN" + + " INSERT VALUES(s.nation_name, (SELECT CONCAT(name, '_INSERTED') FROM tpch.tiny.region WHERE name = s.region_name))"; + + assertUpdate(sqlMergeCommand, 4); + + assertQuery("SELECT * FROM " + targetTable, + "VALUES ('GERMANY', 'EUROPE'), " + + "('ALGERIA', 'AFRICA_UPDATED'), ('FRANCE', 'EUROPE_UPDATED'), " + + "('EGYPT', 'MIDDLE EAST_INSERTED'), ('RUSSIA', 'EUROPE_INSERTED')"); + + assertUpdate("DROP TABLE " + sourceTable); + assertUpdate("DROP TABLE " + targetTable); + } + + @DataProvider + public Object[][] partitionedBucketedFailure() + { + return new Object[][] { + {"CREATE TABLE %s (customer VARCHAR, purchases INT, address VARCHAR)"}, + {"CREATE TABLE %s (customer VARCHAR, purchases INT, address VARCHAR) WITH (partitioning = ARRAY['customer'])"}, + {"CREATE TABLE %s (customer VARCHAR, address VARCHAR, purchases INT) WITH (partitioning = ARRAY['address'])"}, + {"CREATE TABLE %s (purchases INT, customer VARCHAR, address VARCHAR) WITH (partitioning = ARRAY['customer', 'address'])"}, + {"CREATE TABLE %s (customer VARCHAR, purchases INT, address VARCHAR) WITH (partitioning = ARRAY['bucket(customer, 3)'])"} + }; + } + + @Test(dataProvider = "partitionedBucketedFailure") + public void testMergeMultipleRowsMatchMustFails(String createTableSql) + { + String targetTable = "merge_multiple_rows_match_target_" + randomTableSuffix(); + String sourceTable = "merge_multiple_rows_match_source_" + randomTableSuffix(); + + assertUpdate(format(createTableSql, targetTable)); + assertUpdate(format("CREATE TABLE %s (customer VARCHAR, purchases INT, address VARCHAR)", sourceTable)); + + assertUpdate(format("INSERT INTO %s (customer, purchases, address) VALUES ('Aaron', 5, 'Antioch'), ('Bill', 7, 'Antioch')", targetTable), 2); + assertUpdate(format("INSERT INTO %s (customer, purchases, address) VALUES ('Aaron', 6, 'Adelphi'), ('Aaron', 8, 'Ashland')", sourceTable), 2); + + @Language("SQL") String sqlMergeCommand = + format("MERGE INTO %s t USING %s s ", targetTable, sourceTable) + + "ON (t.customer = s.customer) " + + "WHEN MATCHED THEN" + + " UPDATE SET address = s.address"; + + assertQueryFails(sqlMergeCommand, ".*The MERGE INTO command requires each target row to match at most one source row.*"); + + assertUpdate(format("DELETE FROM %s WHERE purchases = 8", sourceTable), 1); + + assertUpdate(sqlMergeCommand, 1); + + assertQuery("SELECT customer, purchases, address FROM " + targetTable, + "VALUES ('Aaron', 5, 'Adelphi'), ('Bill', 7, 'Antioch')"); + + assertUpdate("DROP TABLE " + sourceTable); + assertUpdate("DROP TABLE " + targetTable); + } + + private void createNationRegionTable(String targetTable) + { + assertUpdate(format("CREATE TABLE %s (nation_name VARCHAR, region_name VARCHAR NOT NULL)", targetTable)); + } + + @Test + public void testMergeNonNullableColumns() + { + String targetTable = "merge_non_nullable_target_" + randomTableSuffix(); + + createNationRegionTable(targetTable); + assertUpdate(format("INSERT INTO %s (nation_name, region_name) VALUES ('FRANCE', 'EUROPE'), ('ALGERIA', 'AFRICA'), ('GERMANY', 'EUROPE')", targetTable), 3); + + List sqlMergeCommands = Arrays.asList( + // Command to check that updating using a null value fails. + format("MERGE INTO %s t ", targetTable) + + "USING (VALUES ('ALGERIA', 'AFRICA')) s(nation_name, region_name) " + + "ON (t.nation_name = s.nation_name)\n" + + "WHEN MATCHED THEN" + + " UPDATE SET region_name = NULL", + + // Command to check that inserting using a null value fails. + format("MERGE INTO %s t ", targetTable) + + " USING (VALUES ('ANGOLA', 'AFRICA')) s(nation_name, region_name) " + + "ON (t.nation_name = s.nation_name) " + + "WHEN NOT MATCHED THEN" + + " INSERT (nation_name, region_name) VALUES (s.nation_name, NULL)", + + // Command to check that inserting using an implicit null value fails. + format("MERGE INTO %s t ", targetTable) + + "USING (VALUES ('ANGOLA', 'AFRICA')) s(nation_name, region_name) " + + "ON (t.nation_name = s.nation_name) " + + "WHEN NOT MATCHED THEN" + + " INSERT (nation_name) VALUES ('CANADA')", + + // Command to check that if the updated value is provided by a function unpredictably computing null, the merge fails. + format("MERGE INTO %s t ", targetTable) + + "USING (VALUES ('ALGERIA', 'AFRICA')) s(nation_name, region_name) " + + "ON (t.nation_name = s.nation_name) " + + "WHEN MATCHED THEN" + + " UPDATE SET region_name = CAST(TRY(5/0) AS VARCHAR)"); + + for (@Language("SQL") String sqlMergeCommand : sqlMergeCommands) { + assertQueryFails(sqlMergeCommand, "NULL value not allowed for NOT NULL column. Table: merge_non_nullable_target_.* Column: region_name"); + } + + assertUpdate("DROP TABLE " + targetTable); + } + + @DataProvider + public Object[][] targetAndSourceWithDifferentPartitioning() + { + return new Object[][] { + { + "target_flat_source_flat", + "", + "" + }, + { + "target_partitioned_source_flat", + "WITH (partitioning = ARRAY['customer'])", + "" + }, + { + "target_bucketed_source_flat", + "WITH (partitioning = ARRAY['bucket(customer, 3)'])", + "" + }, + { + "target_partitioned_and_bucketed_source_flat", + "WITH (partitioning = ARRAY['address', 'bucket(customer, 3)'])", + "" + }, + { + "target_partitioned_and_bucketed_source_partitioned", + "WITH (partitioning = ARRAY['address', 'bucket(customer, 3)'])", + "WITH (partitioning = ARRAY['customer'])" + }, + { + "target_and_source_partitioned_and_bucketed", + "WITH (partitioning = ARRAY['address', 'bucket(customer, 3)'])", + "WITH (partitioning = ARRAY['address', 'bucket(customer, 3)'])" + } + }; + } + + @Test(dataProvider = "targetAndSourceWithDifferentPartitioning") + public void testMergeWithDifferentPartitioning(String testDescription, String targetTablePartitioning, String sourceTablePartitioning) + { + String targetTable = format("%s_target_%s", testDescription, randomTableSuffix()); + String sourceTable = format("%s_source_%s", testDescription, randomTableSuffix()); + + assertUpdate(format("CREATE TABLE %s (customer VARCHAR, purchases INT, address VARCHAR) %s", targetTable, targetTablePartitioning)); + assertUpdate(format("CREATE TABLE %s (customer VARCHAR, purchases INT, address VARCHAR) %s", sourceTable, sourceTablePartitioning)); + + assertUpdate(format("INSERT INTO %s (customer, purchases, address) VALUES ('Aaron', 5, 'Antioch'), ('Bill', 7, 'Buena'), ('Carol', 3, 'Cambridge'), ('Dave', 11, 'Devon')", targetTable), 4); + assertUpdate(format("INSERT INTO %s (customer, purchases, address) VALUES ('Aaron', 6, 'Arches'), ('Ed', 7, 'Etherville'), ('Carol', 9, 'Centreville'), ('Dave', 11, 'Darbyshire')", sourceTable), 4); + + @Language("SQL") String sqlMergeCommand = + format("MERGE INTO %s t USING %s s ", targetTable, sourceTable) + + "ON (t.customer = s.customer) " + + "WHEN MATCHED THEN" + + " UPDATE SET purchases = s.purchases + t.purchases, address = s.address " + + "WHEN NOT MATCHED THEN" + + " INSERT (customer, purchases, address) VALUES(s.customer, s.purchases, s.address)"; + + assertUpdate(sqlMergeCommand, 4); + + assertQuery("SELECT * FROM " + targetTable, + "VALUES ('Aaron', 11, 'Arches'), ('Bill', 7, 'Buena'), ('Carol', 12, 'Centreville'), ('Dave', 22, 'Darbyshire'), ('Ed', 7, 'Etherville')"); + + assertUpdate("DROP TABLE " + sourceTable); + assertUpdate("DROP TABLE " + targetTable); + } + + @Test + public void testMergeAccessControl() + { + String catalogName = getSession().getCatalog().get(); + String schemaName = getSession().getSchema().get(); + + String targetTable = "merge_nation_target_" + randomTableSuffix(); + String targetName = format("%s.%s.%s", catalogName, schemaName, targetTable); + + String sourceTable = "merge_nation_source_" + randomTableSuffix(); + String sourceName = format("%s.%s.%s", catalogName, schemaName, sourceTable); + + assertUpdate(format("CREATE TABLE %s (nation_name VARCHAR, region_name VARCHAR)", targetTable)); + assertUpdate(format("CREATE TABLE %s (nation_name VARCHAR, region_name VARCHAR)", sourceTable)); + + String baseMergeSql = format("MERGE INTO %s t USING %s s ", targetTable, sourceTable) + + "ON (t.nation_name = s.nation_name) "; + String updateCase = + "WHEN MATCHED THEN" + + " UPDATE SET nation_name = concat(s.nation_name, '_foo')"; + String insertCase = + "WHEN NOT MATCHED THEN" + + " INSERT VALUES(s.nation_name, (SELECT 'EUROPE'))"; + + ImmutableList mergeCases = ImmutableList.of(updateCase, insertCase); + for (String mergeCase : mergeCases) { + // Show that without SELECT privilege on the source table, the MERGE fails regardless of which case is included + assertAccessDenied(baseMergeSql + mergeCase, "Cannot select from columns .* in table or view " + sourceName, privilege(sourceTable, SELECT_COLUMN)); + + // Show that without SELECT privilege on the target table, the MERGE fails regardless of which case is included + assertAccessDenied(baseMergeSql + mergeCase, "Cannot select from columns .* in table or view " + targetName, privilege(targetTable, SELECT_COLUMN)); + } + + // Show that without INSERT privilege on the target table, the MERGE fails + assertAccessDenied(baseMergeSql + insertCase, "Cannot insert into table " + targetName, privilege(targetTable, INSERT_TABLE)); + + // Show that without UPDATE privilege on the target table, the MERGE fails + assertAccessDenied(baseMergeSql + updateCase, "Cannot update columns \\[\\[nation_name\\]\\] in table " + targetName, privilege(targetTable, UPDATE_TABLE)); + + assertUpdate("DROP TABLE " + sourceTable); + assertUpdate("DROP TABLE " + targetTable); + } + + @Test + public void testInvalidMergePredicate() + { + String targetTable = "merge_invalid_predicate_" + randomTableSuffix(); + + createNationRegionTable(targetTable); + + @Language("SQL") String sqlMergeCommand = + format("MERGE INTO %s t USING (VALUES ('ALGERIA', 'AFRICA')) s(nation_name, region_name) ", targetTable) + + "ON (t.nation_name) " + + "WHEN MATCHED THEN" + + " UPDATE SET region_name = s.region_name"; + + assertQueryFails(sqlMergeCommand, ".*The MERGE predicate must evaluate to a boolean: actual type varchar"); + + sqlMergeCommand = + format("MERGE INTO %s t USING (VALUES (1, 'ALGERIA', 'AFRICA')) s(nation_id, nation_name, region_name) ", targetTable) + + "ON (t.nation_name = s.nation_id) " + + "WHEN MATCHED THEN" + + " UPDATE SET region_name = s.region_name"; + + assertQueryFails(sqlMergeCommand, ".*'=' cannot be applied to varchar, integer"); + } + + @Test + public void testMergeUnknownColumnName() + { + String targetTable = "merge_unknown_column_" + randomTableSuffix(); + + createNationRegionTable(targetTable); + + String baseMergeSql = format("MERGE INTO %s t USING (VALUES ('ALGERIA', 'AFRICA')) s(nation_name, region_name) ", targetTable) + + "ON (t.nation_name = s.nation_name) "; + + List sqlMergeCommands = Arrays.asList( + // Unknown column in the UPDATE statement. + baseMergeSql + + "WHEN MATCHED THEN" + + " UPDATE SET unknown_column = s.region_name", + + // Unknown column in the INSERT statement. + baseMergeSql + + "WHEN NOT MATCHED THEN" + + " INSERT (nation_name, unknown_column) VALUES(s.nation_name, (SELECT 'EUROPE'))"); + + for (@Language("SQL") String sqlMergeCommand : sqlMergeCommands) { + assertQueryFails(sqlMergeCommand, ".*Merge column name does not exist in target table: unknown_column"); + } + } + + @Test + public void testMergeDuplicateColumnName() + { + String targetTable = "merge_duplicate_column_" + randomTableSuffix(); + + createNationRegionTable(targetTable); + + String baseMergeSql = format("MERGE INTO %s t USING (VALUES ('ALGERIA', 'AFRICA')) s(nation_name, region_name) ", targetTable) + + "ON (t.nation_name = s.nation_name) "; + + List sqlMergeCommands = Arrays.asList( + // Duplicate column in the UPDATE statement. + baseMergeSql + + "WHEN MATCHED THEN" + + " UPDATE SET region_name = s.region_name, region_name = 'AFRICA'", + + // Duplicate column in the INSERT statement. + baseMergeSql + + "WHEN NOT MATCHED THEN" + + " INSERT (nation_name, region_name, region_name) VALUES(s.nation_name, (SELECT 'EUROPE'), 'AFRICA')"); + + for (@Language("SQL") String sqlMergeCommand : sqlMergeCommands) { + assertQueryFails(sqlMergeCommand, ".*Merge column name is specified more than once: region_name"); + } + } + + @Test + public void testMergeMismatchedColumnDataTypes() + { + String targetTable = "merge_mismatched_column_data_types_" + randomTableSuffix(); + + createNationRegionTable(targetTable); + + String baseMergeSql = format("MERGE INTO %s t USING (VALUES ('ALGERIA', 'AFRICA')) s(nation_name, region_name) ", targetTable) + + "ON (t.nation_name = s.nation_name) "; + + List sqlMergeCommands = Arrays.asList( + // Mismatched column in the UPDATE statement. + baseMergeSql + + "WHEN MATCHED THEN" + + " UPDATE SET region_name = 1", + + // Mismatched column in the INSERT statement. + baseMergeSql + + "WHEN NOT MATCHED THEN" + + " INSERT (region_name) VALUES(1)"); + + for (@Language("SQL") String sqlMergeCommand : sqlMergeCommands) { + assertQueryFails(sqlMergeCommand, + ".*MERGE table column types don't match for MERGE case 0, SET expressions: Table: \\[varchar\\], Expressions: \\[integer\\]"); + } + } + private void testCheckDeleteFiles(Table icebergTable, int expectedSize, List expectedFileContent) { // check delete file list diff --git a/presto-main-base/src/main/java/com/facebook/presto/connector/ConnectorCodecManager.java b/presto-main-base/src/main/java/com/facebook/presto/connector/ConnectorCodecManager.java index fb5179d141507..37eb7220007bd 100644 --- a/presto-main-base/src/main/java/com/facebook/presto/connector/ConnectorCodecManager.java +++ b/presto-main-base/src/main/java/com/facebook/presto/connector/ConnectorCodecManager.java @@ -18,6 +18,7 @@ import com.facebook.presto.spi.ConnectorDeleteTableHandle; import com.facebook.presto.spi.ConnectorId; import com.facebook.presto.spi.ConnectorInsertTableHandle; +import com.facebook.presto.spi.ConnectorMergeTableHandle; import com.facebook.presto.spi.ConnectorOutputTableHandle; import com.facebook.presto.spi.ConnectorSplit; import com.facebook.presto.spi.ConnectorTableHandle; @@ -85,6 +86,12 @@ public Optional> getDeleteTableHandle return Optional.ofNullable(connectorCodecProviders.get(connectorId)).flatMap(ConnectorCodecProvider::getConnectorDeleteTableHandleCodec); } + public Optional> getMergeTableHandleCodec(String connectorId) + { + requireNonNull(connectorId, "connectorId is null"); + return Optional.ofNullable(connectorCodecProviders.get(connectorId)).flatMap(ConnectorCodecProvider::getConnectorMergeTableHandleCodec); + } + public Optional> getTableLayoutHandleCodec(String connectorId) { requireNonNull(connectorId, "connectorId is null"); diff --git a/presto-main-base/src/main/java/com/facebook/presto/execution/scheduler/ExecutionWriterTarget.java b/presto-main-base/src/main/java/com/facebook/presto/execution/scheduler/ExecutionWriterTarget.java index 97175e428d2a6..b18c5e9e3601b 100644 --- a/presto-main-base/src/main/java/com/facebook/presto/execution/scheduler/ExecutionWriterTarget.java +++ b/presto-main-base/src/main/java/com/facebook/presto/execution/scheduler/ExecutionWriterTarget.java @@ -38,7 +38,8 @@ @JsonSubTypes.Type(value = ExecutionWriterTarget.DeleteHandle.class, name = "DeleteHandle"), @JsonSubTypes.Type(value = ExecutionWriterTarget.RefreshMaterializedViewHandle.class, name = "RefreshMaterializedViewHandle"), @JsonSubTypes.Type(value = ExecutionWriterTarget.UpdateHandle.class, name = "UpdateHandle"), - @JsonSubTypes.Type(value = ExecutionWriterTarget.ExecuteProcedureHandle.class, name = "ExecuteProcedureHandle") + @JsonSubTypes.Type(value = ExecutionWriterTarget.ExecuteProcedureHandle.class, name = "ExecuteProcedureHandle"), + @JsonSubTypes.Type(value = ExecutionWriterTarget.MergeHandle.class, name = "MergeHandle") }) @SuppressWarnings({"EmptyClass", "ClassMayBeInterface"}) public abstract class ExecutionWriterTarget @@ -275,4 +276,51 @@ public String toString() return handle.toString(); } } + + @ThriftStruct + public static class MergeHandle + extends ExecutionWriterTarget + { + private final com.facebook.presto.spi.MergeHandle handle; + // TODO #20578: Uncomment if finally it is necessary. +// private final SchemaTableName schemaTableName; +// private final ConnectorMergeTableHandle connectorMergeTableHandle; + + @JsonCreator + @ThriftConstructor + public MergeHandle( + @JsonProperty("handle") com.facebook.presto.spi.MergeHandle handle) +// @JsonProperty("schemaTableName") SchemaTableName schemaTableName, +// @JsonProperty("connectorMergeTableHandle") ConnectorMergeTableHandle connectorMergeTableHandle) + { + this.handle = requireNonNull(handle, "tableHandle is null"); +// this.schemaTableName = requireNonNull(schemaTableName, "schemaTableName is null"); +// this.connectorMergeTableHandle = requireNonNull(connectorMergeTableHandle, "connectorMergeTableHandle is null"); + } + + @JsonProperty + @ThriftField(1) + public com.facebook.presto.spi.MergeHandle getHandle() + { + return handle; + } + +// @JsonProperty +// public SchemaTableName getSchemaTableName() +// { +// return schemaTableName; +// } + +// @JsonProperty +// public ConnectorMergeTableHandle getConnectorMergeTableHandle() +// { +// return connectorMergeTableHandle; +// } + + @Override + public String toString() + { + return handle.toString(); + } + } } diff --git a/presto-main-base/src/main/java/com/facebook/presto/execution/scheduler/ExecutionWriterTargetUnion.java b/presto-main-base/src/main/java/com/facebook/presto/execution/scheduler/ExecutionWriterTargetUnion.java index f61bd8228d1f1..26ea661d30505 100644 --- a/presto-main-base/src/main/java/com/facebook/presto/execution/scheduler/ExecutionWriterTargetUnion.java +++ b/presto-main-base/src/main/java/com/facebook/presto/execution/scheduler/ExecutionWriterTargetUnion.java @@ -29,6 +29,7 @@ public class ExecutionWriterTargetUnion private ExecutionWriterTarget.DeleteHandle deleteHandle; private ExecutionWriterTarget.RefreshMaterializedViewHandle refreshMaterializedViewHandle; private ExecutionWriterTarget.UpdateHandle updateHandle; + private ExecutionWriterTarget.MergeHandle mergeHandle; @ThriftConstructor public ExecutionWriterTargetUnion() @@ -101,6 +102,19 @@ public ExecutionWriterTarget.UpdateHandle getUpdateHandle() return updateHandle; } + @ThriftConstructor + public ExecutionWriterTargetUnion(ExecutionWriterTarget.MergeHandle mergeHandle) + { + this.id = 6; + this.mergeHandle = mergeHandle; + } + + @ThriftField(6) + public ExecutionWriterTarget.MergeHandle getMergeHandle() + { + return mergeHandle; + } + @ThriftUnionId public short getId() { @@ -125,6 +139,9 @@ else if (executionWriterTargetUnion.getRefreshMaterializedViewHandle() != null) else if (executionWriterTargetUnion.getUpdateHandle() != null) { return executionWriterTargetUnion.getUpdateHandle(); } + else if (executionWriterTargetUnion.getMergeHandle() != null) { + return executionWriterTargetUnion.getMergeHandle(); + } else { throw new IllegalArgumentException("Unrecognized execution writer target: " + executionWriterTargetUnion); } @@ -149,6 +166,9 @@ else if (executionWriterTarget instanceof ExecutionWriterTarget.RefreshMateriali else if (executionWriterTarget instanceof ExecutionWriterTarget.UpdateHandle) { return new ExecutionWriterTargetUnion((ExecutionWriterTarget.UpdateHandle) executionWriterTarget); } + else if (executionWriterTarget instanceof ExecutionWriterTarget.MergeHandle) { + return new ExecutionWriterTargetUnion((ExecutionWriterTarget.MergeHandle) executionWriterTarget); + } else { throw new IllegalArgumentException("Unsupported execution writer target: " + executionWriterTarget); } diff --git a/presto-main-base/src/main/java/com/facebook/presto/execution/scheduler/TableWriteInfo.java b/presto-main-base/src/main/java/com/facebook/presto/execution/scheduler/TableWriteInfo.java index d1925e1937942..b9c5efa99422a 100644 --- a/presto-main-base/src/main/java/com/facebook/presto/execution/scheduler/TableWriteInfo.java +++ b/presto-main-base/src/main/java/com/facebook/presto/execution/scheduler/TableWriteInfo.java @@ -21,6 +21,7 @@ import com.facebook.presto.execution.scheduler.ExecutionWriterTarget.ExecuteProcedureHandle; import com.facebook.presto.metadata.AnalyzeTableHandle; import com.facebook.presto.metadata.Metadata; +import com.facebook.presto.spi.MergeHandle; import com.facebook.presto.spi.plan.PlanNode; import com.facebook.presto.spi.plan.TableFinishNode; import com.facebook.presto.spi.plan.TableWriterNode; @@ -114,6 +115,12 @@ private static Optional createWriterTarget(Optional
mergeHandle = mergeTarget.getMergeHandle(); + return Optional.of(new ExecutionWriterTarget.MergeHandle(mergeHandle.orElseThrow( + () -> new VerifyException("mergeHandle is absent: " + target.getClass().getSimpleName())))); + } throw new IllegalArgumentException("Unhandled target type: " + target.getClass().getSimpleName()); } diff --git a/presto-main-base/src/main/java/com/facebook/presto/metadata/DelegatingMetadataManager.java b/presto-main-base/src/main/java/com/facebook/presto/metadata/DelegatingMetadataManager.java index 3d45b27e77e58..82adc22c29be1 100644 --- a/presto-main-base/src/main/java/com/facebook/presto/metadata/DelegatingMetadataManager.java +++ b/presto-main-base/src/main/java/com/facebook/presto/metadata/DelegatingMetadataManager.java @@ -26,6 +26,7 @@ import com.facebook.presto.spi.ConnectorTableMetadata; import com.facebook.presto.spi.Constraint; import com.facebook.presto.spi.MaterializedViewDefinition; +import com.facebook.presto.spi.MergeHandle; import com.facebook.presto.spi.NewTableLayout; import com.facebook.presto.spi.SystemTable; import com.facebook.presto.spi.TableHandle; @@ -34,6 +35,7 @@ import com.facebook.presto.spi.connector.ConnectorCapabilities; import com.facebook.presto.spi.connector.ConnectorOutputMetadata; import com.facebook.presto.spi.connector.ConnectorTableVersion; +import com.facebook.presto.spi.connector.RowChangeParadigm; import com.facebook.presto.spi.connector.TableFunctionApplicationResult; import com.facebook.presto.spi.constraints.TableConstraint; import com.facebook.presto.spi.function.SqlFunction; @@ -425,6 +427,36 @@ public void finishUpdate(Session session, TableHandle tableHandle, Collection getMergeUpdateLayout(Session session, TableHandle tableHandle) + { + return delegate.getMergeUpdateLayout(session, tableHandle); + } + + @Override + public MergeHandle beginMerge(Session session, TableHandle tableHandle) + { + return delegate.beginMerge(session, tableHandle); + } + + @Override + public void finishMerge(Session session, MergeHandle tableHandle, Collection fragments, Collection computedStatistics) + { + delegate.finishMerge(session, tableHandle, fragments, computedStatistics); + } + @Override public Optional getCatalogHandle(Session session, String catalogName) { diff --git a/presto-main-base/src/main/java/com/facebook/presto/metadata/HandleJsonModule.java b/presto-main-base/src/main/java/com/facebook/presto/metadata/HandleJsonModule.java index c1b80caa2ec27..c46f717b8524c 100644 --- a/presto-main-base/src/main/java/com/facebook/presto/metadata/HandleJsonModule.java +++ b/presto-main-base/src/main/java/com/facebook/presto/metadata/HandleJsonModule.java @@ -33,6 +33,7 @@ public void configure(Binder binder) jsonBinder(binder).addModuleBinding().to(OutputTableHandleJacksonModule.class); jsonBinder(binder).addModuleBinding().to(InsertTableHandleJacksonModule.class); jsonBinder(binder).addModuleBinding().to(DeleteTableHandleJacksonModule.class); + jsonBinder(binder).addModuleBinding().to(MergeTableHandleJacksonModule.class); jsonBinder(binder).addModuleBinding().to(DistributedProcedureHandleJacksonModule.class); jsonBinder(binder).addModuleBinding().to(IndexHandleJacksonModule.class); jsonBinder(binder).addModuleBinding().to(TransactionHandleJacksonModule.class); diff --git a/presto-main-base/src/main/java/com/facebook/presto/metadata/HandleResolver.java b/presto-main-base/src/main/java/com/facebook/presto/metadata/HandleResolver.java index d9bbf61d95e71..1541a98ee6bf7 100644 --- a/presto-main-base/src/main/java/com/facebook/presto/metadata/HandleResolver.java +++ b/presto-main-base/src/main/java/com/facebook/presto/metadata/HandleResolver.java @@ -21,6 +21,7 @@ import com.facebook.presto.spi.ConnectorHandleResolver; import com.facebook.presto.spi.ConnectorIndexHandle; import com.facebook.presto.spi.ConnectorInsertTableHandle; +import com.facebook.presto.spi.ConnectorMergeTableHandle; import com.facebook.presto.spi.ConnectorOutputTableHandle; import com.facebook.presto.spi.ConnectorSplit; import com.facebook.presto.spi.ConnectorTableHandle; @@ -140,6 +141,11 @@ public String getId(FunctionHandle functionHandle) return getFunctionNamespaceId(functionHandle, MaterializedFunctionHandleResolver::getFunctionHandleClass); } + public String getId(ConnectorMergeTableHandle mergeHandle) + { + return getId(mergeHandle, MaterializedHandleResolver::getMergeTableHandleClass); + } + public Class getTableHandleClass(String id) { return resolverFor(id).getTableHandleClass().orElseThrow(() -> new IllegalArgumentException("No resolver for " + id)); @@ -180,6 +186,11 @@ public Class getDeleteTableHandleClass(Str return resolverFor(id).getDeleteTableHandleClass().orElseThrow(() -> new IllegalArgumentException("No resolver for " + id)); } + public Class getMergeTableHandleClass(String id) + { + return resolverFor(id).getMergeTableHandleClass().orElseThrow(() -> new IllegalArgumentException("No resolver for " + id)); + } + public Class getDistributedProcedureHandleClass(String id) { return resolverFor(id).getDistributedProcedureHandleClass().orElseThrow(() -> new IllegalArgumentException("No resolver for " + id)); @@ -252,6 +263,7 @@ private static class MaterializedHandleResolver private final Optional> outputTableHandle; private final Optional> insertTableHandle; private final Optional> deleteTableHandle; + private final Optional> mergeTableHandle; private final Optional> distributedProcedureHandle; private final Optional> partitioningHandle; private final Optional> transactionHandle; @@ -266,6 +278,7 @@ public MaterializedHandleResolver(ConnectorHandleResolver resolver) outputTableHandle = getHandleClass(resolver::getOutputTableHandleClass); insertTableHandle = getHandleClass(resolver::getInsertTableHandleClass); deleteTableHandle = getHandleClass(resolver::getDeleteTableHandleClass); + mergeTableHandle = getHandleClass(resolver::getMergeTableHandleClass); partitioningHandle = getHandleClass(resolver::getPartitioningHandleClass); transactionHandle = getHandleClass(resolver::getTransactionHandleClass); distributedProcedureHandle = getHandleClass(resolver::getDistributedProcedureHandleClass); @@ -321,6 +334,11 @@ public Optional> getDeleteTableHandl return deleteTableHandle; } + public Optional> getMergeTableHandleClass() + { + return mergeTableHandle; + } + public Optional> getDistributedProcedureHandleClass() { return distributedProcedureHandle; @@ -354,6 +372,7 @@ public boolean equals(Object o) Objects.equals(outputTableHandle, that.outputTableHandle) && Objects.equals(insertTableHandle, that.insertTableHandle) && Objects.equals(deleteTableHandle, that.deleteTableHandle) && + Objects.equals(mergeTableHandle, that.mergeTableHandle) && Objects.equals(partitioningHandle, that.partitioningHandle) && Objects.equals(transactionHandle, that.transactionHandle); } @@ -361,7 +380,7 @@ public boolean equals(Object o) @Override public int hashCode() { - return Objects.hash(tableHandle, layoutHandle, columnHandle, split, indexHandle, outputTableHandle, insertTableHandle, deleteTableHandle, partitioningHandle, transactionHandle); + return Objects.hash(tableHandle, layoutHandle, columnHandle, split, indexHandle, outputTableHandle, insertTableHandle, deleteTableHandle, mergeTableHandle, partitioningHandle, transactionHandle); } } diff --git a/presto-main-base/src/main/java/com/facebook/presto/metadata/MergeTableHandleJacksonModule.java b/presto-main-base/src/main/java/com/facebook/presto/metadata/MergeTableHandleJacksonModule.java new file mode 100644 index 0000000000000..1669a6248ad04 --- /dev/null +++ b/presto-main-base/src/main/java/com/facebook/presto/metadata/MergeTableHandleJacksonModule.java @@ -0,0 +1,58 @@ +/* + * Licensed 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. + */ +package com.facebook.presto.metadata; + +import com.facebook.presto.connector.ConnectorManager; +import com.facebook.presto.spi.ConnectorCodec; +import com.facebook.presto.spi.ConnectorId; +import com.facebook.presto.spi.ConnectorMergeTableHandle; +import com.facebook.presto.spi.connector.ConnectorCodecProvider; +import com.facebook.presto.sql.analyzer.FeaturesConfig; +import jakarta.inject.Provider; + +import javax.inject.Inject; + +import java.util.Optional; +import java.util.function.Function; + +public class MergeTableHandleJacksonModule + extends AbstractTypedJacksonModule +{ + @Inject + public MergeTableHandleJacksonModule( + HandleResolver handleResolver, + Provider connectorManagerProvider, + FeaturesConfig featuresConfig) + { + super(ConnectorMergeTableHandle.class, + handleResolver::getId, + handleResolver::getMergeTableHandleClass, + featuresConfig.isUseConnectorProvidedSerializationCodecs(), + connectorId -> connectorManagerProvider.get() + .getConnectorCodecProvider(connectorId) + .flatMap(ConnectorCodecProvider::getConnectorMergeTableHandleCodec)); + } + + public MergeTableHandleJacksonModule( + HandleResolver handleResolver, + FeaturesConfig featuresConfig, + Function>> codecExtractor) + { + super(ConnectorMergeTableHandle.class, + handleResolver::getId, + handleResolver::getMergeTableHandleClass, + featuresConfig.isUseConnectorProvidedSerializationCodecs(), + codecExtractor); + } +} diff --git a/presto-main-base/src/main/java/com/facebook/presto/metadata/Metadata.java b/presto-main-base/src/main/java/com/facebook/presto/metadata/Metadata.java index 18e33ca8954cb..f306062050d49 100644 --- a/presto-main-base/src/main/java/com/facebook/presto/metadata/Metadata.java +++ b/presto-main-base/src/main/java/com/facebook/presto/metadata/Metadata.java @@ -28,6 +28,7 @@ import com.facebook.presto.spi.ConnectorTableMetadata; import com.facebook.presto.spi.Constraint; import com.facebook.presto.spi.MaterializedViewDefinition; +import com.facebook.presto.spi.MergeHandle; import com.facebook.presto.spi.NewTableLayout; import com.facebook.presto.spi.PrestoException; import com.facebook.presto.spi.SystemTable; @@ -41,6 +42,7 @@ import com.facebook.presto.spi.connector.ConnectorOutputMetadata; import com.facebook.presto.spi.connector.ConnectorPartitioningHandle; import com.facebook.presto.spi.connector.ConnectorTableVersion; +import com.facebook.presto.spi.connector.RowChangeParadigm; import com.facebook.presto.spi.connector.TableFunctionApplicationResult; import com.facebook.presto.spi.constraints.TableConstraint; import com.facebook.presto.spi.function.SqlFunction; @@ -362,6 +364,34 @@ public interface Metadata */ void finishUpdate(Session session, TableHandle tableHandle, Collection fragments); + /** + * Return the row update paradigm supported by the connector on the table or throw + * an exception if row change is not supported. + */ + RowChangeParadigm getRowChangeParadigm(Session session, TableHandle tableHandle); + + /** + * Get the column handle that will generate row IDs for the merge operation. + * These IDs will be passed to the {@code storeMergedRows()} method of the + * {@link com.facebook.presto.spi.ConnectorMergeSink} that created them. + */ + ColumnHandle getMergeTargetTableRowIdColumnHandle(Session session, TableHandle tableHandle); + + /** + * Get the physical layout for updated rows of a MERGE operation. + */ + Optional getMergeUpdateLayout(Session session, TableHandle tableHandle); + + /** + * Begin merge query + */ + MergeHandle beginMerge(Session session, TableHandle tableHandle); + + /** + * Finish merge query + */ + void finishMerge(Session session, MergeHandle tableHandle, Collection fragments, Collection computedStatistics); + /** * Returns a connector id for the specified catalog name. */ diff --git a/presto-main-base/src/main/java/com/facebook/presto/metadata/MetadataManager.java b/presto-main-base/src/main/java/com/facebook/presto/metadata/MetadataManager.java index 18badb5ec600f..f85e1f8f79912 100644 --- a/presto-main-base/src/main/java/com/facebook/presto/metadata/MetadataManager.java +++ b/presto-main-base/src/main/java/com/facebook/presto/metadata/MetadataManager.java @@ -33,6 +33,7 @@ import com.facebook.presto.spi.ConnectorDistributedProcedureHandle; import com.facebook.presto.spi.ConnectorId; import com.facebook.presto.spi.ConnectorInsertTableHandle; +import com.facebook.presto.spi.ConnectorMergeTableHandle; import com.facebook.presto.spi.ConnectorOutputTableHandle; import com.facebook.presto.spi.ConnectorResolvedIndex; import com.facebook.presto.spi.ConnectorSession; @@ -44,6 +45,7 @@ import com.facebook.presto.spi.Constraint; import com.facebook.presto.spi.MaterializedViewDefinition; import com.facebook.presto.spi.MaterializedViewStatus; +import com.facebook.presto.spi.MergeHandle; import com.facebook.presto.spi.NewTableLayout; import com.facebook.presto.spi.PrestoException; import com.facebook.presto.spi.QueryId; @@ -62,6 +64,7 @@ import com.facebook.presto.spi.connector.ConnectorPartitioningMetadata; import com.facebook.presto.spi.connector.ConnectorTableVersion; import com.facebook.presto.spi.connector.ConnectorTransactionHandle; +import com.facebook.presto.spi.connector.RowChangeParadigm; import com.facebook.presto.spi.connector.TableFunctionApplicationResult; import com.facebook.presto.spi.constraints.TableConstraint; import com.facebook.presto.spi.function.SqlFunction; @@ -964,6 +967,26 @@ public Optional getUpdateRowIdColumn(Session session, TableHandle return metadata.getUpdateRowIdColumn(session.toConnectorSession(connectorId), tableHandle.getConnectorHandle(), updatedColumns); } + @Override + public ColumnHandle getMergeTargetTableRowIdColumnHandle(Session session, TableHandle tableHandle) + { + ConnectorId connectorId = tableHandle.getConnectorId(); + ConnectorMetadata metadata = getMetadata(session, connectorId); + return metadata.getMergeTargetTableRowIdColumnHandle(session.toConnectorSession(connectorId), tableHandle.getConnectorHandle()); + } + + @Override + public Optional getMergeUpdateLayout(Session session, TableHandle tableHandle) + { + ConnectorId connectorId = tableHandle.getConnectorId(); + CatalogMetadata catalogMetadata = getCatalogMetadataForWrite(session, connectorId); + ConnectorMetadata metadata = catalogMetadata.getMetadata(); + ConnectorTransactionHandle transactionHandle = catalogMetadata.getTransactionHandleFor(connectorId); + + return metadata.getMergeUpdateLayout(session.toConnectorSession(connectorId), tableHandle.getConnectorHandle()) + .map(partitioning -> new PartitioningHandle(Optional.of(connectorId), Optional.of(transactionHandle), partitioning)); + } + @Override public boolean supportsMetadataDelete(Session session, TableHandle tableHandle) { @@ -1054,6 +1077,35 @@ public void finishUpdate(Session session, TableHandle tableHandle, Collection fragments, + Collection computedStatistics) + { + ConnectorId connectorId = mergeHandle.getTableHandle().getConnectorId(); + ConnectorMetadata metadata = getMetadata(session, connectorId); + metadata.finishMerge(session.toConnectorSession(connectorId), mergeHandle.getConnectorMergeTableHandle(), fragments, computedStatistics); + } + @Override public Optional getCatalogHandle(Session session, String catalogName) { diff --git a/presto-main-base/src/main/java/com/facebook/presto/operator/AbstractRowChangeOperator.java b/presto-main-base/src/main/java/com/facebook/presto/operator/AbstractRowChangeOperator.java index 1fd421543539c..f26ba51630fba 100644 --- a/presto-main-base/src/main/java/com/facebook/presto/operator/AbstractRowChangeOperator.java +++ b/presto-main-base/src/main/java/com/facebook/presto/operator/AbstractRowChangeOperator.java @@ -48,7 +48,7 @@ protected enum State protected State state = State.RUNNING; protected long rowCount; private boolean closed; - private ListenableFuture> finishFuture; + protected ListenableFuture> finishFuture; private Supplier> pageSource = Optional::empty; private final JsonCodec tableCommitContextCodec; @@ -158,6 +158,7 @@ public void close() } else { pageSource.get().ifPresent(UpdatablePageSource::abort); + abort(); } } } @@ -173,4 +174,6 @@ protected UpdatablePageSource pageSource() // empty source can occur if the source operator doesn't output any rows return source.orElseGet(EmptySplitPageSource::new); } + + protected void abort() {} } diff --git a/presto-main-base/src/main/java/com/facebook/presto/operator/ChangeOnlyUpdatedColumnsMergeProcessor.java b/presto-main-base/src/main/java/com/facebook/presto/operator/ChangeOnlyUpdatedColumnsMergeProcessor.java new file mode 100644 index 0000000000000..a16cd28d44ecf --- /dev/null +++ b/presto-main-base/src/main/java/com/facebook/presto/operator/ChangeOnlyUpdatedColumnsMergeProcessor.java @@ -0,0 +1,110 @@ +/* + * Licensed 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. + */ +package com.facebook.presto.operator; + +import com.facebook.presto.common.Page; +import com.facebook.presto.common.block.Block; +import com.facebook.presto.common.block.RunLengthEncodedBlock; + +import java.util.ArrayList; +import java.util.List; + +import static com.facebook.presto.common.Utils.nativeValueToBlock; +import static com.facebook.presto.common.block.RowBlock.getRowFieldsFromBlock; +import static com.facebook.presto.common.type.TinyintType.TINYINT; +import static com.google.common.base.Preconditions.checkArgument; +import static java.util.Objects.requireNonNull; + +/** + * The transformPage() method in this class does two things: + *
    + *
  • Transform the input page into an "update" page format
  • + *
  • Removes all rows whose operation number is DEFAULT_CASE_OPERATION_NUMBER
  • + *
+ */ +public class ChangeOnlyUpdatedColumnsMergeProcessor + implements MergeRowChangeProcessor +{ + private static final Block INSERT_FROM_UPDATE_BLOCK = nativeValueToBlock(TINYINT, 0L); + + private final int rowIdChannel; + private final int mergeRowChannel; + private final List dataColumnChannels; + private final int writeRedistributionColumnCount; + + public ChangeOnlyUpdatedColumnsMergeProcessor( + int rowIdChannel, + int mergeRowChannel, + List targetColumnChannels, + List redistributionColumnChannels) + { + this.rowIdChannel = rowIdChannel; + this.mergeRowChannel = mergeRowChannel; + this.dataColumnChannels = requireNonNull(targetColumnChannels, "targetColumnChannels is null"); + this.writeRedistributionColumnCount = redistributionColumnChannels.size(); + } + + @Override + public Page transformPage(Page inputPage) + { + requireNonNull(inputPage, "inputPage is null"); + + int inputChannelCount = inputPage.getChannelCount(); + checkArgument(inputChannelCount >= 2 + writeRedistributionColumnCount, "inputPage channelCount (%s) should be >= 2 + %s", inputChannelCount, writeRedistributionColumnCount); + int positionCount = inputPage.getPositionCount(); + checkArgument(positionCount > 0, "positionCount should be > 0, but is %s", positionCount); + + Block mergeRow = inputPage.getBlock(mergeRowChannel).getLoadedBlock(); + if (mergeRow.mayHaveNull()) { + for (int position = 0; position < positionCount; position++) { + checkArgument(!mergeRow.isNull(position), "The mergeRow may not have null rows"); + } + } + + List fields = getRowFieldsFromBlock(mergeRow); + List builder = new ArrayList<>(dataColumnChannels.size() + 3); + for (int channel : dataColumnChannels) { + builder.add(fields.get(channel)); + } + Block operationChannelBlock = fields.get(fields.size() - 2); + builder.add(operationChannelBlock); + builder.add(inputPage.getBlock(rowIdChannel)); + builder.add(new RunLengthEncodedBlock(INSERT_FROM_UPDATE_BLOCK, positionCount)); + + Page result = new Page(builder.toArray(new Block[0])); + + int defaultCaseCount = 0; + for (int position = 0; position < positionCount; position++) { + if (TINYINT.getByte(operationChannelBlock, position) == DEFAULT_CASE_OPERATION_NUMBER) { + defaultCaseCount++; + } + } + if (defaultCaseCount == 0) { + return result; + } + + int usedCases = 0; + int[] positions = new int[positionCount - defaultCaseCount]; + for (int position = 0; position < positionCount; position++) { + if (TINYINT.getByte(operationChannelBlock, position) != DEFAULT_CASE_OPERATION_NUMBER) { + positions[usedCases] = position; + usedCases++; + } + } + + checkArgument(usedCases + defaultCaseCount == positionCount, "usedCases (%s) + defaultCaseCount (%s) != positionCount (%s)", usedCases, defaultCaseCount, positionCount); + + return result.getPositions(positions, 0, usedCases); + } +} diff --git a/presto-main-base/src/main/java/com/facebook/presto/operator/DeleteAndInsertMergeProcessor.java b/presto-main-base/src/main/java/com/facebook/presto/operator/DeleteAndInsertMergeProcessor.java new file mode 100644 index 0000000000000..1aad6592d8889 --- /dev/null +++ b/presto-main-base/src/main/java/com/facebook/presto/operator/DeleteAndInsertMergeProcessor.java @@ -0,0 +1,205 @@ +/* + * Licensed 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. + */ +package com.facebook.presto.operator; + +import com.facebook.presto.common.Page; +import com.facebook.presto.common.PageBuilder; +import com.facebook.presto.common.block.Block; +import com.facebook.presto.common.block.BlockBuilder; +import com.facebook.presto.common.block.ColumnarRow; +import com.facebook.presto.common.type.Type; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.google.common.collect.ImmutableList; + +import java.util.List; + +import static com.facebook.presto.common.block.ColumnarRow.toColumnarRow; +import static com.facebook.presto.common.type.TinyintType.TINYINT; +import static com.facebook.presto.spi.ConnectorMergeSink.DELETE_OPERATION_NUMBER; +import static com.facebook.presto.spi.ConnectorMergeSink.INSERT_OPERATION_NUMBER; +import static com.facebook.presto.spi.ConnectorMergeSink.UPDATE_OPERATION_NUMBER; +import static com.google.common.base.Preconditions.checkArgument; +import static com.google.common.base.Verify.verify; +import static java.util.Objects.requireNonNull; + +public class DeleteAndInsertMergeProcessor + implements MergeRowChangeProcessor +{ + private final List targetColumnTypes; + private final Type rowIdType; + private final int targetTableRowIdChannel; + private final int mergeRowChannel; + private final List targetColumnChannels; + private final int redistributionColumnCount; + private final List redistributionChannelNumbers; + + public DeleteAndInsertMergeProcessor( + List targetColumnTypes, + Type rowIdType, + int targetTableRowIdChannel, + int mergeRowChannel, + List redistributionChannelNumbers, + List targetColumnChannels) + { + this.targetColumnTypes = requireNonNull(targetColumnTypes, "targetColumnTypes is null"); + this.rowIdType = requireNonNull(rowIdType, "rowIdType is null"); + this.targetTableRowIdChannel = targetTableRowIdChannel; + this.mergeRowChannel = mergeRowChannel; + this.redistributionColumnCount = redistributionChannelNumbers.size(); + int redistributionSourceIndex = 0; + this.targetColumnChannels = requireNonNull(targetColumnChannels, "targetColumnChannels is null"); + ImmutableList.Builder redistributionChannelNumbersBuilder = ImmutableList.builder(); + for (int dataColumnChannel : targetColumnChannels) { + if (redistributionChannelNumbers.contains(dataColumnChannel)) { + redistributionChannelNumbersBuilder.add(redistributionSourceIndex); + redistributionSourceIndex++; + } + else { + redistributionChannelNumbersBuilder.add(-1); + } + } + this.redistributionChannelNumbers = redistributionChannelNumbersBuilder.build(); + } + + @JsonProperty + public Type getRowIdType() + { + return rowIdType; + } + + /** + * Transform UPDATE operations into an INSERT and DELETE operation. + * See {@link MergeRowChangeProcessor#transformPage} for details. + * @param inputPage It has 5 channels/blocks:
+ * 1. Unique ID
+ * 2. Target Table Row ID (_file:varchar, _pos:bigint, partition_spec_id:integer, partition_data:varchar)
+ * 3. Merge Row (source table columns, operation, case number)
+ * 4. Merge case number
+ * 5. Is distinct row: it is 1 if no other row has the same unique id and WHEN clause number, 0 otherwise.
+ */ + @Override + public Page transformPage(Page inputPage) + { + requireNonNull(inputPage, "inputPage is null"); + int inputChannelCount = inputPage.getChannelCount(); + checkArgument(inputChannelCount >= 2 + redistributionColumnCount, "inputPage channelCount (%s) should be >= 2 + partition columns size (%s)", inputChannelCount, redistributionColumnCount); + + int originalPositionCount = inputPage.getPositionCount(); + checkArgument(originalPositionCount > 0, "originalPositionCount should be > 0, but is %s", originalPositionCount); + + ColumnarRow mergeRow = toColumnarRow(inputPage.getBlock(mergeRowChannel)); + Block operationChannelBlock = mergeRow.getField(mergeRow.getFieldCount() - 2); + + int updatePositions = 0; + int insertPositions = 0; + int deletePositions = 0; + for (int position = 0; position < originalPositionCount; position++) { + byte operation = TINYINT.getByte(operationChannelBlock, position); + switch (operation) { + case DEFAULT_CASE_OPERATION_NUMBER:/* ignored */ + break; + case INSERT_OPERATION_NUMBER: + insertPositions++; + break; + case DELETE_OPERATION_NUMBER: + deletePositions++; + break; + case UPDATE_OPERATION_NUMBER: + updatePositions++; + break; + default: + throw new IllegalArgumentException("Unknown operator number: " + operation); + } + } + + int totalPositions = insertPositions + deletePositions + (2 * updatePositions); + List pageTypes = ImmutableList.builder() + .addAll(targetColumnTypes) + .add(TINYINT) // Operation: INSERT(1), DELETE(2), UPDATE(3). More info: ConnectorMergeSink + .add(rowIdType) + .add(TINYINT) // Insert from update: it is 1 if the cause of the insert is an UPDATE, 0 otherwise. + .build(); + + PageBuilder pageBuilder = new PageBuilder(totalPositions, pageTypes); + for (int position = 0; position < originalPositionCount; position++) { + byte operation = TINYINT.getByte(operationChannelBlock, position); + if (operation != DEFAULT_CASE_OPERATION_NUMBER) { + // Delete and Update because both create a delete row + if (operation == DELETE_OPERATION_NUMBER || operation == UPDATE_OPERATION_NUMBER) { + addDeleteRow(pageBuilder, inputPage, position); + } + // Insert and update because both create an insert row + if (operation == INSERT_OPERATION_NUMBER || operation == UPDATE_OPERATION_NUMBER) { + addInsertRow(pageBuilder, mergeRow, position, operation == UPDATE_OPERATION_NUMBER); + } + } + } + + Page page = pageBuilder.build(); + verify(page.getPositionCount() == totalPositions, "page positions (%s) is not equal to (%s)", page.getPositionCount(), totalPositions); + return page; + } + + private void addDeleteRow(PageBuilder pageBuilder, Page originalPage, int position) + { + // Copy the write redistribution columns + for (int targetChannel : targetColumnChannels) { + Type columnType = targetColumnTypes.get(targetChannel); + BlockBuilder targetBlock = pageBuilder.getBlockBuilder(targetChannel); + + int redistributionChannelNumber = redistributionChannelNumbers.get(targetChannel); + if (redistributionChannelNumbers.get(targetChannel) >= 0) { + // The value comes from that column of the page + columnType.appendTo(originalPage.getBlock(redistributionChannelNumber), position, targetBlock); + } + else { + // We don't care about the other data columns + targetBlock.appendNull(); + } + } + + // Add the operation column == deleted + TINYINT.writeLong(pageBuilder.getBlockBuilder(targetColumnChannels.size()), DELETE_OPERATION_NUMBER); + + // Copy target table row ID column + rowIdType.appendTo(originalPage.getBlock(targetTableRowIdChannel), position, pageBuilder.getBlockBuilder(targetColumnChannels.size() + 1)); + + // Write 0, meaning this row is not an insert derived from an update + TINYINT.writeLong(pageBuilder.getBlockBuilder(targetColumnChannels.size() + 2), 0); + + pageBuilder.declarePosition(); + } + + private void addInsertRow(PageBuilder pageBuilder, ColumnarRow mergeCaseBlock, int position, boolean causedByUpdate) + { + // Copy the values from the merge block + for (int targetChannel : targetColumnChannels) { + Type columnType = targetColumnTypes.get(targetChannel); + BlockBuilder targetBlock = pageBuilder.getBlockBuilder(targetChannel); + // The value comes from that column of the page + columnType.appendTo(mergeCaseBlock.getField(targetChannel), position, targetBlock); + } + + // Add the operation column == insert + TINYINT.writeLong(pageBuilder.getBlockBuilder(targetColumnChannels.size()), INSERT_OPERATION_NUMBER); + + // Add null target table row ID column + pageBuilder.getBlockBuilder(targetColumnChannels.size() + 1).appendNull(); + + // Write 1 if this row is an insert derived from an update, 0 otherwise + TINYINT.writeLong(pageBuilder.getBlockBuilder(targetColumnChannels.size() + 2), causedByUpdate ? 1 : 0); + + pageBuilder.declarePosition(); + } +} diff --git a/presto-main-base/src/main/java/com/facebook/presto/operator/Driver.java b/presto-main-base/src/main/java/com/facebook/presto/operator/Driver.java index 442572f7725fb..9cf41c0f563ca 100644 --- a/presto-main-base/src/main/java/com/facebook/presto/operator/Driver.java +++ b/presto-main-base/src/main/java/com/facebook/presto/operator/Driver.java @@ -81,6 +81,7 @@ public class Driver private final Optional sourceOperator; private final Optional deleteOperator; private final Optional updateOperator; + private final Optional mergeOperator; // This variable acts as a staging area. When new splits (encapsulated in TaskSource) are // provided to a Driver, the Driver will not process them right away. Instead, the splits are @@ -141,6 +142,7 @@ private Driver(DriverContext driverContext, List operators) Optional sourceOperator = Optional.empty(); Optional deleteOperator = Optional.empty(); Optional updateOperator = Optional.empty(); + Optional mergeOperator = Optional.empty(); for (Operator operator : operators) { if (operator instanceof SourceOperator) { checkArgument(!sourceOperator.isPresent(), "There must be at most one SourceOperator"); @@ -154,10 +156,15 @@ else if (operator instanceof UpdateOperator) { checkArgument(!updateOperator.isPresent(), "There must be at most one UpdateOperator"); updateOperator = Optional.of((UpdateOperator) operator); } + else if (operator instanceof MergeWriterOperator) { + checkArgument(!mergeOperator.isPresent(), "There must be at most one MergeWriterOperator"); + mergeOperator = Optional.of((MergeWriterOperator) operator); + } } this.sourceOperator = sourceOperator; this.deleteOperator = deleteOperator; this.updateOperator = updateOperator; + this.mergeOperator = mergeOperator; currentTaskSource = sourceOperator.map(operator -> new TaskSource(operator.getSourceId(), ImmutableSet.of(), false)).orElse(null); // initially the driverBlockedFuture is not blocked (it is completed) @@ -289,6 +296,7 @@ private void processNewSources() Supplier> pageSource = sourceOperator.addSplit(newSplit); deleteOperator.ifPresent(deleteOperator -> deleteOperator.setPageSource(pageSource)); updateOperator.ifPresent(updateOperator -> updateOperator.setPageSource(pageSource)); + mergeOperator.ifPresent(mergeOperator -> mergeOperator.setPageSource(pageSource)); } // set no more splits diff --git a/presto-main-base/src/main/java/com/facebook/presto/operator/MergeProcessorOperator.java b/presto-main-base/src/main/java/com/facebook/presto/operator/MergeProcessorOperator.java new file mode 100644 index 0000000000000..9db1e0a3b9707 --- /dev/null +++ b/presto-main-base/src/main/java/com/facebook/presto/operator/MergeProcessorOperator.java @@ -0,0 +1,176 @@ +/* + * Licensed 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. + */ +package com.facebook.presto.operator; + +import com.facebook.presto.common.Page; +import com.facebook.presto.spi.PrestoException; +import com.facebook.presto.spi.plan.PlanNodeId; +import com.facebook.presto.spi.plan.TableWriterNode.MergeParadigmAndTypes; + +import java.util.List; + +import static com.facebook.presto.spi.StandardErrorCode.NOT_SUPPORTED; +import static com.google.common.base.Preconditions.checkState; +import static java.util.Objects.requireNonNull; + +/** + * This operator is used by operations like SQL MERGE. It is used + * for all {@link com.facebook.presto.spi.connector.RowChangeParadigm}s. This operator + * creates the {@link MergeRowChangeProcessor}. + */ +public class MergeProcessorOperator + implements Operator +{ + public static class MergeProcessorOperatorFactory + implements OperatorFactory + { + private final int operatorId; + private final PlanNodeId planNodeId; + private final MergeRowChangeProcessor rowChangeProcessor; + private boolean closed; + + private MergeProcessorOperatorFactory( + int operatorId, + PlanNodeId planNodeId, + MergeRowChangeProcessor rowChangeProcessor) + { + this.operatorId = operatorId; + this.planNodeId = requireNonNull(planNodeId, "planNodeId is null"); + this.rowChangeProcessor = requireNonNull(rowChangeProcessor, "rowChangeProcessor is null"); + } + + public MergeProcessorOperatorFactory( + int operatorId, + PlanNodeId planNodeId, + MergeParadigmAndTypes merge, + int rowIdChannel, + int mergeRowChannel, + List redistributionColumns, + List targetColumnChannels) + { + MergeRowChangeProcessor rowChangeProcessor = createRowChangeProcessor(merge, rowIdChannel, mergeRowChannel, redistributionColumns, targetColumnChannels); + + this.operatorId = operatorId; + this.planNodeId = requireNonNull(planNodeId, "planNodeId is null"); + this.rowChangeProcessor = requireNonNull(rowChangeProcessor, "rowChangeProcessor is null"); + } + + private static MergeRowChangeProcessor createRowChangeProcessor( + MergeParadigmAndTypes merge, + int rowIdChannel, + int mergeRowChannel, + List redistributionColumnChannels, + List targetColumnChannels) + { + switch (merge.getParadigm()) { + case DELETE_ROW_AND_INSERT_ROW: + return new DeleteAndInsertMergeProcessor( + merge.getColumnTypes(), + merge.getTargetTableRowIdColumnType(), + rowIdChannel, + mergeRowChannel, + redistributionColumnChannels, + targetColumnChannels); + case CHANGE_ONLY_UPDATED_COLUMNS: + return new ChangeOnlyUpdatedColumnsMergeProcessor( + rowIdChannel, + mergeRowChannel, + targetColumnChannels, + redistributionColumnChannels); + default: + throw new PrestoException(NOT_SUPPORTED, "Merge paradigm not supported: " + merge.getParadigm()); + } + } + + @Override + public Operator createOperator(DriverContext driverContext) + { + checkState(!closed, "Factory is already closed"); + OperatorContext context = driverContext.addOperatorContext(operatorId, planNodeId, MergeProcessorOperator.class.getSimpleName()); + return new MergeProcessorOperator(context, rowChangeProcessor); + } + + @Override + public void noMoreOperators() + { + closed = true; + } + + @Override + public OperatorFactory duplicate() + { + return new MergeProcessorOperatorFactory(operatorId, planNodeId, rowChangeProcessor); + } + } + + private final OperatorContext operatorContext; + private final MergeRowChangeProcessor rowChangeProcessor; + + private Page currentPage; + private boolean finishing; + + public MergeProcessorOperator( + OperatorContext operatorContext, + MergeRowChangeProcessor rowChangeProcessor) + { + this.operatorContext = requireNonNull(operatorContext, "operatorContext is null"); + this.rowChangeProcessor = requireNonNull(rowChangeProcessor, "rowChangeProcessor is null"); + } + + @Override + public OperatorContext getOperatorContext() + { + return operatorContext; + } + + @Override + public void finish() + { + finishing = true; + } + + @Override + public boolean isFinished() + { + return finishing && currentPage == null; + } + + @Override + public boolean needsInput() + { + return !finishing && currentPage == null; + } + + @Override + public void addInput(Page page) + { + checkState(!finishing, "Operator is already finishing"); + checkState(currentPage == null, "currentPage must be null to add a new page"); + + currentPage = requireNonNull(page, "page is null"); + } + + @Override + public Page getOutput() + { + if (currentPage == null) { + return null; + } + + Page transformedPage = rowChangeProcessor.transformPage(currentPage); + currentPage = null; + + return transformedPage; + } +} diff --git a/presto-main-base/src/main/java/com/facebook/presto/operator/MergeRowChangeProcessor.java b/presto-main-base/src/main/java/com/facebook/presto/operator/MergeRowChangeProcessor.java new file mode 100644 index 0000000000000..dc7208211a53f --- /dev/null +++ b/presto-main-base/src/main/java/com/facebook/presto/operator/MergeRowChangeProcessor.java @@ -0,0 +1,52 @@ +/* + * Licensed 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. + */ +package com.facebook.presto.operator; + +import com.facebook.presto.common.Page; +import com.facebook.presto.spi.ConnectorMergeSink; + +public interface MergeRowChangeProcessor +{ + int DEFAULT_CASE_OPERATION_NUMBER = -1; + + /** + * Transform a page generated by an SQL MERGE operation into page of data columns and + * operations. The SQL MERGE input page consists of the following: + *
    + *
  • The write redistribution columns, if any
  • + *
  • For partitioned or bucketed tables, a hash value column
  • + *
  • The rowId column for the row from the target table if matched, or null if not matched
  • + *
  • The merge case row block
  • + *
+ * The output page consists of the following: + *
    + *
  • All data columns, in table column order
  • + *
  • {@link ConnectorMergeSink#storeMergedRows The operation block}
  • + *
  • The rowId block
  • + *
  • The last column in the resulting page is 1 if the row is an insert + * derived from an update, and zero otherwise.
  • + *
+ *

+ * The {@link DeleteAndInsertMergeProcessor} implementation will transform each UPDATE + * row into multiple rows: an INSERT row and a DELETE row. + * + * @param inputPage It has 5 channels/blocks:
+ * 1. Unique ID
+ * 2. Target Table Row ID (_file:varchar, _pos:bigint, partition_spec_id:integer, partition_data:varchar)
+ * 3. Merge Row (source table columns, operation, case number)
+ * 4. Merge case number
+ * 5. Is distinct row: it is 1 if no other row has the same unique id and WHEN clause number, 0 otherwise.
+ */ + Page transformPage(Page inputPage); +} diff --git a/presto-main-base/src/main/java/com/facebook/presto/operator/MergeWriterOperator.java b/presto-main-base/src/main/java/com/facebook/presto/operator/MergeWriterOperator.java new file mode 100644 index 0000000000000..559535bf353a3 --- /dev/null +++ b/presto-main-base/src/main/java/com/facebook/presto/operator/MergeWriterOperator.java @@ -0,0 +1,141 @@ +/* + * Licensed 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. + */ +package com.facebook.presto.operator; + +import com.facebook.airlift.json.JsonCodec; +import com.facebook.presto.Session; +import com.facebook.presto.common.Page; +import com.facebook.presto.common.block.Block; +import com.facebook.presto.spi.ConnectorMergeSink; +import com.facebook.presto.spi.plan.PlanNodeId; +import com.facebook.presto.spi.plan.TableWriterNode.MergeTarget; +import com.facebook.presto.split.PageSinkManager; + +import java.util.stream.IntStream; + +import static com.facebook.airlift.concurrent.MoreFutures.toListenableFuture; +import static com.facebook.presto.common.type.TinyintType.TINYINT; +import static com.google.common.base.Preconditions.checkState; +import static java.util.Objects.requireNonNull; + +public class MergeWriterOperator + extends AbstractRowChangeOperator +{ + public static class MergeWriterOperatorFactory + implements OperatorFactory + { + private final int operatorId; + private final PlanNodeId planNodeId; + private final PageSinkManager pageSinkManager; + private final MergeTarget target; + private final Session session; + private final JsonCodec tableCommitContextCodec; + private boolean closed; + + public MergeWriterOperatorFactory( + int operatorId, + PlanNodeId planNodeId, + PageSinkManager pageSinkManager, + MergeTarget target, + Session session, + JsonCodec tableCommitContextCodec) + { + this.operatorId = operatorId; + this.planNodeId = requireNonNull(planNodeId, "planNodeId is null"); + this.pageSinkManager = requireNonNull(pageSinkManager, "pageSinkManager is null"); + this.target = requireNonNull(target, "target is null"); + this.session = requireNonNull(session, "session is null"); + this.tableCommitContextCodec = requireNonNull(tableCommitContextCodec, "tableCommitContextCodec is null"); + } + + @Override + public Operator createOperator(DriverContext driverContext) + { + checkState(!closed, "Factory is already closed"); + OperatorContext context = driverContext.addOperatorContext(operatorId, planNodeId, MergeWriterOperator.class.getSimpleName()); + ConnectorMergeSink mergeSink = pageSinkManager.createMergeSink(session, target.getMergeHandle().get()); + return new MergeWriterOperator(context, mergeSink, tableCommitContextCodec); + } + + @Override + public void noMoreOperators() + { + closed = true; + } + + @Override + public OperatorFactory duplicate() + { + return new MergeWriterOperatorFactory(operatorId, planNodeId, pageSinkManager, target, session, tableCommitContextCodec); + } + } + + private final ConnectorMergeSink mergeSink; + + public MergeWriterOperator(OperatorContext operatorContext, ConnectorMergeSink mergeSink, JsonCodec tableCommitContextCodec) + { + super(operatorContext, tableCommitContextCodec); + this.mergeSink = requireNonNull(mergeSink, "mergeSink is null"); + } + + /** + * @param page It has N + 3 channels/blocks, where N is the number of columns in the source table.
+ * 1: Source table column 1.
+ * 2: Source table column 2.
+ * N: Source table column N.
+ * N + 1: Operation: INSERT(1), DELETE(2), UPDATE(3). More info: {@link ConnectorMergeSink}
+ * N + 2: Target Table Row ID (_file:varchar, _pos:bigint, partition_spec_id:integer, partition_data:varchar).
+ * N + 3: Insert from update: it is 1 if the cause of the insert is an UPDATE, 0 otherwise.
+ */ + @Override + public void addInput(Page page) + { + requireNonNull(page, "page is null"); + checkState(state == State.RUNNING, "Operator is %s", state); + + // Copy all but the last block to a new page. + // The last block exists only to get the rowCount right. + int outputChannelCount = page.getChannelCount() - 1; + + int[] columns = IntStream.range(0, outputChannelCount).toArray(); + Page newPage = page.extractChannels(columns); + + // Store the page + mergeSink.storeMergedRows(newPage); + + // Calculate the amount to increment the rowCount + Block insertFromUpdateColumn = page.getBlock(page.getChannelCount() - 1); + long insertsFromUpdates = 0; + int positionCount = page.getPositionCount(); + for (int position = 0; position < positionCount; position++) { + insertsFromUpdates += TINYINT.getByte(insertFromUpdateColumn, position); + } + rowCount += positionCount - insertsFromUpdates; + } + + @Override + public void finish() + { + if (state == State.RUNNING) { + state = State.FINISHING; + finishFuture = toListenableFuture(mergeSink.finish()); + } + } + + @Override + protected void abort() + { + mergeSink.abort(); + } +} diff --git a/presto-main-base/src/main/java/com/facebook/presto/server/thrift/HandleThriftModule.java b/presto-main-base/src/main/java/com/facebook/presto/server/thrift/HandleThriftModule.java index 6d4c169e82032..71112a1fd1371 100644 --- a/presto-main-base/src/main/java/com/facebook/presto/server/thrift/HandleThriftModule.java +++ b/presto-main-base/src/main/java/com/facebook/presto/server/thrift/HandleThriftModule.java @@ -16,6 +16,7 @@ import com.facebook.presto.metadata.HandleResolver; import com.facebook.presto.spi.ConnectorDeleteTableHandle; import com.facebook.presto.spi.ConnectorInsertTableHandle; +import com.facebook.presto.spi.ConnectorMergeTableHandle; import com.facebook.presto.spi.ConnectorOutputTableHandle; import com.facebook.presto.spi.ConnectorSplit; import com.facebook.presto.spi.ConnectorTableHandle; @@ -39,6 +40,7 @@ public void configure(Binder binder) thriftCodecBinder(binder).bindCustomThriftCodec(OutputTableHandleThriftCodec.class); thriftCodecBinder(binder).bindCustomThriftCodec(InsertTableHandleThriftCodec.class); thriftCodecBinder(binder).bindCustomThriftCodec(DeleteTableHandleThriftCodec.class); + thriftCodecBinder(binder).bindCustomThriftCodec(MergeTableHandleThriftCodec.class); thriftCodecBinder(binder).bindCustomThriftCodec(TableLayoutHandleThriftCodec.class); thriftCodecBinder(binder).bindCustomThriftCodec(TableHandleThriftCodec.class); @@ -47,6 +49,7 @@ public void configure(Binder binder) jsonCodecBinder(binder).bindJsonCodec(ConnectorOutputTableHandle.class); jsonCodecBinder(binder).bindJsonCodec(ConnectorInsertTableHandle.class); jsonCodecBinder(binder).bindJsonCodec(ConnectorDeleteTableHandle.class); + jsonCodecBinder(binder).bindJsonCodec(ConnectorMergeTableHandle.class); jsonCodecBinder(binder).bindJsonCodec(ConnectorTableLayoutHandle.class); jsonCodecBinder(binder).bindJsonCodec(ConnectorTableHandle.class); diff --git a/presto-main-base/src/main/java/com/facebook/presto/server/thrift/MergeTableHandleThriftCodec.java b/presto-main-base/src/main/java/com/facebook/presto/server/thrift/MergeTableHandleThriftCodec.java new file mode 100644 index 0000000000000..57adfa71fc524 --- /dev/null +++ b/presto-main-base/src/main/java/com/facebook/presto/server/thrift/MergeTableHandleThriftCodec.java @@ -0,0 +1,82 @@ +/* + * Licensed 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. + */ +package com.facebook.presto.server.thrift; + +import com.facebook.airlift.json.JsonCodec; +import com.facebook.drift.codec.CodecThriftType; +import com.facebook.drift.codec.metadata.ThriftType; +import com.facebook.drift.protocol.TProtocolReader; +import com.facebook.drift.protocol.TProtocolWriter; +import com.facebook.presto.connector.ConnectorCodecManager; +import com.facebook.presto.metadata.HandleResolver; +import com.facebook.presto.spi.ConnectorMergeTableHandle; + +import javax.inject.Inject; + +import java.nio.ByteBuffer; + +import static java.util.Objects.requireNonNull; + +public class MergeTableHandleThriftCodec + extends AbstractTypedThriftCodec +{ + private static final ThriftType THRIFT_TYPE = createThriftType(ConnectorMergeTableHandle.class); + private final ConnectorCodecManager connectorCodecManager; + + @Inject + public MergeTableHandleThriftCodec(HandleResolver handleResolver, ConnectorCodecManager connectorCodecManager, JsonCodec jsonCodec) + { + super(ConnectorMergeTableHandle.class, + requireNonNull(jsonCodec, "jsonCodec is null"), + requireNonNull(handleResolver, "handleResolver is null")::getId, + handleResolver::getMergeTableHandleClass); + this.connectorCodecManager = requireNonNull(connectorCodecManager, "connectorThriftCodecManager is null"); + } + + @CodecThriftType + public static ThriftType getThriftType() + { + return THRIFT_TYPE; + } + + @Override + public ThriftType getType() + { + return THRIFT_TYPE; + } + + @Override + public ConnectorMergeTableHandle readConcreteValue(String connectorId, TProtocolReader reader) + throws Exception + { + ByteBuffer byteBuffer = reader.readBinary(); + assert (byteBuffer.position() == 0); + byte[] bytes = byteBuffer.array(); + return connectorCodecManager.getMergeTableHandleCodec(connectorId).map(codec -> codec.deserialize(bytes)).orElse(null); + } + + @Override + public void writeConcreteValue(String connectorId, ConnectorMergeTableHandle value, TProtocolWriter writer) + throws Exception + { + requireNonNull(value, "value is null"); + writer.writeBinary(ByteBuffer.wrap(connectorCodecManager.getMergeTableHandleCodec(connectorId).map(codec -> codec.serialize(value)).orElseThrow(() -> new IllegalArgumentException("Can not serialize " + value)))); + } + + @Override + public boolean isThriftCodecAvailable(String connectorId) + { + return connectorCodecManager.getMergeTableHandleCodec(connectorId).isPresent(); + } +} diff --git a/presto-main-base/src/main/java/com/facebook/presto/split/PageSinkManager.java b/presto-main-base/src/main/java/com/facebook/presto/split/PageSinkManager.java index ad02188c7814c..1f48983f916f7 100644 --- a/presto-main-base/src/main/java/com/facebook/presto/split/PageSinkManager.java +++ b/presto-main-base/src/main/java/com/facebook/presto/split/PageSinkManager.java @@ -19,9 +19,12 @@ import com.facebook.presto.metadata.InsertTableHandle; import com.facebook.presto.metadata.OutputTableHandle; import com.facebook.presto.spi.ConnectorId; +import com.facebook.presto.spi.ConnectorMergeSink; import com.facebook.presto.spi.ConnectorPageSink; import com.facebook.presto.spi.ConnectorSession; +import com.facebook.presto.spi.MergeHandle; import com.facebook.presto.spi.PageSinkContext; +import com.facebook.presto.spi.TableHandle; import com.facebook.presto.spi.connector.ConnectorPageSinkProvider; import java.util.concurrent.ConcurrentHashMap; @@ -74,6 +77,15 @@ public ConnectorPageSink createPageSink(Session session, InsertTableHandle table return createPageSink(session, tableHandle, pageSinkContext, null); } + @Override + public ConnectorMergeSink createMergeSink(Session session, MergeHandle mergeHandle) + { + // assumes connectorId and catalog are the same + TableHandle tableHandle = mergeHandle.getTableHandle(); + ConnectorSession connectorSession = session.toConnectorSession(tableHandle.getConnectorId()); + return providerFor(tableHandle.getConnectorId()).createMergeSink(tableHandle.getTransaction(), connectorSession, mergeHandle.getConnectorMergeTableHandle()); + } + @Override public ConnectorPageSink createPageSink(Session session, DistributedProcedureHandle procedureHandle, PageSinkContext pageSinkContext) { diff --git a/presto-main-base/src/main/java/com/facebook/presto/split/PageSinkProvider.java b/presto-main-base/src/main/java/com/facebook/presto/split/PageSinkProvider.java index 8da7105c7c045..e042d5c509207 100644 --- a/presto-main-base/src/main/java/com/facebook/presto/split/PageSinkProvider.java +++ b/presto-main-base/src/main/java/com/facebook/presto/split/PageSinkProvider.java @@ -17,7 +17,9 @@ import com.facebook.presto.metadata.DistributedProcedureHandle; import com.facebook.presto.metadata.InsertTableHandle; import com.facebook.presto.metadata.OutputTableHandle; +import com.facebook.presto.spi.ConnectorMergeSink; import com.facebook.presto.spi.ConnectorPageSink; +import com.facebook.presto.spi.MergeHandle; import com.facebook.presto.spi.PageSinkContext; public interface PageSinkProvider @@ -26,5 +28,10 @@ public interface PageSinkProvider ConnectorPageSink createPageSink(Session session, InsertTableHandle tableHandle, PageSinkContext pageSinkContext); + /* + * Used to write the result of SQL MERGE to an existing table + */ + ConnectorMergeSink createMergeSink(Session session, MergeHandle mergeHandle); + ConnectorPageSink createPageSink(Session session, DistributedProcedureHandle procedureHandle, PageSinkContext pageSinkContext); } diff --git a/presto-main-base/src/main/java/com/facebook/presto/sql/analyzer/StatementAnalyzer.java b/presto-main-base/src/main/java/com/facebook/presto/sql/analyzer/StatementAnalyzer.java index 9ebd03c95fce6..b87c5312be282 100644 --- a/presto-main-base/src/main/java/com/facebook/presto/sql/analyzer/StatementAnalyzer.java +++ b/presto-main-base/src/main/java/com/facebook/presto/sql/analyzer/StatementAnalyzer.java @@ -33,6 +33,7 @@ import com.facebook.presto.common.type.Type; import com.facebook.presto.common.type.VarcharType; import com.facebook.presto.metadata.CatalogMetadata; +import com.facebook.presto.metadata.FunctionAndTypeManager; import com.facebook.presto.metadata.Metadata; import com.facebook.presto.metadata.OperatorNotFoundException; import com.facebook.presto.metadata.TableFunctionMetadata; @@ -41,6 +42,7 @@ import com.facebook.presto.spi.ConnectorId; import com.facebook.presto.spi.MaterializedViewDefinition; import com.facebook.presto.spi.MaterializedViewStatus; +import com.facebook.presto.spi.NewTableLayout; import com.facebook.presto.spi.PrestoException; import com.facebook.presto.spi.PrestoWarning; import com.facebook.presto.spi.SchemaTableName; @@ -70,6 +72,7 @@ import com.facebook.presto.spi.function.table.TableArgument; import com.facebook.presto.spi.function.table.TableArgumentSpecification; import com.facebook.presto.spi.function.table.TableFunctionAnalysis; +import com.facebook.presto.spi.plan.PartitioningHandle; import com.facebook.presto.spi.procedure.DistributedProcedure; import com.facebook.presto.spi.procedure.TableDataRewriteDistributedProcedure; import com.facebook.presto.spi.relation.DomainTranslator; @@ -83,6 +86,7 @@ import com.facebook.presto.spi.type.UnknownTypeException; import com.facebook.presto.sql.ExpressionUtils; import com.facebook.presto.sql.MaterializedViewUtils; +import com.facebook.presto.sql.analyzer.Analysis.MergeAnalysis; import com.facebook.presto.sql.analyzer.Analysis.TableArgumentAnalysis; import com.facebook.presto.sql.analyzer.Analysis.TableFunctionInvocationAnalysis; import com.facebook.presto.sql.parser.ParsingException; @@ -148,6 +152,9 @@ import com.facebook.presto.sql.tree.LogicalBinaryExpression; import com.facebook.presto.sql.tree.LongLiteral; import com.facebook.presto.sql.tree.Merge; +import com.facebook.presto.sql.tree.MergeCase; +import com.facebook.presto.sql.tree.MergeInsert; +import com.facebook.presto.sql.tree.MergeUpdate; import com.facebook.presto.sql.tree.NaturalJoin; import com.facebook.presto.sql.tree.Node; import com.facebook.presto.sql.tree.NodeLocation; @@ -360,6 +367,7 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkState; import static com.google.common.base.Throwables.throwIfInstanceOf; +import static com.google.common.base.Verify.verify; import static com.google.common.collect.ImmutableList.toImmutableList; import static com.google.common.collect.ImmutableMap.toImmutableMap; import static com.google.common.collect.ImmutableSet.toImmutableSet; @@ -2214,6 +2222,16 @@ protected Scope visitTable(Table table, Optional scope) analysis.addSourceColumns(field, ImmutableSet.of(new SourceColumn(name, column.getName()))); } + boolean isMergeIntoStatement = statement instanceof Merge && ((Merge) statement).getTargetTable().equals(table); + if (isMergeIntoStatement) { + // Add the target table row id field used to process the MERGE command. + ColumnHandle targetTableRowIdColumnHandle = metadata.getMergeTargetTableRowIdColumnHandle(session, tableHandle.get()); + Type targetTableRowIdType = metadata.getColumnMetadata(session, tableHandle.get(), targetTableRowIdColumnHandle).getType(); + Field targetTableRowIdField = Field.newUnqualified(Optional.empty(), "$target_table_row_id", targetTableRowIdType); + fields.add(targetTableRowIdField); + analysis.setColumn(targetTableRowIdField, targetTableRowIdColumnHandle); + } + analysis.registerTable(table, tableHandle.get()); List outputFields = fields.build(); @@ -2238,7 +2256,16 @@ protected Scope visitTable(Table table, Optional scope) } } - return createAndAssignScope(table, scope, outputFields); + Scope tableScope = createAndAssignScope(table, scope, outputFields); + + if (isMergeIntoStatement) { + // Set the target table row id field reference used to process the MERGE command. + FieldReference targetTableRowIdFieldReference = new FieldReference(outputFields.size() - 1); + analyzeExpression(targetTableRowIdFieldReference, tableScope); + analysis.setRowIdField(table, targetTableRowIdFieldReference); + } + + return tableScope; } private Optional getTableHandle(TableColumnMetadata tableColumnsMetadata, Table table, QualifiedObjectName name, Optional scope) @@ -3217,7 +3244,262 @@ protected Scope visitUpdate(Update update, Optional scope) @Override protected Scope visitMerge(Merge merge, Optional scope) { - throw new PrestoException(StandardErrorCode.NOT_SUPPORTED, "This connector does not support MERGE INTO statements"); + Relation targetRelation = merge.getTarget(); + Table targetTable = getMergeTargetTable(targetRelation); + QualifiedObjectName targetTableQualifiedName = createQualifiedObjectName(session, targetTable, targetTable.getName(), metadata); + MetadataHandle metadataHandle = analysis.getMetadataHandle(); + + if (getViewDefinition(session, metadataResolver, metadataHandle, targetTableQualifiedName).isPresent()) { + throw new SemanticException(NOT_SUPPORTED, merge, "Merging into views is not supported"); + } + + if (getMaterializedViewDefinition(session, metadataResolver, metadataHandle, targetTableQualifiedName).isPresent()) { + throw new SemanticException(NOT_SUPPORTED, merge, "Merging into materialized views is not supported"); + } + + TableColumnMetadata targetTableColumnsMetadata = getTableColumnsMetadata(session, metadataResolver, metadataHandle, targetTableQualifiedName); + + TableHandle targetTableHandle = targetTableColumnsMetadata.getTableHandle() + .orElseThrow(() -> new SemanticException(MISSING_TABLE, targetTable, "Table '%s' does not exist", targetTableQualifiedName)); + + // The analyzer checks for select permissions, but the MERGE INTO statement has different permissions, so disable access checks. + StatementAnalyzer statementAnalyzer = new StatementAnalyzer(analysis, metadata, sqlParser, + new AllowAllAccessControl(), session, warningCollector); + + Scope targetTableScope = statementAnalyzer.analyze(targetRelation, scope); + Scope sourceTableScope = process(merge.getSource(), scope); + Scope joinScope = createAndAssignScope(merge, scope, targetTableScope.getRelationType().joinWith(sourceTableScope.getRelationType())); + + List targetColumnsMetadata = targetTableColumnsMetadata.getColumnsMetadata().stream() + .filter(column -> !column.isHidden()) + .collect(toImmutableList()); + + Optional targetInsertLayout = metadata.getInsertLayout(session, targetTableHandle); + + Map targetAllColumnHandles = metadata.getColumnHandles(session, targetTableHandle); + ImmutableList.Builder targetColumnHandlesBuilder = ImmutableList.builder(); + ImmutableSet.Builder targetColumnNamesBuilder = ImmutableSet.builder(); + ImmutableList.Builder targetRedistributionColumnHandlesBuilder = ImmutableList.builder(); + Set targetPartitioningColumnNames = ImmutableSet.copyOf(targetInsertLayout.map(NewTableLayout::getPartitionColumns).orElse(ImmutableList.of())); + for (ColumnMetadata columnMetadata : targetColumnsMetadata) { + String targetColumnName = columnMetadata.getName(); + ColumnHandle targetColumnHandle = targetAllColumnHandles.get(targetColumnName); + targetColumnHandlesBuilder.add(targetColumnHandle); + targetColumnNamesBuilder.add(targetColumnName); + if (targetPartitioningColumnNames.contains(targetColumnName)) { + targetRedistributionColumnHandlesBuilder.add(targetColumnHandle); + } + } + List targetColumnHandles = targetColumnHandlesBuilder.build(); + Set targetColumnNames = targetColumnNamesBuilder.build(); + // The "targetRedistributionColumnHandles" is a list that contains the columns from the target table that are also present in the partitioning columns. + List targetRedistributionColumnHandles = targetRedistributionColumnHandlesBuilder.build(); + + Map targetColumnTypes = targetColumnsMetadata.stream().collect(toImmutableMap(ColumnMetadata::getName, ColumnMetadata::getType)); + + // Analyze all expressions in the Merge node + + Expression mergePredicate = merge.getPredicate(); + ExpressionAnalysis mergePredicateAnalysis = analyzeExpression(mergePredicate, joinScope); + Type mergePredicateType = mergePredicateAnalysis.getType(mergePredicate); + if (!mergePredicateType.equals(BOOLEAN)) { + if (!mergePredicateType.equals(UNKNOWN)) { + throw new SemanticException(TYPE_MISMATCH, mergePredicate, "The MERGE predicate must evaluate to a boolean: actual type %s", mergePredicateType); + } + // coerce null to boolean + analysis.addCoercion(mergePredicate, BOOLEAN, false); + } + analysis.recordSubqueries(merge, mergePredicateAnalysis); + + Set allUpdateColumnNames = new HashSet<>(); + + for (int caseCounter = 0; caseCounter < merge.getMergeCases().size(); caseCounter++) { + MergeCase mergeCase = merge.getMergeCases().get(caseCounter); + List setColumnNames = lowercaseIdentifierList(mergeCase.getSetColumns()); + if (mergeCase instanceof MergeUpdate) { + allUpdateColumnNames.addAll(setColumnNames); + } + else if (mergeCase instanceof MergeInsert && setColumnNames.isEmpty()) { + setColumnNames = targetColumnsMetadata.stream().map(ColumnMetadata::getName).collect(toImmutableList()); + } + int mergeCaseSetColumnCount = setColumnNames.size(); + List mergeCaseSetExpressions = mergeCase.getSetExpressions(); + checkArgument( + mergeCaseSetColumnCount == mergeCaseSetExpressions.size(), + "Number of merge columns (%s) isn't equal to number of expressions (%s)", + mergeCaseSetColumnCount, mergeCaseSetExpressions.size()); + Set mergeCaseColumnNameSet = new HashSet<>(mergeCaseSetColumnCount); + // Look for missing or duplicate column names. + setColumnNames.forEach(mergeCaseColumnName -> { + if (!targetColumnNames.contains(mergeCaseColumnName)) { + throw new SemanticException(MISSING_COLUMN, merge, "Merge column name does not exist in target table: %s", mergeCaseColumnName); + } + if (!mergeCaseColumnNameSet.add(mergeCaseColumnName)) { + throw new SemanticException(DUPLICATE_COLUMN_NAME, merge, "Merge column name is specified more than once: %s", mergeCaseColumnName); + } + }); + + // Collects types for columns and expressions in this MergeCase. + ImmutableList.Builder setColumnTypesBuilder = ImmutableList.builder(); + ImmutableList.Builder setExpressionTypesBuilder = ImmutableList.builder(); + for (int index = 0; index < setColumnNames.size(); index++) { + String columnName = setColumnNames.get(index); + Expression setExpression = mergeCaseSetExpressions.get(index); + ExpressionAnalysis setExpressionAnalysis = analyzeExpression(setExpression, joinScope); + analysis.recordSubqueries(merge, setExpressionAnalysis); + Type setColumnType = requireNonNull(targetColumnTypes.get(columnName)); + setColumnTypesBuilder.add(setColumnType); + setExpressionTypesBuilder.add(setExpressionAnalysis.getType(setExpression)); + } + List setColumnTypes = setColumnTypesBuilder.build(); + List setExpressionTypes = setExpressionTypesBuilder.build(); + + // Check if the types of the columns and expressions match for the MERGE SET clause. + if (!checkTypesMatchForMergeSet(setColumnTypes, setExpressionTypes)) { + throw new SemanticException(TYPE_MISMATCH, + mergeCase, + "MERGE table column types don't match for MERGE case %s, SET expressions: Table: [%s], Expressions: [%s]", + caseCounter, + Joiner.on(", ").join(setColumnTypes), + Joiner.on(", ").join(setExpressionTypes)); + } + + // Add coercion if the target column type and set expression type do not match. + for (int index = 0; index < setColumnNames.size(); index++) { + Expression setExpression = mergeCase.getSetExpressions().get(index); + Type targetColumnType = targetColumnTypes.get(setColumnNames.get(index)); + Type setExpressionType = setExpressionTypes.get(index); + if (!targetColumnType.equals(setExpressionType)) { + FunctionAndTypeManager functionAndTypeManager = metadata.getFunctionAndTypeManager(); + analysis.addCoercion(setExpression, targetColumnType, functionAndTypeManager.isTypeOnlyCoercion(setExpressionType, targetColumnType)); + } + } + } + + // Check if the user has permission to insert into the target table + merge.getMergeCases().stream() + .filter(mergeCase -> mergeCase instanceof MergeInsert) + .findFirst() + .ifPresent(mergeCase -> accessControl.checkCanInsertIntoTable(session.getRequiredTransactionId(), + session.getIdentity(), session.getAccessControlContext(), targetTableQualifiedName)); + + // If there are any columns to update then verify the user has permission to update these columns. + if (!allUpdateColumnNames.isEmpty()) { + accessControl.checkCanUpdateTableColumns(session.getRequiredTransactionId(), session.getIdentity(), + session.getAccessControlContext(), targetTableQualifiedName, allUpdateColumnNames); + } + + analysis.setUpdateInfo(merge.getUpdateInfo()); + + List> mergeCaseColumnHandles = buildMergeCaseColumnLists(merge, targetColumnsMetadata, targetAllColumnHandles); + + Optional mergeUpdateLayout = metadata.getMergeUpdateLayout(session, targetTableHandle); + + ImmutableMap.Builder columnHandleFieldNumbersBuilder = ImmutableMap.builder(); + Map fieldIndexes = new HashMap<>(); + RelationType targetRelationType = targetTableScope.getRelationType(); + for (Field targetField : targetRelationType.getAllFields()) { + targetField.getName() + .filter(targetFieldName -> !"$target_table_row_id".equals(targetFieldName)) // Skip "$target_table_row_id" column. + .ifPresent(targetFieldName -> { + int targetFieldIndex = targetRelationType.indexOf(targetField); + ColumnHandle targetColumnHandle = targetAllColumnHandles.get(targetFieldName); + verify(targetColumnHandle != null, "targetAllColumnHandles does not contain the named handle: %s", targetFieldName); + columnHandleFieldNumbersBuilder.put(targetColumnHandle, targetFieldIndex); + fieldIndexes.put(targetFieldName, targetFieldIndex); + }); + } + Map columnHandleFieldNumbers = columnHandleFieldNumbersBuilder.buildOrThrow(); + + List insertPartitioningArgumentIndexes = targetPartitioningColumnNames.stream() + .map(fieldIndexes::get) + .collect(toImmutableList()); + + Set nonNullableColumnHandles = metadata.getTableMetadata(session, targetTableHandle).getColumns().stream() + .filter(column -> !column.isNullable()) + .map(ColumnMetadata::getName) + .map(targetAllColumnHandles::get) + .collect(toImmutableSet()); + + analysis.setMergeAnalysis(new MergeAnalysis( + targetTable, + targetColumnsMetadata, + targetColumnHandles, + targetRedistributionColumnHandles, + mergeCaseColumnHandles, + nonNullableColumnHandles, + columnHandleFieldNumbers, + insertPartitioningArgumentIndexes, + targetInsertLayout, + mergeUpdateLayout, + targetTableScope, + joinScope)); + + return createAndAssignScope(merge, Optional.empty(), Field.newUnqualified(merge.getLocation(), "rows", BIGINT)); + } + + private boolean checkTypesMatchForMergeSet(Iterable tableTypes, Iterable queryTypes) + { + if (Iterables.size(tableTypes) != Iterables.size(queryTypes)) { + return false; + } + + Iterator tableTypesIterator = tableTypes.iterator(); + Iterator queryTypesIterator = queryTypes.iterator(); + while (tableTypesIterator.hasNext()) { + Type tableType = tableTypesIterator.next(); + Type queryType = queryTypesIterator.next(); + + if (!metadata.getFunctionAndTypeManager().canCoerce(queryType, tableType)) { + return false; + } + } + + return true; + } + + private Table getMergeTargetTable(Relation relation) + { + if (relation instanceof Table) { + return (Table) relation; + } + checkArgument(relation instanceof AliasedRelation, "relation is neither a Table nor an AliasedRelation"); + return (Table) ((AliasedRelation) relation).getRelation(); + } + + /** + * Builds a list of column handles for each merge case in the given merge statement. + * + * @param merge the merge statement + * @param columnSchemas the list of column metadata for the target table. + * @param allColumnHandles a map of column names to column handles for the target table. + * @return a list of lists of column handles, where each inner list corresponds to a merge case. + */ + private List> buildMergeCaseColumnLists(Merge merge, List columnSchemas, Map allColumnHandles) + { + ImmutableList.Builder> mergeCaseColumnsListsBuilder = ImmutableList.builder(); + for (int caseCounter = 0; caseCounter < merge.getMergeCases().size(); caseCounter++) { + MergeCase mergeCase = merge.getMergeCases().get(caseCounter); + List mergeColumnNames; + if (mergeCase instanceof MergeInsert && mergeCase.getSetColumns().isEmpty()) { + mergeColumnNames = columnSchemas.stream().map(ColumnMetadata::getName).collect(toImmutableList()); + } + else { + mergeColumnNames = lowercaseIdentifierList(mergeCase.getSetColumns()); + } + mergeCaseColumnsListsBuilder.add( + mergeColumnNames.stream() + .map(name -> requireNonNull(allColumnHandles.get(name), "No column found for name")) + .collect(toImmutableList())); + } + return mergeCaseColumnsListsBuilder.build(); + } + + private List lowercaseIdentifierList(Collection identifiers) + { + return identifiers.stream() + .map(identifier -> identifier.getValue().toLowerCase(ENGLISH)) + .collect(toImmutableList()); } private Scope analyzeJoinUsing(Join node, List columns, Optional scope, Scope left, Scope right) diff --git a/presto-main-base/src/main/java/com/facebook/presto/sql/planner/BasePlanFragmenter.java b/presto-main-base/src/main/java/com/facebook/presto/sql/planner/BasePlanFragmenter.java index 63d5d02c793c8..95a957f38303e 100644 --- a/presto-main-base/src/main/java/com/facebook/presto/sql/planner/BasePlanFragmenter.java +++ b/presto-main-base/src/main/java/com/facebook/presto/sql/planner/BasePlanFragmenter.java @@ -45,6 +45,8 @@ import com.facebook.presto.sql.planner.plan.CallDistributedProcedureNode; import com.facebook.presto.sql.planner.plan.ExchangeNode; import com.facebook.presto.sql.planner.plan.ExplainAnalyzeNode; +import com.facebook.presto.sql.planner.plan.MergeProcessorNode; +import com.facebook.presto.sql.planner.plan.MergeWriterNode; import com.facebook.presto.sql.planner.plan.RemoteSourceNode; import com.facebook.presto.sql.planner.plan.SequenceNode; import com.facebook.presto.sql.planner.plan.SimplePlanRewriter; @@ -266,6 +268,21 @@ public PlanNode visitTableWriter(TableWriterNode node, RewriteContext context) + { + if (node.getPartitioningScheme().isPresent()) { + context.get().setDistribution(node.getPartitioningScheme().get().getPartitioning().getHandle(), metadata, session); + } + return context.defaultRewrite(node, context.get()); + } + + @Override + public PlanNode visitMergeProcessor(MergeProcessorNode node, RewriteContext context) + { + return context.defaultRewrite(node, context.get()); + } + @Override public PlanNode visitCallDistributedProcedure(CallDistributedProcedureNode node, RewriteContext context) { diff --git a/presto-main-base/src/main/java/com/facebook/presto/sql/planner/LocalExecutionPlanner.java b/presto-main-base/src/main/java/com/facebook/presto/sql/planner/LocalExecutionPlanner.java index 063174a954eae..bdb65ec3c1f6b 100644 --- a/presto-main-base/src/main/java/com/facebook/presto/sql/planner/LocalExecutionPlanner.java +++ b/presto-main-base/src/main/java/com/facebook/presto/sql/planner/LocalExecutionPlanner.java @@ -38,6 +38,7 @@ import com.facebook.presto.execution.scheduler.ExecutionWriterTarget.DeleteHandle; import com.facebook.presto.execution.scheduler.ExecutionWriterTarget.ExecuteProcedureHandle; import com.facebook.presto.execution.scheduler.ExecutionWriterTarget.InsertHandle; +import com.facebook.presto.execution.scheduler.ExecutionWriterTarget.MergeHandle; import com.facebook.presto.execution.scheduler.ExecutionWriterTarget.RefreshMaterializedViewHandle; import com.facebook.presto.execution.scheduler.ExecutionWriterTarget.UpdateHandle; import com.facebook.presto.execution.scheduler.TableWriteInfo; @@ -74,6 +75,8 @@ import com.facebook.presto.operator.LookupOuterOperator.LookupOuterOperatorFactory; import com.facebook.presto.operator.LookupSourceFactory; import com.facebook.presto.operator.MarkDistinctOperator.MarkDistinctOperatorFactory; +import com.facebook.presto.operator.MergeProcessorOperator; +import com.facebook.presto.operator.MergeWriterOperator; import com.facebook.presto.operator.MetadataDeleteOperator.MetadataDeleteOperatorFactory; import com.facebook.presto.operator.NestedLoopJoinBridge; import com.facebook.presto.operator.NestedLoopJoinPagesSupplier; @@ -208,6 +211,8 @@ import com.facebook.presto.sql.planner.plan.ExplainAnalyzeNode; import com.facebook.presto.sql.planner.plan.GroupIdNode; import com.facebook.presto.sql.planner.plan.InternalPlanVisitor; +import com.facebook.presto.sql.planner.plan.MergeProcessorNode; +import com.facebook.presto.sql.planner.plan.MergeWriterNode; import com.facebook.presto.sql.planner.plan.RemoteSourceNode; import com.facebook.presto.sql.planner.plan.RowNumberNode; import com.facebook.presto.sql.planner.plan.SampleNode; @@ -2810,6 +2815,47 @@ private PageSinkCommitStrategy getPageSinkCommitStrategy() return NO_COMMIT; } + @Override + public PhysicalOperation visitMergeWriter(MergeWriterNode node, LocalExecutionPlanContext context) + { + context.setDriverInstanceCount(getTaskWriterCount(session)); + + PhysicalOperation source = node.getSource().accept(this, context); + OperatorFactory operatorFactory = new MergeWriterOperator.MergeWriterOperatorFactory( + context.getNextOperatorId(), node.getId(), pageSinkManager, node.getTarget(), session, + tableCommitContextCodec); + return new PhysicalOperation(operatorFactory, makeLayout(node), context, source); + } + + @Override + public PhysicalOperation visitMergeProcessor(MergeProcessorNode node, LocalExecutionPlanContext context) + { + PhysicalOperation source = node.getSource().accept(this, context); + + Map nodeLayout = makeLayout(node); + Map sourceLayout = makeLayout(node.getSource()); + int rowIdChannel = sourceLayout.get(node.getTargetTableRowIdColumnVariable()); + int mergeRowChannel = sourceLayout.get(node.getMergeRowVariable()); + + List redistributionColumns = node.getTargetRedistributionColumnVariables().stream() + .map(nodeLayout::get) + .collect(toImmutableList()); + List targetColumnChannels = node.getTargetColumnVariables().stream() + .map(nodeLayout::get) + .collect(toImmutableList()); + + OperatorFactory operatorFactory = new MergeProcessorOperator.MergeProcessorOperatorFactory( + context.getNextOperatorId(), + node.getId(), + node.getTarget().getMergeParadigmAndTypes(), + rowIdChannel, + mergeRowChannel, + redistributionColumns, + targetColumnChannels); + + return new PhysicalOperation(operatorFactory, nodeLayout, context, source); + } + @Override public PhysicalOperation visitStatisticsWriterNode(StatisticsWriterNode node, LocalExecutionPlanContext context) { @@ -3536,6 +3582,10 @@ else if (target instanceof UpdateHandle) { metadata.finishUpdate(session, ((UpdateHandle) target).getHandle(), fragments); return Optional.empty(); } + else if (target instanceof MergeHandle) { + metadata.finishMerge(session, ((MergeHandle) target).getHandle(), fragments, statistics); + return Optional.empty(); + } else if (target instanceof ExecuteProcedureHandle) { metadata.finishCallDistributedProcedure(session, ((ExecuteProcedureHandle) target).getHandle(), ((ExecuteProcedureHandle) target).getProcedureName(), fragments); return Optional.empty(); diff --git a/presto-main-base/src/main/java/com/facebook/presto/sql/planner/LogicalPlanner.java b/presto-main-base/src/main/java/com/facebook/presto/sql/planner/LogicalPlanner.java index 414d2d9b47bd9..f766ee47ad3c6 100644 --- a/presto-main-base/src/main/java/com/facebook/presto/sql/planner/LogicalPlanner.java +++ b/presto-main-base/src/main/java/com/facebook/presto/sql/planner/LogicalPlanner.java @@ -59,6 +59,7 @@ import com.facebook.presto.sql.planner.StatisticsAggregationPlanner.TableStatisticAggregation; import com.facebook.presto.sql.planner.plan.CallDistributedProcedureNode; import com.facebook.presto.sql.planner.plan.ExplainAnalyzeNode; +import com.facebook.presto.sql.planner.plan.MergeWriterNode; import com.facebook.presto.sql.planner.plan.StatisticsWriterNode; import com.facebook.presto.sql.planner.plan.UpdateNode; import com.facebook.presto.sql.tree.Analyze; @@ -72,6 +73,7 @@ import com.facebook.presto.sql.tree.Identifier; import com.facebook.presto.sql.tree.Insert; import com.facebook.presto.sql.tree.LambdaArgumentDeclaration; +import com.facebook.presto.sql.tree.Merge; import com.facebook.presto.sql.tree.NodeRef; import com.facebook.presto.sql.tree.NullLiteral; import com.facebook.presto.sql.tree.Parameter; @@ -112,6 +114,7 @@ import static com.facebook.presto.sql.analyzer.ExpressionTreeUtils.createSymbolReference; import static com.facebook.presto.sql.analyzer.ExpressionTreeUtils.getSourceLocation; import static com.facebook.presto.sql.planner.PlannerUtils.newVariable; +import static com.facebook.presto.sql.planner.SystemPartitioningHandle.FIXED_HASH_DISTRIBUTION; import static com.facebook.presto.sql.planner.TranslateExpressionsUtil.toRowExpression; import static com.facebook.presto.sql.relational.Expressions.constant; import static com.facebook.presto.sql.tree.ExplainFormat.Type.TEXT; @@ -199,6 +202,9 @@ else if (statement instanceof Delete) { if (statement instanceof Update) { return createUpdatePlan(analysis, (Update) statement); } + if (statement instanceof Merge) { + return createMergePlan(analysis, (Merge) statement); + } else if (statement instanceof Query) { return createRelationPlan(analysis, (Query) statement, new SqlPlannerContext(0)); } @@ -631,6 +637,26 @@ private RelationPlan createUpdatePlan(Analysis analysis, Update node) return new RelationPlan(commitNode, analysis.getScope(node), commitNode.getOutputVariables()); } + private RelationPlan createMergePlan(Analysis analysis, Merge node) + { + SqlPlannerContext context = new SqlPlannerContext(0); + MergeWriterNode mergeNode = new QueryPlanner(analysis, variableAllocator, idAllocator, + buildLambdaDeclarationToVariableMap(analysis, variableAllocator), metadata, session, context, sqlParser) + .plan(node); + + TableFinishNode commitNode = new TableFinishNode( + mergeNode.getSourceLocation(), + idAllocator.getNextId(), + mergeNode, + Optional.of(mergeNode.getTarget()), + variableAllocator.newVariable("rows", BIGINT), + Optional.empty(), + Optional.empty(), + Optional.empty()); + + return new RelationPlan(commitNode, analysis.getScope(node), commitNode.getOutputVariables()); + } + private PlanNode createOutputPlan(RelationPlan plan, Analysis analysis) { ImmutableList.Builder outputs = ImmutableList.builder(); @@ -740,7 +766,7 @@ private static Optional getPartitioningSchemeForTableWrite(O List outputLayout = new ArrayList<>(variables); partitioningScheme = Optional.of(new PartitioningScheme( - Partitioning.create(tableLayout.get().getPartitioning(), partitionFunctionArguments), + Partitioning.create(tableLayout.get().getPartitioning().orElse(FIXED_HASH_DISTRIBUTION), partitionFunctionArguments), outputLayout, tableLayout.get().getWriterPolicy() == MULTIPLE_WRITERS_PER_PARTITION_ALLOWED)); } diff --git a/presto-main-base/src/main/java/com/facebook/presto/sql/planner/MergePartitioningHandle.java b/presto-main-base/src/main/java/com/facebook/presto/sql/planner/MergePartitioningHandle.java new file mode 100644 index 0000000000000..f9e44808fdbb9 --- /dev/null +++ b/presto-main-base/src/main/java/com/facebook/presto/sql/planner/MergePartitioningHandle.java @@ -0,0 +1,210 @@ +/* + * Licensed 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. + */ +package com.facebook.presto.sql.planner; + +import com.facebook.presto.common.Page; +import com.facebook.presto.common.block.Block; +import com.facebook.presto.common.type.Type; +import com.facebook.presto.operator.BucketPartitionFunction; +import com.facebook.presto.operator.PartitionFunction; +import com.facebook.presto.spi.PrestoException; +import com.facebook.presto.spi.connector.ConnectorPartitioningHandle; +import com.facebook.presto.spi.plan.PartitioningHandle; +import com.facebook.presto.spi.plan.PartitioningScheme; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.google.common.base.VerifyException; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import java.util.function.Function; +import java.util.stream.IntStream; + +import static com.facebook.presto.common.type.TinyintType.TINYINT; +import static com.facebook.presto.spi.ConnectorMergeSink.DELETE_OPERATION_NUMBER; +import static com.facebook.presto.spi.ConnectorMergeSink.INSERT_OPERATION_NUMBER; +import static com.facebook.presto.spi.ConnectorMergeSink.UPDATE_OPERATION_NUMBER; +import static com.facebook.presto.spi.StandardErrorCode.NOT_SUPPORTED; +import static com.google.common.base.Preconditions.checkArgument; +import static com.google.common.collect.Iterables.getLast; +import static java.util.Objects.requireNonNull; + +public final class MergePartitioningHandle + implements ConnectorPartitioningHandle +{ + private final Optional insertPartitioning; + private final Optional updatePartitioning; + + @JsonCreator + public MergePartitioningHandle( + @JsonProperty("insertPartitioning") Optional insertPartitioning, + @JsonProperty("updatePartitioning") Optional updatePartitioning) + { + this.insertPartitioning = requireNonNull(insertPartitioning, "insertPartitioning is null"); + this.updatePartitioning = requireNonNull(updatePartitioning, "updatePartitioning is null"); + checkArgument(insertPartitioning.isPresent() || updatePartitioning.isPresent(), "insert or update partitioning must be present"); + } + + @JsonProperty + public Optional getInsertPartitioning() + { + return insertPartitioning; + } + + @JsonProperty + public Optional getUpdatePartitioning() + { + return updatePartitioning; + } + + @Override + public boolean equals(Object o) + { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MergePartitioningHandle that = (MergePartitioningHandle) o; + return insertPartitioning.equals(that.insertPartitioning) && + updatePartitioning.equals(that.updatePartitioning); + } + + @Override + public int hashCode() + { + return Objects.hash(insertPartitioning, updatePartitioning); + } + + @Override + public String toString() + { + List parts = new ArrayList<>(); + insertPartitioning.ifPresent(scheme -> parts.add("insert = " + scheme.getPartitioning().getHandle())); + updatePartitioning.ifPresent(scheme -> parts.add("update = " + scheme.getPartitioning().getHandle())); + return "MERGE " + parts; + } + + public NodePartitionMap getNodePartitioningMap(Function getMap) + { + Optional optionalInsertMap = insertPartitioning.map(scheme -> scheme.getPartitioning().getHandle()).map(getMap); + Optional optionalUpdateMap = updatePartitioning.map(scheme -> scheme.getPartitioning().getHandle()).map(getMap); + + if (optionalInsertMap.isPresent() && optionalUpdateMap.isPresent()) { + NodePartitionMap insertMap = optionalInsertMap.get(); + NodePartitionMap updateMap = optionalUpdateMap.get(); + if (!insertMap.getPartitionToNode().equals(updateMap.getPartitionToNode()) || + !Arrays.equals(insertMap.getBucketToPartition(), updateMap.getBucketToPartition())) { + throw new PrestoException(NOT_SUPPORTED, "Insert and update layout have mismatched BucketNodeMap"); + } + } + + return optionalInsertMap.orElseGet(optionalUpdateMap::get); + } + + public PartitionFunction getPartitionFunction(PartitionFunctionLookup partitionFunctionLookup, List types, int[] bucketToPartition) + { + // channels: merge row, insert arguments, update row ID + List insertTypes = types.subList(1, types.size() - (updatePartitioning.isPresent() ? 1 : 0)); + + Optional insertFunction = insertPartitioning.map(scheme -> + partitionFunctionLookup.get(scheme, insertTypes)); + + Optional updateFunction = updatePartitioning.map(scheme -> + partitionFunctionLookup.get(scheme, Collections.singletonList(getLast(types)))); + + return getPartitionFunction(insertFunction, updateFunction, insertTypes.size(), bucketToPartition); + } + + private static PartitionFunction getPartitionFunction(Optional insertFunction, Optional updateFunction, int insertArguments, int[] bucketToPartition) + { + if (insertFunction.isPresent() && updateFunction.isPresent()) { + return new MergePartitionFunction( + insertFunction.get(), + updateFunction.get(), + IntStream.range(1, insertArguments + 1).toArray(), + new int[] {insertArguments + 1}); + } + + PartitionFunction roundRobinFunction = new BucketPartitionFunction(new SystemPartitioningHandle.SystemPartitionFunction.RoundRobinBucketFunction(bucketToPartition.length), bucketToPartition); + + if (insertFunction.isPresent()) { + return new MergePartitionFunction( + insertFunction.get(), + roundRobinFunction, + IntStream.range(1, insertArguments + 1).toArray(), + new int[] {}); + } + + if (updateFunction.isPresent()) { + return new MergePartitionFunction( + roundRobinFunction, + updateFunction.get(), + new int[] {}, + new int[] {insertArguments + 1}); + } + + throw new AssertionError(); + } + + public interface PartitionFunctionLookup + { + PartitionFunction get(PartitioningScheme scheme, List partitionChannelTypes); + } + + private static final class MergePartitionFunction + implements PartitionFunction + { + private final PartitionFunction insertFunction; + private final PartitionFunction updateFunction; + private final int[] insertColumns; + private final int[] updateColumns; + + public MergePartitionFunction(PartitionFunction insertFunction, PartitionFunction updateFunction, int[] insertColumns, int[] updateColumns) + { + this.insertFunction = requireNonNull(insertFunction, "insertFunction is null"); + this.updateFunction = requireNonNull(updateFunction, "updateFunction is null"); + this.insertColumns = requireNonNull(insertColumns, "insertColumns is null"); + this.updateColumns = requireNonNull(updateColumns, "updateColumns is null"); + checkArgument(insertFunction.getPartitionCount() == updateFunction.getPartitionCount(), "partition counts must match"); + } + + @Override + public int getPartitionCount() + { + return insertFunction.getPartitionCount(); + } + + @Override + public int getPartition(Page page, int position) + { + Block operationBlock = page.getBlock(0); + byte operation = TINYINT.getByte(operationBlock, position); + switch (operation) { + case INSERT_OPERATION_NUMBER: + return insertFunction.getPartition(page.extractChannels(insertColumns), position); + case UPDATE_OPERATION_NUMBER: + case DELETE_OPERATION_NUMBER: + return updateFunction.getPartition(page.extractChannels(updateColumns), position); + default: + throw new VerifyException("Invalid merge operation number: " + operation); + } + } + } +} diff --git a/presto-main-base/src/main/java/com/facebook/presto/sql/planner/NodePartitioningManager.java b/presto-main-base/src/main/java/com/facebook/presto/sql/planner/NodePartitioningManager.java index 3de6783a91a41..7806e1f7a9843 100644 --- a/presto-main-base/src/main/java/com/facebook/presto/sql/planner/NodePartitioningManager.java +++ b/presto-main-base/src/main/java/com/facebook/presto/sql/planner/NodePartitioningManager.java @@ -20,6 +20,7 @@ import com.facebook.presto.execution.scheduler.NodeScheduler; import com.facebook.presto.execution.scheduler.group.DynamicBucketNodeMap; import com.facebook.presto.execution.scheduler.nodeSelection.NodeSelectionStats; +import com.facebook.presto.execution.scheduler.nodeSelection.NodeSelector; import com.facebook.presto.metadata.InternalNode; import com.facebook.presto.metadata.Split; import com.facebook.presto.operator.BucketPartitionFunction; @@ -36,6 +37,7 @@ import com.facebook.presto.spi.plan.PartitioningScheme; import com.facebook.presto.spi.schedule.NodeSelectionStrategy; import com.facebook.presto.split.EmptySplit; +import com.facebook.presto.sql.planner.SystemPartitioningHandle.SystemPartitioning; import com.google.common.collect.BiMap; import com.google.common.collect.HashBiMap; import com.google.common.collect.ImmutableList; @@ -49,11 +51,16 @@ import java.util.function.ToIntFunction; import java.util.stream.IntStream; +import static com.facebook.presto.SystemSessionProperties.getHashPartitionCount; import static com.facebook.presto.SystemSessionProperties.getMaxTasksPerStage; import static com.facebook.presto.metadata.InternalNode.NodeStatus.DEAD; import static com.facebook.presto.spi.StandardErrorCode.NODE_SELECTION_NOT_SUPPORTED; +import static com.facebook.presto.spi.StandardErrorCode.NO_NODES_AVAILABLE; +import static com.facebook.presto.sql.planner.SystemPartitioningHandle.FIXED_HASH_DISTRIBUTION; +import static com.facebook.presto.util.Failures.checkCondition; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.collect.ImmutableList.toImmutableList; +import static java.lang.Math.min; import static java.lang.String.format; import static java.util.Objects.requireNonNull; @@ -89,6 +96,12 @@ public PartitionFunction getPartitionFunction( partitioningScheme.getHashColumn().isPresent(), partitioningScheme.getBucketToPartition().get()); } + else if (partitioningHandle.getConnectorHandle() instanceof MergePartitioningHandle) { + MergePartitioningHandle handle = (MergePartitioningHandle) partitioningHandle.getConnectorHandle(); + return handle.getPartitionFunction( + (scheme, types) -> getPartitionFunction(session, scheme, types), + partitionChannelTypes, bucketToPartition.get()); + } else { ConnectorNodePartitioningProvider partitioningProvider = partitioningProviderManager.getPartitioningProvider(partitioningHandle.getConnectorId().get()); @@ -120,18 +133,35 @@ public NodePartitionMap getNodePartitioningMap(Session session, PartitioningHand return getNodePartitioningMap(session, partitioningHandle, Optional.empty()); } + /** + * This method is recursive for MergePartitioningHandle. It caches the node mappings + * to ensure that both the insert and update layouts use the same mapping. + */ public NodePartitionMap getNodePartitioningMap(Session session, PartitioningHandle partitioningHandle, Optional> nodePredicate) { requireNonNull(session, "session is null"); requireNonNull(partitioningHandle, "partitioningHandle is null"); if (partitioningHandle.getConnectorHandle() instanceof SystemPartitioningHandle) { - return ((SystemPartitioningHandle) partitioningHandle.getConnectorHandle()).getNodePartitionMap(session, nodeScheduler, nodePredicate); + // TODO #20578: The next commented line is the original code. The following one is an alternative that I need to check if is valid. + // return ((SystemPartitioningHandle) partitioningHandle.getConnectorHandle()).getNodePartitionMap(session, nodeScheduler, nodePredicate); + return systemNodePartitionMap(session, partitioningHandle, nodePredicate); + } + + if (partitioningHandle.getConnectorHandle() instanceof MergePartitioningHandle) { + MergePartitioningHandle mergeHandle = (MergePartitioningHandle) partitioningHandle.getConnectorHandle(); + return mergeHandle.getNodePartitioningMap(handle -> getNodePartitioningMap(session, handle, nodePredicate)); } ConnectorId connectorId = partitioningHandle.getConnectorId() .orElseThrow(() -> new IllegalArgumentException("No connector ID for partitioning handle: " + partitioningHandle)); - ConnectorBucketNodeMap connectorBucketNodeMap = getConnectorBucketNodeMap(session, partitioningHandle, nodePredicate); + + Optional optionalMap = getConnectorBucketNodeMap(session, partitioningHandle, nodePredicate); + if (!optionalMap.isPresent()) { + return systemNodePartitionMap(session, FIXED_HASH_DISTRIBUTION, nodePredicate); + } + ConnectorBucketNodeMap connectorBucketNodeMap = optionalMap.get(); + // safety check for crazy partitioning checkArgument(connectorBucketNodeMap.getBucketCount() < 1_000_000, "Too many buckets in partitioning: %s", connectorBucketNodeMap.getBucketCount()); @@ -179,32 +209,58 @@ public NodePartitionMap getNodePartitioningMap(Session session, PartitioningHand public BucketNodeMap getBucketNodeMap(Session session, PartitioningHandle partitioningHandle, boolean preferDynamic) { - ConnectorBucketNodeMap connectorBucketNodeMap = getConnectorBucketNodeMap(session, partitioningHandle, Optional.empty()); + Optional connectorBucketNodeMap = getConnectorBucketNodeMap(session, partitioningHandle, Optional.empty()); - NodeSelectionStrategy nodeSelectionStrategy = connectorBucketNodeMap.getNodeSelectionStrategy(); + int bucketCount = getBucketCount(session, partitioningHandle, connectorBucketNodeMap, preferDynamic); + + // TODO #20578: WIP - This method is under development. Unsafe ".get()" method call. + NodeSelectionStrategy nodeSelectionStrategy = connectorBucketNodeMap.get().getNodeSelectionStrategy(); switch (nodeSelectionStrategy) { case HARD_AFFINITY: - return new FixedBucketNodeMap(getSplitToBucket(session, partitioningHandle), getFixedMapping(connectorBucketNodeMap), false); + return new FixedBucketNodeMap(getSplitToBucket(session, partitioningHandle), getFixedMapping(connectorBucketNodeMap.get()), false); case SOFT_AFFINITY: if (preferDynamic) { - return new DynamicBucketNodeMap(getSplitToBucket(session, partitioningHandle), connectorBucketNodeMap.getBucketCount(), getFixedMapping(connectorBucketNodeMap)); + return new DynamicBucketNodeMap(getSplitToBucket(session, partitioningHandle), bucketCount, getFixedMapping(connectorBucketNodeMap.get())); } - return new FixedBucketNodeMap(getSplitToBucket(session, partitioningHandle), getFixedMapping(connectorBucketNodeMap), true); + return new FixedBucketNodeMap(getSplitToBucket(session, partitioningHandle), getFixedMapping(connectorBucketNodeMap.get()), true); case NO_PREFERENCE: if (preferDynamic) { - return new DynamicBucketNodeMap(getSplitToBucket(session, partitioningHandle), connectorBucketNodeMap.getBucketCount()); + return new DynamicBucketNodeMap(getSplitToBucket(session, partitioningHandle), bucketCount); } + return new FixedBucketNodeMap( getSplitToBucket(session, partitioningHandle), createArbitraryBucketToNode( nodeScheduler.createNodeSelector(session, partitioningHandle.getConnectorId().get()).selectRandomNodes(getMaxTasksPerStage(session)), - connectorBucketNodeMap.getBucketCount()), + bucketCount), false); default: throw new PrestoException(NODE_SELECTION_NOT_SUPPORTED, format("Unsupported node selection strategy %s", nodeSelectionStrategy)); } } + private Integer getBucketCount( + Session session, + PartitioningHandle partitioningHandle, + Optional connectorBucketNodeMap, + boolean preferDynamic) + { + Optional bucketCount = connectorBucketNodeMap.map(ConnectorBucketNodeMap::getBucketCount); + + return bucketCount.orElseGet(() -> preferDynamic ? + getNodeCount(session, partitioningHandle) : getAllNodes(session, partitioningHandle).size()); + } + + public int getNodeCount(Session session, PartitioningHandle partitioningHandle) + { + return getAllNodes(session, partitioningHandle).size(); + } + + private List getAllNodes(Session session, PartitioningHandle partitioningHandle) + { + return nodeScheduler.createNodeSelector(session, partitioningHandle.getConnectorId().get()).getAllNodes(); + } + private static List getFixedMapping(ConnectorBucketNodeMap connectorBucketNodeMap) { return connectorBucketNodeMap.getFixedMapping().stream() @@ -212,7 +268,7 @@ private static List getFixedMapping(ConnectorBucketNodeMap connect .collect(toImmutableList()); } - private ConnectorBucketNodeMap getConnectorBucketNodeMap(Session session, PartitioningHandle partitioningHandle, Optional> nodePredicate) + private Optional getConnectorBucketNodeMap(Session session, PartitioningHandle partitioningHandle, Optional> nodePredicate) { checkArgument(!(partitioningHandle.getConnectorHandle() instanceof SystemPartitioningHandle)); ConnectorId connectorId = partitioningHandle.getConnectorId() @@ -221,14 +277,11 @@ private ConnectorBucketNodeMap getConnectorBucketNodeMap(Session session, Partit ConnectorNodePartitioningProvider partitioningProvider = partitioningProviderManager.getPartitioningProvider(partitioningHandle.getConnectorId().get()); - ConnectorBucketNodeMap connectorBucketNodeMap = partitioningProvider.getBucketNodeMap( + return partitioningProvider.getBucketNodeMap( partitioningHandle.getTransactionHandle().orElse(null), session.toConnectorSession(partitioningHandle.getConnectorId().get()), partitioningHandle.getConnectorHandle(), nodes); - - checkArgument(connectorBucketNodeMap != null, "No partition map %s", partitioningHandle); - return connectorBucketNodeMap; } private ToIntFunction getSplitToBucket(Session session, PartitioningHandle partitioningHandle) @@ -290,4 +343,31 @@ public List getNodes(Session session, ConnectorId connectorId, Optional> nodePredicate) + { + SystemPartitioning partitioning = ((SystemPartitioningHandle) partitioningHandle.getConnectorHandle()).getPartitioning(); + + // TODO #20578: Be careful with the "partitioningHandle.getConnectorId().orElse(null)". Evaluate possible side effects. + NodeSelector nodeSelector = nodeScheduler.createNodeSelector(session, partitioningHandle.getConnectorId().orElse(null), nodePredicate); + + List nodes; + if (partitioning == SystemPartitioning.COORDINATOR_ONLY) { + nodes = ImmutableList.of(nodeSelector.selectCurrentNode()); + } + else if (partitioning == SystemPartitioning.SINGLE) { + nodes = nodeSelector.selectRandomNodes(1); + } + else if (partitioning == SystemPartitioning.FIXED) { + nodes = nodeSelector.selectRandomNodes(min(getHashPartitionCount(session), getMaxTasksPerStage(session))); + } + else { + throw new IllegalArgumentException("Unsupported plan distribution " + partitioning); + } + checkCondition(!nodes.isEmpty(), NO_NODES_AVAILABLE, "No worker nodes available"); + + return new NodePartitionMap(nodes, split -> { + throw new UnsupportedOperationException("System distribution does not support source splits"); + }); + } } diff --git a/presto-main-base/src/main/java/com/facebook/presto/sql/planner/PlanBuilder.java b/presto-main-base/src/main/java/com/facebook/presto/sql/planner/PlanBuilder.java index 8729e4831c9e2..25cd1d1d8b57d 100644 --- a/presto-main-base/src/main/java/com/facebook/presto/sql/planner/PlanBuilder.java +++ b/presto-main-base/src/main/java/com/facebook/presto/sql/planner/PlanBuilder.java @@ -25,6 +25,8 @@ import com.facebook.presto.sql.analyzer.Analysis; import com.facebook.presto.sql.parser.SqlParser; import com.facebook.presto.sql.tree.Expression; +import com.facebook.presto.sql.tree.LambdaArgumentDeclaration; +import com.facebook.presto.sql.tree.NodeRef; import com.google.common.collect.ImmutableMap; import java.util.Map; @@ -47,6 +49,16 @@ public PlanBuilder(TranslationMap translations, PlanNode root) this.root = root; } + public static PlanBuilder newPlanBuilder( + RelationPlan plan, + Analysis analysis, + Map, VariableReferenceExpression> lambdaArguments) + { + return new PlanBuilder( + new TranslationMap(plan, analysis, lambdaArguments), + plan.getRoot()); + } + public TranslationMap copyTranslations() { TranslationMap translations = new TranslationMap(getRelationPlan(), getAnalysis(), getTranslations().getLambdaDeclarationToVariableMap()); diff --git a/presto-main-base/src/main/java/com/facebook/presto/sql/planner/PlanOptimizers.java b/presto-main-base/src/main/java/com/facebook/presto/sql/planner/PlanOptimizers.java index e7bd31adf70ac..a12b350dcdd1e 100644 --- a/presto-main-base/src/main/java/com/facebook/presto/sql/planner/PlanOptimizers.java +++ b/presto-main-base/src/main/java/com/facebook/presto/sql/planner/PlanOptimizers.java @@ -77,6 +77,7 @@ import com.facebook.presto.sql.planner.iterative.rule.PruneJoinColumns; import com.facebook.presto.sql.planner.iterative.rule.PruneLimitColumns; import com.facebook.presto.sql.planner.iterative.rule.PruneMarkDistinctColumns; +import com.facebook.presto.sql.planner.iterative.rule.PruneMergeSourceColumns; import com.facebook.presto.sql.planner.iterative.rule.PruneOrderByInAggregation; import com.facebook.presto.sql.planner.iterative.rule.PruneOutputColumns; import com.facebook.presto.sql.planner.iterative.rule.PruneProjectColumns; @@ -308,6 +309,7 @@ public PlanOptimizers( new PruneJoinChildrenColumns(), new PruneJoinColumns(), new PruneUpdateSourceColumns(), + new PruneMergeSourceColumns(), new PruneMarkDistinctColumns(), new PruneOutputColumns(), new PruneProjectColumns(), diff --git a/presto-main-base/src/main/java/com/facebook/presto/sql/planner/QueryPlanner.java b/presto-main-base/src/main/java/com/facebook/presto/sql/planner/QueryPlanner.java index e2c79cb02b29c..3d56094fcdcce 100644 --- a/presto-main-base/src/main/java/com/facebook/presto/sql/planner/QueryPlanner.java +++ b/presto-main-base/src/main/java/com/facebook/presto/sql/planner/QueryPlanner.java @@ -18,13 +18,18 @@ import com.facebook.presto.common.QualifiedObjectName; import com.facebook.presto.common.block.SortOrder; import com.facebook.presto.common.predicate.TupleDomain; +import com.facebook.presto.common.type.RowType; import com.facebook.presto.common.type.Type; import com.facebook.presto.metadata.Metadata; import com.facebook.presto.spi.ColumnHandle; import com.facebook.presto.spi.ColumnMetadata; +import com.facebook.presto.spi.MergeHandle; +import com.facebook.presto.spi.NewTableLayout; import com.facebook.presto.spi.PrestoException; import com.facebook.presto.spi.TableHandle; +import com.facebook.presto.spi.TableMetadata; import com.facebook.presto.spi.VariableAllocator; +import com.facebook.presto.spi.connector.RowChangeParadigm; import com.facebook.presto.spi.function.FunctionHandle; import com.facebook.presto.spi.function.FunctionMetadata; import com.facebook.presto.spi.plan.AggregationNode; @@ -34,14 +39,19 @@ import com.facebook.presto.spi.plan.DeleteNode; import com.facebook.presto.spi.plan.FilterNode; import com.facebook.presto.spi.plan.LimitNode; +import com.facebook.presto.spi.plan.MarkDistinctNode; import com.facebook.presto.spi.plan.Ordering; import com.facebook.presto.spi.plan.OrderingScheme; +import com.facebook.presto.spi.plan.Partitioning; +import com.facebook.presto.spi.plan.PartitioningHandle; +import com.facebook.presto.spi.plan.PartitioningScheme; import com.facebook.presto.spi.plan.PlanNode; import com.facebook.presto.spi.plan.PlanNodeId; import com.facebook.presto.spi.plan.PlanNodeIdAllocator; import com.facebook.presto.spi.plan.ProjectNode; import com.facebook.presto.spi.plan.SortNode; import com.facebook.presto.spi.plan.TableScanNode; +import com.facebook.presto.spi.plan.TableWriterNode; import com.facebook.presto.spi.plan.ValuesNode; import com.facebook.presto.spi.plan.WindowNode; import com.facebook.presto.spi.relation.CallExpression; @@ -55,34 +65,54 @@ import com.facebook.presto.sql.analyzer.RelationType; import com.facebook.presto.sql.analyzer.Scope; import com.facebook.presto.sql.parser.SqlParser; +import com.facebook.presto.sql.planner.plan.AssignUniqueId; import com.facebook.presto.sql.planner.plan.GroupIdNode; +import com.facebook.presto.sql.planner.plan.MergeProcessorNode; +import com.facebook.presto.sql.planner.plan.MergeWriterNode; import com.facebook.presto.sql.planner.plan.OffsetNode; import com.facebook.presto.sql.planner.plan.UpdateNode; import com.facebook.presto.sql.tree.Cast; +import com.facebook.presto.sql.tree.CoalesceExpression; import com.facebook.presto.sql.tree.ComparisonExpression; import com.facebook.presto.sql.tree.Delete; import com.facebook.presto.sql.tree.Expression; import com.facebook.presto.sql.tree.FieldReference; import com.facebook.presto.sql.tree.FrameBound; import com.facebook.presto.sql.tree.FunctionCall; +import com.facebook.presto.sql.tree.GenericLiteral; import com.facebook.presto.sql.tree.GroupingOperation; import com.facebook.presto.sql.tree.IfExpression; import com.facebook.presto.sql.tree.IntervalLiteral; +import com.facebook.presto.sql.tree.IsNotNullPredicate; +import com.facebook.presto.sql.tree.IsNullPredicate; +import com.facebook.presto.sql.tree.Join; import com.facebook.presto.sql.tree.LambdaArgumentDeclaration; import com.facebook.presto.sql.tree.LambdaExpression; +import com.facebook.presto.sql.tree.LogicalBinaryExpression; import com.facebook.presto.sql.tree.LongLiteral; +import com.facebook.presto.sql.tree.Merge; +import com.facebook.presto.sql.tree.MergeCase; +import com.facebook.presto.sql.tree.MergeInsert; +import com.facebook.presto.sql.tree.MergeUpdate; import com.facebook.presto.sql.tree.Node; import com.facebook.presto.sql.tree.NodeLocation; import com.facebook.presto.sql.tree.NodeRef; +import com.facebook.presto.sql.tree.NotExpression; +import com.facebook.presto.sql.tree.NullLiteral; import com.facebook.presto.sql.tree.Offset; import com.facebook.presto.sql.tree.OrderBy; import com.facebook.presto.sql.tree.QualifiedName; import com.facebook.presto.sql.tree.Query; import com.facebook.presto.sql.tree.QuerySpecification; +import com.facebook.presto.sql.tree.Row; +import com.facebook.presto.sql.tree.SearchedCaseExpression; import com.facebook.presto.sql.tree.SortItem; import com.facebook.presto.sql.tree.StringLiteral; +import com.facebook.presto.sql.tree.SubscriptExpression; import com.facebook.presto.sql.tree.SymbolReference; +import com.facebook.presto.sql.tree.Table; import com.facebook.presto.sql.tree.Update; +import com.facebook.presto.sql.tree.WhenClause; import com.facebook.presto.sql.tree.Window; import com.facebook.presto.sql.tree.WindowFrame; import com.google.common.base.VerifyException; @@ -105,8 +135,12 @@ import static com.facebook.presto.SystemSessionProperties.isSkipRedundantSort; import static com.facebook.presto.common.type.BigintType.BIGINT; import static com.facebook.presto.common.type.BooleanType.BOOLEAN; +import static com.facebook.presto.common.type.IntegerType.INTEGER; +import static com.facebook.presto.common.type.TinyintType.TINYINT; import static com.facebook.presto.common.type.VarbinaryType.VARBINARY; import static com.facebook.presto.common.type.VarcharType.VARCHAR; +import static com.facebook.presto.spi.ConnectorMergeSink.INSERT_OPERATION_NUMBER; +import static com.facebook.presto.spi.ConnectorMergeSink.UPDATE_OPERATION_NUMBER; import static com.facebook.presto.spi.StandardErrorCode.INVALID_LIMIT_CLAUSE; import static com.facebook.presto.spi.plan.AggregationNode.groupingSets; import static com.facebook.presto.spi.plan.AggregationNode.singleGroupingSet; @@ -114,11 +148,14 @@ import static com.facebook.presto.spi.plan.ProjectNode.Locality.LOCAL; import static com.facebook.presto.sql.NodeUtils.getSortItemsFromOrderBy; import static com.facebook.presto.sql.analyzer.ExpressionAnalyzer.isNumericType; +import static com.facebook.presto.sql.analyzer.ExpressionTreeUtils.createSymbolReference; import static com.facebook.presto.sql.analyzer.ExpressionTreeUtils.getSourceLocation; +import static com.facebook.presto.sql.planner.PlanBuilder.newPlanBuilder; import static com.facebook.presto.sql.planner.PlannerUtils.newVariable; import static com.facebook.presto.sql.planner.PlannerUtils.toOrderingScheme; import static com.facebook.presto.sql.planner.PlannerUtils.toSortOrder; import static com.facebook.presto.sql.planner.PlannerUtils.toVariableReference; +import static com.facebook.presto.sql.planner.SystemPartitioningHandle.FIXED_HASH_DISTRIBUTION; import static com.facebook.presto.sql.planner.TranslateExpressionsUtil.analyzeCallExpressionTypes; import static com.facebook.presto.sql.planner.TranslateExpressionsUtil.toRowExpression; import static com.facebook.presto.sql.planner.optimizations.WindowNodeUtil.toBoundType; @@ -396,6 +433,407 @@ public UpdateNode plan(Update node) outputs); } + /** + * Plan a MERGE statement. The MERGE statement is processed by creating a RIGHT JOIN between the target table and the source. + * Example of converting a MERGE statement into a SELECT statement with a RIGHT JOIN: + * Merge statement: + * MERGE INTO t USING s + * ON (t. = s.) + * WHEN NOT MATCHED THEN + * INSERT (column1, column2, column3) + * VALUES (s.column1, s.column2, s.column3); + * WHEN MATCHED THEN + * UPDATE SET = s. + t., + * = s. + * + * SELECT statement with a RIGHT JOIN created to process the previous MERGE statement: + * SELECT + * CASE + * WHEN NOT MATCHED THEN + * -- Insert column values: operation INSERT=1, case_number=0 + * row(s.column1, s.column2, s.column3, 1, 0) + * WHEN MATCHED THEN + * -- Update column values: operation UPDATE=3, case_number=1 + * row(t.column1, s.column1 + t.column1, s.column2, 3, 1) + * ELSE + * -- Null values for no case matched: operation=-1, case_number=-1 + * row(null, null, null, -1, -1) + * END + * FROM + * t RIGHT JOIN s + * ON t. = s.; + * + * @param mergeStmt the MERGE statement to plan into a MergeWriterNode. + * @return a MergeWriterNode that represents the plan for the MERGE statement. + */ + public MergeWriterNode plan(Merge mergeStmt) + { + // The goal of this method is to build the following MERGE INTO execution plan: + // + // MergeWriterNode : Write the merge results into the target table. + // | + // MergeProcessorNode : Processes the result of the RIGHT JOIN to identify which rows need to be inserted and which need to be updated. + // | + // FilterDuplicateMatchingRows : Look for marked rows in the previous step. If it finds one, then it stops MERGE execution and returns an error. + // | + // MarkDistinctNode : Look for target rows that matched more than one source row and mark them. + // | + // RightEquiJoin : Run a RIGHT JOIN as a first step to process the MERGE INTO command. + // / \ + // / \ + // AssignUniqueID \ : Assign a unique ID to each row in the target table. + // | \ + // TableScan TableScan : Read data from the target and source tables. + // | | + // (target table) (source table) + + Analysis.MergeAnalysis mergeAnalysis = analysis.getMergeAnalysis().orElseThrow(() -> new IllegalArgumentException("analysis.getMergeAnalysis() isn't present")); + + // Make the plan for the merge target table scan + RelationPlan targetTableRelationPlan = new RelationPlanner(analysis, variableAllocator, idAllocator, lambdaDeclarationToVariableMap, metadata, session, sqlParser) + .process(mergeStmt.getTarget(), sqlPlannerContext); + + // Assign a unique id to every target table row + VariableReferenceExpression targetUniqueIdColumnVariable = variableAllocator.newVariable("unique_id", BIGINT); + AssignUniqueId assignUniqueRowIdToTargetTable = new AssignUniqueId(getSourceLocation(mergeStmt), idAllocator.getNextId(), targetTableRelationPlan.getRoot(), targetUniqueIdColumnVariable); + RelationPlan relationPlanWithUniqueRowIds = new RelationPlan( + assignUniqueRowIdToTargetTable, + mergeAnalysis.getTargetTableScope(), + targetTableRelationPlan.getFieldMappings()); + + RelationPlan sourceRelationPlan = new RelationPlanner(analysis, variableAllocator, idAllocator, lambdaDeclarationToVariableMap, metadata, session, sqlParser) + .process(mergeStmt.getSource(), sqlPlannerContext); + + RelationPlan joinRelationPlan = new RelationPlanner(analysis, variableAllocator, idAllocator, lambdaDeclarationToVariableMap, metadata, session, sqlParser) + .planJoin( + coerceIfNecessary(analysis, mergeStmt.getPredicate(), mergeStmt.getPredicate()), + Join.Type.RIGHT, mergeAnalysis.getJoinScope(), + relationPlanWithUniqueRowIds, sourceRelationPlan, + mergeStmt, sqlPlannerContext); + + // Build the SearchedCaseExpression that creates the project "merge_row" + PlanBuilder joinSubPlan = newPlanBuilder(joinRelationPlan, analysis, lambdaDeclarationToVariableMap); + + // CASE + // WHEN (unique_id IS NULL) THEN row(column1, column2, ..., present=false, operation INSERT=1, case_number=0) + // WHEN (unique_id IS NOT NULL) THEN row(column1, column2, ..., present=true, operation UPDATE=3, case_number=1) + // ELSE row(null, null, ..., false, -1, -1) + // END + ImmutableList.Builder whenClauses = ImmutableList.builder(); + for (int caseNumber = 0; caseNumber < mergeStmt.getMergeCases().size(); caseNumber++) { + MergeCase mergeCase = mergeStmt.getMergeCases().get(caseNumber); + + ImmutableList.Builder joinResultBuilder = ImmutableList.builder(); + List> mergeCaseColumnsHandles = mergeAnalysis.getMergeCaseColumnHandles(); + List mergeCaseSetColumns = mergeCaseColumnsHandles.get(caseNumber); + for (ColumnHandle targetColumnHandle : mergeAnalysis.getTargetColumnHandles()) { + int index = mergeCaseSetColumns.indexOf(targetColumnHandle); + int fieldNumber = requireNonNull(mergeAnalysis.getColumnHandleFieldNumbers().get(targetColumnHandle), "Field number for ColumnHandle is null"); + Expression expression; + if (index >= 0) { // Update column value + Expression setExpression = mergeCase.getSetExpressions().get(index); + joinSubPlan = subqueryPlanner.handleSubqueries(joinSubPlan, setExpression, mergeStmt, sqlPlannerContext); + expression = joinSubPlan.rewrite(setExpression); + expression = coerceIfNecessary(analysis, setExpression, expression); + expression = checkNotNullColumns(targetColumnHandle, expression, fieldNumber, mergeAnalysis); + } + else { // Insert column value + expression = createSymbolReference(relationPlanWithUniqueRowIds.getFieldMappings().get(fieldNumber)); + + if (mergeCase instanceof MergeInsert) { + expression = checkNotNullColumns(targetColumnHandle, expression, fieldNumber, mergeAnalysis); + } + } + joinResultBuilder.add(expression); + } + + // Add the operation number + joinResultBuilder.add(new GenericLiteral("TINYINT", String.valueOf(getMergeCaseOperationNumber(mergeCase)))); + + // Add the mergeStmt case number, needed by MarkDistinct + joinResultBuilder.add(new GenericLiteral("INTEGER", String.valueOf(caseNumber))); + + // Build the match condition for the MERGE case + SymbolReference targetUniqueIdColumnSymbolReference = createSymbolReference(targetUniqueIdColumnVariable); + Expression mergeCondition = mergeCase instanceof MergeInsert ? + new IsNullPredicate(targetUniqueIdColumnSymbolReference) : new IsNotNullPredicate(targetUniqueIdColumnSymbolReference); + + whenClauses.add(new WhenClause(mergeCondition, new Row(joinResultBuilder.build()))); + } + + // Build the "else" clause for the SearchedCaseExpression + ImmutableList.Builder joinElseBuilder = ImmutableList.builder(); + mergeAnalysis.getTargetColumnsMetadata().forEach(columnMetadata -> + joinElseBuilder.add(new Cast(new NullLiteral(), columnMetadata.getType().getDisplayName()))); + + // The operation number column value: -1 + joinElseBuilder.add(new GenericLiteral("TINYINT", "-1")); + // The case number column value: -1 + joinElseBuilder.add(new GenericLiteral("INTEGER", "-1")); + + SearchedCaseExpression caseExpression = new SearchedCaseExpression(whenClauses.build(), Optional.of(new Row(joinElseBuilder.build()))); + + RowType mergeRowType = createMergeRowType(mergeAnalysis.getTargetColumnsMetadata()); + Table targetTable = mergeAnalysis.getTargetTable(); + FieldReference targetTableRowIdReference = analysis.getRowIdField(targetTable); + + VariableReferenceExpression targetTableRowIdColumnVariable = relationPlanWithUniqueRowIds.getFieldMappings().get(targetTableRowIdReference.getFieldIndex()); + VariableReferenceExpression mergeRowColumnVariable = variableAllocator.newVariable("merge_row", mergeRowType); + + // Project the partitioning variables, the merge_row, the rowId, and the unique_id variable. + Assignments.Builder projectionAssignmentsBuilder = Assignments.builder(); + for (ColumnHandle column : mergeAnalysis.getTargetRedistributionColumnHandles()) { + int fieldIndex = requireNonNull(mergeAnalysis.getColumnHandleFieldNumbers().get(column), "Could not find fieldIndex for redistribution column"); + VariableReferenceExpression variable = relationPlanWithUniqueRowIds.getFieldMappings().get(fieldIndex); + projectionAssignmentsBuilder.put(variable, variable); + } + + projectionAssignmentsBuilder.put(targetUniqueIdColumnVariable, targetUniqueIdColumnVariable); + projectionAssignmentsBuilder.put(targetTableRowIdColumnVariable, targetTableRowIdColumnVariable); + projectionAssignmentsBuilder.put(mergeRowColumnVariable, rowExpression(caseExpression, sqlPlannerContext)); + + ProjectNode joinSubPlanProject = new ProjectNode( + idAllocator.getNextId(), + joinSubPlan.getRoot(), + projectionAssignmentsBuilder.build()); + + // Now add a column for the case_number, gotten from the merge_row + SubscriptExpression caseNumberExpression = new SubscriptExpression( + createSymbolReference(mergeRowColumnVariable), new LongLiteral(Long.toString(mergeRowType.getFields().size()))); + + VariableReferenceExpression caseNumberVariable = variableAllocator.newVariable("case_number", INTEGER); + + ProjectNode joinProjectNode = new ProjectNode( + joinSubPlanProject.getSourceLocation(), + idAllocator.getNextId(), + joinSubPlanProject, + Assignments.builder() + .putAll(joinSubPlanProject.getOutputVariables().stream().collect(toImmutableMap(Function.identity(), Function.identity()))) + .put(caseNumberVariable, rowExpression(caseNumberExpression, sqlPlannerContext)) + .build(), + LOCAL); + + // Mark distinct combinations of the unique_id value and the case_number + VariableReferenceExpression isDistinctVariable = variableAllocator.newVariable("is_distinct", BOOLEAN); + MarkDistinctNode markDistinctNode = new MarkDistinctNode( + getSourceLocation(mergeStmt), idAllocator.getNextId(), joinProjectNode, isDistinctVariable, + ImmutableList.of(targetUniqueIdColumnVariable, caseNumberVariable), Optional.empty()); + + // Raise an error if unique_id variable is non-null and the unique_id/case_number combination was not distinct + Expression multipleMatchesExpression = new IfExpression( + LogicalBinaryExpression.and( + new NotExpression(createSymbolReference(isDistinctVariable)), + new IsNotNullPredicate(createSymbolReference(targetUniqueIdColumnVariable))), + new Cast( + new FunctionCall( + QualifiedName.of("presto", "default", "fail"), + ImmutableList.of(new Cast(new StringLiteral( + "MERGE INTO operation failed for target table '" + targetTable.getName() + "'. " + + "One or more rows in the target table matched multiple source rows. " + + "The MERGE INTO command requires each target row to match at most one source row. " + + "Please review the ON condition to ensure it produces a one-to-one or one-to-none match."), + VARCHAR.getTypeSignature().toString()))), + BOOLEAN.getTypeSignature().toString()), + TRUE_LITERAL); + + FilterNode filterMultipleMatches = new FilterNode(getSourceLocation(mergeStmt), idAllocator.getNextId(), + markDistinctNode, rowExpression(multipleMatchesExpression, sqlPlannerContext)); + + TableHandle targetTableHandle = analysis.getTableHandle(targetTable); + RowChangeParadigm rowChangeParadigm = metadata.getRowChangeParadigm(session, targetTableHandle); + Type targetTableRowIdColumnType = analysis.getType(analysis.getRowIdField(targetTable)); + TableMetadata targetTableMetadata = metadata.getTableMetadata(session, targetTableHandle); + + List targetColumnsDataTypes = targetTableMetadata.getMetadata().getColumns().stream() + .filter(column -> !column.isHidden()) + .map(ColumnMetadata::getType) + .collect(toImmutableList()); + + TableWriterNode.MergeParadigmAndTypes mergeParadigmAndTypes = + new TableWriterNode.MergeParadigmAndTypes(rowChangeParadigm, targetColumnsDataTypes, targetTableRowIdColumnType); + + Optional mergeHandle = Optional.of(metadata.beginMerge(session, targetTableHandle)); + TableWriterNode.MergeTarget mergeTarget = + new TableWriterNode.MergeTarget(targetTableHandle, mergeHandle, targetTableMetadata.getTable(), mergeParadigmAndTypes); + + ImmutableList.Builder mergeColumnVariablesBuilder = ImmutableList.builder(); + for (ColumnHandle columnHandle : mergeAnalysis.getTargetColumnHandles()) { + int fieldIndex = requireNonNull(mergeAnalysis.getColumnHandleFieldNumbers().get(columnHandle), "Could not find field number for column handle"); + mergeColumnVariablesBuilder.add(relationPlanWithUniqueRowIds.getFieldMappings().get(fieldIndex)); + } + List mergeColumnVariables = mergeColumnVariablesBuilder.build(); + + ImmutableList.Builder mergeRedistributionVariablesBuilder = ImmutableList.builder(); + for (ColumnHandle columnHandle : mergeAnalysis.getTargetRedistributionColumnHandles()) { + int fieldIndex = requireNonNull(mergeAnalysis.getColumnHandleFieldNumbers().get(columnHandle), "Could not find field number for column handle"); + mergeRedistributionVariablesBuilder.add(relationPlanWithUniqueRowIds.getFieldMappings().get(fieldIndex)); + } + + // Variable to specify whether the MERGE INTO statement should insert a new row or update an existing one. + // Operations defined in ConnectorMergeSink: INSERT_OPERATION_NUMBER and UPDATE_OPERATION_NUMBER. + VariableReferenceExpression mergeOperationVariable = variableAllocator.newVariable("operation", TINYINT); + + // Variable to indicate whether the row is an insert resulting from an UPDATE or an INSERT. + // The RowChangeParadigm.DELETE_ROW_AND_INSERT_ROW will use this information. + // Values: + // 1: if this row is an insert derived from an UPDATE + // 0: if this row is an insert derived from an INSERT + VariableReferenceExpression insertFromUpdateVariable = variableAllocator.newVariable("insert_from_update", TINYINT); + + List mergeProjectedVariables = ImmutableList.builder() + .addAll(mergeColumnVariables) + .add(mergeOperationVariable) + .add(targetTableRowIdColumnVariable) + .add(insertFromUpdateVariable) + .build(); + + MergeProcessorNode mergeProcessorNode = new MergeProcessorNode( + getSourceLocation(mergeStmt), + idAllocator.getNextId(), + filterMultipleMatches, + mergeTarget, + targetTableRowIdColumnVariable, + mergeRowColumnVariable, + mergeColumnVariables, + mergeRedistributionVariablesBuilder.build(), + mergeProjectedVariables); + + Optional mergeWriterPartitioningScheme = createMergePartitioningScheme( + mergeAnalysis.getInsertLayout(), + mergeColumnVariables, + mergeAnalysis.getInsertPartitioningArgumentIndexes(), + mergeAnalysis.getUpdateLayout(), + targetTableRowIdColumnVariable, + mergeOperationVariable); + + List mergeWriterOutputs = ImmutableList.of( + variableAllocator.newVariable("partialrows", BIGINT), + variableAllocator.newVariable("fragment", VARBINARY)); + + return new MergeWriterNode( + getSourceLocation(mergeStmt), + idAllocator.getNextId(), + mergeProcessorNode, + mergeTarget, + mergeProjectedVariables, + mergeWriterPartitioningScheme, + mergeWriterOutputs); + } + + /** + * Method to create a CoalesceExpression that triggers an error if the query attempts to insert a NULL value + * into a non-nullable column. The same applies if the query tries to update a non-nullable column with a NULL value. + * + * @return The same expression if the column allows null values; otherwise, a CoalesceExpression that + * prevents inserting NULL values into non-nullable columns. + */ + private static Expression checkNotNullColumns( + ColumnHandle targetColumnHandle, + Expression expression, + int fieldNumber, + Analysis.MergeAnalysis mergeAnalysis) + { + // If the current column allows NULL values, then the method returns the original expression. + if (!mergeAnalysis.getNonNullableColumnHandles().contains(targetColumnHandle)) { + return expression; + } + + ColumnMetadata columnMetadata = mergeAnalysis.getTargetColumnsMetadata().get(fieldNumber); + + // Build a coalesce expression that returns an error when the original expression value is NULL. + return new CoalesceExpression(expression, + new Cast( + new FunctionCall( + QualifiedName.of("presto", "default", "fail"), + ImmutableList.of(new Cast(new StringLiteral( + "NULL value not allowed for NOT NULL column. Table: " + mergeAnalysis.getTargetTable().getName() + + " Column: " + columnMetadata.getName()), + VARCHAR.getTypeSignature().toString()))), + columnMetadata.getType().getTypeSignature().toString())); + } + + private static int getMergeCaseOperationNumber(MergeCase mergeCase) + { + if (mergeCase instanceof MergeInsert) { + return INSERT_OPERATION_NUMBER; + } + if (mergeCase instanceof MergeUpdate) { + return UPDATE_OPERATION_NUMBER; + } + throw new IllegalArgumentException("Unrecognized MergeCase: " + mergeCase); + } + + private static RowType createMergeRowType(List allColumnsMetadata) + { + // Create the RowType that holds all column values + List fields = new ArrayList<>(); + for (ColumnMetadata columnMetadata : allColumnsMetadata) { + fields.add(new RowType.Field(Optional.empty(), columnMetadata.getType())); + } + + fields.add(new RowType.Field(Optional.empty(), TINYINT)); // operation_number + fields.add(new RowType.Field(Optional.empty(), INTEGER)); // case_number + return RowType.from(fields); + } + + public static Optional createMergePartitioningScheme( + Optional insertLayout, + List variables, + List insertPartitioningArgumentIndexes, + Optional updateLayout, + VariableReferenceExpression targetTableRowIdColumnVariable, + VariableReferenceExpression operationVariable) + { + if (!insertLayout.isPresent() && !updateLayout.isPresent()) { + return Optional.empty(); + } + + Optional insertPartitioning = insertLayout.map(layout -> { + List arguments = insertPartitioningArgumentIndexes.stream() + .map(variables::get) + .collect(toImmutableList()); + + return layout.getPartitioning() + .map(handle -> new PartitioningScheme(Partitioning.create(handle, arguments), variables)) + // empty connector partitioning handle means evenly partitioning on partitioning columns + .orElseGet(() -> new PartitioningScheme(Partitioning.create(FIXED_HASH_DISTRIBUTION, arguments), variables)); + }); + + Optional updatePartitioning = updateLayout.map(handle -> + new PartitioningScheme(Partitioning.create(handle, ImmutableList.of(targetTableRowIdColumnVariable)), ImmutableList.of(targetTableRowIdColumnVariable))); + + PartitioningHandle partitioningHandle = new PartitioningHandle( + Optional.empty(), + Optional.empty(), + new MergePartitioningHandle(insertPartitioning, updatePartitioning)); + + List combinedVariables = new ArrayList<>(); + combinedVariables.add(operationVariable); + insertPartitioning.ifPresent(scheme -> combinedVariables.addAll(partitioningVariables(scheme))); + updatePartitioning.ifPresent(scheme -> combinedVariables.addAll(partitioningVariables(scheme))); + + return Optional.of(new PartitioningScheme(Partitioning.create(partitioningHandle, combinedVariables), combinedVariables)); + } + + private static List partitioningVariables(PartitioningScheme scheme) + { + return new ArrayList<>(scheme.getPartitioning().getVariableReferences()); + } + + public static Expression coerceIfNecessary(Analysis analysis, Expression original, Expression rewritten) + { + Type coercion = analysis.getCoercion(original); + if (coercion == null) { + return rewritten; + } + + return new Cast( + rewritten, + coercion.getDisplayName(), + false, + analysis.isTypeOnlyCoercion(original)); + } + private Optional getIdForLeftTableScan(PlanNode node) { if (node instanceof TableScanNode) { diff --git a/presto-main-base/src/main/java/com/facebook/presto/sql/planner/RelationPlanner.java b/presto-main-base/src/main/java/com/facebook/presto/sql/planner/RelationPlanner.java index 844dbb08340d4..be6b7851ec99b 100644 --- a/presto-main-base/src/main/java/com/facebook/presto/sql/planner/RelationPlanner.java +++ b/presto-main-base/src/main/java/com/facebook/presto/sql/planner/RelationPlanner.java @@ -483,6 +483,11 @@ protected RelationPlan visitJoin(Join node, SqlPlannerContext context) return planJoinUsing(node, leftPlan, rightPlan, context); } + return planJoin(analysis.getJoinCriteria(node), node.getType(), analysis.getScope(node), leftPlan, rightPlan, node, context); + } + + public RelationPlan planJoin(Expression criteria, Join.Type type, Scope scope, RelationPlan leftPlan, RelationPlan rightPlan, Node node, SqlPlannerContext context) + { PlanBuilder leftPlanBuilder = initializePlanBuilder(leftPlan); PlanBuilder rightPlanBuilder = initializePlanBuilder(rightPlan); @@ -496,12 +501,10 @@ protected RelationPlan visitJoin(Join node, SqlPlannerContext context) List complexJoinExpressions = new ArrayList<>(); List postInnerJoinConditions = new ArrayList<>(); - if (node.getType() != Join.Type.CROSS && node.getType() != Join.Type.IMPLICIT) { - Expression criteria = analysis.getJoinCriteria(node); - - RelationType left = analysis.getOutputDescriptor(node.getLeft()); - RelationType right = analysis.getOutputDescriptor(node.getRight()); + RelationType left = leftPlan.getDescriptor(); + RelationType right = rightPlan.getDescriptor(); + if (type != Join.Type.CROSS && type != Join.Type.IMPLICIT) { List leftComparisonExpressions = new ArrayList<>(); List rightComparisonExpressions = new ArrayList<>(); List joinConditionComparisonOperators = new ArrayList<>(); @@ -509,7 +512,7 @@ protected RelationPlan visitJoin(Join node, SqlPlannerContext context) for (Expression conjunct : ExpressionUtils.extractConjuncts(criteria)) { conjunct = ExpressionUtils.normalize(conjunct); - if (!isEqualComparisonExpression(conjunct) && node.getType() != INNER) { + if (!isEqualComparisonExpression(conjunct) && type != INNER) { complexJoinExpressions.add(conjunct); continue; } @@ -573,7 +576,7 @@ else if (firstDependencies.stream().allMatch(right::canResolve) && secondDepende PlanNode root = new JoinNode( getSourceLocation(node), idAllocator.getNextId(), - JoinNodeUtils.typeConvert(node.getType()), + JoinNodeUtils.typeConvert(type), leftPlanBuilder.getRoot(), rightPlanBuilder.getRoot(), equiClauses.build(), @@ -587,7 +590,7 @@ else if (firstDependencies.stream().allMatch(right::canResolve) && secondDepende Optional.empty(), ImmutableMap.of()); - if (node.getType() != INNER) { + if (type != INNER) { for (Expression complexExpression : complexJoinExpressions) { Set inPredicates = subqueryPlanner.collectInPredicateSubqueries(complexExpression, node); if (!inPredicates.isEmpty()) { @@ -596,10 +599,7 @@ else if (firstDependencies.stream().allMatch(right::canResolve) && secondDepende } } - if (node.getType() == LEFT || node.getType() == RIGHT) { - RelationType left = analysis.getOutputDescriptor(node.getLeft()); - RelationType right = analysis.getOutputDescriptor(node.getRight()); - + if (type == LEFT || type == RIGHT) { for (Expression complexJoinExpression : complexJoinExpressions) { Set dependencies = VariablesExtractor.extractNames(complexJoinExpression, analysis.getColumnReferences()); // If there are no dependencies, no subqueries, or if the expression references both inputs, @@ -615,7 +615,7 @@ else if (firstDependencies.stream().allMatch(right::canResolve) && secondDepende // If the subquery references the right input, those variables will remain unresolved and caught in NoIdentifierLeftChecker leftPlanBuilder = subqueryPlanner.handleUncorrelatedSubqueries(leftPlanBuilder, ImmutableList.of(complexJoinExpression), node, context); } - else if (node.getType() == LEFT && !dependencies.stream().allMatch(left::canResolve)) { + else if (type == LEFT && !dependencies.stream().allMatch(left::canResolve)) { rightPlanBuilder = subqueryPlanner.handleSubqueries(rightPlanBuilder, complexJoinExpression, node, context); } else { @@ -630,19 +630,19 @@ else if (node.getType() == LEFT && !dependencies.stream().allMatch(left::canReso } } - RelationPlan intermediateRootRelationPlan = new RelationPlan(root, analysis.getScope(node), outputs); + RelationPlan intermediateRootRelationPlan = new RelationPlan(root, scope, outputs); TranslationMap translationMap = new TranslationMap(intermediateRootRelationPlan, analysis, lambdaDeclarationToVariableMap); translationMap.setFieldMappings(outputs); translationMap.putExpressionMappingsFrom(leftPlanBuilder.getTranslations()); translationMap.putExpressionMappingsFrom(rightPlanBuilder.getTranslations()); - if (node.getType() != INNER && !complexJoinExpressions.isEmpty()) { + if (type != INNER && !complexJoinExpressions.isEmpty()) { Expression joinedFilterCondition = ExpressionUtils.and(complexJoinExpressions); Expression rewrittenFilterCondition = translationMap.rewrite(joinedFilterCondition); root = new JoinNode( getSourceLocation(node), idAllocator.getNextId(), - JoinNodeUtils.typeConvert(node.getType()), + JoinNodeUtils.typeConvert(type), leftPlanBuilder.getRoot(), rightPlanBuilder.getRoot(), equiClauses.build(), @@ -657,7 +657,7 @@ else if (node.getType() == LEFT && !dependencies.stream().allMatch(left::canReso ImmutableMap.of()); } - if (node.getType() == INNER) { + if (type == INNER) { // rewrite all the other conditions using output variables from left + right plan node. PlanBuilder rootPlanBuilder = new PlanBuilder(translationMap, root); rootPlanBuilder = subqueryPlanner.handleSubqueries(rootPlanBuilder, complexJoinExpressions, node, context); @@ -674,7 +674,7 @@ else if (node.getType() == LEFT && !dependencies.stream().allMatch(left::canReso } } - return new RelationPlan(root, analysis.getScope(node), outputs); + return new RelationPlan(root, scope, outputs); } private RelationPlan planJoinUsing(Join node, RelationPlan left, RelationPlan right, SqlPlannerContext context) diff --git a/presto-main-base/src/main/java/com/facebook/presto/sql/planner/SplitSourceFactory.java b/presto-main-base/src/main/java/com/facebook/presto/sql/planner/SplitSourceFactory.java index 1feda17089865..28d2bc98b1efb 100644 --- a/presto-main-base/src/main/java/com/facebook/presto/sql/planner/SplitSourceFactory.java +++ b/presto-main-base/src/main/java/com/facebook/presto/sql/planner/SplitSourceFactory.java @@ -55,6 +55,8 @@ import com.facebook.presto.sql.planner.plan.ExplainAnalyzeNode; import com.facebook.presto.sql.planner.plan.GroupIdNode; import com.facebook.presto.sql.planner.plan.InternalPlanVisitor; +import com.facebook.presto.sql.planner.plan.MergeProcessorNode; +import com.facebook.presto.sql.planner.plan.MergeWriterNode; import com.facebook.presto.sql.planner.plan.RemoteSourceNode; import com.facebook.presto.sql.planner.plan.RowNumberNode; import com.facebook.presto.sql.planner.plan.SampleNode; @@ -417,6 +419,18 @@ public Map visitPlan(PlanNode node, Context context) { throw new UnsupportedOperationException("not yet implemented: " + node.getClass().getName()); } + + @Override + public Map visitMergeWriter(MergeWriterNode node, Context context) + { + return node.getSource().accept(this, context); + } + + @Override + public Map visitMergeProcessor(MergeProcessorNode node, Context context) + { + return node.getSource().accept(this, context); + } } private static class Context diff --git a/presto-main-base/src/main/java/com/facebook/presto/sql/planner/SystemPartitioningHandle.java b/presto-main-base/src/main/java/com/facebook/presto/sql/planner/SystemPartitioningHandle.java index 8a4174c9cefe7..d7b859ec00348 100644 --- a/presto-main-base/src/main/java/com/facebook/presto/sql/planner/SystemPartitioningHandle.java +++ b/presto-main-base/src/main/java/com/facebook/presto/sql/planner/SystemPartitioningHandle.java @@ -13,43 +13,31 @@ */ package com.facebook.presto.sql.planner; -import com.facebook.presto.Session; import com.facebook.presto.common.Page; import com.facebook.presto.common.type.Type; -import com.facebook.presto.execution.scheduler.NodeScheduler; -import com.facebook.presto.execution.scheduler.nodeSelection.NodeSelector; -import com.facebook.presto.metadata.InternalNode; import com.facebook.presto.operator.BucketPartitionFunction; import com.facebook.presto.operator.HashGenerator; import com.facebook.presto.operator.InterpretedHashGenerator; import com.facebook.presto.operator.PartitionFunction; import com.facebook.presto.operator.PrecomputedHashGenerator; import com.facebook.presto.spi.BucketFunction; -import com.facebook.presto.spi.Node; import com.facebook.presto.spi.connector.ConnectorPartitioningHandle; import com.facebook.presto.spi.plan.PartitioningHandle; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import com.google.common.collect.ImmutableList; import java.util.List; import java.util.Objects; import java.util.Optional; -import java.util.function.Predicate; -import static com.facebook.presto.SystemSessionProperties.getHashPartitionCount; -import static com.facebook.presto.SystemSessionProperties.getMaxTasksPerStage; -import static com.facebook.presto.spi.StandardErrorCode.NO_NODES_AVAILABLE; -import static com.facebook.presto.util.Failures.checkCondition; import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkArgument; -import static java.lang.Math.min; import static java.util.Objects.requireNonNull; public final class SystemPartitioningHandle implements ConnectorPartitioningHandle { - private enum SystemPartitioning + enum SystemPartitioning { SINGLE, FIXED, @@ -151,30 +139,6 @@ public String toString() return partitioning.toString(); } - public NodePartitionMap getNodePartitionMap(Session session, NodeScheduler nodeScheduler, Optional> nodePredicate) - { - NodeSelector nodeSelector = nodeScheduler.createNodeSelector(session, null, nodePredicate); - List nodes; - if (partitioning == SystemPartitioning.COORDINATOR_ONLY) { - nodes = ImmutableList.of(nodeSelector.selectCurrentNode()); - } - else if (partitioning == SystemPartitioning.SINGLE) { - nodes = nodeSelector.selectRandomNodes(1); - } - else if (partitioning == SystemPartitioning.FIXED) { - nodes = nodeSelector.selectRandomNodes(min(getHashPartitionCount(session), getMaxTasksPerStage(session))); - } - else { - throw new IllegalArgumentException("Unsupported plan distribution " + partitioning); - } - - checkCondition(!nodes.isEmpty(), NO_NODES_AVAILABLE, "No worker nodes available"); - - return new NodePartitionMap(nodes, split -> { - throw new UnsupportedOperationException("System distribution does not support source splits"); - }); - } - public PartitionFunction getPartitionFunction(List partitionChannelTypes, boolean isHashPrecomputed, int[] bucketToPartition) { requireNonNull(partitionChannelTypes, "partitionChannelTypes is null"); @@ -252,7 +216,7 @@ public int getBucket(Page page, int position) } } - private static class RoundRobinBucketFunction + public static class RoundRobinBucketFunction implements BucketFunction { private final int bucketCount; diff --git a/presto-main-base/src/main/java/com/facebook/presto/sql/planner/iterative/rule/PruneMergeSourceColumns.java b/presto-main-base/src/main/java/com/facebook/presto/sql/planner/iterative/rule/PruneMergeSourceColumns.java new file mode 100644 index 0000000000000..9237e98e06833 --- /dev/null +++ b/presto-main-base/src/main/java/com/facebook/presto/sql/planner/iterative/rule/PruneMergeSourceColumns.java @@ -0,0 +1,43 @@ +/* + * Licensed 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. + */ +package com.facebook.presto.sql.planner.iterative.rule; + +import com.facebook.presto.matching.Captures; +import com.facebook.presto.matching.Pattern; +import com.facebook.presto.sql.planner.iterative.Rule; +import com.facebook.presto.sql.planner.plan.MergeWriterNode; +import com.google.common.collect.ImmutableSet; + +import static com.facebook.presto.sql.planner.iterative.rule.Util.restrictChildOutputs; +import static com.facebook.presto.sql.planner.plan.Patterns.mergeWriter; + +public class PruneMergeSourceColumns + implements Rule +{ + private static final Pattern PATTERN = mergeWriter(); + + @Override + public Pattern getPattern() + { + return PATTERN; + } + + @Override + public Result apply(MergeWriterNode mergeNode, Captures captures, Context context) + { + return restrictChildOutputs(context.getIdAllocator(), mergeNode, ImmutableSet.copyOf(mergeNode.getMergeProcessorProjectedVariables())) + .map(Result::ofPlanNode) + .orElse(Result.empty()); + } +} diff --git a/presto-main-base/src/main/java/com/facebook/presto/sql/planner/optimizations/AddExchanges.java b/presto-main-base/src/main/java/com/facebook/presto/sql/planner/optimizations/AddExchanges.java index 5cc78f07af09d..3733c4be25306 100644 --- a/presto-main-base/src/main/java/com/facebook/presto/sql/planner/optimizations/AddExchanges.java +++ b/presto-main-base/src/main/java/com/facebook/presto/sql/planner/optimizations/AddExchanges.java @@ -75,6 +75,7 @@ import com.facebook.presto.sql.planner.plan.GroupIdNode; import com.facebook.presto.sql.planner.plan.InternalPlanVisitor; import com.facebook.presto.sql.planner.plan.LateralJoinNode; +import com.facebook.presto.sql.planner.plan.MergeWriterNode; import com.facebook.presto.sql.planner.plan.RowNumberNode; import com.facebook.presto.sql.planner.plan.SequenceNode; import com.facebook.presto.sql.planner.plan.StatisticsWriterNode; @@ -754,27 +755,33 @@ public PlanWithProperties visitCallDistributedProcedure(CallDistributedProcedure { Optional partitioningScheme = node.getPartitioningScheme(); boolean isSingleWriterPerPartitionRequired = partitioningScheme.isPresent(); - return getTableWriterPlanWithProperties(node, preferredProperties, partitioningScheme, partitioningScheme, isSingleWriterPerPartitionRequired); + return getTableWriterPlanWithProperties(node, preferredProperties, partitioningScheme, isSingleWriterPerPartitionRequired); + } + + @Override + public PlanWithProperties visitMergeWriter(MergeWriterNode node, PreferredProperties preferredProperties) + { + Optional partitioningScheme = node.getPartitioningScheme(); + boolean isSingleWriterPerPartitionRequired = partitioningScheme.isPresent() && !partitioningScheme.get().isScaleWriters(); + return getTableWriterPlanWithProperties(node, preferredProperties, partitioningScheme, isSingleWriterPerPartitionRequired); } @Override public PlanWithProperties visitTableWriter(TableWriterNode node, PreferredProperties preferredProperties) { - Optional shufflePartitioningScheme = node.getTablePartitioningScheme(); - return getTableWriterPlanWithProperties(node, preferredProperties, node.getTablePartitioningScheme(), - shufflePartitioningScheme, node.isSingleWriterPerPartitionRequired()); + return getTableWriterPlanWithProperties(node, preferredProperties, node.getTablePartitioningScheme(), node.isSingleWriterPerPartitionRequired()); } private PlanWithProperties getTableWriterPlanWithProperties( PlanNode node, PreferredProperties preferredProperties, - Optional tablePartitioningScheme, - Optional shufflePartitioningScheme, + Optional nodeTablePartitioningScheme, boolean isSingleWriterPerPartitionRequired) { - checkArgument(node instanceof TableWriterNode || node instanceof CallDistributedProcedureNode); + checkArgument(node instanceof TableWriterNode || node instanceof CallDistributedProcedureNode || node instanceof MergeWriterNode); PlanWithProperties source = accept(node.getSources().get(0), preferredProperties); + Optional shufflePartitioningScheme = nodeTablePartitioningScheme; if (!isSingleWriterPerPartitionRequired) { // prefer scale writers if single writer per partition is not required // TODO: take into account partitioning scheme in scale writer tasks implementation @@ -789,15 +796,16 @@ else if (redistributeWrites) { } } + PlanWithProperties newSource = source; if (shufflePartitioningScheme.isPresent() && // TODO: Deprecate compatible table partitioning - !source.getProperties().isCompatibleTablePartitioningWith(shufflePartitioningScheme.get().getPartitioning(), false, metadata, session) && - !(source.getProperties().isRefinedPartitioningOver(shufflePartitioningScheme.get().getPartitioning(), false, metadata, session) && - canPushdownPartialMerge(source.getNode(), partialMergePushdownStrategy))) { + !newSource.getProperties().isCompatibleTablePartitioningWith(shufflePartitioningScheme.get().getPartitioning(), false, metadata, session) && + !(newSource.getProperties().isRefinedPartitioningOver(shufflePartitioningScheme.get().getPartitioning(), false, metadata, session) && + canPushdownPartialMerge(newSource.getNode(), partialMergePushdownStrategy))) { PartitioningScheme exchangePartitioningScheme = shufflePartitioningScheme.get(); - if (tablePartitioningScheme.isPresent() && isPrestoSparkAssignBucketToPartitionForPartitionedTableWriteEnabled(session)) { + if (nodeTablePartitioningScheme.isPresent() && isPrestoSparkAssignBucketToPartitionForPartitionedTableWriteEnabled(session)) { int writerThreadsPerNode = getTaskPartitionedWriterCount(session); - int bucketCount = getBucketCount(tablePartitioningScheme.get().getPartitioning().getHandle()); + int bucketCount = getBucketCount(nodeTablePartitioningScheme.get().getPartitioning().getHandle()); int[] bucketToPartition = new int[bucketCount]; for (int i = 0; i < bucketCount; i++) { bucketToPartition[i] = i / writerThreadsPerNode; @@ -805,15 +813,15 @@ else if (redistributeWrites) { exchangePartitioningScheme = exchangePartitioningScheme.withBucketToPartition(Optional.of(bucketToPartition)); } - source = withDerivedProperties( + newSource = withDerivedProperties( partitionedExchange( idAllocator.getNextId(), REMOTE_STREAMING, - source.getNode(), + newSource.getNode(), exchangePartitioningScheme), - source.getProperties()); + newSource.getProperties()); } - return rebaseAndDeriveProperties(node, source); + return rebaseAndDeriveProperties(node, newSource); } private int getBucketCount(PartitioningHandle partitioning) diff --git a/presto-main-base/src/main/java/com/facebook/presto/sql/planner/optimizations/AddLocalExchanges.java b/presto-main-base/src/main/java/com/facebook/presto/sql/planner/optimizations/AddLocalExchanges.java index 2ed2c65cbeab0..98abde7f5f018 100644 --- a/presto-main-base/src/main/java/com/facebook/presto/sql/planner/optimizations/AddLocalExchanges.java +++ b/presto-main-base/src/main/java/com/facebook/presto/sql/planner/optimizations/AddLocalExchanges.java @@ -46,7 +46,9 @@ import com.facebook.presto.spi.plan.TopNNode; import com.facebook.presto.spi.plan.UnionNode; import com.facebook.presto.spi.plan.WindowNode; +import com.facebook.presto.spi.relation.ConstantExpression; import com.facebook.presto.spi.relation.VariableReferenceExpression; +import com.facebook.presto.sql.planner.SystemPartitioningHandle; import com.facebook.presto.sql.planner.TypeProvider; import com.facebook.presto.sql.planner.optimizations.StreamPropertyDerivations.StreamProperties; import com.facebook.presto.sql.planner.plan.ApplyNode; @@ -56,6 +58,7 @@ import com.facebook.presto.sql.planner.plan.ExplainAnalyzeNode; import com.facebook.presto.sql.planner.plan.InternalPlanVisitor; import com.facebook.presto.sql.planner.plan.LateralJoinNode; +import com.facebook.presto.sql.planner.plan.MergeWriterNode; import com.facebook.presto.sql.planner.plan.RowNumberNode; import com.facebook.presto.sql.planner.plan.StatisticsWriterNode; import com.facebook.presto.sql.planner.plan.TableWriterMergeNode; @@ -92,6 +95,7 @@ import static com.facebook.presto.sql.planner.optimizations.StreamPreferredProperties.defaultParallelism; import static com.facebook.presto.sql.planner.optimizations.StreamPreferredProperties.exactlyPartitionedOn; import static com.facebook.presto.sql.planner.optimizations.StreamPreferredProperties.fixedParallelism; +import static com.facebook.presto.sql.planner.optimizations.StreamPreferredProperties.partitionedOn; import static com.facebook.presto.sql.planner.optimizations.StreamPreferredProperties.singleStream; import static com.facebook.presto.sql.planner.optimizations.StreamPropertyDerivations.StreamProperties.StreamDistribution.SINGLE; import static com.facebook.presto.sql.planner.optimizations.StreamPropertyDerivations.derivePropertiesRecursively; @@ -733,6 +737,52 @@ private PlanWithProperties planTableWriteWithTableWriteMerge(TableWriterNode tab gatherExchangeWithProperties.getProperties()); } + private PlanWithProperties visitPartitionedWriter(PlanNode node, Optional optionalPartitioning, PlanNode source, StreamPreferredProperties parentPreferences) + { + if (getTaskWriterCount(session) == 1) { + return planAndEnforceChildren(node, singleStream(), defaultParallelism(session)); + } + + if (!optionalPartitioning.isPresent()) { + return planAndEnforceChildren(node, fixedParallelism(), fixedParallelism()); + } + + PartitioningScheme partitioningScheme = optionalPartitioning.get(); + + if (partitioningScheme.getPartitioning().getHandle().equals(FIXED_HASH_DISTRIBUTION)) { + // arbitrary hash function on predefined set of partition columns + StreamPreferredProperties preference = partitionedOn(partitioningScheme.getPartitioning().getVariableReferences()); + return planAndEnforceChildren(node, preference, preference); + } + + // connector provided hash function + verify(!(partitioningScheme.getPartitioning().getHandle().getConnectorHandle() instanceof SystemPartitioningHandle)); + // TODO #20578: Check if the following verification is correct. + verify(partitioningScheme.getPartitioning().getArguments().stream() + .noneMatch(argument -> argument instanceof ConstantExpression), + "Table writer partitioning has constant arguments"); + PlanWithProperties newSource = source.accept(this, parentPreferences); + PlanWithProperties exchange = deriveProperties( + partitionedExchange( + idAllocator.getNextId(), + LOCAL, + newSource.getNode(), + partitioningScheme), + newSource.getProperties()); + + return rebaseAndDeriveProperties(node, ImmutableList.of(exchange)); + } + + // + // Merge + // + + @Override + public PlanWithProperties visitMergeWriter(MergeWriterNode node, StreamPreferredProperties parentPreferences) + { + return visitPartitionedWriter(node, node.getPartitioningScheme(), node.getSource(), parentPreferences); + } + @Override public PlanWithProperties visitTableWriteMerge(TableWriterMergeNode node, StreamPreferredProperties context) { diff --git a/presto-main-base/src/main/java/com/facebook/presto/sql/planner/optimizations/PropertyDerivations.java b/presto-main-base/src/main/java/com/facebook/presto/sql/planner/optimizations/PropertyDerivations.java index 21a0699b03c65..9dff1d3fb86d9 100644 --- a/presto-main-base/src/main/java/com/facebook/presto/sql/planner/optimizations/PropertyDerivations.java +++ b/presto-main-base/src/main/java/com/facebook/presto/sql/planner/optimizations/PropertyDerivations.java @@ -66,6 +66,8 @@ import com.facebook.presto.sql.planner.plan.GroupIdNode; import com.facebook.presto.sql.planner.plan.InternalPlanVisitor; import com.facebook.presto.sql.planner.plan.LateralJoinNode; +import com.facebook.presto.sql.planner.plan.MergeProcessorNode; +import com.facebook.presto.sql.planner.plan.MergeWriterNode; import com.facebook.presto.sql.planner.plan.RemoteSourceNode; import com.facebook.presto.sql.planner.plan.RowNumberNode; import com.facebook.presto.sql.planner.plan.SampleNode; @@ -427,6 +429,18 @@ public ActualProperties visitUpdate(UpdateNode node, List inpu return Iterables.getOnlyElement(inputProperties).translateVariable(symbol -> Optional.empty()); } + @Override + public ActualProperties visitMergeWriter(MergeWriterNode node, List inputProperties) + { + return visitPartitionedWriter(inputProperties); + } + + @Override + public ActualProperties visitMergeProcessor(MergeProcessorNode node, List inputProperties) + { + return Iterables.getOnlyElement(inputProperties).translateVariable(symbol -> Optional.empty()); + } + @Override public ActualProperties visitMetadataDelete(MetadataDeleteNode node, List inputProperties) { @@ -786,6 +800,11 @@ else if (!(value instanceof RowExpression)) { @Override public ActualProperties visitTableWriter(TableWriterNode node, List inputProperties) + { + return visitPartitionedWriter(inputProperties); + } + + private ActualProperties visitPartitionedWriter(List inputProperties) { ActualProperties properties = Iterables.getOnlyElement(inputProperties); diff --git a/presto-main-base/src/main/java/com/facebook/presto/sql/planner/optimizations/PruneUnreferencedOutputs.java b/presto-main-base/src/main/java/com/facebook/presto/sql/planner/optimizations/PruneUnreferencedOutputs.java index c74a76dcf41f4..fa65a1d93b582 100644 --- a/presto-main-base/src/main/java/com/facebook/presto/sql/planner/optimizations/PruneUnreferencedOutputs.java +++ b/presto-main-base/src/main/java/com/facebook/presto/sql/planner/optimizations/PruneUnreferencedOutputs.java @@ -62,6 +62,8 @@ import com.facebook.presto.sql.planner.plan.ExplainAnalyzeNode; import com.facebook.presto.sql.planner.plan.GroupIdNode; import com.facebook.presto.sql.planner.plan.LateralJoinNode; +import com.facebook.presto.sql.planner.plan.MergeProcessorNode; +import com.facebook.presto.sql.planner.plan.MergeWriterNode; import com.facebook.presto.sql.planner.plan.RowNumberNode; import com.facebook.presto.sql.planner.plan.SequenceNode; import com.facebook.presto.sql.planner.plan.SimplePlanRewriter; @@ -525,6 +527,49 @@ public PlanNode visitTableScan(TableScanNode node, RewriteContext> context) + { + Set expectedInputs = ImmutableSet.builder() + .addAll(node.getMergeProcessorProjectedVariables()) + .build(); + + PlanNode source = context.rewrite(node.getSource(), expectedInputs); + + return new MergeWriterNode( + node.getSourceLocation(), + node.getId(), + node.getStatsEquivalentPlanNode(), + source, + node.getTarget(), + node.getMergeProcessorProjectedVariables(), + node.getPartitioningScheme(), + node.getOutputVariables()); + } + + @Override + public PlanNode visitMergeProcessor(MergeProcessorNode node, RewriteContext> context) + { + Set expectedInputs = ImmutableSet.builder() + .add(node.getTargetTableRowIdColumnVariable()) + .add(node.getMergeRowVariable()) + .build(); + + PlanNode source = context.rewrite(node.getSource(), expectedInputs); + + return new MergeProcessorNode( + node.getSourceLocation(), + node.getId(), + node.getStatsEquivalentPlanNode(), + source, + node.getTarget(), + node.getTargetTableRowIdColumnVariable(), + node.getMergeRowVariable(), + node.getTargetColumnVariables(), + node.getTargetRedistributionColumnVariables(), + node.getOutputVariables()); + } + @Override public PlanNode visitFilter(FilterNode node, RewriteContext> context) { diff --git a/presto-main-base/src/main/java/com/facebook/presto/sql/planner/optimizations/StreamPreferredProperties.java b/presto-main-base/src/main/java/com/facebook/presto/sql/planner/optimizations/StreamPreferredProperties.java index 96288e6af729c..b1b44d241e6d6 100644 --- a/presto-main-base/src/main/java/com/facebook/presto/sql/planner/optimizations/StreamPreferredProperties.java +++ b/presto-main-base/src/main/java/com/facebook/presto/sql/planner/optimizations/StreamPreferredProperties.java @@ -105,6 +105,16 @@ public StreamPreferredProperties withFixedParallelism() return fixedParallelism(); } + public static StreamPreferredProperties partitionedOn(Collection partitionSymbols) + { + if (partitionSymbols.isEmpty()) { + return singleStream(); + } + + // Prefer partitioning on given partitioning symbols. Partition hash can be evaluated in any order. + return new StreamPreferredProperties(Optional.of(FIXED), false, Optional.of(ImmutableSet.copyOf(partitionSymbols)), false); + } + public static StreamPreferredProperties exactlyPartitionedOn(Collection partitionVariables) { if (partitionVariables.isEmpty()) { diff --git a/presto-main-base/src/main/java/com/facebook/presto/sql/planner/optimizations/StreamPropertyDerivations.java b/presto-main-base/src/main/java/com/facebook/presto/sql/planner/optimizations/StreamPropertyDerivations.java index 2515e42fbee58..612fb584566bb 100644 --- a/presto-main-base/src/main/java/com/facebook/presto/sql/planner/optimizations/StreamPropertyDerivations.java +++ b/presto-main-base/src/main/java/com/facebook/presto/sql/planner/optimizations/StreamPropertyDerivations.java @@ -56,6 +56,8 @@ import com.facebook.presto.sql.planner.plan.GroupIdNode; import com.facebook.presto.sql.planner.plan.InternalPlanVisitor; import com.facebook.presto.sql.planner.plan.LateralJoinNode; +import com.facebook.presto.sql.planner.plan.MergeProcessorNode; +import com.facebook.presto.sql.planner.plan.MergeWriterNode; import com.facebook.presto.sql.planner.plan.RemoteSourceNode; import com.facebook.presto.sql.planner.plan.RowNumberNode; import com.facebook.presto.sql.planner.plan.SampleNode; @@ -491,6 +493,20 @@ public StreamProperties visitUpdate(UpdateNode node, List inpu return properties.withUnspecifiedPartitioning(); } + @Override + public StreamProperties visitMergeWriter(MergeWriterNode node, List inputProperties) + { + StreamProperties properties = Iterables.getOnlyElement(inputProperties); + return properties.withUnspecifiedPartitioning(); + } + + @Override + public StreamProperties visitMergeProcessor(MergeProcessorNode node, List inputProperties) + { + StreamProperties properties = Iterables.getOnlyElement(inputProperties); + return properties.withUnspecifiedPartitioning(); + } + @Override public StreamProperties visitMetadataDelete(MetadataDeleteNode node, List inputProperties) { diff --git a/presto-main-base/src/main/java/com/facebook/presto/sql/planner/optimizations/SymbolMapper.java b/presto-main-base/src/main/java/com/facebook/presto/sql/planner/optimizations/SymbolMapper.java index cb66746b0c633..f26aeee4434b7 100644 --- a/presto-main-base/src/main/java/com/facebook/presto/sql/planner/optimizations/SymbolMapper.java +++ b/presto-main-base/src/main/java/com/facebook/presto/sql/planner/optimizations/SymbolMapper.java @@ -20,6 +20,7 @@ import com.facebook.presto.spi.WarningCollector; import com.facebook.presto.spi.plan.AggregationNode; import com.facebook.presto.spi.plan.AggregationNode.Aggregation; +import com.facebook.presto.spi.plan.ExchangeEncoding; import com.facebook.presto.spi.plan.Ordering; import com.facebook.presto.spi.plan.OrderingScheme; import com.facebook.presto.spi.plan.PartitioningScheme; @@ -37,6 +38,8 @@ import com.facebook.presto.sql.planner.Symbol; import com.facebook.presto.sql.planner.TypeProvider; import com.facebook.presto.sql.planner.plan.CallDistributedProcedureNode; +import com.facebook.presto.sql.planner.plan.MergeProcessorNode; +import com.facebook.presto.sql.planner.plan.MergeWriterNode; import com.facebook.presto.sql.planner.plan.StatisticsWriterNode; import com.facebook.presto.sql.planner.plan.TableWriterMergeNode; import com.facebook.presto.sql.tree.Expression; @@ -111,6 +114,13 @@ public VariableReferenceExpression map(VariableReferenceExpression variable) return new VariableReferenceExpression(variable.getSourceLocation(), canonical, types.get(new SymbolReference(getNodeLocation(variable.getSourceLocation()), canonical))); } + public List map(List variableReferenceExpressions) + { + return variableReferenceExpressions.stream() + .map(this::map) + .collect(toImmutableList()); + } + public Expression map(Expression value) { return ExpressionTreeRewriter.rewriteWith(new ExpressionRewriter() @@ -298,6 +308,64 @@ public StatisticsWriterNode map(StatisticsWriterNode node, PlanNode source) node.getDescriptor().map(this::map)); } + public MergeWriterNode map(MergeWriterNode node, PlanNode source) + { + // Intentionally does not use mapAndDistinct on columns as that would remove columns + List newOutputs = map(node.getOutputVariables()); + + return new MergeWriterNode( + source.getSourceLocation(), + node.getId(), + source, + node.getTarget(), + map(node.getMergeProcessorProjectedVariables()), + node.getPartitioningScheme().map(partitioningScheme -> map(partitioningScheme, source.getOutputVariables())), + newOutputs); + } + + public MergeWriterNode map(MergeWriterNode node, PlanNode source, PlanNodeId newId) + { + // Intentionally does not use mapAndDistinct on columns as that would remove columns + List newOutputs = map(node.getOutputVariables()); + + return new MergeWriterNode( + source.getSourceLocation(), + newId, + source, + node.getTarget(), + map(node.getMergeProcessorProjectedVariables()), + node.getPartitioningScheme().map(partitioningScheme -> map(partitioningScheme, source.getOutputVariables())), + newOutputs); + } + + public MergeProcessorNode map(MergeProcessorNode node, PlanNode source) + { + List newOutputs = map(node.getOutputVariables()); + + return new MergeProcessorNode( + source.getSourceLocation(), + node.getId(), + source, + node.getTarget(), + map(node.getTargetTableRowIdColumnVariable()), + map(node.getMergeRowVariable()), + map(node.getTargetColumnVariables()), + map(node.getTargetRedistributionColumnVariables()), + newOutputs); + } + + public PartitioningScheme map(PartitioningScheme scheme, List sourceLayout) + { + return new PartitioningScheme( + translateVariable(scheme.getPartitioning(), this::map), + mapAndDistinctVariable(sourceLayout), + scheme.getHashColumn().map(this::map), + scheme.isReplicateNullsAndAny(), + scheme.isScaleWriters(), + ExchangeEncoding.COLUMNAR, + scheme.getBucketToPartition()); + } + public TableFinishNode map(TableFinishNode node, PlanNode source) { return new TableFinishNode( diff --git a/presto-main-base/src/main/java/com/facebook/presto/sql/planner/optimizations/UnaliasSymbolReferences.java b/presto-main-base/src/main/java/com/facebook/presto/sql/planner/optimizations/UnaliasSymbolReferences.java index 201bd54c8c937..f0a6f30a8db29 100644 --- a/presto-main-base/src/main/java/com/facebook/presto/sql/planner/optimizations/UnaliasSymbolReferences.java +++ b/presto-main-base/src/main/java/com/facebook/presto/sql/planner/optimizations/UnaliasSymbolReferences.java @@ -68,6 +68,8 @@ import com.facebook.presto.sql.planner.plan.ExplainAnalyzeNode; import com.facebook.presto.sql.planner.plan.GroupIdNode; import com.facebook.presto.sql.planner.plan.LateralJoinNode; +import com.facebook.presto.sql.planner.plan.MergeProcessorNode; +import com.facebook.presto.sql.planner.plan.MergeWriterNode; import com.facebook.presto.sql.planner.plan.OffsetNode; import com.facebook.presto.sql.planner.plan.RemoteSourceNode; import com.facebook.presto.sql.planner.plan.RowNumberNode; @@ -463,6 +465,22 @@ public PlanNode visitUpdate(UpdateNode node, RewriteContext context) return new UpdateNode(node.getSourceLocation(), node.getId(), node.getSource(), canonicalize(node.getRowId()), node.getColumnValueAndRowIdSymbols(), node.getOutputVariables()); } + @Override + public PlanNode visitMergeWriter(MergeWriterNode node, RewriteContext context) + { + PlanNode source = context.rewrite(node.getSource()); + SymbolMapper mapper = new SymbolMapper(mapping, types, warningCollector); + return mapper.map(node, source); + } + + @Override + public PlanNode visitMergeProcessor(MergeProcessorNode node, RewriteContext context) + { + PlanNode source = context.rewrite(node.getSource()); + SymbolMapper mapper = new SymbolMapper(mapping, types, warningCollector); + return mapper.map(node, source); + } + @Override public PlanNode visitStatisticsWriterNode(StatisticsWriterNode node, RewriteContext context) { diff --git a/presto-main-base/src/main/java/com/facebook/presto/sql/planner/plan/InternalPlanVisitor.java b/presto-main-base/src/main/java/com/facebook/presto/sql/planner/plan/InternalPlanVisitor.java index 4add380c33bc2..a3e3ec3dc0d2c 100644 --- a/presto-main-base/src/main/java/com/facebook/presto/sql/planner/plan/InternalPlanVisitor.java +++ b/presto-main-base/src/main/java/com/facebook/presto/sql/planner/plan/InternalPlanVisitor.java @@ -13,6 +13,7 @@ */ package com.facebook.presto.sql.planner.plan; +import com.facebook.presto.spi.plan.MergeJoinNode; import com.facebook.presto.spi.plan.PlanVisitor; import com.facebook.presto.sql.planner.CanonicalJoinNode; import com.facebook.presto.sql.planner.CanonicalTableScanNode; @@ -37,6 +38,21 @@ public R visitExplainAnalyze(ExplainAnalyzeNode node, C context) return visitPlan(node, context); } + public R visitMergeJoin(MergeJoinNode node, C context) + { + return visitPlan(node, context); + } + + public R visitMergeWriter(MergeWriterNode node, C context) + { + return visitPlan(node, context); + } + + public R visitMergeProcessor(MergeProcessorNode node, C context) + { + return visitPlan(node, context); + } + public R visitOffset(OffsetNode node, C context) { return visitPlan(node, context); diff --git a/presto-main-base/src/main/java/com/facebook/presto/sql/planner/plan/MergeProcessorNode.java b/presto-main-base/src/main/java/com/facebook/presto/sql/planner/plan/MergeProcessorNode.java new file mode 100644 index 0000000000000..215ccc02c4853 --- /dev/null +++ b/presto-main-base/src/main/java/com/facebook/presto/sql/planner/plan/MergeProcessorNode.java @@ -0,0 +1,152 @@ +/* + * Licensed 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. + */ +package com.facebook.presto.sql.planner.plan; + +import com.facebook.presto.spi.SourceLocation; +import com.facebook.presto.spi.plan.PlanNode; +import com.facebook.presto.spi.plan.PlanNodeId; +import com.facebook.presto.spi.plan.TableWriterNode.MergeTarget; +import com.facebook.presto.spi.relation.VariableReferenceExpression; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.Iterables; + +import java.util.List; +import java.util.Optional; + +import static java.util.Objects.requireNonNull; + +/** + * The node processes the result of the Searched CASE and RIGHT JOIN + * derived from a MERGE statement. + */ +public class MergeProcessorNode + extends InternalPlanNode +{ + private final PlanNode source; + private final MergeTarget target; + private final VariableReferenceExpression targetTableRowIdColumnVariable; + private final VariableReferenceExpression mergeRowVariable; + private final List targetColumnVariables; + private final List targetRedistributionColumnVariables; + private final List outputs; + + @JsonCreator + public MergeProcessorNode( + Optional sourceLocation, + @JsonProperty("id") PlanNodeId id, + @JsonProperty("source") PlanNode source, + @JsonProperty("target") MergeTarget target, + @JsonProperty("targetTableRowIdColumnVariable") VariableReferenceExpression targetTableRowIdColumnVariable, + @JsonProperty("mergeRowVariable") VariableReferenceExpression mergeRowVariable, + @JsonProperty("targetColumnVariables") List targetColumnVariables, + @JsonProperty("targetRedistributionColumnVariables") List targetRedistributionColumnVariables, + @JsonProperty("outputs") List outputs) + { + this(sourceLocation, id, Optional.empty(), source, target, targetTableRowIdColumnVariable, mergeRowVariable, targetColumnVariables, targetRedistributionColumnVariables, outputs); + } + + public MergeProcessorNode( + Optional sourceLocation, + PlanNodeId id, + Optional statsEquivalentPlanNode, + PlanNode source, + MergeTarget target, + VariableReferenceExpression targetTableRowIdColumnVariable, + VariableReferenceExpression mergeRowVariable, + List targetColumnVariables, + List targetRedistributionColumnVariables, + List outputs) + { + super(sourceLocation, id, statsEquivalentPlanNode); + + this.source = requireNonNull(source, "source is null"); + this.target = requireNonNull(target, "target is null"); + this.mergeRowVariable = requireNonNull(mergeRowVariable, "mergeRowVariable is null"); + this.targetTableRowIdColumnVariable = requireNonNull(targetTableRowIdColumnVariable, "targetTableRowIdColumnVariable is null"); + this.targetColumnVariables = requireNonNull(targetColumnVariables, "targetColumnVariables is null"); + this.targetRedistributionColumnVariables = requireNonNull(targetRedistributionColumnVariables, "targetRedistributionColumnVariables is null"); + this.outputs = ImmutableList.copyOf(requireNonNull(outputs, "outputs is null")); + } + + @JsonProperty + public PlanNode getSource() + { + return source; + } + + @JsonProperty + public MergeTarget getTarget() + { + return target; + } + + @JsonProperty + public VariableReferenceExpression getMergeRowVariable() + { + return mergeRowVariable; + } + + @JsonProperty + public VariableReferenceExpression getTargetTableRowIdColumnVariable() + { + return targetTableRowIdColumnVariable; + } + + @JsonProperty + public List getTargetColumnVariables() + { + return targetColumnVariables; + } + + @JsonProperty + public List getTargetRedistributionColumnVariables() + { + return targetRedistributionColumnVariables; + } + + @JsonProperty("outputs") + @Override + public List getOutputVariables() + { + return outputs; + } + + @Override + public List getSources() + { + return ImmutableList.of(source); + } + + @Override + public R accept(InternalPlanVisitor visitor, C context) + { + return visitor.visitMergeProcessor(this, context); + } + + @Override + public PlanNode replaceChildren(List newChildren) + { + return new MergeProcessorNode(getSourceLocation(), getId(), Iterables.getOnlyElement(newChildren), + target, targetTableRowIdColumnVariable, mergeRowVariable, targetColumnVariables, targetRedistributionColumnVariables, outputs); + } + + @Override + public PlanNode assignStatsEquivalentPlanNode(Optional statsEquivalentPlanNode) + { + return new MergeProcessorNode(getSourceLocation(), getId(), statsEquivalentPlanNode, source, target, + targetTableRowIdColumnVariable, mergeRowVariable, targetColumnVariables, targetRedistributionColumnVariables, outputs); + } +} diff --git a/presto-main-base/src/main/java/com/facebook/presto/sql/planner/plan/MergeWriterNode.java b/presto-main-base/src/main/java/com/facebook/presto/sql/planner/plan/MergeWriterNode.java new file mode 100644 index 0000000000000..28b397aa9ad4a --- /dev/null +++ b/presto-main-base/src/main/java/com/facebook/presto/sql/planner/plan/MergeWriterNode.java @@ -0,0 +1,131 @@ +/* + * Licensed 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. + */ +package com.facebook.presto.sql.planner.plan; + +import com.facebook.presto.spi.SourceLocation; +import com.facebook.presto.spi.plan.PartitioningScheme; +import com.facebook.presto.spi.plan.PlanNode; +import com.facebook.presto.spi.plan.PlanNodeId; +import com.facebook.presto.spi.plan.TableWriterNode.MergeTarget; +import com.facebook.presto.spi.relation.VariableReferenceExpression; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.Iterables; +import com.google.errorprone.annotations.Immutable; + +import java.util.List; +import java.util.Optional; + +import static java.util.Objects.requireNonNull; + +@Immutable +public class MergeWriterNode + extends InternalPlanNode +{ + private final PlanNode source; + private final MergeTarget target; + private final List mergeProcessorProjectedVariables; + private final Optional partitioningScheme; + private final List outputs; + + @JsonCreator + public MergeWriterNode( + Optional sourceLocation, + @JsonProperty("id") PlanNodeId id, + @JsonProperty("source") PlanNode source, + @JsonProperty("target") MergeTarget target, + @JsonProperty("mergeProcessorProjectedVariables") List mergeProcessorProjectedVariables, + @JsonProperty("partitioningScheme") Optional partitioningScheme, + @JsonProperty("outputs") List outputs) + { + this(sourceLocation, id, Optional.empty(), source, target, mergeProcessorProjectedVariables, partitioningScheme, outputs); + } + + public MergeWriterNode( + Optional sourceLocation, + PlanNodeId id, + Optional statsEquivalentPlanNode, + PlanNode source, + MergeTarget target, + List mergeProcessorProjectedVariables, + Optional partitioningScheme, + List outputs) + { + super(sourceLocation, id, statsEquivalentPlanNode); + + this.source = requireNonNull(source, "source is null"); + this.target = requireNonNull(target, "target is null"); + this.mergeProcessorProjectedVariables = requireNonNull(mergeProcessorProjectedVariables, "mergeProcessorProjectedVariables is null"); + this.partitioningScheme = requireNonNull(partitioningScheme, "partitioningScheme is null"); + this.outputs = ImmutableList.copyOf(requireNonNull(outputs, "outputs is null")); + } + + @JsonProperty + public PlanNode getSource() + { + return source; + } + + @JsonProperty + public MergeTarget getTarget() + { + return target; + } + + @JsonProperty + public List getMergeProcessorProjectedVariables() + { + return mergeProcessorProjectedVariables; + } + + @JsonProperty + public Optional getPartitioningScheme() + { + return partitioningScheme; + } + + @Override + public List getSources() + { + return ImmutableList.of(source); + } + + @Override + @JsonProperty("outputs") + public List getOutputVariables() + { + return outputs; + } + + @Override + public R accept(InternalPlanVisitor visitor, C context) + { + return visitor.visitMergeWriter(this, context); + } + + @Override + public PlanNode assignStatsEquivalentPlanNode(Optional statsEquivalentPlanNode) + { + return new MergeWriterNode(getSourceLocation(), getId(), statsEquivalentPlanNode, source, target, + mergeProcessorProjectedVariables, partitioningScheme, outputs); + } + + @Override + public PlanNode replaceChildren(List newChildren) + { + return new MergeWriterNode(getSourceLocation(), getId(), Iterables.getOnlyElement(newChildren), + target, mergeProcessorProjectedVariables, partitioningScheme, outputs); + } +} diff --git a/presto-main-base/src/main/java/com/facebook/presto/sql/planner/plan/Patterns.java b/presto-main-base/src/main/java/com/facebook/presto/sql/planner/plan/Patterns.java index 2e3c9d26c924a..a8af658030818 100644 --- a/presto-main-base/src/main/java/com/facebook/presto/sql/planner/plan/Patterns.java +++ b/presto-main-base/src/main/java/com/facebook/presto/sql/planner/plan/Patterns.java @@ -210,6 +210,11 @@ public static Pattern tableWriterMergeNode() return typeOf(TableWriterMergeNode.class); } + public static Pattern mergeWriter() + { + return typeOf(MergeWriterNode.class); + } + public static Pattern topN() { return typeOf(TopNNode.class); diff --git a/presto-main-base/src/main/java/com/facebook/presto/sql/planner/planPrinter/PlanPrinter.java b/presto-main-base/src/main/java/com/facebook/presto/sql/planner/planPrinter/PlanPrinter.java index a07475dfe59a3..19a9ffc6069c0 100644 --- a/presto-main-base/src/main/java/com/facebook/presto/sql/planner/planPrinter/PlanPrinter.java +++ b/presto-main-base/src/main/java/com/facebook/presto/sql/planner/planPrinter/PlanPrinter.java @@ -94,6 +94,8 @@ import com.facebook.presto.sql.planner.plan.GroupIdNode; import com.facebook.presto.sql.planner.plan.InternalPlanVisitor; import com.facebook.presto.sql.planner.plan.LateralJoinNode; +import com.facebook.presto.sql.planner.plan.MergeProcessorNode; +import com.facebook.presto.sql.planner.plan.MergeWriterNode; import com.facebook.presto.sql.planner.plan.OffsetNode; import com.facebook.presto.sql.planner.plan.RemoteSourceNode; import com.facebook.presto.sql.planner.plan.RowNumberNode; @@ -1292,6 +1294,28 @@ public Void visitMetadataDelete(MetadataDeleteNode node, Void context) return processChildren(node, context); } + @Override + public Void visitMergeWriter(MergeWriterNode node, Void context) + { + addNode(node, "MergeWriter", format("table: %s", node.getTarget().toString())); + return processChildren(node, context); + } + + @Override + public Void visitMergeProcessor(MergeProcessorNode node, Void context) + { + String identifier = format("[target: %s, output: %s]", node.getTarget(), node.getOutputVariables()); + + NodeRepresentation nodeOutput = addNode(node, "MergeProcessor", identifier); + nodeOutput.appendDetails("target: %s", node.getTarget()); + nodeOutput.appendDetails("merge row column: %s", node.getMergeRowVariable()); + nodeOutput.appendDetails("target table row id column: %s", node.getTargetTableRowIdColumnVariable()); + nodeOutput.appendDetails("redistribution columns: %s", node.getTargetRedistributionColumnVariables()); + nodeOutput.appendDetails("data columns: %s", node.getTargetColumnVariables()); + + return processChildren(node, context); + } + @Override public Void visitEnforceSingleRow(EnforceSingleRowNode node, Void context) { diff --git a/presto-main-base/src/main/java/com/facebook/presto/sql/planner/sanity/ValidateDependenciesChecker.java b/presto-main-base/src/main/java/com/facebook/presto/sql/planner/sanity/ValidateDependenciesChecker.java index b110a04e72a06..bf93c5d23388f 100644 --- a/presto-main-base/src/main/java/com/facebook/presto/sql/planner/sanity/ValidateDependenciesChecker.java +++ b/presto-main-base/src/main/java/com/facebook/presto/sql/planner/sanity/ValidateDependenciesChecker.java @@ -65,6 +65,8 @@ import com.facebook.presto.sql.planner.plan.GroupIdNode; import com.facebook.presto.sql.planner.plan.InternalPlanVisitor; import com.facebook.presto.sql.planner.plan.LateralJoinNode; +import com.facebook.presto.sql.planner.plan.MergeProcessorNode; +import com.facebook.presto.sql.planner.plan.MergeWriterNode; import com.facebook.presto.sql.planner.plan.OffsetNode; import com.facebook.presto.sql.planner.plan.RemoteSourceNode; import com.facebook.presto.sql.planner.plan.RowNumberNode; @@ -665,6 +667,30 @@ public Void visitTableWriteMerge(TableWriterMergeNode node, Set boundSymbols) + { + PlanNode source = node.getSource(); + source.accept(this, boundSymbols); // visit child + return null; + } + + @Override + public Void visitMergeProcessor(MergeProcessorNode node, Set boundSymbols) + { + PlanNode source = node.getSource(); + source.accept(this, boundSymbols); // visit child + + checkArgument(source.getOutputVariables().contains(node.getTargetTableRowIdColumnVariable()), + "Invalid node. rowId symbol (%s) is not in source plan output (%s)", + node.getTargetTableRowIdColumnVariable(), node.getSource().getOutputVariables()); + checkArgument(source.getOutputVariables().contains(node.getMergeRowVariable()), + "Invalid node. Merge row symbol (%s) is not in source plan output (%s)", + node.getMergeRowVariable(), node.getSource().getOutputVariables()); + + return null; + } + @Override public Void visitDelete(DeleteNode node, Set boundVariables) { diff --git a/presto-main-base/src/main/java/com/facebook/presto/util/GraphvizPrinter.java b/presto-main-base/src/main/java/com/facebook/presto/util/GraphvizPrinter.java index 3a94ed3c2d864..a01407fd4ce88 100644 --- a/presto-main-base/src/main/java/com/facebook/presto/util/GraphvizPrinter.java +++ b/presto-main-base/src/main/java/com/facebook/presto/util/GraphvizPrinter.java @@ -63,6 +63,8 @@ import com.facebook.presto.sql.planner.plan.GroupIdNode; import com.facebook.presto.sql.planner.plan.InternalPlanVisitor; import com.facebook.presto.sql.planner.plan.LateralJoinNode; +import com.facebook.presto.sql.planner.plan.MergeProcessorNode; +import com.facebook.presto.sql.planner.plan.MergeWriterNode; import com.facebook.presto.sql.planner.plan.RemoteSourceNode; import com.facebook.presto.sql.planner.plan.RowNumberNode; import com.facebook.presto.sql.planner.plan.SampleNode; @@ -133,6 +135,7 @@ private enum NodeType ANALYZE_FINISH, EXPLAIN_ANALYZE, UPDATE, + MERGE } private static final Map NODE_COLORS = immutableEnumMap(ImmutableMap.builder() @@ -164,6 +167,7 @@ private enum NodeType .put(NodeType.ANALYZE_FINISH, "plum") .put(NodeType.EXPLAIN_ANALYZE, "cadetblue1") .put(NodeType.UPDATE, "blue") + .put(NodeType.MERGE, "lightblue") .build()); static { @@ -330,6 +334,20 @@ public Void visitUpdate(UpdateNode node, Void context) return node.getSource().accept(this, context); } + @Override + public Void visitMergeWriter(MergeWriterNode node, Void context) + { + printNode(node, format("MergeWriterNode[%s]", Joiner.on(", ").join(node.getOutputVariables())), NODE_COLORS.get(NodeType.MERGE)); + return node.getSource().accept(this, context); + } + + @Override + public Void visitMergeProcessor(MergeProcessorNode node, Void context) + { + printNode(node, format("MergeProcessorNode[%s]", Joiner.on(", ").join(node.getOutputVariables())), NODE_COLORS.get(NodeType.MERGE)); + return node.getSource().accept(this, context); + } + @Override public Void visitStatisticsWriterNode(StatisticsWriterNode node, Void context) { diff --git a/presto-main-base/src/test/java/com/facebook/presto/metadata/AbstractMockMetadata.java b/presto-main-base/src/test/java/com/facebook/presto/metadata/AbstractMockMetadata.java index 9cf5cb9a0217d..4f3c78b985629 100644 --- a/presto-main-base/src/test/java/com/facebook/presto/metadata/AbstractMockMetadata.java +++ b/presto-main-base/src/test/java/com/facebook/presto/metadata/AbstractMockMetadata.java @@ -26,6 +26,7 @@ import com.facebook.presto.spi.ConnectorTableMetadata; import com.facebook.presto.spi.Constraint; import com.facebook.presto.spi.MaterializedViewDefinition; +import com.facebook.presto.spi.MergeHandle; import com.facebook.presto.spi.NewTableLayout; import com.facebook.presto.spi.SystemTable; import com.facebook.presto.spi.TableHandle; @@ -35,6 +36,7 @@ import com.facebook.presto.spi.connector.ConnectorCapabilities; import com.facebook.presto.spi.connector.ConnectorOutputMetadata; import com.facebook.presto.spi.connector.ConnectorTableVersion; +import com.facebook.presto.spi.connector.RowChangeParadigm; import com.facebook.presto.spi.connector.TableFunctionApplicationResult; import com.facebook.presto.spi.constraints.TableConstraint; import com.facebook.presto.spi.function.SqlFunction; @@ -460,6 +462,49 @@ public void finishUpdate(Session session, TableHandle tableHandle, Collection getMergeUpdateLayout(Session session, TableHandle tableHandle) + { + throw new UnsupportedOperationException(); + } + + /** + * Begin merge query + */ + public MergeHandle beginMerge(Session session, TableHandle tableHandle) + { + throw new UnsupportedOperationException(); + } + + /** + * Finish merge query + */ + public void finishMerge(Session session, MergeHandle tableHandle, Collection fragments, Collection computedStatistics) + { + throw new UnsupportedOperationException(); + } + @Override public Optional getCatalogHandle(Session session, String catalogName) { diff --git a/presto-main-base/src/test/java/com/facebook/presto/operator/exchange/TestLocalExchange.java b/presto-main-base/src/test/java/com/facebook/presto/operator/exchange/TestLocalExchange.java index 465a374eca960..06fb18c1502d1 100644 --- a/presto-main-base/src/test/java/com/facebook/presto/operator/exchange/TestLocalExchange.java +++ b/presto-main-base/src/test/java/com/facebook/presto/operator/exchange/TestLocalExchange.java @@ -460,9 +460,9 @@ public void testCreatePartitionFunction() new ConnectorId("prism"), new ConnectorNodePartitioningProvider() { @Override - public ConnectorBucketNodeMap getBucketNodeMap(ConnectorTransactionHandle transactionHandle, ConnectorSession session, ConnectorPartitioningHandle partitioningHandle, List sortedNodes) + public Optional getBucketNodeMap(ConnectorTransactionHandle transactionHandle, ConnectorSession session, ConnectorPartitioningHandle partitioningHandle, List sortedNodes) { - return createBucketNodeMap(Stream.generate(() -> sortedNodes).flatMap(List::stream).limit(10).collect(toImmutableList()), SOFT_AFFINITY); + return Optional.of(createBucketNodeMap(Stream.generate(() -> sortedNodes).flatMap(List::stream).limit(10).collect(toImmutableList()), SOFT_AFFINITY)); } @Override diff --git a/presto-main-base/src/test/java/com/facebook/presto/sql/analyzer/AbstractAnalyzerTest.java b/presto-main-base/src/test/java/com/facebook/presto/sql/analyzer/AbstractAnalyzerTest.java index c02042d2afb04..7bb0832c7d3c0 100644 --- a/presto-main-base/src/test/java/com/facebook/presto/sql/analyzer/AbstractAnalyzerTest.java +++ b/presto-main-base/src/test/java/com/facebook/presto/sql/analyzer/AbstractAnalyzerTest.java @@ -46,6 +46,7 @@ import com.facebook.presto.spi.ColumnMetadata; import com.facebook.presto.spi.ConnectorId; import com.facebook.presto.spi.ConnectorTableMetadata; +import com.facebook.presto.spi.MaterializedViewDefinition; import com.facebook.presto.spi.SchemaTableName; import com.facebook.presto.spi.WarningCollector; import com.facebook.presto.spi.analyzer.ViewDefinition; @@ -81,6 +82,7 @@ import org.testng.annotations.BeforeClass; import java.util.ArrayList; +import java.util.Collections; import java.util.List; import java.util.Optional; import java.util.function.Consumer; @@ -337,6 +339,33 @@ public void setup() ColumnMetadata.builder().setName("z").setType(BIGINT).build())), false)); + // materialized view referencing table in same schema + List baseTables = new ArrayList<>(Collections.singletonList(table2)); + MaterializedViewDefinition.TableColumn baseTableColumns = new MaterializedViewDefinition.TableColumn(table2, "a", true); + + SchemaTableName materializedTable = new SchemaTableName("s1", "mv1"); + MaterializedViewDefinition.TableColumn materializedViewTableColumn = new MaterializedViewDefinition.TableColumn(materializedTable, "a", true); + + List columnMappings = Collections.singletonList( + new MaterializedViewDefinition.ColumnMapping(materializedViewTableColumn, Collections.singletonList(baseTableColumns))); + + MaterializedViewDefinition materializedViewData1 = new MaterializedViewDefinition( + "select a from t2", + "s1", + "mv1", + baseTables, + Optional.of("user"), + Optional.empty(), + columnMappings, + new ArrayList<>(), + Optional.of(new ArrayList<>(Collections.singletonList("a")))); + + ConnectorTableMetadata materializedViewMetadata1 = new ConnectorTableMetadata( + materializedTable, ImmutableList.of(ColumnMetadata.builder().setName("a").setType(BIGINT).build())); + + inSetupTransaction(session -> + metadata.createMaterializedView(session, TPCH_CATALOG, materializedViewMetadata1, materializedViewData1, false)); + // valid view referencing table in same schema String viewData1 = JsonCodec.jsonCodec(ViewDefinition.class).toJson( new ViewDefinition( diff --git a/presto-main-base/src/test/java/com/facebook/presto/sql/analyzer/TestAnalyzer.java b/presto-main-base/src/test/java/com/facebook/presto/sql/analyzer/TestAnalyzer.java index d3a28af7b6339..a74d59c1e2d03 100644 --- a/presto-main-base/src/test/java/com/facebook/presto/sql/analyzer/TestAnalyzer.java +++ b/presto-main-base/src/test/java/com/facebook/presto/sql/analyzer/TestAnalyzer.java @@ -2351,4 +2351,17 @@ public void testTableFunctionRequiredColumns() // table s1.t5 has two columns. The second column is hidden. Table function can require a hidden column. analyze("SELECT * FROM TABLE(system.required_columns_function(input => TABLE(s1.t5)))"); } + + @Test + public void testInvalidMerge() + { + assertFails(MISSING_TABLE, "Table tpch.s1.foo does not exist", + "MERGE INTO foo USING bar ON foo.id = bar.id WHEN MATCHED THEN UPDATE SET id = bar.id + 1"); + + assertFails(NOT_SUPPORTED, "line 1:1: Merging into views is not supported", + "MERGE INTO v1 USING t1 ON v1.a = t1.a WHEN MATCHED THEN UPDATE SET id = bar.id + 1"); + + assertFails(NOT_SUPPORTED, "line 1:1: Merging into materialized views is not supported", + "MERGE INTO mv1 USING t1 ON mv1.a = t1.a WHEN MATCHED THEN UPDATE SET id = bar.id + 1"); + } } diff --git a/presto-main-base/src/test/java/com/facebook/presto/sql/planner/TestDeleteAndInsertMergeProcessor.java b/presto-main-base/src/test/java/com/facebook/presto/sql/planner/TestDeleteAndInsertMergeProcessor.java new file mode 100644 index 0000000000000..c06ed5a9e32a3 --- /dev/null +++ b/presto-main-base/src/test/java/com/facebook/presto/sql/planner/TestDeleteAndInsertMergeProcessor.java @@ -0,0 +1,244 @@ +/* + * Licensed 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. + */ +package com.facebook.presto.sql.planner; + +import com.facebook.presto.common.Page; +import com.facebook.presto.common.block.Block; +import com.facebook.presto.common.block.BlockBuilder; +import com.facebook.presto.common.block.ByteArrayBlock; +import com.facebook.presto.common.block.IntArrayBlock; +import com.facebook.presto.common.block.LongArrayBlock; +import com.facebook.presto.common.block.PageBuilderStatus; +import com.facebook.presto.common.block.RowBlock; +import com.facebook.presto.common.type.RowType; +import com.facebook.presto.common.type.Type; +import com.facebook.presto.operator.DeleteAndInsertMergeProcessor; +import com.google.common.collect.ImmutableList; +import io.airlift.slice.Slices; +import org.testng.annotations.Test; + +import java.nio.charset.Charset; +import java.util.List; +import java.util.Optional; + +import static com.facebook.presto.common.type.BigintType.BIGINT; +import static com.facebook.presto.common.type.IntegerType.INTEGER; +import static com.facebook.presto.common.type.TinyintType.TINYINT; +import static com.facebook.presto.common.type.VarbinaryType.VARBINARY; +import static com.facebook.presto.common.type.VarcharType.VARCHAR; +import static com.facebook.presto.operator.MergeRowChangeProcessor.DEFAULT_CASE_OPERATION_NUMBER; +import static com.facebook.presto.spi.ConnectorMergeSink.DELETE_OPERATION_NUMBER; +import static com.facebook.presto.spi.ConnectorMergeSink.INSERT_OPERATION_NUMBER; +import static com.facebook.presto.spi.ConnectorMergeSink.UPDATE_OPERATION_NUMBER; +import static org.assertj.core.api.Assertions.assertThat; + +public class TestDeleteAndInsertMergeProcessor +{ + @Test + public void testSimpleDeletedRowMerge() + { + // target: ('Dave', 11, 'Devon'), ('Dave', 11, 'Darbyshire') + // source: ('Dave', 11, 'Darbyshire') + // merge: + // MERGE INTO target t USING source s + // ON t.customer = s.customer" + + // WHEN MATCHED AND t.address <> 'Darbyshire' AND s.purchases * 2 > 20" + + // THEN DELETE + // expected: ('Dave', 11, 'Darbyshire') + DeleteAndInsertMergeProcessor processor = makeMergeProcessor(); + Page inputPage = makePageFromBlocks( + 2, + Optional.empty(), + new Block[] { + makeLongArrayBlock(1, 1), // TransactionId + makeLongArrayBlock(1, 0), // rowId + makeIntArrayBlock(536870912, 536870912)}, // bucket + new Block[] { + makeVarcharArrayBlock("", "Dave"), // customer + makeIntArrayBlock(0, 11), // purchases + makeVarcharArrayBlock("", "Devon"), // address + makeByteArrayBlock(1, 1), // "present" boolean + makeByteArrayBlock(DEFAULT_CASE_OPERATION_NUMBER, DELETE_OPERATION_NUMBER), + makeIntArrayBlock(-1, 0)}); + + Page outputPage = processor.transformPage(inputPage); + assertThat(outputPage.getPositionCount()).isEqualTo(1); + + // The single operation is a delete + assertThat(TINYINT.getLong(outputPage.getBlock(3), 0)).isEqualTo(DELETE_OPERATION_NUMBER); + + // Show that the row to be deleted is rowId 0, e.g. ('Dave', 11, 'Devon') + Block rowIdRow = outputPage.getBlock(4).getBlock(0); + assertThat(INTEGER.getLong(rowIdRow, 1)).isEqualTo(0); + } + + @Test + public void testUpdateAndDeletedMerge() + { + // target: ('Aaron', 11, 'Arches'), ('Bill', 7, 'Buena'), ('Dave', 11, 'Darbyshire'), ('Dave', 11, 'Devon'), ('Ed', 7, 'Etherville') + // source: ('Aaron', 6, 'Arches'), ('Carol', 9, 'Centreville'), ('Dave', 11, 'Darbyshire'), ('Ed', 7, 'Etherville') + // merge: + // MERGE INTO target t USING source s + // ON t.customer = s.customer" + + // WHEN MATCHED AND t.address <> 'Darbyshire' AND s.purchases * 2 > 20 + // THEN DELETE" + + // WHEN MATCHED" + + // THEN UPDATE SET purchases = s.purchases + t.purchases, address = concat(t.address, '/', s.address)" + + // WHEN NOT MATCHED" + + // THEN INSERT (customer, purchases, address) VALUES(s.customer, s.purchases, s.address) + // expected: ('Aaron', 17, 'Arches/Arches'), ('Bill', 7, 'Buena'), ('Carol', 9, 'Centreville'), ('Dave', 22, 'Darbyshire/Darbyshire'), ('Ed', 14, 'Etherville/Etherville'), ('Fred', 30, 'Franklin') + DeleteAndInsertMergeProcessor processor = makeMergeProcessor(); + boolean[] rowIdNulls = new boolean[] {false, true, false, false, false}; + Page inputPage = makePageFromBlocks( + 5, + Optional.of(rowIdNulls), + new Block[] { + makeLongArrayBlockWithNulls(rowIdNulls, 5, 2, 1, 2, 2), // TransactionId + makeLongArrayBlockWithNulls(rowIdNulls, 5, 0, 3, 1, 2), // rowId + makeIntArrayBlockWithNulls(rowIdNulls, 5, 536870912, 536870912, 536870912, 536870912)}, // bucket + new Block[] { + // customer + makeVarcharArrayBlock("Aaron", "Carol", "Dave", "Dave", "Ed"), + // purchases + makeIntArrayBlock(17, 9, 11, 22, 14), + // address + makeVarcharArrayBlock("Arches/Arches", "Centreville", "Devon", "Darbyshire/Darbyshire", "Etherville/Etherville"), + // "present" boolean + makeByteArrayBlock(1, 0, 1, 1, 1), + // operation number: update, insert, delete, update + makeByteArrayBlock(UPDATE_OPERATION_NUMBER, INSERT_OPERATION_NUMBER, DELETE_OPERATION_NUMBER, UPDATE_OPERATION_NUMBER, UPDATE_OPERATION_NUMBER), + makeIntArrayBlock(0, 1, 2, 0, 0)}); + + Page outputPage = processor.transformPage(inputPage); + assertThat(outputPage.getPositionCount()).isEqualTo(8); + RowBlock rowIdBlock = (RowBlock) outputPage.getBlock(4); + assertThat(rowIdBlock.getPositionCount()).isEqualTo(8); + // Show that the first row has address "Arches" + assertThat(getString(outputPage.getBlock(2), 1)).isEqualTo("Arches/Arches"); + } + + @Test + public void testAnotherMergeCase() + { + /* + inputPage: Page[positions=5 + 0:Row[0:Long[2, 1, 2, 2], 1:Long[0, 3, 1, 2], 2:Int[536870912, 536870912, 536870912, 536870912]], + 1:Row[0:VarWidth["Aaron", "Carol", "Dave", "Dave", "Ed"], 1:Int[17, 9, 11, 22, 14], 2:VarWidth["Arches/Arches", "Centreville", "Devon", "Darbyshire/Darbyshir...", "Etherville/Ethervill..."], 3:Int[1, 2, 0, 1, 1], 4:Int[3, 1, 2, 3, 3]]] +Page[positions=8 0:Dict[VarWidth["Aaron", "Dave", "Dave", "Ed", "Aaron", "Carol", "Dave", "Ed"]], 1:Dict[Int[17, 11, 22, 14, 17, 9, 22, 14]], 2:Dict[VarWidth["Arches/Arches", "Devon", "Darbyshire/Darbyshir...", "Etherville/Ethervill...", "Arches/Arches", "Centreville", "Darbyshire/Darbyshir...", "Etherville/Ethervill..."]], 3:Int[2, 2, 2, 2, 1, 1, 1, 1], 4:Row[0:Dict[Long[2, 1, 2, 2, 2, 2, 2, 2]], 1:Dict[Long[0, 3, 1, 2, 0, 0, 0, 0]], 2:Dict[Int[536870912, 536870912, 536870912, 536870912, 536870912, 536870912, 536870912, 536870912]]]] + Expected row count to be <5>, but was <7>; rows=[[Bill, 7, Buena], [Dave, 11, Devon], [Aaron, 11, Arches], [Aaron, 17, Arches/Arches], [Carol, 9, Centreville], [Dave, 22, Darbyshire/Darbyshire], [Ed, 14, Etherville/Etherville]] + */ + DeleteAndInsertMergeProcessor processor = makeMergeProcessor(); + boolean[] rowIdNulls = new boolean[] {false, true, false, false, false}; + Page inputPage = makePageFromBlocks( + 5, + Optional.of(rowIdNulls), + new Block[] { + makeLongArrayBlockWithNulls(rowIdNulls, 5, 2, 1, 2, 2), // TransactionId + makeLongArrayBlockWithNulls(rowIdNulls, 5, 0, 3, 1, 2), // rowId + makeIntArrayBlockWithNulls(rowIdNulls, 5, 536870912, 536870912, 536870912, 536870912)}, // bucket + new Block[] { + // customer + makeVarcharArrayBlock("Aaron", "Carol", "Dave", "Dave", "Ed"), + // purchases + makeIntArrayBlock(17, 9, 11, 22, 14), + // address + makeVarcharArrayBlock("Arches/Arches", "Centreville", "Devon", "Darbyshire/Darbyshire", "Etherville/Etherville"), + // "present" boolean + makeByteArrayBlock(1, 0, 1, 1, 0), + // operation number: update, insert, delete, update, update + makeByteArrayBlock(3, 1, 2, 3, 3), + makeIntArrayBlock(0, -1, 1, 0, 0)}); + + Page outputPage = processor.transformPage(inputPage); + assertThat(outputPage.getPositionCount()).isEqualTo(8); + RowBlock rowIdBlock = (RowBlock) outputPage.getBlock(4); + assertThat(rowIdBlock.getPositionCount()).isEqualTo(8); + // Show that the first row has address "Arches/Arches" + assertThat(getString(outputPage.getBlock(2), 1)).isEqualTo("Arches/Arches"); + } + + private Page makePageFromBlocks(int positionCount, Optional rowIdNulls, Block[] rowIdBlocks, Block[] mergeCaseBlocks) + { + Block[] pageBlocks = new Block[] { + RowBlock.fromFieldBlocks(positionCount, rowIdNulls, rowIdBlocks), + RowBlock.fromFieldBlocks(positionCount, Optional.empty(), mergeCaseBlocks) + }; + return new Page(pageBlocks); + } + + private DeleteAndInsertMergeProcessor makeMergeProcessor() + { + // CREATE TABLE (customer VARCHAR, purchases INTEGER, address VARCHAR) + List types = ImmutableList.of(VARCHAR, INTEGER, VARCHAR); + + RowType rowIdType = RowType.anonymous(ImmutableList.of(BIGINT, BIGINT, INTEGER)); + return new DeleteAndInsertMergeProcessor(types, rowIdType, 0, 1, ImmutableList.of(), ImmutableList.of(0, 1, 2)); + } + + private String getString(Block block, int position) + { + return VARBINARY.getSlice(block, position).toString(Charset.defaultCharset()); + } + + private LongArrayBlock makeLongArrayBlock(long... elements) + { + return new LongArrayBlock(elements.length, Optional.empty(), elements); + } + + private LongArrayBlock makeLongArrayBlockWithNulls(boolean[] nulls, int positionCount, long... elements) + { + assertThat(countNonNull(nulls) + elements.length).isEqualTo(positionCount); + return new LongArrayBlock(elements.length, Optional.of(nulls), elements); + } + + private IntArrayBlock makeIntArrayBlock(int... elements) + { + return new IntArrayBlock(elements.length, Optional.empty(), elements); + } + + private IntArrayBlock makeIntArrayBlockWithNulls(boolean[] nulls, int positionCount, int... elements) + { + assertThat(countNonNull(nulls) + elements.length).isEqualTo(positionCount); + return new IntArrayBlock(elements.length, Optional.of(nulls), elements); + } + + private int countNonNull(boolean[] nulls) + { + int count = 0; + for (int position = 0; position < nulls.length; position++) { + if (nulls[position]) { + count++; + } + } + return count; + } + + private ByteArrayBlock makeByteArrayBlock(int... elements) + { + byte[] bytes = new byte[elements.length]; + for (int index = 0; index < elements.length; index++) { + bytes[index] = (byte) elements[index]; + } + return new ByteArrayBlock(elements.length, Optional.empty(), bytes); + } + + private Block makeVarcharArrayBlock(String... elements) + { + BlockBuilder builder = VARCHAR.createBlockBuilder(new PageBuilderStatus().createBlockBuilderStatus(), elements.length); + for (String element : elements) { + VARCHAR.writeSlice(builder, Slices.utf8Slice(element)); + } + return builder.build(); + } +} diff --git a/presto-main-base/src/test/java/com/facebook/presto/sql/planner/iterative/rule/TestPruneMergeSourceColumns.java b/presto-main-base/src/test/java/com/facebook/presto/sql/planner/iterative/rule/TestPruneMergeSourceColumns.java new file mode 100644 index 0000000000000..54a5c35c05845 --- /dev/null +++ b/presto-main-base/src/test/java/com/facebook/presto/sql/planner/iterative/rule/TestPruneMergeSourceColumns.java @@ -0,0 +1,79 @@ +/* + * Licensed 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. + */ +package com.facebook.presto.sql.planner.iterative.rule; + +import com.facebook.presto.spi.SchemaTableName; +import com.facebook.presto.spi.relation.VariableReferenceExpression; +import com.facebook.presto.sql.planner.assertions.PlanMatchPattern; +import com.facebook.presto.sql.planner.iterative.rule.test.BaseRuleTest; +import com.facebook.presto.sql.planner.plan.MergeWriterNode; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import org.testng.annotations.Test; + +import java.util.List; + +import static com.facebook.presto.sql.planner.assertions.PlanMatchPattern.node; +import static com.facebook.presto.sql.planner.assertions.PlanMatchPattern.strictProject; +import static com.facebook.presto.sql.planner.assertions.PlanMatchPattern.values; + +public class TestPruneMergeSourceColumns + extends BaseRuleTest +{ + @Test + public void testPruneInputColumn() + { + tester().assertThat(new PruneMergeSourceColumns()) + .on(p -> { + VariableReferenceExpression a = p.variable("a"); + VariableReferenceExpression mergeRow = p.variable("merge_row"); + VariableReferenceExpression rowId = p.variable("row_id"); + VariableReferenceExpression partialRows = p.variable("partial_rows"); + VariableReferenceExpression fragment = p.variable("fragment"); + List mergeProcessorProjectedSymbols = ImmutableList.of(mergeRow, rowId); + return p.merge( + new SchemaTableName("schema", "table"), + p.values(a, mergeRow, rowId), + mergeProcessorProjectedSymbols, + ImmutableList.of(partialRows, fragment)); + }) + .matches( + node( + MergeWriterNode.class, + strictProject( + ImmutableMap.of( + "row_id", PlanMatchPattern.expression("row_id"), + "merge_row", PlanMatchPattern.expression("merge_row")), + values("a", "merge_row", "row_id")))); + } + + @Test + public void testDoNotPruneRowId() + { + tester().assertThat(new PruneMergeSourceColumns()) + .on(p -> { + VariableReferenceExpression mergeRow = p.variable("merge_row"); + VariableReferenceExpression rowId = p.variable("row_id"); + VariableReferenceExpression partialRows = p.variable("partial_rows"); + VariableReferenceExpression fragment = p.variable("fragment"); + List mergeProcessorProjectedSymbols = ImmutableList.of(mergeRow, rowId); + return p.merge( + new SchemaTableName("schema", "table"), + p.values(mergeRow, rowId), + mergeProcessorProjectedSymbols, + ImmutableList.of(partialRows, fragment)); + }) + .doesNotFire(); + } +} diff --git a/presto-main-base/src/test/java/com/facebook/presto/sql/planner/iterative/rule/test/PlanBuilder.java b/presto-main-base/src/test/java/com/facebook/presto/sql/planner/iterative/rule/test/PlanBuilder.java index 6582111703f9d..a42e526fbf823 100644 --- a/presto-main-base/src/test/java/com/facebook/presto/sql/planner/iterative/rule/test/PlanBuilder.java +++ b/presto-main-base/src/test/java/com/facebook/presto/sql/planner/iterative/rule/test/PlanBuilder.java @@ -26,6 +26,7 @@ import com.facebook.presto.spi.SchemaTableName; import com.facebook.presto.spi.TableHandle; import com.facebook.presto.spi.WarningCollector; +import com.facebook.presto.spi.connector.RowChangeParadigm; import com.facebook.presto.spi.constraints.TableConstraint; import com.facebook.presto.spi.function.FunctionHandle; import com.facebook.presto.spi.plan.AggregationNode; @@ -63,6 +64,8 @@ import com.facebook.presto.spi.plan.TableFinishNode; import com.facebook.presto.spi.plan.TableScanNode; import com.facebook.presto.spi.plan.TableWriterNode; +import com.facebook.presto.spi.plan.TableWriterNode.MergeParadigmAndTypes; +import com.facebook.presto.spi.plan.TableWriterNode.MergeTarget; import com.facebook.presto.spi.plan.TopNNode; import com.facebook.presto.spi.plan.UnionNode; import com.facebook.presto.spi.plan.UnnestNode; @@ -84,6 +87,7 @@ import com.facebook.presto.sql.planner.plan.ExchangeNode; import com.facebook.presto.sql.planner.plan.GroupIdNode; import com.facebook.presto.sql.planner.plan.LateralJoinNode; +import com.facebook.presto.sql.planner.plan.MergeWriterNode; import com.facebook.presto.sql.planner.plan.OffsetNode; import com.facebook.presto.sql.planner.plan.RemoteSourceNode; import com.facebook.presto.sql.planner.plan.RowNumberNode; @@ -113,6 +117,7 @@ import static com.facebook.presto.common.block.SortOrder.ASC_NULLS_FIRST; import static com.facebook.presto.common.type.BigintType.BIGINT; +import static com.facebook.presto.common.type.IntegerType.INTEGER; import static com.facebook.presto.common.type.UnknownType.UNKNOWN; import static com.facebook.presto.common.type.VarbinaryType.VARBINARY; import static com.facebook.presto.spi.plan.ExchangeEncoding.COLUMNAR; @@ -603,6 +608,35 @@ public TableFinishNode tableDelete(SchemaTableName schemaTableName, PlanNode del Optional.empty(), Optional.empty()); } + public MergeWriterNode merge( + SchemaTableName schemaTableName, + PlanNode mergeSource, + List inputSymbols, + List outputSymbols) + { + return new MergeWriterNode( + mergeSource.getSourceLocation(), + idAllocator.getNextId(), + mergeSource, + mergeTarget(schemaTableName), + inputSymbols, + Optional.empty(), + outputSymbols); + } + + private MergeTarget mergeTarget(SchemaTableName schemaTableName) + { + return new MergeTarget( + new TableHandle( + new ConnectorId("testConnector"), + new TestingTableHandle(), + TestingTransactionHandle.create(), + Optional.empty()), + Optional.empty(), + schemaTableName, + new MergeParadigmAndTypes(RowChangeParadigm.DELETE_ROW_AND_INSERT_ROW, ImmutableList.of(), INTEGER)); + } + public ExchangeNode gatheringExchange(ExchangeNode.Scope scope, PlanNode child) { return exchange(builder -> builder.type(ExchangeNode.Type.GATHER) diff --git a/presto-main/src/test/java/com/facebook/presto/server/remotetask/TestHttpRemoteTask.java b/presto-main/src/test/java/com/facebook/presto/server/remotetask/TestHttpRemoteTask.java index 2fdeba6e84030..c08050a6f8cac 100644 --- a/presto-main/src/test/java/com/facebook/presto/server/remotetask/TestHttpRemoteTask.java +++ b/presto-main/src/test/java/com/facebook/presto/server/remotetask/TestHttpRemoteTask.java @@ -63,6 +63,7 @@ import com.facebook.presto.server.thrift.ConnectorSplitThriftCodec; import com.facebook.presto.server.thrift.DeleteTableHandleThriftCodec; import com.facebook.presto.server.thrift.InsertTableHandleThriftCodec; +import com.facebook.presto.server.thrift.MergeTableHandleThriftCodec; import com.facebook.presto.server.thrift.OutputTableHandleThriftCodec; import com.facebook.presto.server.thrift.TableHandleThriftCodec; import com.facebook.presto.server.thrift.TableLayoutHandleThriftCodec; @@ -70,6 +71,7 @@ import com.facebook.presto.spi.ConnectorDeleteTableHandle; import com.facebook.presto.spi.ConnectorId; import com.facebook.presto.spi.ConnectorInsertTableHandle; +import com.facebook.presto.spi.ConnectorMergeTableHandle; import com.facebook.presto.spi.ConnectorOutputTableHandle; import com.facebook.presto.spi.ConnectorSplit; import com.facebook.presto.spi.ConnectorTableHandle; @@ -392,6 +394,7 @@ public void configure(Binder binder) jsonCodecBinder(binder).bindJsonCodec(ConnectorOutputTableHandle.class); jsonCodecBinder(binder).bindJsonCodec(ConnectorDeleteTableHandle.class); jsonCodecBinder(binder).bindJsonCodec(ConnectorInsertTableHandle.class); + jsonCodecBinder(binder).bindJsonCodec(ConnectorMergeTableHandle.class); jsonCodecBinder(binder).bindJsonCodec(ConnectorTableHandle.class); jsonCodecBinder(binder).bindJsonCodec(ConnectorTableLayoutHandle.class); @@ -402,6 +405,7 @@ public void configure(Binder binder) thriftCodecBinder(binder).bindCustomThriftCodec(OutputTableHandleThriftCodec.class); thriftCodecBinder(binder).bindCustomThriftCodec(InsertTableHandleThriftCodec.class); thriftCodecBinder(binder).bindCustomThriftCodec(DeleteTableHandleThriftCodec.class); + thriftCodecBinder(binder).bindCustomThriftCodec(MergeTableHandleThriftCodec.class); thriftCodecBinder(binder).bindCustomThriftCodec(TableHandleThriftCodec.class); thriftCodecBinder(binder).bindCustomThriftCodec(TableLayoutHandleThriftCodec.class); thriftCodecBinder(binder).bindThriftCodec(TaskStatus.class); diff --git a/presto-main/src/test/java/com/facebook/presto/server/remotetask/TestHttpRemoteTaskConnectorCodec.java b/presto-main/src/test/java/com/facebook/presto/server/remotetask/TestHttpRemoteTaskConnectorCodec.java index fee24c9113f21..5bdb7eeeb9ab7 100644 --- a/presto-main/src/test/java/com/facebook/presto/server/remotetask/TestHttpRemoteTaskConnectorCodec.java +++ b/presto-main/src/test/java/com/facebook/presto/server/remotetask/TestHttpRemoteTaskConnectorCodec.java @@ -62,6 +62,7 @@ import com.facebook.presto.metadata.InsertTableHandle; import com.facebook.presto.metadata.InsertTableHandleJacksonModule; import com.facebook.presto.metadata.InternalNode; +import com.facebook.presto.metadata.MergeTableHandleJacksonModule; import com.facebook.presto.metadata.OutputTableHandle; import com.facebook.presto.metadata.OutputTableHandleJacksonModule; import com.facebook.presto.metadata.PartitioningHandleJacksonModule; @@ -75,6 +76,7 @@ import com.facebook.presto.server.thrift.ConnectorSplitThriftCodec; import com.facebook.presto.server.thrift.DeleteTableHandleThriftCodec; import com.facebook.presto.server.thrift.InsertTableHandleThriftCodec; +import com.facebook.presto.server.thrift.MergeTableHandleThriftCodec; import com.facebook.presto.server.thrift.OutputTableHandleThriftCodec; import com.facebook.presto.server.thrift.TableHandleThriftCodec; import com.facebook.presto.server.thrift.TableLayoutHandleThriftCodec; @@ -87,6 +89,7 @@ import com.facebook.presto.spi.ConnectorId; import com.facebook.presto.spi.ConnectorIndexHandle; import com.facebook.presto.spi.ConnectorInsertTableHandle; +import com.facebook.presto.spi.ConnectorMergeTableHandle; import com.facebook.presto.spi.ConnectorOutputTableHandle; import com.facebook.presto.spi.ConnectorSplit; import com.facebook.presto.spi.ConnectorTableHandle; @@ -642,6 +645,9 @@ public void configure(Binder binder) Map> deleteTableHandleCodecMap = new ConcurrentHashMap<>(); deleteTableHandleCodecMap.put(connectorWithCodec, codecProvider.getConnectorDeleteTableHandleCodec().get()); + Map> mergeTableHandleCodecMap = new ConcurrentHashMap<>(); + mergeTableHandleCodecMap.put(connectorWithCodec, codecProvider.getConnectorMergeTableHandleCodec().get()); + HandleResolver handleResolver = new HandleResolver(); handleResolver.addConnectorName(connectorWithCodec, new TestConnectorWithCodecHandleResolver()); handleResolver.addConnectorName(connectorWithoutCodec, new TestConnectorWithoutCodecHandleResolver()); @@ -659,6 +665,8 @@ public void configure(Binder binder) connectorId -> Optional.ofNullable(insertTableHandleCodecMap.get(connectorId.getCatalogName())); Function>> deleteTableHandleCodecExtractor = connectorId -> Optional.ofNullable(deleteTableHandleCodecMap.get(connectorId.getCatalogName())); + Function>> mergeTableHandleCodecExtractor = + connectorId -> Optional.ofNullable(mergeTableHandleCodecMap.get(connectorId.getCatalogName())); Function>> noOpIndexCodec = connectorId -> Optional.empty(); Function>> noOpTransactionCodec = @@ -676,6 +684,7 @@ public void configure(Binder binder) jsonBinder(binder).addModuleBinding().toInstance(new OutputTableHandleJacksonModule(handleResolver, featuresConfig, outputTableHandleCodecExtractor)); jsonBinder(binder).addModuleBinding().toInstance(new InsertTableHandleJacksonModule(handleResolver, featuresConfig, insertTableHandleCodecExtractor)); jsonBinder(binder).addModuleBinding().toInstance(new DeleteTableHandleJacksonModule(handleResolver, featuresConfig, deleteTableHandleCodecExtractor)); + jsonBinder(binder).addModuleBinding().toInstance(new MergeTableHandleJacksonModule(handleResolver, featuresConfig, mergeTableHandleCodecExtractor)); jsonBinder(binder).addModuleBinding().toInstance(new com.facebook.presto.index.IndexHandleJacksonModule(handleResolver, featuresConfig, noOpIndexCodec)); jsonBinder(binder).addModuleBinding().toInstance(new TransactionHandleJacksonModule(handleResolver, featuresConfig, noOpTransactionCodec)); jsonBinder(binder).addModuleBinding().toInstance(new PartitioningHandleJacksonModule(handleResolver, featuresConfig, noOpPartitioningCodec)); @@ -706,6 +715,7 @@ public void configure(Binder binder) jsonCodecBinder(binder).bindJsonCodec(ConnectorDeleteTableHandle.class); jsonCodecBinder(binder).bindJsonCodec(ConnectorInsertTableHandle.class); jsonCodecBinder(binder).bindJsonCodec(ConnectorTableLayoutHandle.class); + jsonCodecBinder(binder).bindJsonCodec(ConnectorMergeTableHandle.class); binder.bind(ConnectorCodecManager.class).in(Scopes.SINGLETON); @@ -714,6 +724,7 @@ public void configure(Binder binder) thriftCodecBinder(binder).bindCustomThriftCodec(OutputTableHandleThriftCodec.class); thriftCodecBinder(binder).bindCustomThriftCodec(InsertTableHandleThriftCodec.class); thriftCodecBinder(binder).bindCustomThriftCodec(DeleteTableHandleThriftCodec.class); + thriftCodecBinder(binder).bindCustomThriftCodec(MergeTableHandleThriftCodec.class); thriftCodecBinder(binder).bindCustomThriftCodec(TableHandleThriftCodec.class); thriftCodecBinder(binder).bindCustomThriftCodec(TableLayoutHandleThriftCodec.class); thriftCodecBinder(binder).bindThriftCodec(TaskStatus.class); @@ -990,6 +1001,25 @@ public ConnectorDeleteTableHandle deserialize(byte[] data) } }); } + + public Optional> getConnectorMergeTableHandleCodec() + { + return Optional.of(new ConnectorCodec<>() + { + @Override + public byte[] serialize(ConnectorMergeTableHandle handle) + { + TestConnectorMergeTableHandle mergeTableHandle = (TestConnectorMergeTableHandle) handle; + return mergeTableHandle.getTableName().getBytes(UTF_8); + } + + @Override + public ConnectorMergeTableHandle deserialize(byte[] data) + { + return new TestConnectorMergeTableHandle(new String(data, UTF_8)); + } + }); + } } /** @@ -1293,6 +1323,53 @@ public int hashCode() } } + /** + * Test merge table handle with binary serialization support + */ + public static class TestConnectorMergeTableHandle + implements ConnectorMergeTableHandle + { + private final String tableName; + + @JsonCreator + public TestConnectorMergeTableHandle( + @JsonProperty("tableName") String tableName) + { + this.tableName = tableName; + } + + @JsonProperty + public String getTableName() + { + return tableName; + } + + @Override + public ConnectorTableHandle getTableHandle() + { + throw new UnsupportedOperationException("Merge table handles not supported"); + } + + @Override + public boolean equals(Object o) + { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TestConnectorMergeTableHandle that = (TestConnectorMergeTableHandle) o; + return tableName.equals(that.tableName); + } + + @Override + public int hashCode() + { + return Objects.hash(tableName); + } + } + public static class TestConnectorWithoutCodecSplit implements ConnectorSplit { @@ -1402,5 +1479,11 @@ public Class getDeleteTableHandleClass() { throw new UnsupportedOperationException("Delete table handles not supported"); } + + @Override + public Class getMergeTableHandleClass() + { + throw new UnsupportedOperationException("Merge table handles not supported"); + } } } diff --git a/presto-main/src/test/java/com/facebook/presto/server/remotetask/TestHttpRemoteTaskWithEventLoop.java b/presto-main/src/test/java/com/facebook/presto/server/remotetask/TestHttpRemoteTaskWithEventLoop.java index 41c845c2b4a65..21d6a8ce42627 100644 --- a/presto-main/src/test/java/com/facebook/presto/server/remotetask/TestHttpRemoteTaskWithEventLoop.java +++ b/presto-main/src/test/java/com/facebook/presto/server/remotetask/TestHttpRemoteTaskWithEventLoop.java @@ -61,6 +61,7 @@ import com.facebook.presto.server.thrift.ConnectorSplitThriftCodec; import com.facebook.presto.server.thrift.DeleteTableHandleThriftCodec; import com.facebook.presto.server.thrift.InsertTableHandleThriftCodec; +import com.facebook.presto.server.thrift.MergeTableHandleThriftCodec; import com.facebook.presto.server.thrift.OutputTableHandleThriftCodec; import com.facebook.presto.server.thrift.TableHandleThriftCodec; import com.facebook.presto.server.thrift.TableLayoutHandleThriftCodec; @@ -68,6 +69,7 @@ import com.facebook.presto.spi.ConnectorDeleteTableHandle; import com.facebook.presto.spi.ConnectorId; import com.facebook.presto.spi.ConnectorInsertTableHandle; +import com.facebook.presto.spi.ConnectorMergeTableHandle; import com.facebook.presto.spi.ConnectorOutputTableHandle; import com.facebook.presto.spi.ConnectorSplit; import com.facebook.presto.spi.ConnectorTableHandle; @@ -400,6 +402,7 @@ public void configure(Binder binder) jsonCodecBinder(binder).bindJsonCodec(ConnectorOutputTableHandle.class); jsonCodecBinder(binder).bindJsonCodec(ConnectorDeleteTableHandle.class); jsonCodecBinder(binder).bindJsonCodec(ConnectorInsertTableHandle.class); + jsonCodecBinder(binder).bindJsonCodec(ConnectorMergeTableHandle.class); jsonCodecBinder(binder).bindJsonCodec(ConnectorTableHandle.class); jsonCodecBinder(binder).bindJsonCodec(ConnectorTableLayoutHandle.class); @@ -410,6 +413,7 @@ public void configure(Binder binder) thriftCodecBinder(binder).bindCustomThriftCodec(OutputTableHandleThriftCodec.class); thriftCodecBinder(binder).bindCustomThriftCodec(InsertTableHandleThriftCodec.class); thriftCodecBinder(binder).bindCustomThriftCodec(DeleteTableHandleThriftCodec.class); + thriftCodecBinder(binder).bindCustomThriftCodec(MergeTableHandleThriftCodec.class); thriftCodecBinder(binder).bindCustomThriftCodec(TableHandleThriftCodec.class); thriftCodecBinder(binder).bindCustomThriftCodec(TableLayoutHandleThriftCodec.class); thriftCodecBinder(binder).bindThriftCodec(TaskStatus.class); diff --git a/presto-native-execution/presto_cpp/presto_protocol/core/presto_protocol_core.cpp b/presto-native-execution/presto_cpp/presto_protocol/core/presto_protocol_core.cpp index bc4dac0b0d911..c47f3295c8604 100644 --- a/presto-native-execution/presto_cpp/presto_protocol/core/presto_protocol_core.cpp +++ b/presto-native-execution/presto_cpp/presto_protocol/core/presto_protocol_core.cpp @@ -2308,6 +2308,10 @@ void to_json(json& j, const std::shared_ptr& p) { j = *std::static_pointer_cast(p); return; } + if (type == "MergeHandle") { + j = *std::static_pointer_cast(p); + return; + } throw TypeError(type + " no abstract type ExecutionWriterTarget "); } @@ -2359,6 +2363,12 @@ void from_json(const json& j, std::shared_ptr& p) { p = std::static_pointer_cast(k); return; } + if (type == "MergeHandle") { + std::shared_ptr k = std::make_shared(); + j.get_to(*k); + p = std::static_pointer_cast(k); + return; + } throw TypeError(type + " no abstract type ExecutionWriterTarget "); } @@ -7244,6 +7254,71 @@ void from_json(const json& j, MemoryInfo& p) { } } // namespace facebook::presto::protocol namespace facebook::presto::protocol { +void to_json(json& j, const std::shared_ptr& p) { + if (p == nullptr) { + return; + } + String type = p->_type; + + throw TypeError(type + " no abstract type ConnectorMergeTableHandle "); +} + +void from_json(const json& j, std::shared_ptr& p) { + String type; + try { + type = p->getSubclassKey(j); + } catch (json::parse_error& e) { + throw ParseError( + std::string(e.what()) + + " ConnectorMergeTableHandle ConnectorMergeTableHandle"); + } + + throw TypeError(type + " no abstract type ConnectorMergeTableHandle "); +} +} // namespace facebook::presto::protocol +namespace facebook::presto::protocol { +MergeHandle::MergeHandle() noexcept { + _type = "MergeHandle"; +} + +void to_json(json& j, const MergeHandle& p) { + j = json::object(); + j["@type"] = "MergeHandle"; + to_json_key( + j, + "tableHandle", + p.tableHandle, + "MergeHandle", + "TableHandle", + "tableHandle"); + to_json_key( + j, + "connectorMergeTableHandle", + p.connectorMergeTableHandle, + "MergeHandle", + "ConnectorMergeTableHandle", + "connectorMergeTableHandle"); +} + +void from_json(const json& j, MergeHandle& p) { + p._type = j["@type"]; + from_json_key( + j, + "tableHandle", + p.tableHandle, + "MergeHandle", + "TableHandle", + "tableHandle"); + from_json_key( + j, + "connectorMergeTableHandle", + p.connectorMergeTableHandle, + "MergeHandle", + "ConnectorMergeTableHandle", + "connectorMergeTableHandle"); +} +} // namespace facebook::presto::protocol +namespace facebook::presto::protocol { MergeJoinNode::MergeJoinNode() noexcept { _type = ".MergeJoinNode"; } @@ -7336,6 +7411,151 @@ void from_json(const json& j, MergeJoinNode& p) { } } // namespace facebook::presto::protocol namespace facebook::presto::protocol { +// Loosely copied this here from NLOHMANN_JSON_SERIALIZE_ENUM() + +// NOLINTNEXTLINE: cppcoreguidelines-avoid-c-arrays +static const std::pair RowChangeParadigm_enum_table[] = + { // NOLINT: cert-err58-cpp + {RowChangeParadigm::CHANGE_ONLY_UPDATED_COLUMNS, + "CHANGE_ONLY_UPDATED_COLUMNS"}, + {RowChangeParadigm::DELETE_ROW_AND_INSERT_ROW, + "DELETE_ROW_AND_INSERT_ROW"}}; +void to_json(json& j, const RowChangeParadigm& e) { + static_assert( + std::is_enum::value, + "RowChangeParadigm must be an enum!"); + const auto* it = std::find_if( + std::begin(RowChangeParadigm_enum_table), + std::end(RowChangeParadigm_enum_table), + [e](const std::pair& ej_pair) -> bool { + return ej_pair.first == e; + }); + j = ((it != std::end(RowChangeParadigm_enum_table)) + ? it + : std::begin(RowChangeParadigm_enum_table)) + ->second; +} +void from_json(const json& j, RowChangeParadigm& e) { + static_assert( + std::is_enum::value, + "RowChangeParadigm must be an enum!"); + const auto* it = std::find_if( + std::begin(RowChangeParadigm_enum_table), + std::end(RowChangeParadigm_enum_table), + [&j](const std::pair& ej_pair) -> bool { + return ej_pair.second == j; + }); + e = ((it != std::end(RowChangeParadigm_enum_table)) + ? it + : std::begin(RowChangeParadigm_enum_table)) + ->first; +} +} // namespace facebook::presto::protocol +namespace facebook::presto::protocol { + +void to_json(json& j, const MergeParadigmAndTypes& p) { + j = json::object(); + to_json_key( + j, + "paradigm", + p.paradigm, + "MergeParadigmAndTypes", + "RowChangeParadigm", + "paradigm"); + to_json_key( + j, + "columnTypes", + p.columnTypes, + "MergeParadigmAndTypes", + "List", + "columnTypes"); + to_json_key( + j, + "targetTableRowIdColumnType", + p.targetTableRowIdColumnType, + "MergeParadigmAndTypes", + "Type", + "targetTableRowIdColumnType"); +} + +void from_json(const json& j, MergeParadigmAndTypes& p) { + from_json_key( + j, + "paradigm", + p.paradigm, + "MergeParadigmAndTypes", + "RowChangeParadigm", + "paradigm"); + from_json_key( + j, + "columnTypes", + p.columnTypes, + "MergeParadigmAndTypes", + "List", + "columnTypes"); + from_json_key( + j, + "targetTableRowIdColumnType", + p.targetTableRowIdColumnType, + "MergeParadigmAndTypes", + "Type", + "targetTableRowIdColumnType"); +} +} // namespace facebook::presto::protocol +namespace facebook::presto::protocol { + +void to_json(json& j, const MergeTarget& p) { + j = json::object(); + to_json_key(j, "handle", p.handle, "MergeTarget", "TableHandle", "handle"); + to_json_key( + j, + "mergeHandle", + p.mergeHandle, + "MergeTarget", + "MergeHandle", + "mergeHandle"); + to_json_key( + j, + "schemaTableName", + p.schemaTableName, + "MergeTarget", + "SchemaTableName", + "schemaTableName"); + to_json_key( + j, + "mergeParadigmAndTypes", + p.mergeParadigmAndTypes, + "MergeTarget", + "MergeParadigmAndTypes", + "mergeParadigmAndTypes"); +} + +void from_json(const json& j, MergeTarget& p) { + from_json_key(j, "handle", p.handle, "MergeTarget", "TableHandle", "handle"); + from_json_key( + j, + "mergeHandle", + p.mergeHandle, + "MergeTarget", + "MergeHandle", + "mergeHandle"); + from_json_key( + j, + "schemaTableName", + p.schemaTableName, + "MergeTarget", + "SchemaTableName", + "schemaTableName"); + from_json_key( + j, + "mergeParadigmAndTypes", + p.mergeParadigmAndTypes, + "MergeTarget", + "MergeParadigmAndTypes", + "mergeParadigmAndTypes"); +} +} // namespace facebook::presto::protocol +namespace facebook::presto::protocol { void to_json(json& j, const NodeLoadMetrics& p) { j = json::object(); diff --git a/presto-native-execution/presto_cpp/presto_protocol/core/presto_protocol_core.h b/presto-native-execution/presto_cpp/presto_protocol/core/presto_protocol_core.h index bb4786cab31a6..0052734bc0805 100644 --- a/presto-native-execution/presto_cpp/presto_protocol/core/presto_protocol_core.h +++ b/presto-native-execution/presto_cpp/presto_protocol/core/presto_protocol_core.h @@ -319,6 +319,11 @@ struct ColumnHandle : public JsonEncodedSubclass { void to_json(json& j, const std::shared_ptr& p); void from_json(const json& j, std::shared_ptr& p); } // namespace facebook::presto::protocol +namespace facebook::presto::protocol { +struct ConnectorMergeTableHandle : public JsonEncodedSubclass {}; +void to_json(json& j, const std::shared_ptr& p); +void from_json(const json& j, std::shared_ptr& p); +} // namespace facebook::presto::protocol namespace facebook::presto::protocol { struct SourceLocation { @@ -1790,6 +1795,16 @@ void to_json(json& j, const MemoryInfo& p); void from_json(const json& j, MemoryInfo& p); } // namespace facebook::presto::protocol namespace facebook::presto::protocol { +struct MergeHandle : public ExecutionWriterTarget { + TableHandle tableHandle = {}; + std::shared_ptr connectorMergeTableHandle = {}; + + MergeHandle() noexcept; +}; +void to_json(json& j, const MergeHandle& p); +void from_json(const json& j, MergeHandle& p); +} // namespace facebook::presto::protocol +namespace facebook::presto::protocol { struct MergeJoinNode : public PlanNode { MergeJoinNode() noexcept; PlanNodeId id = {}; @@ -1806,6 +1821,33 @@ void to_json(json& j, const MergeJoinNode& p); void from_json(const json& j, MergeJoinNode& p); } // namespace facebook::presto::protocol namespace facebook::presto::protocol { +enum class RowChangeParadigm { + CHANGE_ONLY_UPDATED_COLUMNS, + DELETE_ROW_AND_INSERT_ROW +}; +extern void to_json(json& j, const RowChangeParadigm& e); +extern void from_json(const json& j, RowChangeParadigm& e); +} // namespace facebook::presto::protocol +namespace facebook::presto::protocol { +struct MergeParadigmAndTypes { + RowChangeParadigm paradigm = {}; + List columnTypes = {}; + Type targetTableRowIdColumnType = {}; +}; +void to_json(json& j, const MergeParadigmAndTypes& p); +void from_json(const json& j, MergeParadigmAndTypes& p); +} // namespace facebook::presto::protocol +namespace facebook::presto::protocol { +struct MergeTarget { + TableHandle handle = {}; + std::shared_ptr mergeHandle = {}; + SchemaTableName schemaTableName = {}; + MergeParadigmAndTypes mergeParadigmAndTypes = {}; +}; +void to_json(json& j, const MergeTarget& p); +void from_json(const json& j, MergeTarget& p); +} // namespace facebook::presto::protocol +namespace facebook::presto::protocol { struct NodeLoadMetrics { double cpuUsedPercent = {}; double memoryUsedInBytes = {}; diff --git a/presto-native-execution/presto_cpp/presto_protocol/core/presto_protocol_core.yml b/presto-native-execution/presto_cpp/presto_protocol/core/presto_protocol_core.yml index feecd99f33f32..33f3d6da9654b 100644 --- a/presto-native-execution/presto_cpp/presto_protocol/core/presto_protocol_core.yml +++ b/presto-native-execution/presto_cpp/presto_protocol/core/presto_protocol_core.yml @@ -89,6 +89,10 @@ AbstractClasses: super: JsonEncodedSubclass subclasses: + ConnectorMergeTableHandle: + super: JsonEncodedSubclass + subclasses: + ConnectorTransactionHandle: super: JsonEncodedSubclass subclasses: @@ -134,6 +138,7 @@ AbstractClasses: - { name: DeleteHandle, key: DeleteHandle } - { name: UpdateHandle, key: UpdateHandle } - { name: ExecuteProcedureHandle, key: ExecuteProcedureHandle} + - { name: MergeHandle, key: MergeHandle } InputDistribution: super: JsonEncodedSubclass @@ -226,6 +231,7 @@ JavaClasses: - presto-spi/src/main/java/com/facebook/presto/spi/ConnectorSplit.java - presto-spi/src/main/java/com/facebook/presto/spi/ConnectorTableHandle.java - presto-spi/src/main/java/com/facebook/presto/spi/connector/ConnectorTransactionHandle.java + - presto-spi/src/main/java/com/facebook/presto/spi/connector/RowChangeParadigm.java - presto-spi/src/main/java/com/facebook/presto/spi/ConnectorIndexHandle.java - presto-spi/src/main/java/com/facebook/presto/spi/plan/DistinctLimitNode.java - presto-spi/src/main/java/com/facebook/presto/spi/plan/MarkDistinctNode.java @@ -351,6 +357,7 @@ JavaClasses: - presto-function-namespace-managers-common/src/main/java/com/facebook/presto/functionNamespace/JsonBasedUdfFunctionMetadata.java - presto-spi/src/main/java/com/facebook/presto/spi/plan/DeleteNode.java - presto-spi/src/main/java/com/facebook/presto/spi/plan/BaseInputDistribution.java + - presto-spi/src/main/java/com/facebook/presto/spi/MergeHandle.java - presto-main-base/src/main/java/com/facebook/presto/metadata/BuiltInFunctionKind.java - presto-spi/src/main/java/com/facebook/presto/spi/NodeStats.java - presto-spi/src/main/java/com/facebook/presto/spi/NodeLoadMetrics.java diff --git a/presto-parser/src/main/java/com/facebook/presto/sql/tree/Merge.java b/presto-parser/src/main/java/com/facebook/presto/sql/tree/Merge.java index 5b98d809773d0..d79bc09799c4f 100644 --- a/presto-parser/src/main/java/com/facebook/presto/sql/tree/Merge.java +++ b/presto-parser/src/main/java/com/facebook/presto/sql/tree/Merge.java @@ -13,6 +13,7 @@ */ package com.facebook.presto.sql.tree; +import com.facebook.presto.spi.analyzer.UpdateInfo; import com.google.common.collect.ImmutableList; import java.util.List; @@ -110,6 +111,12 @@ public List getChildren() return builder.build(); } + @Override + public UpdateInfo getUpdateInfo() + { + return new UpdateInfo("MERGE", target.toString()); + } + @Override public boolean equals(Object o) { diff --git a/presto-pinot-toolkit/src/main/java/com/facebook/presto/pinot/PinotNodePartitioningProvider.java b/presto-pinot-toolkit/src/main/java/com/facebook/presto/pinot/PinotNodePartitioningProvider.java index 38142dfcf3d6c..730e71205ce0e 100644 --- a/presto-pinot-toolkit/src/main/java/com/facebook/presto/pinot/PinotNodePartitioningProvider.java +++ b/presto-pinot-toolkit/src/main/java/com/facebook/presto/pinot/PinotNodePartitioningProvider.java @@ -24,19 +24,20 @@ import com.facebook.presto.spi.connector.ConnectorTransactionHandle; import java.util.List; +import java.util.Optional; import java.util.function.ToIntFunction; public class PinotNodePartitioningProvider implements ConnectorNodePartitioningProvider { @Override - public ConnectorBucketNodeMap getBucketNodeMap( + public Optional getBucketNodeMap( ConnectorTransactionHandle transactionHandle, ConnectorSession session, ConnectorPartitioningHandle partitioningHandle, List sortedNodes) { - return ConnectorBucketNodeMap.createBucketNodeMap(1); + return Optional.of(ConnectorBucketNodeMap.createBucketNodeMap(1)); } @Override diff --git a/presto-plugin-toolkit/src/main/java/com/facebook/presto/plugin/base/util/Closables.java b/presto-plugin-toolkit/src/main/java/com/facebook/presto/plugin/base/util/Closables.java new file mode 100644 index 0000000000000..d6293631808e9 --- /dev/null +++ b/presto-plugin-toolkit/src/main/java/com/facebook/presto/plugin/base/util/Closables.java @@ -0,0 +1,41 @@ +/* + * Licensed 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. + */ +package com.facebook.presto.plugin.base.util; + +import static java.util.Objects.requireNonNull; + +public final class Closables +{ + private Closables() {} + + public static T closeAllSuppress(T rootCause, AutoCloseable... closeables) + { + requireNonNull(rootCause, "rootCause is null"); + requireNonNull(closeables, "closeables is null"); + for (AutoCloseable closeable : closeables) { + try { + if (closeable != null) { + closeable.close(); + } + } + catch (Throwable e) { + // Self-suppression not permitted + if (rootCause != e) { + rootCause.addSuppressed(e); + } + } + } + return rootCause; + } +} diff --git a/presto-spi/src/main/java/com/facebook/presto/spi/ConnectorHandleResolver.java b/presto-spi/src/main/java/com/facebook/presto/spi/ConnectorHandleResolver.java index 05af1070bc21b..55bee3238e34d 100644 --- a/presto-spi/src/main/java/com/facebook/presto/spi/ConnectorHandleResolver.java +++ b/presto-spi/src/main/java/com/facebook/presto/spi/ConnectorHandleResolver.java @@ -46,6 +46,11 @@ default Class getDeleteTableHandleClass() throw new UnsupportedOperationException(); } + default Class getMergeTableHandleClass() + { + throw new UnsupportedOperationException(); + } + default Class getDistributedProcedureHandleClass() { throw new UnsupportedOperationException(); diff --git a/presto-spi/src/main/java/com/facebook/presto/spi/ConnectorMergeSink.java b/presto-spi/src/main/java/com/facebook/presto/spi/ConnectorMergeSink.java new file mode 100644 index 0000000000000..e89d8da6954b0 --- /dev/null +++ b/presto-spi/src/main/java/com/facebook/presto/spi/ConnectorMergeSink.java @@ -0,0 +1,61 @@ +/* + * Licensed 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. + */ +package com.facebook.presto.spi; + +import com.facebook.presto.common.Page; +import io.airlift.slice.Slice; + +import java.util.Collection; +import java.util.concurrent.CompletableFuture; + +public interface ConnectorMergeSink +{ + /** + * Represents an inserted row. + */ + int INSERT_OPERATION_NUMBER = 1; + + /** + * Represents a deleted row. + */ + int DELETE_OPERATION_NUMBER = 2; + + /** + * Represents an updated row when using {@link com.facebook.presto.spi.connector.RowChangeParadigm#CHANGE_ONLY_UPDATED_COLUMNS}. + */ + int UPDATE_OPERATION_NUMBER = 3; + + /** + * Store the page resulting from a merge. The page consists of {@code n} channels, numbered {@code 0..n-1}: + *

    + *
  • Blocks {@code 0..n-3} in page are the data columns
  • + *
  • Block {@code n-2} is the tinyint operation: + *
      + *
    • {@link #INSERT_OPERATION_NUMBER}
    • + *
    • {@link #DELETE_OPERATION_NUMBER}
    • + *
    • {@link #UPDATE_OPERATION_NUMBER}
    • + *
    + *
  • Block {@code n-1} is a connector-specific rowId column, whose handle was previously returned by + * {@link com.facebook.presto.spi.connector.ConnectorMetadata#getMergeTargetTableRowIdColumnHandle(ConnectorSession, ConnectorTableHandle) getMergeTargetTableRowIdColumnHandle()} + *
  • + *
+ * + * @param page The page to store. + */ + void storeMergedRows(Page page); + + CompletableFuture> finish(); + + default void abort() {} +} diff --git a/presto-spi/src/main/java/com/facebook/presto/spi/ConnectorMergeTableHandle.java b/presto-spi/src/main/java/com/facebook/presto/spi/ConnectorMergeTableHandle.java new file mode 100644 index 0000000000000..117a81841baa3 --- /dev/null +++ b/presto-spi/src/main/java/com/facebook/presto/spi/ConnectorMergeTableHandle.java @@ -0,0 +1,29 @@ +/* + * Licensed 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. + */ +package com.facebook.presto.spi; + +import com.facebook.presto.spi.connector.ConnectorMetadata; + +public interface ConnectorMergeTableHandle +{ + /** + * This method is required because the {@link ConnectorTableHandle} returned by + * {@link ConnectorMetadata#beginMerge} is in general different from the + * one passed to that method, but the updated handle must be made + * available to {@link ConnectorMetadata#finishMerge} + * + * @return the {@link ConnectorTableHandle} returned by {@link ConnectorMetadata#beginMerge} + */ + ConnectorTableHandle getTableHandle(); +} diff --git a/presto-spi/src/main/java/com/facebook/presto/spi/ConnectorNewTableLayout.java b/presto-spi/src/main/java/com/facebook/presto/spi/ConnectorNewTableLayout.java index 46fcf1eb665f8..652778d09ff35 100644 --- a/presto-spi/src/main/java/com/facebook/presto/spi/ConnectorNewTableLayout.java +++ b/presto-spi/src/main/java/com/facebook/presto/spi/ConnectorNewTableLayout.java @@ -17,13 +17,14 @@ import java.util.List; import java.util.Objects; +import java.util.Optional; import static com.facebook.presto.spi.PartitionedTableWritePolicy.SINGLE_WRITER_PER_PARTITION_REQUIRED; import static java.util.Objects.requireNonNull; public class ConnectorNewTableLayout { - private final ConnectorPartitioningHandle partitioning; + private final Optional partitioning; private final List partitionColumns; private final PartitionedTableWritePolicy writerPolicy; @@ -34,12 +35,19 @@ public ConnectorNewTableLayout(ConnectorPartitioningHandle partitioning, List partitionColumns, PartitionedTableWritePolicy writerPolicy) { - this.partitioning = requireNonNull(partitioning, "partitioning is null"); + this.partitioning = Optional.of(requireNonNull(partitioning, "partitioning is null")); this.partitionColumns = requireNonNull(partitionColumns, "partitionColumns is null"); this.writerPolicy = requireNonNull(writerPolicy, "writerPolicy is null"); } - public ConnectorPartitioningHandle getPartitioning() + public ConnectorNewTableLayout(List partitionColumns) + { + this.partitioning = Optional.empty(); + this.partitionColumns = requireNonNull(partitionColumns, "partitionColumns is null"); + this.writerPolicy = SINGLE_WRITER_PER_PARTITION_REQUIRED; + } + + public Optional getPartitioning() { return partitioning; } diff --git a/presto-spi/src/main/java/com/facebook/presto/spi/MergeHandle.java b/presto-spi/src/main/java/com/facebook/presto/spi/MergeHandle.java new file mode 100644 index 0000000000000..01cf3896235f6 --- /dev/null +++ b/presto-spi/src/main/java/com/facebook/presto/spi/MergeHandle.java @@ -0,0 +1,81 @@ +/* + * Licensed 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. + */ +package com.facebook.presto.spi; + +import com.facebook.drift.annotations.ThriftConstructor; +import com.facebook.drift.annotations.ThriftField; +import com.facebook.drift.annotations.ThriftStruct; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; + +import java.util.Objects; + +import static java.util.Objects.requireNonNull; + +@ThriftStruct +public final class MergeHandle +{ + private final TableHandle tableHandle; + private final ConnectorMergeTableHandle connectorMergeTableHandle; + + @JsonCreator + @ThriftConstructor + public MergeHandle( + @JsonProperty("tableHandle") TableHandle tableHandle, + @JsonProperty("connectorMergeTableHandle") ConnectorMergeTableHandle connectorMergeTableHandle) + { + this.tableHandle = requireNonNull(tableHandle, "tableHandle is null"); + this.connectorMergeTableHandle = requireNonNull(connectorMergeTableHandle, "connectorMergeTableHandle is null"); + } + + @JsonProperty + @ThriftField(1) + public TableHandle getTableHandle() + { + return tableHandle; + } + + @JsonProperty + @ThriftField(2) + public ConnectorMergeTableHandle getConnectorMergeTableHandle() + { + return connectorMergeTableHandle; + } + + @Override + public int hashCode() + { + return Objects.hash(tableHandle, connectorMergeTableHandle); + } + + @Override + public boolean equals(Object obj) + { + if (this == obj) { + return true; + } + if (obj == null || getClass() != obj.getClass()) { + return false; + } + MergeHandle o = (MergeHandle) obj; + return Objects.equals(this.tableHandle, o.tableHandle) && + Objects.equals(this.connectorMergeTableHandle, o.connectorMergeTableHandle); + } + + @Override + public String toString() + { + return tableHandle + ":" + connectorMergeTableHandle; + } +} diff --git a/presto-spi/src/main/java/com/facebook/presto/spi/NewTableLayout.java b/presto-spi/src/main/java/com/facebook/presto/spi/NewTableLayout.java index 202b25c9a4923..93761adcac26d 100644 --- a/presto-spi/src/main/java/com/facebook/presto/spi/NewTableLayout.java +++ b/presto-spi/src/main/java/com/facebook/presto/spi/NewTableLayout.java @@ -54,9 +54,10 @@ public ConnectorNewTableLayout getLayout() return layout; } - public PartitioningHandle getPartitioning() + public Optional getPartitioning() { - return new PartitioningHandle(Optional.of(connectorId), Optional.of(transactionHandle), layout.getPartitioning()); + return layout.getPartitioning() + .map(partitioning -> new PartitioningHandle(Optional.of(connectorId), Optional.of(transactionHandle), partitioning)); } public List getPartitionColumns() diff --git a/presto-spi/src/main/java/com/facebook/presto/spi/TableHandle.java b/presto-spi/src/main/java/com/facebook/presto/spi/TableHandle.java index 3dd4c8abfad8e..a38055fbaacf2 100644 --- a/presto-spi/src/main/java/com/facebook/presto/spi/TableHandle.java +++ b/presto-spi/src/main/java/com/facebook/presto/spi/TableHandle.java @@ -72,6 +72,16 @@ public TableHandle( this.dynamicFilter = requireNonNull(dynamicFilter, "dynamicFilter is null"); } + public TableHandle cloneWithConnectorHandle(ConnectorTableHandle connectorHandle) + { + return new TableHandle( + connectorId, + connectorHandle, + transaction, + layout, + dynamicFilter); + } + @JsonProperty @ThriftField(1) public ConnectorId getConnectorId() diff --git a/presto-spi/src/main/java/com/facebook/presto/spi/connector/ConnectorCodecProvider.java b/presto-spi/src/main/java/com/facebook/presto/spi/connector/ConnectorCodecProvider.java index 1adcf802825fa..98e71be2e266d 100644 --- a/presto-spi/src/main/java/com/facebook/presto/spi/connector/ConnectorCodecProvider.java +++ b/presto-spi/src/main/java/com/facebook/presto/spi/connector/ConnectorCodecProvider.java @@ -19,6 +19,7 @@ import com.facebook.presto.spi.ConnectorDistributedProcedureHandle; import com.facebook.presto.spi.ConnectorIndexHandle; import com.facebook.presto.spi.ConnectorInsertTableHandle; +import com.facebook.presto.spi.ConnectorMergeTableHandle; import com.facebook.presto.spi.ConnectorOutputTableHandle; import com.facebook.presto.spi.ConnectorSplit; import com.facebook.presto.spi.ConnectorTableHandle; @@ -53,6 +54,11 @@ default Optional> getConnectorDeleteT return Optional.empty(); } + default Optional> getConnectorMergeTableHandleCodec() + { + return Optional.empty(); + } + default Optional> getConnectorTableLayoutHandleCodec() { return Optional.empty(); diff --git a/presto-spi/src/main/java/com/facebook/presto/spi/connector/ConnectorMetadata.java b/presto-spi/src/main/java/com/facebook/presto/spi/connector/ConnectorMetadata.java index 241ea67ced191..fa1eba34046c6 100644 --- a/presto-spi/src/main/java/com/facebook/presto/spi/connector/ConnectorMetadata.java +++ b/presto-spi/src/main/java/com/facebook/presto/spi/connector/ConnectorMetadata.java @@ -22,6 +22,7 @@ import com.facebook.presto.spi.ConnectorDeleteTableHandle; import com.facebook.presto.spi.ConnectorDistributedProcedureHandle; import com.facebook.presto.spi.ConnectorInsertTableHandle; +import com.facebook.presto.spi.ConnectorMergeTableHandle; import com.facebook.presto.spi.ConnectorNewTableLayout; import com.facebook.presto.spi.ConnectorOutputTableHandle; import com.facebook.presto.spi.ConnectorResolvedIndex; @@ -73,6 +74,8 @@ public interface ConnectorMetadata { + String MODIFYING_ROWS_MESSAGE = "This connector does not support modifying table rows"; + /** * Checks if a schema exists. The connector may have schemas that exist * but are not enumerable via {@link #listSchemaNames}. @@ -563,6 +566,16 @@ default Optional getUpdateRowIdColumn(ConnectorSession session, Co return Optional.ofNullable(getUpdateRowIdColumnHandle(session, tableHandle, updatedColumns)); } + /** + * Get the column handle that will generate row IDs for the merge operation. + * These IDs will be passed to the {@link com.facebook.presto.spi.ConnectorMergeSink#storeMergedRows} + * method of the {@link com.facebook.presto.spi.ConnectorMergeSink} that created them. + */ + default ColumnHandle getMergeTargetTableRowIdColumnHandle(ConnectorSession session, ConnectorTableHandle tableHandle) + { + throw new PrestoException(NOT_SUPPORTED, MODIFYING_ROWS_MESSAGE); + } + /** * Begin call distributed procedure */ @@ -624,6 +637,46 @@ default void finishUpdate(ConnectorSession session, ConnectorTableHandle tableHa throw new PrestoException(NOT_SUPPORTED, "This connector does not support update"); } + /** + * Return the row change paradigm supported by the connector on the table. + */ + default RowChangeParadigm getRowChangeParadigm(ConnectorSession session, ConnectorTableHandle tableHandle) + { + throw new PrestoException(NOT_SUPPORTED, MODIFYING_ROWS_MESSAGE); + } + + /** + * Get the physical layout for updated rows of a MERGE operation. + * Inserted rows are handled by {@link #getInsertLayout}. + * This layout always uses the {@link #getMergeTargetTableRowIdColumnHandle merge target table row ID column}. + */ + default Optional getMergeUpdateLayout(ConnectorSession session, ConnectorTableHandle tableHandle) + { + return Optional.empty(); + } + + /** + * Do whatever is necessary to start an MERGE query, returning the {@link ConnectorMergeTableHandle} + * instance that will be passed to the PageSink, and to the {@link #finishMerge} method. + */ + default ConnectorMergeTableHandle beginMerge(ConnectorSession session, ConnectorTableHandle tableHandle) + { + throw new PrestoException(NOT_SUPPORTED, MODIFYING_ROWS_MESSAGE); + } + + /** + * Finish a merge query + * + * @param session The session + * @param mergeTableHandle A ConnectorMergeTableHandle for the table that is the target of the merge + * @param fragments All fragments returned by the merge plan + * @param computedStatistics Statistics for the table, meaningful only to the connector that produced them. + */ + default void finishMerge(ConnectorSession session, ConnectorMergeTableHandle mergeTableHandle, Collection fragments, Collection computedStatistics) + { + throw new PrestoException(GENERIC_INTERNAL_ERROR, "ConnectorMetadata beginMerge() is implemented without finishMerge()"); + } + /** * Create the specified view. The data for the view is opaque to the connector. */ diff --git a/presto-spi/src/main/java/com/facebook/presto/spi/connector/ConnectorNodePartitioningProvider.java b/presto-spi/src/main/java/com/facebook/presto/spi/connector/ConnectorNodePartitioningProvider.java index bf35da6986437..c202d75e9be3e 100644 --- a/presto-spi/src/main/java/com/facebook/presto/spi/connector/ConnectorNodePartitioningProvider.java +++ b/presto-spi/src/main/java/com/facebook/presto/spi/connector/ConnectorNodePartitioningProvider.java @@ -20,6 +20,7 @@ import com.facebook.presto.spi.Node; import java.util.List; +import java.util.Optional; import java.util.function.ToIntFunction; import static com.facebook.presto.spi.connector.NotPartitionedPartitionHandle.NOT_PARTITIONED; @@ -44,7 +45,7 @@ default List listPartitionHandles( return singletonList(NOT_PARTITIONED); } - ConnectorBucketNodeMap getBucketNodeMap( + Optional getBucketNodeMap( ConnectorTransactionHandle transactionHandle, ConnectorSession session, ConnectorPartitioningHandle partitioningHandle, diff --git a/presto-spi/src/main/java/com/facebook/presto/spi/connector/ConnectorPageSinkProvider.java b/presto-spi/src/main/java/com/facebook/presto/spi/connector/ConnectorPageSinkProvider.java index 506ecb755dc04..8e40634956cef 100644 --- a/presto-spi/src/main/java/com/facebook/presto/spi/connector/ConnectorPageSinkProvider.java +++ b/presto-spi/src/main/java/com/facebook/presto/spi/connector/ConnectorPageSinkProvider.java @@ -16,6 +16,8 @@ import com.facebook.presto.spi.ConnectorDeleteTableHandle; import com.facebook.presto.spi.ConnectorDistributedProcedureHandle; import com.facebook.presto.spi.ConnectorInsertTableHandle; +import com.facebook.presto.spi.ConnectorMergeSink; +import com.facebook.presto.spi.ConnectorMergeTableHandle; import com.facebook.presto.spi.ConnectorOutputTableHandle; import com.facebook.presto.spi.ConnectorPageSink; import com.facebook.presto.spi.ConnectorSession; @@ -35,6 +37,11 @@ default ConnectorPageSink createPageSink(ConnectorTransactionHandle transactionH throw new UnsupportedOperationException("ConnectorPageSinkProvider does not support connectorDeleteTableHandle"); } + default ConnectorMergeSink createMergeSink(ConnectorTransactionHandle transactionHandle, ConnectorSession session, ConnectorMergeTableHandle mergeHandle) + { + throw new PrestoException(NOT_SUPPORTED, "This connector does not support SQL MERGE operations"); + } + default ConnectorPageSink createPageSink(ConnectorTransactionHandle transactionHandle, ConnectorSession session, ConnectorDistributedProcedureHandle procedureHandle, PageSinkContext pageSinkContext) { throw new PrestoException(NOT_SUPPORTED, "This connector does not support distributed procedure"); diff --git a/presto-spi/src/main/java/com/facebook/presto/spi/connector/MergePage.java b/presto-spi/src/main/java/com/facebook/presto/spi/connector/MergePage.java new file mode 100644 index 0000000000000..f3956d6e0727a --- /dev/null +++ b/presto-spi/src/main/java/com/facebook/presto/spi/connector/MergePage.java @@ -0,0 +1,128 @@ +/* + * Licensed 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. + */ + +package com.facebook.presto.spi.connector; + +import com.facebook.presto.common.Page; +import com.facebook.presto.common.block.Block; +import com.facebook.presto.spi.ConnectorMergeSink; + +import java.util.Optional; +import java.util.stream.IntStream; + +import static com.facebook.presto.common.type.TinyintType.TINYINT; +import static com.facebook.presto.spi.ConnectorMergeSink.DELETE_OPERATION_NUMBER; +import static com.facebook.presto.spi.ConnectorMergeSink.INSERT_OPERATION_NUMBER; +import static java.lang.Math.toIntExact; +import static java.lang.String.format; +import static java.util.Objects.requireNonNull; + +/** + * Separate deletions and insertions pages from a merge using + * {@link RowChangeParadigm#DELETE_ROW_AND_INSERT_ROW}. + */ +public final class MergePage +{ + private final Optional deletionsPage; + private final Optional insertionsPage; + + private MergePage(Optional deletionsPage, Optional insertionsPage) + { + this.deletionsPage = requireNonNull(deletionsPage); + this.insertionsPage = requireNonNull(insertionsPage); + } + + /** + * @return delete page with data columns followed by row ID column + */ + public Optional getDeletionsPage() + { + return deletionsPage; + } + + /** + * @return insert page with data columns + */ + public Optional getInsertionsPage() + { + return insertionsPage; + } + + /** + * @param inputPage It has N + 2 channels/blocks, where N is the number of columns in the source table.
+ * 1: Source table column 1.
+ * 2: Source table column 2.
+ * N: Source table column N.
+ * N + 1: Operation: INSERT(1), DELETE(2), UPDATE(3). More info: {@link ConnectorMergeSink}
+ * N + 2: Target Table Row ID (_file:varchar, _pos:bigint, partition_spec_id:integer, partition_data:varchar).
+ * @param dataColumnCount Number of columns of the MERGE INTO target table. + */ + public static MergePage createDeleteAndInsertPages(Page inputPage, int dataColumnCount) + { + // see page description in ConnectorMergeSink + int inputChannelCount = inputPage.getChannelCount(); + if (inputChannelCount != dataColumnCount + 2) { + throw new IllegalArgumentException(format("inputPage channelCount (%s) == dataColumns size (%s) + 2", inputChannelCount, dataColumnCount)); + } + + int positionCount = inputPage.getPositionCount(); // number of rows inserted, deleted or updated in this page. The updated rows count double. + if (positionCount <= 0) { + throw new IllegalArgumentException("positionCount should be > 0, but is " + positionCount); + } + + Block operationBlock = inputPage.getBlock(inputChannelCount - 2); + + int[] deletePositions = new int[positionCount]; + int[] insertPositions = new int[positionCount]; + int deletePositionCount = 0; + int insertPositionCount = 0; + + for (int position = 0; position < positionCount; position++) { + int operation = toIntExact(TINYINT.getLong(operationBlock, position)); + switch (operation) { + case DELETE_OPERATION_NUMBER: + deletePositions[deletePositionCount] = position; + deletePositionCount++; + break; + case INSERT_OPERATION_NUMBER: + insertPositions[insertPositionCount] = position; + insertPositionCount++; + break; + default: + throw new IllegalArgumentException("Invalid merge operation: " + operation); + } + } + + Optional deletePage = Optional.empty(); + if (deletePositionCount > 0) { + int[] columns = new int[dataColumnCount + 1]; + for (int i = 0; i < dataColumnCount; i++) { + columns[i] = i; + } + columns[dataColumnCount] = dataColumnCount + 1; // Merge Target Table Row ID channel + deletePage = Optional.of(inputPage + .extractChannels(columns) + .getPositions(deletePositions, 0, deletePositionCount)); + } + + Optional insertPage = Optional.empty(); + if (insertPositionCount > 0) { + insertPage = Optional.of(inputPage + .extractChannels(IntStream.range(0, dataColumnCount).toArray()) + .getPositions(insertPositions, 0, insertPositionCount)); + } + + return new MergePage(deletePage, insertPage); + } +} diff --git a/presto-spi/src/main/java/com/facebook/presto/spi/connector/RowChangeParadigm.java b/presto-spi/src/main/java/com/facebook/presto/spi/connector/RowChangeParadigm.java new file mode 100644 index 0000000000000..0b29c1380f2be --- /dev/null +++ b/presto-spi/src/main/java/com/facebook/presto/spi/connector/RowChangeParadigm.java @@ -0,0 +1,36 @@ +/* + * Licensed 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. + */ +package com.facebook.presto.spi.connector; + +/** + * Different connectors have different ways of representing row updates, imposed by the underlying storage systems. + * The Presto engine categorizes these methods into the elements of this {@link RowChangeParadigm} enumeration, + * which is provided by {@link ConnectorMetadata#getRowChangeParadigm}. + */ +public enum RowChangeParadigm +{ + /** + * A storage paradigm in which the connector can update individual columns + * of rows identified by a rowId. The corresponding merge processor class is + * {@code ChangeOnlyUpdatedColumnsMergeProcessor} + */ + CHANGE_ONLY_UPDATED_COLUMNS, + + /** + * A paradigm that translates a changed row into a delete by rowId, and an insert of a + * new record, which will get a new rowId when the connector writes it out. The + * corresponding merge processor class is {@code DeleteAndInsertMergeProcessor}. + */ + DELETE_ROW_AND_INSERT_ROW, +} diff --git a/presto-spi/src/main/java/com/facebook/presto/spi/connector/classloader/ClassLoaderSafeConnectorMergeSink.java b/presto-spi/src/main/java/com/facebook/presto/spi/connector/classloader/ClassLoaderSafeConnectorMergeSink.java new file mode 100644 index 0000000000000..d22f0915baa66 --- /dev/null +++ b/presto-spi/src/main/java/com/facebook/presto/spi/connector/classloader/ClassLoaderSafeConnectorMergeSink.java @@ -0,0 +1,61 @@ +/* + * Licensed 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. + */ +package com.facebook.presto.spi.connector.classloader; + +import com.facebook.presto.common.Page; +import com.facebook.presto.spi.ConnectorMergeSink; +import com.facebook.presto.spi.classloader.ThreadContextClassLoader; +import io.airlift.slice.Slice; + +import java.util.Collection; +import java.util.concurrent.CompletableFuture; + +import static java.util.Objects.requireNonNull; + +public class ClassLoaderSafeConnectorMergeSink + implements ConnectorMergeSink +{ + private final ConnectorMergeSink delegate; + private final ClassLoader classLoader; + + public ClassLoaderSafeConnectorMergeSink(ConnectorMergeSink delegate, ClassLoader classLoader) + { + this.delegate = requireNonNull(delegate, "delegate is null"); + this.classLoader = requireNonNull(classLoader, "classLoader is null"); + } + + @Override + public void storeMergedRows(Page page) + { + try (ThreadContextClassLoader ignored = new ThreadContextClassLoader(classLoader)) { + delegate.storeMergedRows(page); + } + } + + @Override + public CompletableFuture> finish() + { + try (ThreadContextClassLoader ignored = new ThreadContextClassLoader(classLoader)) { + return delegate.finish(); + } + } + + @Override + public void abort() + { + try (ThreadContextClassLoader ignored = new ThreadContextClassLoader(classLoader)) { + delegate.abort(); + } + } +} diff --git a/presto-spi/src/main/java/com/facebook/presto/spi/connector/classloader/ClassLoaderSafeConnectorMetadata.java b/presto-spi/src/main/java/com/facebook/presto/spi/connector/classloader/ClassLoaderSafeConnectorMetadata.java index e8f969cfabdee..3562c0cbf8932 100644 --- a/presto-spi/src/main/java/com/facebook/presto/spi/connector/classloader/ClassLoaderSafeConnectorMetadata.java +++ b/presto-spi/src/main/java/com/facebook/presto/spi/connector/classloader/ClassLoaderSafeConnectorMetadata.java @@ -22,6 +22,7 @@ import com.facebook.presto.spi.ConnectorDeleteTableHandle; import com.facebook.presto.spi.ConnectorDistributedProcedureHandle; import com.facebook.presto.spi.ConnectorInsertTableHandle; +import com.facebook.presto.spi.ConnectorMergeTableHandle; import com.facebook.presto.spi.ConnectorNewTableLayout; import com.facebook.presto.spi.ConnectorOutputTableHandle; import com.facebook.presto.spi.ConnectorResolvedIndex; @@ -45,6 +46,7 @@ import com.facebook.presto.spi.connector.ConnectorPartitioningHandle; import com.facebook.presto.spi.connector.ConnectorPartitioningMetadata; import com.facebook.presto.spi.connector.ConnectorTableVersion; +import com.facebook.presto.spi.connector.RowChangeParadigm; import com.facebook.presto.spi.connector.TableFunctionApplicationResult; import com.facebook.presto.spi.constraints.TableConstraint; import com.facebook.presto.spi.function.table.ConnectorTableFunctionHandle; @@ -674,6 +676,48 @@ public void finishUpdate(ConnectorSession session, ConnectorTableHandle tableHan } } + @Override + public RowChangeParadigm getRowChangeParadigm(ConnectorSession session, ConnectorTableHandle tableHandle) + { + try (ThreadContextClassLoader ignored = new ThreadContextClassLoader(classLoader)) { + return delegate.getRowChangeParadigm(session, tableHandle); + } + } + + /** + * Get the column handle that will generate row IDs for the merge operation. + * These IDs will be passed to the {@link com.facebook.presto.spi.ConnectorMergeSink#storeMergedRows} + * method of the {@link com.facebook.presto.spi.ConnectorMergeSink} that created them. + */ + public ColumnHandle getMergeTargetTableRowIdColumnHandle(ConnectorSession session, ConnectorTableHandle tableHandle) + { + try (ThreadContextClassLoader ignored = new ThreadContextClassLoader(classLoader)) { + return delegate.getMergeTargetTableRowIdColumnHandle(session, tableHandle); + } + } + + @Override + public Optional getMergeUpdateLayout(ConnectorSession session, ConnectorTableHandle tableHandle) + { + return delegate.getMergeUpdateLayout(session, tableHandle); + } + + @Override + public ConnectorMergeTableHandle beginMerge(ConnectorSession session, ConnectorTableHandle tableHandle) + { + try (ThreadContextClassLoader ignored = new ThreadContextClassLoader(classLoader)) { + return delegate.beginMerge(session, tableHandle); + } + } + + @Override + public void finishMerge(ConnectorSession session, ConnectorMergeTableHandle mergeTableHandle, Collection fragments, Collection computedStatistics) + { + try (ThreadContextClassLoader ignored = new ThreadContextClassLoader(classLoader)) { + delegate.finishMerge(session, mergeTableHandle, fragments, computedStatistics); + } + } + @Override public boolean supportsMetadataDelete(ConnectorSession session, ConnectorTableHandle tableHandle, Optional tableLayoutHandle) { diff --git a/presto-spi/src/main/java/com/facebook/presto/spi/connector/classloader/ClassLoaderSafeConnectorPageSinkProvider.java b/presto-spi/src/main/java/com/facebook/presto/spi/connector/classloader/ClassLoaderSafeConnectorPageSinkProvider.java index 099ea51b04567..8289ef34cd0ca 100644 --- a/presto-spi/src/main/java/com/facebook/presto/spi/connector/classloader/ClassLoaderSafeConnectorPageSinkProvider.java +++ b/presto-spi/src/main/java/com/facebook/presto/spi/connector/classloader/ClassLoaderSafeConnectorPageSinkProvider.java @@ -16,6 +16,8 @@ import com.facebook.presto.spi.ConnectorDeleteTableHandle; import com.facebook.presto.spi.ConnectorDistributedProcedureHandle; import com.facebook.presto.spi.ConnectorInsertTableHandle; +import com.facebook.presto.spi.ConnectorMergeSink; +import com.facebook.presto.spi.ConnectorMergeTableHandle; import com.facebook.presto.spi.ConnectorOutputTableHandle; import com.facebook.presto.spi.ConnectorPageSink; import com.facebook.presto.spi.ConnectorSession; @@ -62,6 +64,14 @@ public ConnectorPageSink createPageSink(ConnectorTransactionHandle transactionHa } } + @Override + public ConnectorMergeSink createMergeSink(ConnectorTransactionHandle transactionHandle, ConnectorSession session, ConnectorMergeTableHandle mergeHandle) + { + try (ThreadContextClassLoader ignored = new ThreadContextClassLoader(classLoader)) { + return new ClassLoaderSafeConnectorMergeSink(delegate.createMergeSink(transactionHandle, session, mergeHandle), classLoader); + } + } + @Override public ConnectorPageSink createPageSink(ConnectorTransactionHandle transactionHandle, ConnectorSession session, ConnectorDistributedProcedureHandle procedureHandle, PageSinkContext pageSinkContext) { diff --git a/presto-spi/src/main/java/com/facebook/presto/spi/connector/classloader/ClassLoaderSafeNodePartitioningProvider.java b/presto-spi/src/main/java/com/facebook/presto/spi/connector/classloader/ClassLoaderSafeNodePartitioningProvider.java index 7878f1c542bab..4490990c827ea 100644 --- a/presto-spi/src/main/java/com/facebook/presto/spi/connector/classloader/ClassLoaderSafeNodePartitioningProvider.java +++ b/presto-spi/src/main/java/com/facebook/presto/spi/connector/classloader/ClassLoaderSafeNodePartitioningProvider.java @@ -26,6 +26,7 @@ import com.facebook.presto.spi.connector.ConnectorTransactionHandle; import java.util.List; +import java.util.Optional; import java.util.function.ToIntFunction; import static java.util.Objects.requireNonNull; @@ -64,7 +65,7 @@ public List listPartitionHandles(ConnectorTransactionH } @Override - public ConnectorBucketNodeMap getBucketNodeMap(ConnectorTransactionHandle transactionHandle, ConnectorSession session, ConnectorPartitioningHandle partitioningHandle, List sortedNodes) + public Optional getBucketNodeMap(ConnectorTransactionHandle transactionHandle, ConnectorSession session, ConnectorPartitioningHandle partitioningHandle, List sortedNodes) { try (ThreadContextClassLoader ignored = new ThreadContextClassLoader(classLoader)) { return delegate.getBucketNodeMap(transactionHandle, session, partitioningHandle, sortedNodes); diff --git a/presto-spi/src/main/java/com/facebook/presto/spi/plan/TableWriterNode.java b/presto-spi/src/main/java/com/facebook/presto/spi/plan/TableWriterNode.java index 1354da343998d..e1803582f7677 100644 --- a/presto-spi/src/main/java/com/facebook/presto/spi/plan/TableWriterNode.java +++ b/presto-spi/src/main/java/com/facebook/presto/spi/plan/TableWriterNode.java @@ -14,13 +14,16 @@ package com.facebook.presto.spi.plan; import com.facebook.presto.common.QualifiedObjectName; +import com.facebook.presto.common.type.Type; import com.facebook.presto.spi.ColumnHandle; import com.facebook.presto.spi.ConnectorId; import com.facebook.presto.spi.ConnectorTableMetadata; +import com.facebook.presto.spi.MergeHandle; import com.facebook.presto.spi.NewTableLayout; import com.facebook.presto.spi.SchemaTableName; import com.facebook.presto.spi.SourceLocation; import com.facebook.presto.spi.TableHandle; +import com.facebook.presto.spi.connector.RowChangeParadigm; import com.facebook.presto.spi.eventlistener.OutputColumnMetadata; import com.facebook.presto.spi.relation.VariableReferenceExpression; import com.fasterxml.jackson.annotation.JsonCreator; @@ -529,6 +532,106 @@ public String toString() } } + public static class MergeTarget + extends WriterTarget + { + private final TableHandle handle; + private final Optional mergeHandle; + private final SchemaTableName schemaTableName; + private final MergeParadigmAndTypes mergeParadigmAndTypes; + + @JsonCreator + public MergeTarget( + @JsonProperty("handle") TableHandle handle, + @JsonProperty("mergeHandle") Optional mergeHandle, + @JsonProperty("schemaTableName") SchemaTableName schemaTableName, + @JsonProperty("mergeParadigmAndTypes") MergeParadigmAndTypes mergeParadigmAndTypes) + { + this.handle = requireNonNull(handle, "handle is null"); + this.mergeHandle = requireNonNull(mergeHandle, "mergeHandle is null"); + this.schemaTableName = requireNonNull(schemaTableName, "schemaTableName is null"); + this.mergeParadigmAndTypes = requireNonNull(mergeParadigmAndTypes, "mergeElements is null"); + } + + @JsonProperty + public TableHandle getHandle() + { + return handle; + } + + @JsonProperty + public Optional getMergeHandle() + { + return mergeHandle; + } + + @JsonProperty + public SchemaTableName getSchemaTableName() + { + return schemaTableName; + } + + @JsonProperty + public MergeParadigmAndTypes getMergeParadigmAndTypes() + { + return mergeParadigmAndTypes; + } + + @Override + public ConnectorId getConnectorId() + { + return handle.getConnectorId(); + } + + @Override + public Optional> getOutputColumns() + { + return Optional.empty(); + } + + @Override + public String toString() + { + return handle.toString(); + } + } + + public static class MergeParadigmAndTypes + { + private final RowChangeParadigm paradigm; + private final List columnTypes; + private final Type targetTableRowIdColumnType; + + @JsonCreator + public MergeParadigmAndTypes( + @JsonProperty("paradigm") RowChangeParadigm paradigm, + @JsonProperty("columnTypes") List columnTypes, + @JsonProperty("targetTableRowIdColumnType") Type targetTableRowIdColumnType) + { + this.paradigm = requireNonNull(paradigm, "paradigm is null"); + this.columnTypes = requireNonNull(columnTypes, "columnTypes is null"); + this.targetTableRowIdColumnType = requireNonNull(targetTableRowIdColumnType, "targetTableRowIdColumnType is null"); + } + + @JsonProperty + public RowChangeParadigm getParadigm() + { + return paradigm; + } + + @JsonProperty + public List getColumnTypes() + { + return columnTypes; + } + + @JsonProperty + public Type getTargetTableRowIdColumnType() + { + return targetTableRowIdColumnType; + } + } + public static class CallDistributedProcedureTarget extends WriterTarget { diff --git a/presto-spi/src/test/java/com/facebook/presto/spi/connector/classloader/TestClassLoaderSafeWrappers.java b/presto-spi/src/test/java/com/facebook/presto/spi/connector/classloader/TestClassLoaderSafeWrappers.java index 2edafb43a0663..13293040ec921 100644 --- a/presto-spi/src/test/java/com/facebook/presto/spi/connector/classloader/TestClassLoaderSafeWrappers.java +++ b/presto-spi/src/test/java/com/facebook/presto/spi/connector/classloader/TestClassLoaderSafeWrappers.java @@ -13,6 +13,7 @@ */ package com.facebook.presto.spi.connector.classloader; +import com.facebook.presto.spi.ConnectorMergeSink; import com.facebook.presto.spi.ConnectorPageSink; import com.facebook.presto.spi.connector.ConnectorMetadata; import com.facebook.presto.spi.connector.ConnectorNodePartitioningProvider; @@ -34,5 +35,6 @@ public void testAllMethodsOverridden() assertAllMethodsOverridden(ConnectorPageSourceProvider.class, ClassLoaderSafeConnectorPageSourceProvider.class); assertAllMethodsOverridden(ConnectorSplitManager.class, ClassLoaderSafeConnectorSplitManager.class); assertAllMethodsOverridden(ConnectorNodePartitioningProvider.class, ClassLoaderSafeNodePartitioningProvider.class); + assertAllMethodsOverridden(ConnectorMergeSink.class, ClassLoaderSafeConnectorMergeSink.class); } } diff --git a/presto-thrift-spec/pom.xml b/presto-thrift-spec/pom.xml index e6079576f1b89..1577f0c857cce 100644 --- a/presto-thrift-spec/pom.xml +++ b/presto-thrift-spec/pom.xml @@ -60,6 +60,7 @@ com.facebook.presto.spi.ConnectorOutputTableHandle com.facebook.presto.spi.ConnectorDeleteTableHandle com.facebook.presto.spi.ConnectorInsertTableHandle + com.facebook.presto.spi.ConnectorMergeTableHandle com.facebook.presto.spi.ConnectorTableHandle com.facebook.presto.spi.ConnectorTableLayoutHandle @@ -72,6 +73,7 @@ com.facebook.presto.server.thrift.OutputTableHandleThriftCodec com.facebook.presto.server.thrift.DeleteTableHandleThriftCodec com.facebook.presto.server.thrift.InsertTableHandleThriftCodec + com.facebook.presto.server.thrift.MergeTableHandleThriftCodec com.facebook.presto.server.thrift.TableHandleThriftCodec com.facebook.presto.server.thrift.TableLayoutHandleThriftCodec com.facebook.drift.codec.utils.DurationToMillisThriftCodec diff --git a/presto-tpcds/src/main/java/com/facebook/presto/tpcds/TpcdsNodePartitioningProvider.java b/presto-tpcds/src/main/java/com/facebook/presto/tpcds/TpcdsNodePartitioningProvider.java index 8e97faedb2019..2f13f6295bb74 100644 --- a/presto-tpcds/src/main/java/com/facebook/presto/tpcds/TpcdsNodePartitioningProvider.java +++ b/presto-tpcds/src/main/java/com/facebook/presto/tpcds/TpcdsNodePartitioningProvider.java @@ -25,6 +25,7 @@ import com.facebook.presto.spi.connector.ConnectorTransactionHandle; import java.util.List; +import java.util.Optional; import java.util.Set; import java.util.function.ToIntFunction; @@ -50,13 +51,13 @@ public TpcdsNodePartitioningProvider(NodeManager nodeManager, int splitsPerNode) } @Override - public ConnectorBucketNodeMap getBucketNodeMap(ConnectorTransactionHandle transactionHandle, ConnectorSession session, ConnectorPartitioningHandle partitioningHandle, List sortedNodes) + public Optional getBucketNodeMap(ConnectorTransactionHandle transactionHandle, ConnectorSession session, ConnectorPartitioningHandle partitioningHandle, List sortedNodes) { Set nodes = nodeManager.getRequiredWorkerNodes(); checkState(!nodes.isEmpty(), "No TPCDS nodes available"); // Split the data using split and skew by the number of nodes available. - return createBucketNodeMap(toIntExact((long) nodes.size() * splitsPerNode)); + return Optional.of(createBucketNodeMap(toIntExact((long) nodes.size() * splitsPerNode))); } @Override diff --git a/presto-tpch/src/main/java/com/facebook/presto/tpch/TpchNodePartitioningProvider.java b/presto-tpch/src/main/java/com/facebook/presto/tpch/TpchNodePartitioningProvider.java index d0213c9b359bb..98e455ab66da6 100644 --- a/presto-tpch/src/main/java/com/facebook/presto/tpch/TpchNodePartitioningProvider.java +++ b/presto-tpch/src/main/java/com/facebook/presto/tpch/TpchNodePartitioningProvider.java @@ -26,6 +26,7 @@ import com.google.common.collect.ImmutableList; import java.util.List; +import java.util.Optional; import java.util.Set; import java.util.function.ToIntFunction; @@ -48,12 +49,12 @@ public TpchNodePartitioningProvider(NodeManager nodeManager, int splitsPerNode) } @Override - public ConnectorBucketNodeMap getBucketNodeMap(ConnectorTransactionHandle transactionHandle, ConnectorSession session, ConnectorPartitioningHandle partitioningHandle, List sortedNodes) + public Optional getBucketNodeMap(ConnectorTransactionHandle transactionHandle, ConnectorSession session, ConnectorPartitioningHandle partitioningHandle, List sortedNodes) { Set nodes = nodeManager.getRequiredWorkerNodes(); // Split the data using split and skew by the number of nodes available. - return createBucketNodeMap(toIntExact((long) nodes.size() * splitsPerNode)); + return Optional.of(createBucketNodeMap(toIntExact((long) nodes.size() * splitsPerNode))); } @Override diff --git a/presto-ui/src/sql-parser/SqlBase.interp b/presto-ui/src/sql-parser/SqlBase.interp index 4ebff088c2ae4..7455e554d1fe3 100644 --- a/presto-ui/src/sql-parser/SqlBase.interp +++ b/presto-ui/src/sql-parser/SqlBase.interp @@ -20,6 +20,7 @@ null 'AS' 'ASC' 'AT' +'BEFORE' 'BERNOULLI' 'BETWEEN' 'BY' @@ -36,6 +37,7 @@ null 'COMMITTED' 'CONSTRAINT' 'CREATE' +'COPARTITION' 'CROSS' 'CUBE' 'CURRENT' @@ -52,12 +54,17 @@ null 'DELETE' 'DESC' 'DESCRIBE' +'DESCRIPTOR' 'DETERMINISTIC' +'DISABLED' 'DISTINCT' 'DISTRIBUTED' 'DROP' 'ELSE' +'EMPTY' +'ENABLED' 'END' +'ENFORCED' 'ESCAPE' 'EXCEPT' 'EXCLUDING' @@ -102,6 +109,8 @@ null 'ISOLATION' 'JSON' 'JOIN' +'KEEP' +'KEY' 'LANGUAGE' 'LAST' 'LATERAL' @@ -113,7 +122,9 @@ null 'LOCALTIMESTAMP' 'LOGICAL' 'MAP' +'MATCHED' 'MATERIALIZED' +'MERGE' 'MINUTE' 'MONTH' 'NAME' @@ -145,12 +156,15 @@ null 'POSITION' 'PRECEDING' 'PREPARE' +'PRIMARY' 'PRIVILEGES' 'PROPERTIES' +'PRUNE' 'RANGE' 'READ' 'RECURSIVE' 'REFRESH' +'RELY' 'RENAME' 'REPEATABLE' 'REPLACE' @@ -203,6 +217,7 @@ null 'UNBOUNDED' 'UNCOMMITTED' 'UNION' +'UNIQUE' 'UNNEST' 'UPDATE' 'USE' @@ -273,6 +288,7 @@ ARRAY AS ASC AT +BEFORE BERNOULLI BETWEEN BY @@ -289,6 +305,7 @@ COMMIT COMMITTED CONSTRAINT CREATE +COPARTITION CROSS CUBE CURRENT @@ -305,12 +322,17 @@ DEFINER DELETE DESC DESCRIBE +DESCRIPTOR DETERMINISTIC +DISABLED DISTINCT DISTRIBUTED DROP ELSE +EMPTY +ENABLED END +ENFORCED ESCAPE EXCEPT EXCLUDING @@ -355,6 +377,8 @@ IS ISOLATION JSON JOIN +KEEP +KEY LANGUAGE LAST LATERAL @@ -366,7 +390,9 @@ LOCALTIME LOCALTIMESTAMP LOGICAL MAP +MATCHED MATERIALIZED +MERGE MINUTE MONTH NAME @@ -398,12 +424,15 @@ PARTITIONS POSITION PRECEDING PREPARE +PRIMARY PRIVILEGES PROPERTIES +PRUNE RANGE READ RECURSIVE REFRESH +RELY RENAME REPEATABLE REPLACE @@ -456,6 +485,7 @@ UESCAPE UNBOUNDED UNCOMMITTED UNION +UNIQUE UNNEST UPDATE USE @@ -563,10 +593,18 @@ intervalField normalForm types type +tableFunctionCall +tableFunctionArgument +tableArgument +tableArgumentRelation +descriptorArgument +descriptorField +copartitionTables typeParameter baseType whenClause filter +mergeCase over windowFrame frameBound @@ -578,13 +616,23 @@ callArgument privilege qualifiedName tableVersionExpression +tableVersionState grantor principal roles identifier number +constraintSpecification +namedConstraintSpecification +unnamedConstraintSpecification +constraintType +constraintQualifiers +constraintQualifier +constraintRely +constraintEnabled +constraintEnforced nonReserved atn: -[4, 1, 250, 1919, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 2, 58, 7, 58, 2, 59, 7, 59, 2, 60, 7, 60, 2, 61, 7, 61, 2, 62, 7, 62, 2, 63, 7, 63, 2, 64, 7, 64, 2, 65, 7, 65, 2, 66, 7, 66, 2, 67, 7, 67, 2, 68, 7, 68, 2, 69, 7, 69, 2, 70, 7, 70, 2, 71, 7, 71, 2, 72, 7, 72, 2, 73, 7, 73, 2, 74, 7, 74, 2, 75, 7, 75, 2, 76, 7, 76, 2, 77, 7, 77, 2, 78, 7, 78, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 181, 8, 3, 1, 3, 1, 3, 1, 3, 3, 3, 186, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 192, 8, 3, 1, 3, 1, 3, 3, 3, 196, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 210, 8, 3, 1, 3, 1, 3, 3, 3, 214, 8, 3, 1, 3, 1, 3, 3, 3, 218, 8, 3, 1, 3, 1, 3, 3, 3, 222, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 230, 8, 3, 1, 3, 1, 3, 3, 3, 234, 8, 3, 1, 3, 3, 3, 237, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 244, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 5, 3, 251, 8, 3, 10, 3, 12, 3, 254, 9, 3, 1, 3, 1, 3, 1, 3, 3, 3, 259, 8, 3, 1, 3, 1, 3, 3, 3, 263, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 269, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 276, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 285, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 294, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 305, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 312, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 322, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 329, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 337, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 345, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 353, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 5, 3, 363, 8, 3, 10, 3, 12, 3, 366, 9, 3, 1, 3, 1, 3, 1, 3, 3, 3, 371, 8, 3, 1, 3, 1, 3, 1, 3, 3, 3, 376, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 382, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 391, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 400, 8, 3, 1, 3, 1, 3, 1, 3, 3, 3, 405, 8, 3, 1, 3, 1, 3, 3, 3, 409, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 417, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 424, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 437, 8, 3, 1, 3, 3, 3, 440, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 5, 3, 448, 8, 3, 10, 3, 12, 3, 451, 9, 3, 3, 3, 453, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 460, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 469, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 475, 8, 3, 1, 3, 1, 3, 1, 3, 3, 3, 480, 8, 3, 1, 3, 1, 3, 3, 3, 484, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 5, 3, 492, 8, 3, 10, 3, 12, 3, 495, 9, 3, 3, 3, 497, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 507, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 5, 3, 518, 8, 3, 10, 3, 12, 3, 521, 9, 3, 1, 3, 1, 3, 1, 3, 3, 3, 526, 8, 3, 1, 3, 1, 3, 1, 3, 3, 3, 531, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 537, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 5, 3, 544, 8, 3, 10, 3, 12, 3, 547, 9, 3, 1, 3, 1, 3, 1, 3, 3, 3, 552, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 559, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 5, 3, 565, 8, 3, 10, 3, 12, 3, 568, 9, 3, 1, 3, 1, 3, 3, 3, 572, 8, 3, 1, 3, 1, 3, 3, 3, 576, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 584, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 590, 8, 3, 1, 3, 1, 3, 1, 3, 5, 3, 595, 8, 3, 10, 3, 12, 3, 598, 9, 3, 1, 3, 1, 3, 3, 3, 602, 8, 3, 1, 3, 1, 3, 3, 3, 606, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 616, 8, 3, 1, 3, 3, 3, 619, 8, 3, 1, 3, 1, 3, 3, 3, 623, 8, 3, 1, 3, 3, 3, 626, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 5, 3, 632, 8, 3, 10, 3, 12, 3, 635, 9, 3, 1, 3, 1, 3, 3, 3, 639, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 660, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 666, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 672, 8, 3, 3, 3, 674, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 680, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 686, 8, 3, 3, 3, 688, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 696, 8, 3, 3, 3, 698, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 717, 8, 3, 1, 3, 1, 3, 1, 3, 3, 3, 722, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 729, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 741, 8, 3, 3, 3, 743, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 751, 8, 3, 3, 3, 753, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 5, 3, 769, 8, 3, 10, 3, 12, 3, 772, 9, 3, 3, 3, 774, 8, 3, 1, 3, 1, 3, 3, 3, 778, 8, 3, 1, 3, 1, 3, 3, 3, 782, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 5, 3, 798, 8, 3, 10, 3, 12, 3, 801, 9, 3, 3, 3, 803, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 5, 3, 817, 8, 3, 10, 3, 12, 3, 820, 9, 3, 1, 3, 1, 3, 3, 3, 824, 8, 3, 3, 3, 826, 8, 3, 1, 4, 3, 4, 829, 8, 4, 1, 4, 1, 4, 1, 5, 1, 5, 3, 5, 835, 8, 5, 1, 5, 1, 5, 1, 5, 5, 5, 840, 8, 5, 10, 5, 12, 5, 843, 9, 5, 1, 6, 1, 6, 3, 6, 847, 8, 6, 1, 7, 1, 7, 1, 7, 1, 7, 3, 7, 853, 8, 7, 1, 7, 1, 7, 3, 7, 857, 8, 7, 1, 7, 1, 7, 3, 7, 861, 8, 7, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 867, 8, 8, 1, 9, 1, 9, 1, 9, 1, 9, 5, 9, 873, 8, 9, 10, 9, 12, 9, 876, 9, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 12, 5, 12, 888, 8, 12, 10, 12, 12, 12, 891, 9, 12, 1, 13, 1, 13, 1, 13, 1, 13, 3, 13, 897, 8, 13, 1, 14, 5, 14, 900, 8, 14, 10, 14, 12, 14, 903, 9, 14, 1, 15, 1, 15, 1, 16, 1, 16, 3, 16, 909, 8, 16, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 3, 18, 917, 8, 18, 1, 19, 1, 19, 3, 19, 921, 8, 19, 1, 20, 1, 20, 1, 20, 3, 20, 926, 8, 20, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 3, 21, 937, 8, 21, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 5, 23, 947, 8, 23, 10, 23, 12, 23, 950, 9, 23, 3, 23, 952, 8, 23, 1, 23, 1, 23, 1, 23, 3, 23, 957, 8, 23, 3, 23, 959, 8, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 3, 23, 968, 8, 23, 3, 23, 970, 8, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 3, 24, 978, 8, 24, 1, 24, 1, 24, 1, 24, 1, 24, 3, 24, 984, 8, 24, 1, 24, 5, 24, 987, 8, 24, 10, 24, 12, 24, 990, 9, 24, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 5, 25, 999, 8, 25, 10, 25, 12, 25, 1002, 9, 25, 1, 25, 1, 25, 1, 25, 1, 25, 3, 25, 1008, 8, 25, 1, 26, 1, 26, 3, 26, 1012, 8, 26, 1, 26, 1, 26, 3, 26, 1016, 8, 26, 1, 27, 1, 27, 3, 27, 1020, 8, 27, 1, 27, 1, 27, 1, 27, 5, 27, 1025, 8, 27, 10, 27, 12, 27, 1028, 9, 27, 1, 27, 1, 27, 1, 27, 1, 27, 5, 27, 1034, 8, 27, 10, 27, 12, 27, 1037, 9, 27, 3, 27, 1039, 8, 27, 1, 27, 1, 27, 3, 27, 1043, 8, 27, 1, 27, 1, 27, 1, 27, 3, 27, 1048, 8, 27, 1, 27, 1, 27, 3, 27, 1052, 8, 27, 1, 28, 3, 28, 1055, 8, 28, 1, 28, 1, 28, 1, 28, 5, 28, 1060, 8, 28, 10, 28, 12, 28, 1063, 9, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 5, 29, 1071, 8, 29, 10, 29, 12, 29, 1074, 9, 29, 3, 29, 1076, 8, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 5, 29, 1084, 8, 29, 10, 29, 12, 29, 1087, 9, 29, 3, 29, 1089, 8, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 5, 29, 1098, 8, 29, 10, 29, 12, 29, 1101, 9, 29, 1, 29, 1, 29, 3, 29, 1105, 8, 29, 1, 30, 1, 30, 1, 30, 1, 30, 5, 30, 1111, 8, 30, 10, 30, 12, 30, 1114, 9, 30, 3, 30, 1116, 8, 30, 1, 30, 1, 30, 3, 30, 1120, 8, 30, 1, 31, 1, 31, 3, 31, 1124, 8, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 33, 1, 33, 3, 33, 1135, 8, 33, 1, 33, 3, 33, 1138, 8, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 3, 33, 1145, 8, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 1164, 8, 34, 5, 34, 1166, 8, 34, 10, 34, 12, 34, 1169, 9, 34, 1, 35, 3, 35, 1172, 8, 35, 1, 35, 1, 35, 3, 35, 1176, 8, 35, 1, 35, 1, 35, 3, 35, 1180, 8, 35, 1, 35, 1, 35, 3, 35, 1184, 8, 35, 3, 35, 1186, 8, 35, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 5, 36, 1195, 8, 36, 10, 36, 12, 36, 1198, 9, 36, 1, 36, 1, 36, 3, 36, 1202, 8, 36, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 3, 37, 1211, 8, 37, 1, 38, 1, 38, 1, 39, 1, 39, 3, 39, 1217, 8, 39, 1, 39, 1, 39, 3, 39, 1221, 8, 39, 3, 39, 1223, 8, 39, 1, 40, 1, 40, 1, 40, 1, 40, 5, 40, 1229, 8, 40, 10, 40, 12, 40, 1232, 9, 40, 1, 40, 1, 40, 1, 41, 1, 41, 3, 41, 1238, 8, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 5, 41, 1249, 8, 41, 10, 41, 12, 41, 1252, 9, 41, 1, 41, 1, 41, 1, 41, 3, 41, 1257, 8, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 3, 41, 1268, 8, 41, 1, 42, 1, 42, 1, 43, 1, 43, 1, 43, 3, 43, 1275, 8, 43, 1, 43, 1, 43, 3, 43, 1279, 8, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 5, 43, 1287, 8, 43, 10, 43, 12, 43, 1290, 9, 43, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 3, 44, 1302, 8, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 3, 44, 1310, 8, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 5, 44, 1317, 8, 44, 10, 44, 12, 44, 1320, 9, 44, 1, 44, 1, 44, 1, 44, 3, 44, 1325, 8, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 3, 44, 1333, 8, 44, 1, 44, 1, 44, 1, 44, 1, 44, 3, 44, 1339, 8, 44, 1, 44, 1, 44, 3, 44, 1343, 8, 44, 1, 44, 1, 44, 1, 44, 3, 44, 1348, 8, 44, 1, 44, 1, 44, 1, 44, 3, 44, 1353, 8, 44, 1, 45, 1, 45, 1, 45, 1, 45, 3, 45, 1359, 8, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 5, 45, 1373, 8, 45, 10, 45, 12, 45, 1376, 9, 45, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 4, 46, 1402, 8, 46, 11, 46, 12, 46, 1403, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 5, 46, 1413, 8, 46, 10, 46, 12, 46, 1416, 9, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 3, 46, 1425, 8, 46, 1, 46, 3, 46, 1428, 8, 46, 1, 46, 1, 46, 1, 46, 3, 46, 1433, 8, 46, 1, 46, 1, 46, 1, 46, 5, 46, 1438, 8, 46, 10, 46, 12, 46, 1441, 9, 46, 3, 46, 1443, 8, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 5, 46, 1450, 8, 46, 10, 46, 12, 46, 1453, 9, 46, 3, 46, 1455, 8, 46, 1, 46, 1, 46, 3, 46, 1459, 8, 46, 1, 46, 3, 46, 1462, 8, 46, 1, 46, 3, 46, 1465, 8, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 5, 46, 1475, 8, 46, 10, 46, 12, 46, 1478, 9, 46, 3, 46, 1480, 8, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 4, 46, 1497, 8, 46, 11, 46, 12, 46, 1498, 1, 46, 1, 46, 3, 46, 1503, 8, 46, 1, 46, 1, 46, 1, 46, 1, 46, 4, 46, 1509, 8, 46, 11, 46, 12, 46, 1510, 1, 46, 1, 46, 3, 46, 1515, 8, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 5, 46, 1538, 8, 46, 10, 46, 12, 46, 1541, 9, 46, 3, 46, 1543, 8, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 3, 46, 1552, 8, 46, 1, 46, 1, 46, 1, 46, 1, 46, 3, 46, 1558, 8, 46, 1, 46, 1, 46, 1, 46, 1, 46, 3, 46, 1564, 8, 46, 1, 46, 1, 46, 1, 46, 1, 46, 3, 46, 1570, 8, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 3, 46, 1580, 8, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 3, 46, 1589, 8, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 5, 46, 1609, 8, 46, 10, 46, 12, 46, 1612, 9, 46, 3, 46, 1614, 8, 46, 1, 46, 3, 46, 1617, 8, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 5, 46, 1627, 8, 46, 10, 46, 12, 46, 1630, 9, 46, 1, 47, 1, 47, 1, 47, 1, 47, 3, 47, 1636, 8, 47, 3, 47, 1638, 8, 47, 1, 48, 1, 48, 1, 48, 1, 48, 3, 48, 1644, 8, 48, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 3, 49, 1652, 8, 49, 1, 50, 1, 50, 1, 51, 1, 51, 1, 52, 1, 52, 1, 53, 1, 53, 3, 53, 1662, 8, 53, 1, 53, 1, 53, 1, 53, 1, 53, 3, 53, 1668, 8, 53, 1, 54, 1, 54, 1, 55, 1, 55, 1, 56, 1, 56, 1, 56, 1, 56, 5, 56, 1678, 8, 56, 10, 56, 12, 56, 1681, 9, 56, 3, 56, 1683, 8, 56, 1, 56, 1, 56, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 5, 57, 1708, 8, 57, 10, 57, 12, 57, 1711, 9, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 5, 57, 1720, 8, 57, 10, 57, 12, 57, 1723, 9, 57, 1, 57, 1, 57, 3, 57, 1727, 8, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 3, 57, 1734, 8, 57, 1, 57, 1, 57, 5, 57, 1738, 8, 57, 10, 57, 12, 57, 1741, 9, 57, 1, 58, 1, 58, 3, 58, 1745, 8, 58, 1, 59, 1, 59, 1, 59, 1, 59, 3, 59, 1751, 8, 59, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 5, 62, 1771, 8, 62, 10, 62, 12, 62, 1774, 9, 62, 3, 62, 1776, 8, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 5, 62, 1783, 8, 62, 10, 62, 12, 62, 1786, 9, 62, 3, 62, 1788, 8, 62, 1, 62, 3, 62, 1791, 8, 62, 1, 62, 1, 62, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 3, 63, 1819, 8, 63, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 3, 64, 1830, 8, 64, 1, 65, 1, 65, 1, 65, 1, 65, 1, 66, 1, 66, 1, 66, 1, 66, 3, 66, 1840, 8, 66, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 3, 67, 1847, 8, 67, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 3, 68, 1856, 8, 68, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 3, 69, 1863, 8, 69, 1, 70, 1, 70, 1, 70, 1, 70, 3, 70, 1869, 8, 70, 1, 71, 1, 71, 1, 71, 5, 71, 1874, 8, 71, 10, 71, 12, 71, 1877, 9, 71, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 73, 1, 73, 1, 73, 3, 73, 1888, 8, 73, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 3, 74, 1895, 8, 74, 1, 75, 1, 75, 1, 75, 5, 75, 1900, 8, 75, 10, 75, 12, 75, 1903, 9, 75, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 3, 76, 1910, 8, 76, 1, 77, 1, 77, 1, 77, 3, 77, 1915, 8, 77, 1, 78, 1, 78, 1, 78, 0, 6, 48, 68, 86, 90, 92, 114, 79, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 0, 24, 2, 0, 26, 26, 157, 157, 2, 0, 49, 49, 97, 97, 2, 0, 74, 74, 89, 89, 2, 0, 61, 61, 90, 90, 1, 0, 166, 167, 2, 0, 12, 12, 236, 236, 2, 0, 60, 60, 203, 203, 2, 0, 19, 19, 51, 51, 2, 0, 70, 70, 104, 104, 2, 0, 12, 12, 54, 54, 2, 0, 21, 21, 183, 183, 1, 0, 227, 228, 1, 0, 229, 231, 1, 0, 221, 226, 3, 0, 12, 12, 16, 16, 178, 178, 2, 0, 67, 67, 196, 196, 5, 0, 47, 47, 86, 86, 115, 116, 170, 170, 219, 219, 1, 0, 119, 122, 2, 0, 71, 71, 144, 144, 3, 0, 81, 81, 101, 101, 190, 190, 4, 0, 55, 55, 98, 98, 112, 112, 209, 209, 2, 0, 133, 133, 218, 218, 3, 0, 184, 185, 193, 193, 212, 212, 48, 0, 10, 12, 14, 14, 16, 17, 19, 21, 24, 26, 29, 34, 39, 39, 41, 41, 45, 47, 49, 49, 51, 51, 53, 53, 55, 55, 61, 61, 64, 64, 66, 66, 68, 71, 73, 73, 76, 81, 84, 84, 86, 88, 90, 90, 92, 92, 95, 95, 97, 98, 100, 101, 103, 105, 107, 107, 109, 109, 112, 117, 119, 124, 128, 131, 133, 134, 137, 137, 139, 144, 146, 149, 151, 160, 162, 164, 166, 171, 173, 185, 187, 190, 192, 195, 197, 199, 201, 202, 205, 207, 209, 209, 211, 213, 217, 220, 2221, 0, 158, 1, 0, 0, 0, 2, 161, 1, 0, 0, 0, 4, 164, 1, 0, 0, 0, 6, 825, 1, 0, 0, 0, 8, 828, 1, 0, 0, 0, 10, 832, 1, 0, 0, 0, 12, 846, 1, 0, 0, 0, 14, 848, 1, 0, 0, 0, 16, 862, 1, 0, 0, 0, 18, 868, 1, 0, 0, 0, 20, 879, 1, 0, 0, 0, 22, 883, 1, 0, 0, 0, 24, 889, 1, 0, 0, 0, 26, 896, 1, 0, 0, 0, 28, 901, 1, 0, 0, 0, 30, 904, 1, 0, 0, 0, 32, 908, 1, 0, 0, 0, 34, 910, 1, 0, 0, 0, 36, 913, 1, 0, 0, 0, 38, 920, 1, 0, 0, 0, 40, 925, 1, 0, 0, 0, 42, 936, 1, 0, 0, 0, 44, 938, 1, 0, 0, 0, 46, 940, 1, 0, 0, 0, 48, 971, 1, 0, 0, 0, 50, 1007, 1, 0, 0, 0, 52, 1009, 1, 0, 0, 0, 54, 1017, 1, 0, 0, 0, 56, 1054, 1, 0, 0, 0, 58, 1104, 1, 0, 0, 0, 60, 1119, 1, 0, 0, 0, 62, 1121, 1, 0, 0, 0, 64, 1130, 1, 0, 0, 0, 66, 1144, 1, 0, 0, 0, 68, 1146, 1, 0, 0, 0, 70, 1185, 1, 0, 0, 0, 72, 1201, 1, 0, 0, 0, 74, 1203, 1, 0, 0, 0, 76, 1212, 1, 0, 0, 0, 78, 1214, 1, 0, 0, 0, 80, 1224, 1, 0, 0, 0, 82, 1267, 1, 0, 0, 0, 84, 1269, 1, 0, 0, 0, 86, 1278, 1, 0, 0, 0, 88, 1352, 1, 0, 0, 0, 90, 1358, 1, 0, 0, 0, 92, 1616, 1, 0, 0, 0, 94, 1637, 1, 0, 0, 0, 96, 1643, 1, 0, 0, 0, 98, 1651, 1, 0, 0, 0, 100, 1653, 1, 0, 0, 0, 102, 1655, 1, 0, 0, 0, 104, 1657, 1, 0, 0, 0, 106, 1659, 1, 0, 0, 0, 108, 1669, 1, 0, 0, 0, 110, 1671, 1, 0, 0, 0, 112, 1673, 1, 0, 0, 0, 114, 1733, 1, 0, 0, 0, 116, 1744, 1, 0, 0, 0, 118, 1750, 1, 0, 0, 0, 120, 1752, 1, 0, 0, 0, 122, 1757, 1, 0, 0, 0, 124, 1763, 1, 0, 0, 0, 126, 1818, 1, 0, 0, 0, 128, 1829, 1, 0, 0, 0, 130, 1831, 1, 0, 0, 0, 132, 1839, 1, 0, 0, 0, 134, 1846, 1, 0, 0, 0, 136, 1855, 1, 0, 0, 0, 138, 1862, 1, 0, 0, 0, 140, 1868, 1, 0, 0, 0, 142, 1870, 1, 0, 0, 0, 144, 1878, 1, 0, 0, 0, 146, 1887, 1, 0, 0, 0, 148, 1894, 1, 0, 0, 0, 150, 1896, 1, 0, 0, 0, 152, 1909, 1, 0, 0, 0, 154, 1914, 1, 0, 0, 0, 156, 1916, 1, 0, 0, 0, 158, 159, 3, 6, 3, 0, 159, 160, 5, 0, 0, 1, 160, 1, 1, 0, 0, 0, 161, 162, 3, 84, 42, 0, 162, 163, 5, 0, 0, 1, 163, 3, 1, 0, 0, 0, 164, 165, 3, 32, 16, 0, 165, 166, 5, 0, 0, 1, 166, 5, 1, 0, 0, 0, 167, 826, 3, 8, 4, 0, 168, 169, 5, 206, 0, 0, 169, 826, 3, 152, 76, 0, 170, 171, 5, 206, 0, 0, 171, 172, 3, 152, 76, 0, 172, 173, 5, 1, 0, 0, 173, 174, 3, 152, 76, 0, 174, 826, 1, 0, 0, 0, 175, 176, 5, 36, 0, 0, 176, 180, 5, 168, 0, 0, 177, 178, 5, 87, 0, 0, 178, 179, 5, 126, 0, 0, 179, 181, 5, 63, 0, 0, 180, 177, 1, 0, 0, 0, 180, 181, 1, 0, 0, 0, 181, 182, 1, 0, 0, 0, 182, 185, 3, 142, 71, 0, 183, 184, 5, 216, 0, 0, 184, 186, 3, 18, 9, 0, 185, 183, 1, 0, 0, 0, 185, 186, 1, 0, 0, 0, 186, 826, 1, 0, 0, 0, 187, 188, 5, 56, 0, 0, 188, 191, 5, 168, 0, 0, 189, 190, 5, 87, 0, 0, 190, 192, 5, 63, 0, 0, 191, 189, 1, 0, 0, 0, 191, 192, 1, 0, 0, 0, 192, 193, 1, 0, 0, 0, 193, 195, 3, 142, 71, 0, 194, 196, 7, 0, 0, 0, 195, 194, 1, 0, 0, 0, 195, 196, 1, 0, 0, 0, 196, 826, 1, 0, 0, 0, 197, 198, 5, 13, 0, 0, 198, 199, 5, 168, 0, 0, 199, 200, 3, 142, 71, 0, 200, 201, 5, 152, 0, 0, 201, 202, 5, 194, 0, 0, 202, 203, 3, 152, 76, 0, 203, 826, 1, 0, 0, 0, 204, 205, 5, 36, 0, 0, 205, 209, 5, 186, 0, 0, 206, 207, 5, 87, 0, 0, 207, 208, 5, 126, 0, 0, 208, 210, 5, 63, 0, 0, 209, 206, 1, 0, 0, 0, 209, 210, 1, 0, 0, 0, 210, 211, 1, 0, 0, 0, 211, 213, 3, 142, 71, 0, 212, 214, 3, 80, 40, 0, 213, 212, 1, 0, 0, 0, 213, 214, 1, 0, 0, 0, 214, 217, 1, 0, 0, 0, 215, 216, 5, 32, 0, 0, 216, 218, 3, 94, 47, 0, 217, 215, 1, 0, 0, 0, 217, 218, 1, 0, 0, 0, 218, 221, 1, 0, 0, 0, 219, 220, 5, 216, 0, 0, 220, 222, 3, 18, 9, 0, 221, 219, 1, 0, 0, 0, 221, 222, 1, 0, 0, 0, 222, 223, 1, 0, 0, 0, 223, 229, 5, 18, 0, 0, 224, 230, 3, 8, 4, 0, 225, 226, 5, 2, 0, 0, 226, 227, 3, 8, 4, 0, 227, 228, 5, 3, 0, 0, 228, 230, 1, 0, 0, 0, 229, 224, 1, 0, 0, 0, 229, 225, 1, 0, 0, 0, 230, 236, 1, 0, 0, 0, 231, 233, 5, 216, 0, 0, 232, 234, 5, 123, 0, 0, 233, 232, 1, 0, 0, 0, 233, 234, 1, 0, 0, 0, 234, 235, 1, 0, 0, 0, 235, 237, 5, 45, 0, 0, 236, 231, 1, 0, 0, 0, 236, 237, 1, 0, 0, 0, 237, 826, 1, 0, 0, 0, 238, 239, 5, 36, 0, 0, 239, 243, 5, 186, 0, 0, 240, 241, 5, 87, 0, 0, 241, 242, 5, 126, 0, 0, 242, 244, 5, 63, 0, 0, 243, 240, 1, 0, 0, 0, 243, 244, 1, 0, 0, 0, 244, 245, 1, 0, 0, 0, 245, 246, 3, 142, 71, 0, 246, 247, 5, 2, 0, 0, 247, 252, 3, 12, 6, 0, 248, 249, 5, 4, 0, 0, 249, 251, 3, 12, 6, 0, 250, 248, 1, 0, 0, 0, 251, 254, 1, 0, 0, 0, 252, 250, 1, 0, 0, 0, 252, 253, 1, 0, 0, 0, 253, 255, 1, 0, 0, 0, 254, 252, 1, 0, 0, 0, 255, 258, 5, 3, 0, 0, 256, 257, 5, 32, 0, 0, 257, 259, 3, 94, 47, 0, 258, 256, 1, 0, 0, 0, 258, 259, 1, 0, 0, 0, 259, 262, 1, 0, 0, 0, 260, 261, 5, 216, 0, 0, 261, 263, 3, 18, 9, 0, 262, 260, 1, 0, 0, 0, 262, 263, 1, 0, 0, 0, 263, 826, 1, 0, 0, 0, 264, 265, 5, 56, 0, 0, 265, 268, 5, 186, 0, 0, 266, 267, 5, 87, 0, 0, 267, 269, 5, 63, 0, 0, 268, 266, 1, 0, 0, 0, 268, 269, 1, 0, 0, 0, 269, 270, 1, 0, 0, 0, 270, 826, 3, 142, 71, 0, 271, 272, 5, 93, 0, 0, 272, 273, 5, 96, 0, 0, 273, 275, 3, 142, 71, 0, 274, 276, 3, 80, 40, 0, 275, 274, 1, 0, 0, 0, 275, 276, 1, 0, 0, 0, 276, 277, 1, 0, 0, 0, 277, 278, 3, 8, 4, 0, 278, 826, 1, 0, 0, 0, 279, 280, 5, 50, 0, 0, 280, 281, 5, 74, 0, 0, 281, 284, 3, 142, 71, 0, 282, 283, 5, 215, 0, 0, 283, 285, 3, 86, 43, 0, 284, 282, 1, 0, 0, 0, 284, 285, 1, 0, 0, 0, 285, 826, 1, 0, 0, 0, 286, 287, 5, 197, 0, 0, 287, 288, 5, 186, 0, 0, 288, 826, 3, 142, 71, 0, 289, 290, 5, 13, 0, 0, 290, 293, 5, 186, 0, 0, 291, 292, 5, 87, 0, 0, 292, 294, 5, 63, 0, 0, 293, 291, 1, 0, 0, 0, 293, 294, 1, 0, 0, 0, 294, 295, 1, 0, 0, 0, 295, 296, 3, 142, 71, 0, 296, 297, 5, 152, 0, 0, 297, 298, 5, 194, 0, 0, 298, 299, 3, 142, 71, 0, 299, 826, 1, 0, 0, 0, 300, 301, 5, 13, 0, 0, 301, 304, 5, 186, 0, 0, 302, 303, 5, 87, 0, 0, 303, 305, 5, 63, 0, 0, 304, 302, 1, 0, 0, 0, 304, 305, 1, 0, 0, 0, 305, 306, 1, 0, 0, 0, 306, 307, 3, 142, 71, 0, 307, 308, 5, 152, 0, 0, 308, 311, 5, 30, 0, 0, 309, 310, 5, 87, 0, 0, 310, 312, 5, 63, 0, 0, 311, 309, 1, 0, 0, 0, 311, 312, 1, 0, 0, 0, 312, 313, 1, 0, 0, 0, 313, 314, 3, 152, 76, 0, 314, 315, 5, 194, 0, 0, 315, 316, 3, 152, 76, 0, 316, 826, 1, 0, 0, 0, 317, 318, 5, 13, 0, 0, 318, 321, 5, 186, 0, 0, 319, 320, 5, 87, 0, 0, 320, 322, 5, 63, 0, 0, 321, 319, 1, 0, 0, 0, 321, 322, 1, 0, 0, 0, 322, 323, 1, 0, 0, 0, 323, 324, 3, 142, 71, 0, 324, 325, 5, 56, 0, 0, 325, 328, 5, 30, 0, 0, 326, 327, 5, 87, 0, 0, 327, 329, 5, 63, 0, 0, 328, 326, 1, 0, 0, 0, 328, 329, 1, 0, 0, 0, 329, 330, 1, 0, 0, 0, 330, 331, 3, 142, 71, 0, 331, 826, 1, 0, 0, 0, 332, 333, 5, 13, 0, 0, 333, 336, 5, 186, 0, 0, 334, 335, 5, 87, 0, 0, 335, 337, 5, 63, 0, 0, 336, 334, 1, 0, 0, 0, 336, 337, 1, 0, 0, 0, 337, 338, 1, 0, 0, 0, 338, 339, 3, 142, 71, 0, 339, 340, 5, 10, 0, 0, 340, 344, 5, 30, 0, 0, 341, 342, 5, 87, 0, 0, 342, 343, 5, 126, 0, 0, 343, 345, 5, 63, 0, 0, 344, 341, 1, 0, 0, 0, 344, 345, 1, 0, 0, 0, 345, 346, 1, 0, 0, 0, 346, 347, 3, 14, 7, 0, 347, 826, 1, 0, 0, 0, 348, 349, 5, 14, 0, 0, 349, 352, 3, 142, 71, 0, 350, 351, 5, 216, 0, 0, 351, 353, 3, 18, 9, 0, 352, 350, 1, 0, 0, 0, 352, 353, 1, 0, 0, 0, 353, 826, 1, 0, 0, 0, 354, 355, 5, 36, 0, 0, 355, 356, 5, 199, 0, 0, 356, 357, 3, 142, 71, 0, 357, 370, 5, 18, 0, 0, 358, 359, 5, 2, 0, 0, 359, 364, 3, 22, 11, 0, 360, 361, 5, 4, 0, 0, 361, 363, 3, 22, 11, 0, 362, 360, 1, 0, 0, 0, 363, 366, 1, 0, 0, 0, 364, 362, 1, 0, 0, 0, 364, 365, 1, 0, 0, 0, 365, 367, 1, 0, 0, 0, 366, 364, 1, 0, 0, 0, 367, 368, 5, 3, 0, 0, 368, 371, 1, 0, 0, 0, 369, 371, 3, 114, 57, 0, 370, 358, 1, 0, 0, 0, 370, 369, 1, 0, 0, 0, 371, 826, 1, 0, 0, 0, 372, 375, 5, 36, 0, 0, 373, 374, 5, 135, 0, 0, 374, 376, 5, 154, 0, 0, 375, 373, 1, 0, 0, 0, 375, 376, 1, 0, 0, 0, 376, 377, 1, 0, 0, 0, 377, 378, 5, 213, 0, 0, 378, 381, 3, 142, 71, 0, 379, 380, 5, 171, 0, 0, 380, 382, 7, 1, 0, 0, 381, 379, 1, 0, 0, 0, 381, 382, 1, 0, 0, 0, 382, 383, 1, 0, 0, 0, 383, 384, 5, 18, 0, 0, 384, 385, 3, 8, 4, 0, 385, 826, 1, 0, 0, 0, 386, 387, 5, 56, 0, 0, 387, 390, 5, 213, 0, 0, 388, 389, 5, 87, 0, 0, 389, 391, 5, 63, 0, 0, 390, 388, 1, 0, 0, 0, 390, 391, 1, 0, 0, 0, 391, 392, 1, 0, 0, 0, 392, 826, 3, 142, 71, 0, 393, 394, 5, 36, 0, 0, 394, 395, 5, 114, 0, 0, 395, 399, 5, 213, 0, 0, 396, 397, 5, 87, 0, 0, 397, 398, 5, 126, 0, 0, 398, 400, 5, 63, 0, 0, 399, 396, 1, 0, 0, 0, 399, 400, 1, 0, 0, 0, 400, 401, 1, 0, 0, 0, 401, 404, 3, 142, 71, 0, 402, 403, 5, 32, 0, 0, 403, 405, 3, 94, 47, 0, 404, 402, 1, 0, 0, 0, 404, 405, 1, 0, 0, 0, 405, 408, 1, 0, 0, 0, 406, 407, 5, 216, 0, 0, 407, 409, 3, 18, 9, 0, 408, 406, 1, 0, 0, 0, 408, 409, 1, 0, 0, 0, 409, 410, 1, 0, 0, 0, 410, 416, 5, 18, 0, 0, 411, 417, 3, 8, 4, 0, 412, 413, 5, 2, 0, 0, 413, 414, 3, 8, 4, 0, 414, 415, 5, 3, 0, 0, 415, 417, 1, 0, 0, 0, 416, 411, 1, 0, 0, 0, 416, 412, 1, 0, 0, 0, 417, 826, 1, 0, 0, 0, 418, 419, 5, 56, 0, 0, 419, 420, 5, 114, 0, 0, 420, 423, 5, 213, 0, 0, 421, 422, 5, 87, 0, 0, 422, 424, 5, 63, 0, 0, 423, 421, 1, 0, 0, 0, 423, 424, 1, 0, 0, 0, 424, 425, 1, 0, 0, 0, 425, 826, 3, 142, 71, 0, 426, 427, 5, 151, 0, 0, 427, 428, 5, 114, 0, 0, 428, 429, 5, 213, 0, 0, 429, 430, 3, 142, 71, 0, 430, 431, 5, 215, 0, 0, 431, 432, 3, 86, 43, 0, 432, 826, 1, 0, 0, 0, 433, 436, 5, 36, 0, 0, 434, 435, 5, 135, 0, 0, 435, 437, 5, 154, 0, 0, 436, 434, 1, 0, 0, 0, 436, 437, 1, 0, 0, 0, 437, 439, 1, 0, 0, 0, 438, 440, 5, 189, 0, 0, 439, 438, 1, 0, 0, 0, 439, 440, 1, 0, 0, 0, 440, 441, 1, 0, 0, 0, 441, 442, 5, 76, 0, 0, 442, 443, 3, 142, 71, 0, 443, 452, 5, 2, 0, 0, 444, 449, 3, 22, 11, 0, 445, 446, 5, 4, 0, 0, 446, 448, 3, 22, 11, 0, 447, 445, 1, 0, 0, 0, 448, 451, 1, 0, 0, 0, 449, 447, 1, 0, 0, 0, 449, 450, 1, 0, 0, 0, 450, 453, 1, 0, 0, 0, 451, 449, 1, 0, 0, 0, 452, 444, 1, 0, 0, 0, 452, 453, 1, 0, 0, 0, 453, 454, 1, 0, 0, 0, 454, 455, 5, 3, 0, 0, 455, 456, 5, 159, 0, 0, 456, 459, 3, 114, 57, 0, 457, 458, 5, 32, 0, 0, 458, 460, 3, 94, 47, 0, 459, 457, 1, 0, 0, 0, 459, 460, 1, 0, 0, 0, 460, 461, 1, 0, 0, 0, 461, 462, 3, 24, 12, 0, 462, 463, 3, 32, 16, 0, 463, 826, 1, 0, 0, 0, 464, 465, 5, 13, 0, 0, 465, 466, 5, 76, 0, 0, 466, 468, 3, 142, 71, 0, 467, 469, 3, 112, 56, 0, 468, 467, 1, 0, 0, 0, 468, 469, 1, 0, 0, 0, 469, 470, 1, 0, 0, 0, 470, 471, 3, 28, 14, 0, 471, 826, 1, 0, 0, 0, 472, 474, 5, 56, 0, 0, 473, 475, 5, 189, 0, 0, 474, 473, 1, 0, 0, 0, 474, 475, 1, 0, 0, 0, 475, 476, 1, 0, 0, 0, 476, 479, 5, 76, 0, 0, 477, 478, 5, 87, 0, 0, 478, 480, 5, 63, 0, 0, 479, 477, 1, 0, 0, 0, 479, 480, 1, 0, 0, 0, 480, 481, 1, 0, 0, 0, 481, 483, 3, 142, 71, 0, 482, 484, 3, 112, 56, 0, 483, 482, 1, 0, 0, 0, 483, 484, 1, 0, 0, 0, 484, 826, 1, 0, 0, 0, 485, 486, 5, 24, 0, 0, 486, 487, 3, 142, 71, 0, 487, 496, 5, 2, 0, 0, 488, 493, 3, 138, 69, 0, 489, 490, 5, 4, 0, 0, 490, 492, 3, 138, 69, 0, 491, 489, 1, 0, 0, 0, 492, 495, 1, 0, 0, 0, 493, 491, 1, 0, 0, 0, 493, 494, 1, 0, 0, 0, 494, 497, 1, 0, 0, 0, 495, 493, 1, 0, 0, 0, 496, 488, 1, 0, 0, 0, 496, 497, 1, 0, 0, 0, 497, 498, 1, 0, 0, 0, 498, 499, 5, 3, 0, 0, 499, 826, 1, 0, 0, 0, 500, 501, 5, 36, 0, 0, 501, 502, 5, 162, 0, 0, 502, 506, 3, 152, 76, 0, 503, 504, 5, 216, 0, 0, 504, 505, 5, 11, 0, 0, 505, 507, 3, 146, 73, 0, 506, 503, 1, 0, 0, 0, 506, 507, 1, 0, 0, 0, 507, 826, 1, 0, 0, 0, 508, 509, 5, 56, 0, 0, 509, 510, 5, 162, 0, 0, 510, 826, 3, 152, 76, 0, 511, 512, 5, 78, 0, 0, 512, 513, 3, 150, 75, 0, 513, 514, 5, 194, 0, 0, 514, 519, 3, 148, 74, 0, 515, 516, 5, 4, 0, 0, 516, 518, 3, 148, 74, 0, 517, 515, 1, 0, 0, 0, 518, 521, 1, 0, 0, 0, 519, 517, 1, 0, 0, 0, 519, 520, 1, 0, 0, 0, 520, 525, 1, 0, 0, 0, 521, 519, 1, 0, 0, 0, 522, 523, 5, 216, 0, 0, 523, 524, 5, 11, 0, 0, 524, 526, 5, 134, 0, 0, 525, 522, 1, 0, 0, 0, 525, 526, 1, 0, 0, 0, 526, 530, 1, 0, 0, 0, 527, 528, 5, 79, 0, 0, 528, 529, 5, 23, 0, 0, 529, 531, 3, 146, 73, 0, 530, 527, 1, 0, 0, 0, 530, 531, 1, 0, 0, 0, 531, 826, 1, 0, 0, 0, 532, 536, 5, 160, 0, 0, 533, 534, 5, 11, 0, 0, 534, 535, 5, 134, 0, 0, 535, 537, 5, 72, 0, 0, 536, 533, 1, 0, 0, 0, 536, 537, 1, 0, 0, 0, 537, 538, 1, 0, 0, 0, 538, 539, 3, 150, 75, 0, 539, 540, 5, 74, 0, 0, 540, 545, 3, 148, 74, 0, 541, 542, 5, 4, 0, 0, 542, 544, 3, 148, 74, 0, 543, 541, 1, 0, 0, 0, 544, 547, 1, 0, 0, 0, 545, 543, 1, 0, 0, 0, 545, 546, 1, 0, 0, 0, 546, 551, 1, 0, 0, 0, 547, 545, 1, 0, 0, 0, 548, 549, 5, 79, 0, 0, 549, 550, 5, 23, 0, 0, 550, 552, 3, 146, 73, 0, 551, 548, 1, 0, 0, 0, 551, 552, 1, 0, 0, 0, 552, 826, 1, 0, 0, 0, 553, 554, 5, 175, 0, 0, 554, 558, 5, 162, 0, 0, 555, 559, 5, 12, 0, 0, 556, 559, 5, 124, 0, 0, 557, 559, 3, 152, 76, 0, 558, 555, 1, 0, 0, 0, 558, 556, 1, 0, 0, 0, 558, 557, 1, 0, 0, 0, 559, 826, 1, 0, 0, 0, 560, 571, 5, 78, 0, 0, 561, 566, 3, 140, 70, 0, 562, 563, 5, 4, 0, 0, 563, 565, 3, 140, 70, 0, 564, 562, 1, 0, 0, 0, 565, 568, 1, 0, 0, 0, 566, 564, 1, 0, 0, 0, 566, 567, 1, 0, 0, 0, 567, 572, 1, 0, 0, 0, 568, 566, 1, 0, 0, 0, 569, 570, 5, 12, 0, 0, 570, 572, 5, 146, 0, 0, 571, 561, 1, 0, 0, 0, 571, 569, 1, 0, 0, 0, 572, 573, 1, 0, 0, 0, 573, 575, 5, 132, 0, 0, 574, 576, 5, 186, 0, 0, 575, 574, 1, 0, 0, 0, 575, 576, 1, 0, 0, 0, 576, 577, 1, 0, 0, 0, 577, 578, 3, 142, 71, 0, 578, 579, 5, 194, 0, 0, 579, 583, 3, 148, 74, 0, 580, 581, 5, 216, 0, 0, 581, 582, 5, 78, 0, 0, 582, 584, 5, 134, 0, 0, 583, 580, 1, 0, 0, 0, 583, 584, 1, 0, 0, 0, 584, 826, 1, 0, 0, 0, 585, 589, 5, 160, 0, 0, 586, 587, 5, 78, 0, 0, 587, 588, 5, 134, 0, 0, 588, 590, 5, 72, 0, 0, 589, 586, 1, 0, 0, 0, 589, 590, 1, 0, 0, 0, 590, 601, 1, 0, 0, 0, 591, 596, 3, 140, 70, 0, 592, 593, 5, 4, 0, 0, 593, 595, 3, 140, 70, 0, 594, 592, 1, 0, 0, 0, 595, 598, 1, 0, 0, 0, 596, 594, 1, 0, 0, 0, 596, 597, 1, 0, 0, 0, 597, 602, 1, 0, 0, 0, 598, 596, 1, 0, 0, 0, 599, 600, 5, 12, 0, 0, 600, 602, 5, 146, 0, 0, 601, 591, 1, 0, 0, 0, 601, 599, 1, 0, 0, 0, 602, 603, 1, 0, 0, 0, 603, 605, 5, 132, 0, 0, 604, 606, 5, 186, 0, 0, 605, 604, 1, 0, 0, 0, 605, 606, 1, 0, 0, 0, 606, 607, 1, 0, 0, 0, 607, 608, 3, 142, 71, 0, 608, 609, 5, 74, 0, 0, 609, 610, 3, 148, 74, 0, 610, 826, 1, 0, 0, 0, 611, 612, 5, 177, 0, 0, 612, 618, 5, 80, 0, 0, 613, 615, 5, 132, 0, 0, 614, 616, 5, 186, 0, 0, 615, 614, 1, 0, 0, 0, 615, 616, 1, 0, 0, 0, 616, 617, 1, 0, 0, 0, 617, 619, 3, 142, 71, 0, 618, 613, 1, 0, 0, 0, 618, 619, 1, 0, 0, 0, 619, 826, 1, 0, 0, 0, 620, 622, 5, 64, 0, 0, 621, 623, 5, 14, 0, 0, 622, 621, 1, 0, 0, 0, 622, 623, 1, 0, 0, 0, 623, 625, 1, 0, 0, 0, 624, 626, 5, 211, 0, 0, 625, 624, 1, 0, 0, 0, 625, 626, 1, 0, 0, 0, 626, 638, 1, 0, 0, 0, 627, 628, 5, 2, 0, 0, 628, 633, 3, 132, 66, 0, 629, 630, 5, 4, 0, 0, 630, 632, 3, 132, 66, 0, 631, 629, 1, 0, 0, 0, 632, 635, 1, 0, 0, 0, 633, 631, 1, 0, 0, 0, 633, 634, 1, 0, 0, 0, 634, 636, 1, 0, 0, 0, 635, 633, 1, 0, 0, 0, 636, 637, 5, 3, 0, 0, 637, 639, 1, 0, 0, 0, 638, 627, 1, 0, 0, 0, 638, 639, 1, 0, 0, 0, 639, 640, 1, 0, 0, 0, 640, 826, 3, 6, 3, 0, 641, 642, 5, 177, 0, 0, 642, 643, 5, 36, 0, 0, 643, 644, 5, 186, 0, 0, 644, 826, 3, 142, 71, 0, 645, 646, 5, 177, 0, 0, 646, 647, 5, 36, 0, 0, 647, 648, 5, 213, 0, 0, 648, 826, 3, 142, 71, 0, 649, 650, 5, 177, 0, 0, 650, 651, 5, 36, 0, 0, 651, 652, 5, 114, 0, 0, 652, 653, 5, 213, 0, 0, 653, 826, 3, 142, 71, 0, 654, 655, 5, 177, 0, 0, 655, 656, 5, 36, 0, 0, 656, 657, 5, 76, 0, 0, 657, 659, 3, 142, 71, 0, 658, 660, 3, 112, 56, 0, 659, 658, 1, 0, 0, 0, 659, 660, 1, 0, 0, 0, 660, 826, 1, 0, 0, 0, 661, 662, 5, 177, 0, 0, 662, 665, 5, 187, 0, 0, 663, 664, 7, 2, 0, 0, 664, 666, 3, 142, 71, 0, 665, 663, 1, 0, 0, 0, 665, 666, 1, 0, 0, 0, 666, 673, 1, 0, 0, 0, 667, 668, 5, 108, 0, 0, 668, 671, 3, 94, 47, 0, 669, 670, 5, 59, 0, 0, 670, 672, 3, 94, 47, 0, 671, 669, 1, 0, 0, 0, 671, 672, 1, 0, 0, 0, 672, 674, 1, 0, 0, 0, 673, 667, 1, 0, 0, 0, 673, 674, 1, 0, 0, 0, 674, 826, 1, 0, 0, 0, 675, 676, 5, 177, 0, 0, 676, 679, 5, 169, 0, 0, 677, 678, 7, 2, 0, 0, 678, 680, 3, 152, 76, 0, 679, 677, 1, 0, 0, 0, 679, 680, 1, 0, 0, 0, 680, 687, 1, 0, 0, 0, 681, 682, 5, 108, 0, 0, 682, 685, 3, 94, 47, 0, 683, 684, 5, 59, 0, 0, 684, 686, 3, 94, 47, 0, 685, 683, 1, 0, 0, 0, 685, 686, 1, 0, 0, 0, 686, 688, 1, 0, 0, 0, 687, 681, 1, 0, 0, 0, 687, 688, 1, 0, 0, 0, 688, 826, 1, 0, 0, 0, 689, 690, 5, 177, 0, 0, 690, 697, 5, 29, 0, 0, 691, 692, 5, 108, 0, 0, 692, 695, 3, 94, 47, 0, 693, 694, 5, 59, 0, 0, 694, 696, 3, 94, 47, 0, 695, 693, 1, 0, 0, 0, 695, 696, 1, 0, 0, 0, 696, 698, 1, 0, 0, 0, 697, 691, 1, 0, 0, 0, 697, 698, 1, 0, 0, 0, 698, 826, 1, 0, 0, 0, 699, 700, 5, 177, 0, 0, 700, 701, 5, 31, 0, 0, 701, 702, 7, 2, 0, 0, 702, 826, 3, 142, 71, 0, 703, 704, 5, 177, 0, 0, 704, 705, 5, 181, 0, 0, 705, 706, 5, 72, 0, 0, 706, 826, 3, 142, 71, 0, 707, 708, 5, 177, 0, 0, 708, 709, 5, 181, 0, 0, 709, 710, 5, 72, 0, 0, 710, 711, 5, 2, 0, 0, 711, 712, 3, 54, 27, 0, 712, 713, 5, 3, 0, 0, 713, 826, 1, 0, 0, 0, 714, 716, 5, 177, 0, 0, 715, 717, 5, 39, 0, 0, 716, 715, 1, 0, 0, 0, 716, 717, 1, 0, 0, 0, 717, 718, 1, 0, 0, 0, 718, 721, 5, 163, 0, 0, 719, 720, 7, 2, 0, 0, 720, 722, 3, 152, 76, 0, 721, 719, 1, 0, 0, 0, 721, 722, 1, 0, 0, 0, 722, 826, 1, 0, 0, 0, 723, 724, 5, 177, 0, 0, 724, 725, 5, 162, 0, 0, 725, 728, 5, 80, 0, 0, 726, 727, 7, 2, 0, 0, 727, 729, 3, 152, 76, 0, 728, 726, 1, 0, 0, 0, 728, 729, 1, 0, 0, 0, 729, 826, 1, 0, 0, 0, 730, 731, 5, 52, 0, 0, 731, 826, 3, 142, 71, 0, 732, 733, 5, 51, 0, 0, 733, 826, 3, 142, 71, 0, 734, 735, 5, 177, 0, 0, 735, 742, 5, 77, 0, 0, 736, 737, 5, 108, 0, 0, 737, 740, 3, 94, 47, 0, 738, 739, 5, 59, 0, 0, 739, 741, 3, 94, 47, 0, 740, 738, 1, 0, 0, 0, 740, 741, 1, 0, 0, 0, 741, 743, 1, 0, 0, 0, 742, 736, 1, 0, 0, 0, 742, 743, 1, 0, 0, 0, 743, 826, 1, 0, 0, 0, 744, 745, 5, 177, 0, 0, 745, 752, 5, 174, 0, 0, 746, 747, 5, 108, 0, 0, 747, 750, 3, 94, 47, 0, 748, 749, 5, 59, 0, 0, 749, 751, 3, 94, 47, 0, 750, 748, 1, 0, 0, 0, 750, 751, 1, 0, 0, 0, 751, 753, 1, 0, 0, 0, 752, 746, 1, 0, 0, 0, 752, 753, 1, 0, 0, 0, 753, 826, 1, 0, 0, 0, 754, 755, 5, 175, 0, 0, 755, 756, 5, 174, 0, 0, 756, 757, 3, 142, 71, 0, 757, 758, 5, 221, 0, 0, 758, 759, 3, 84, 42, 0, 759, 826, 1, 0, 0, 0, 760, 761, 5, 155, 0, 0, 761, 762, 5, 174, 0, 0, 762, 826, 3, 142, 71, 0, 763, 764, 5, 180, 0, 0, 764, 773, 5, 195, 0, 0, 765, 770, 3, 134, 67, 0, 766, 767, 5, 4, 0, 0, 767, 769, 3, 134, 67, 0, 768, 766, 1, 0, 0, 0, 769, 772, 1, 0, 0, 0, 770, 768, 1, 0, 0, 0, 770, 771, 1, 0, 0, 0, 771, 774, 1, 0, 0, 0, 772, 770, 1, 0, 0, 0, 773, 765, 1, 0, 0, 0, 773, 774, 1, 0, 0, 0, 774, 826, 1, 0, 0, 0, 775, 777, 5, 33, 0, 0, 776, 778, 5, 217, 0, 0, 777, 776, 1, 0, 0, 0, 777, 778, 1, 0, 0, 0, 778, 826, 1, 0, 0, 0, 779, 781, 5, 164, 0, 0, 780, 782, 5, 217, 0, 0, 781, 780, 1, 0, 0, 0, 781, 782, 1, 0, 0, 0, 782, 826, 1, 0, 0, 0, 783, 784, 5, 145, 0, 0, 784, 785, 3, 152, 76, 0, 785, 786, 5, 74, 0, 0, 786, 787, 3, 6, 3, 0, 787, 826, 1, 0, 0, 0, 788, 789, 5, 48, 0, 0, 789, 790, 5, 145, 0, 0, 790, 826, 3, 152, 76, 0, 791, 792, 5, 62, 0, 0, 792, 802, 3, 152, 76, 0, 793, 794, 5, 208, 0, 0, 794, 799, 3, 84, 42, 0, 795, 796, 5, 4, 0, 0, 796, 798, 3, 84, 42, 0, 797, 795, 1, 0, 0, 0, 798, 801, 1, 0, 0, 0, 799, 797, 1, 0, 0, 0, 799, 800, 1, 0, 0, 0, 800, 803, 1, 0, 0, 0, 801, 799, 1, 0, 0, 0, 802, 793, 1, 0, 0, 0, 802, 803, 1, 0, 0, 0, 803, 826, 1, 0, 0, 0, 804, 805, 5, 52, 0, 0, 805, 806, 5, 92, 0, 0, 806, 826, 3, 152, 76, 0, 807, 808, 5, 52, 0, 0, 808, 809, 5, 139, 0, 0, 809, 826, 3, 152, 76, 0, 810, 811, 5, 205, 0, 0, 811, 812, 3, 142, 71, 0, 812, 813, 5, 175, 0, 0, 813, 818, 3, 130, 65, 0, 814, 815, 5, 4, 0, 0, 815, 817, 3, 130, 65, 0, 816, 814, 1, 0, 0, 0, 817, 820, 1, 0, 0, 0, 818, 816, 1, 0, 0, 0, 818, 819, 1, 0, 0, 0, 819, 823, 1, 0, 0, 0, 820, 818, 1, 0, 0, 0, 821, 822, 5, 215, 0, 0, 822, 824, 3, 86, 43, 0, 823, 821, 1, 0, 0, 0, 823, 824, 1, 0, 0, 0, 824, 826, 1, 0, 0, 0, 825, 167, 1, 0, 0, 0, 825, 168, 1, 0, 0, 0, 825, 170, 1, 0, 0, 0, 825, 175, 1, 0, 0, 0, 825, 187, 1, 0, 0, 0, 825, 197, 1, 0, 0, 0, 825, 204, 1, 0, 0, 0, 825, 238, 1, 0, 0, 0, 825, 264, 1, 0, 0, 0, 825, 271, 1, 0, 0, 0, 825, 279, 1, 0, 0, 0, 825, 286, 1, 0, 0, 0, 825, 289, 1, 0, 0, 0, 825, 300, 1, 0, 0, 0, 825, 317, 1, 0, 0, 0, 825, 332, 1, 0, 0, 0, 825, 348, 1, 0, 0, 0, 825, 354, 1, 0, 0, 0, 825, 372, 1, 0, 0, 0, 825, 386, 1, 0, 0, 0, 825, 393, 1, 0, 0, 0, 825, 418, 1, 0, 0, 0, 825, 426, 1, 0, 0, 0, 825, 433, 1, 0, 0, 0, 825, 464, 1, 0, 0, 0, 825, 472, 1, 0, 0, 0, 825, 485, 1, 0, 0, 0, 825, 500, 1, 0, 0, 0, 825, 508, 1, 0, 0, 0, 825, 511, 1, 0, 0, 0, 825, 532, 1, 0, 0, 0, 825, 553, 1, 0, 0, 0, 825, 560, 1, 0, 0, 0, 825, 585, 1, 0, 0, 0, 825, 611, 1, 0, 0, 0, 825, 620, 1, 0, 0, 0, 825, 641, 1, 0, 0, 0, 825, 645, 1, 0, 0, 0, 825, 649, 1, 0, 0, 0, 825, 654, 1, 0, 0, 0, 825, 661, 1, 0, 0, 0, 825, 675, 1, 0, 0, 0, 825, 689, 1, 0, 0, 0, 825, 699, 1, 0, 0, 0, 825, 703, 1, 0, 0, 0, 825, 707, 1, 0, 0, 0, 825, 714, 1, 0, 0, 0, 825, 723, 1, 0, 0, 0, 825, 730, 1, 0, 0, 0, 825, 732, 1, 0, 0, 0, 825, 734, 1, 0, 0, 0, 825, 744, 1, 0, 0, 0, 825, 754, 1, 0, 0, 0, 825, 760, 1, 0, 0, 0, 825, 763, 1, 0, 0, 0, 825, 775, 1, 0, 0, 0, 825, 779, 1, 0, 0, 0, 825, 783, 1, 0, 0, 0, 825, 788, 1, 0, 0, 0, 825, 791, 1, 0, 0, 0, 825, 804, 1, 0, 0, 0, 825, 807, 1, 0, 0, 0, 825, 810, 1, 0, 0, 0, 826, 7, 1, 0, 0, 0, 827, 829, 3, 10, 5, 0, 828, 827, 1, 0, 0, 0, 828, 829, 1, 0, 0, 0, 829, 830, 1, 0, 0, 0, 830, 831, 3, 46, 23, 0, 831, 9, 1, 0, 0, 0, 832, 834, 5, 216, 0, 0, 833, 835, 5, 150, 0, 0, 834, 833, 1, 0, 0, 0, 834, 835, 1, 0, 0, 0, 835, 836, 1, 0, 0, 0, 836, 841, 3, 62, 31, 0, 837, 838, 5, 4, 0, 0, 838, 840, 3, 62, 31, 0, 839, 837, 1, 0, 0, 0, 840, 843, 1, 0, 0, 0, 841, 839, 1, 0, 0, 0, 841, 842, 1, 0, 0, 0, 842, 11, 1, 0, 0, 0, 843, 841, 1, 0, 0, 0, 844, 847, 3, 14, 7, 0, 845, 847, 3, 16, 8, 0, 846, 844, 1, 0, 0, 0, 846, 845, 1, 0, 0, 0, 847, 13, 1, 0, 0, 0, 848, 849, 3, 152, 76, 0, 849, 852, 3, 114, 57, 0, 850, 851, 5, 126, 0, 0, 851, 853, 5, 127, 0, 0, 852, 850, 1, 0, 0, 0, 852, 853, 1, 0, 0, 0, 853, 856, 1, 0, 0, 0, 854, 855, 5, 32, 0, 0, 855, 857, 3, 94, 47, 0, 856, 854, 1, 0, 0, 0, 856, 857, 1, 0, 0, 0, 857, 860, 1, 0, 0, 0, 858, 859, 5, 216, 0, 0, 859, 861, 3, 18, 9, 0, 860, 858, 1, 0, 0, 0, 860, 861, 1, 0, 0, 0, 861, 15, 1, 0, 0, 0, 862, 863, 5, 108, 0, 0, 863, 866, 3, 142, 71, 0, 864, 865, 7, 3, 0, 0, 865, 867, 5, 147, 0, 0, 866, 864, 1, 0, 0, 0, 866, 867, 1, 0, 0, 0, 867, 17, 1, 0, 0, 0, 868, 869, 5, 2, 0, 0, 869, 874, 3, 20, 10, 0, 870, 871, 5, 4, 0, 0, 871, 873, 3, 20, 10, 0, 872, 870, 1, 0, 0, 0, 873, 876, 1, 0, 0, 0, 874, 872, 1, 0, 0, 0, 874, 875, 1, 0, 0, 0, 875, 877, 1, 0, 0, 0, 876, 874, 1, 0, 0, 0, 877, 878, 5, 3, 0, 0, 878, 19, 1, 0, 0, 0, 879, 880, 3, 152, 76, 0, 880, 881, 5, 221, 0, 0, 881, 882, 3, 84, 42, 0, 882, 21, 1, 0, 0, 0, 883, 884, 3, 152, 76, 0, 884, 885, 3, 114, 57, 0, 885, 23, 1, 0, 0, 0, 886, 888, 3, 26, 13, 0, 887, 886, 1, 0, 0, 0, 888, 891, 1, 0, 0, 0, 889, 887, 1, 0, 0, 0, 889, 890, 1, 0, 0, 0, 890, 25, 1, 0, 0, 0, 891, 889, 1, 0, 0, 0, 892, 893, 5, 103, 0, 0, 893, 897, 3, 38, 19, 0, 894, 897, 3, 40, 20, 0, 895, 897, 3, 42, 21, 0, 896, 892, 1, 0, 0, 0, 896, 894, 1, 0, 0, 0, 896, 895, 1, 0, 0, 0, 897, 27, 1, 0, 0, 0, 898, 900, 3, 30, 15, 0, 899, 898, 1, 0, 0, 0, 900, 903, 1, 0, 0, 0, 901, 899, 1, 0, 0, 0, 901, 902, 1, 0, 0, 0, 902, 29, 1, 0, 0, 0, 903, 901, 1, 0, 0, 0, 904, 905, 3, 42, 21, 0, 905, 31, 1, 0, 0, 0, 906, 909, 3, 34, 17, 0, 907, 909, 3, 36, 18, 0, 908, 906, 1, 0, 0, 0, 908, 907, 1, 0, 0, 0, 909, 33, 1, 0, 0, 0, 910, 911, 5, 158, 0, 0, 911, 912, 3, 84, 42, 0, 912, 35, 1, 0, 0, 0, 913, 916, 5, 66, 0, 0, 914, 915, 5, 117, 0, 0, 915, 917, 3, 44, 22, 0, 916, 914, 1, 0, 0, 0, 916, 917, 1, 0, 0, 0, 917, 37, 1, 0, 0, 0, 918, 921, 5, 179, 0, 0, 919, 921, 3, 152, 76, 0, 920, 918, 1, 0, 0, 0, 920, 919, 1, 0, 0, 0, 921, 39, 1, 0, 0, 0, 922, 926, 5, 53, 0, 0, 923, 924, 5, 126, 0, 0, 924, 926, 5, 53, 0, 0, 925, 922, 1, 0, 0, 0, 925, 923, 1, 0, 0, 0, 926, 41, 1, 0, 0, 0, 927, 928, 5, 159, 0, 0, 928, 929, 5, 127, 0, 0, 929, 930, 5, 132, 0, 0, 930, 931, 5, 127, 0, 0, 931, 937, 5, 92, 0, 0, 932, 933, 5, 25, 0, 0, 933, 934, 5, 132, 0, 0, 934, 935, 5, 127, 0, 0, 935, 937, 5, 92, 0, 0, 936, 927, 1, 0, 0, 0, 936, 932, 1, 0, 0, 0, 937, 43, 1, 0, 0, 0, 938, 939, 3, 152, 76, 0, 939, 45, 1, 0, 0, 0, 940, 951, 3, 48, 24, 0, 941, 942, 5, 136, 0, 0, 942, 943, 5, 23, 0, 0, 943, 948, 3, 52, 26, 0, 944, 945, 5, 4, 0, 0, 945, 947, 3, 52, 26, 0, 946, 944, 1, 0, 0, 0, 947, 950, 1, 0, 0, 0, 948, 946, 1, 0, 0, 0, 948, 949, 1, 0, 0, 0, 949, 952, 1, 0, 0, 0, 950, 948, 1, 0, 0, 0, 951, 941, 1, 0, 0, 0, 951, 952, 1, 0, 0, 0, 952, 958, 1, 0, 0, 0, 953, 954, 5, 131, 0, 0, 954, 956, 5, 236, 0, 0, 955, 957, 7, 4, 0, 0, 956, 955, 1, 0, 0, 0, 956, 957, 1, 0, 0, 0, 957, 959, 1, 0, 0, 0, 958, 953, 1, 0, 0, 0, 958, 959, 1, 0, 0, 0, 959, 969, 1, 0, 0, 0, 960, 961, 5, 109, 0, 0, 961, 968, 7, 5, 0, 0, 962, 963, 5, 68, 0, 0, 963, 964, 5, 70, 0, 0, 964, 965, 5, 236, 0, 0, 965, 966, 5, 167, 0, 0, 966, 968, 5, 133, 0, 0, 967, 960, 1, 0, 0, 0, 967, 962, 1, 0, 0, 0, 967, 968, 1, 0, 0, 0, 968, 970, 1, 0, 0, 0, 969, 967, 1, 0, 0, 0, 969, 970, 1, 0, 0, 0, 970, 47, 1, 0, 0, 0, 971, 972, 6, 24, -1, 0, 972, 973, 3, 50, 25, 0, 973, 988, 1, 0, 0, 0, 974, 975, 10, 2, 0, 0, 975, 977, 5, 94, 0, 0, 976, 978, 3, 64, 32, 0, 977, 976, 1, 0, 0, 0, 977, 978, 1, 0, 0, 0, 978, 979, 1, 0, 0, 0, 979, 987, 3, 48, 24, 3, 980, 981, 10, 1, 0, 0, 981, 983, 7, 6, 0, 0, 982, 984, 3, 64, 32, 0, 983, 982, 1, 0, 0, 0, 983, 984, 1, 0, 0, 0, 984, 985, 1, 0, 0, 0, 985, 987, 3, 48, 24, 2, 986, 974, 1, 0, 0, 0, 986, 980, 1, 0, 0, 0, 987, 990, 1, 0, 0, 0, 988, 986, 1, 0, 0, 0, 988, 989, 1, 0, 0, 0, 989, 49, 1, 0, 0, 0, 990, 988, 1, 0, 0, 0, 991, 1008, 3, 54, 27, 0, 992, 993, 5, 186, 0, 0, 993, 1008, 3, 142, 71, 0, 994, 995, 5, 210, 0, 0, 995, 1000, 3, 84, 42, 0, 996, 997, 5, 4, 0, 0, 997, 999, 3, 84, 42, 0, 998, 996, 1, 0, 0, 0, 999, 1002, 1, 0, 0, 0, 1000, 998, 1, 0, 0, 0, 1000, 1001, 1, 0, 0, 0, 1001, 1008, 1, 0, 0, 0, 1002, 1000, 1, 0, 0, 0, 1003, 1004, 5, 2, 0, 0, 1004, 1005, 3, 46, 23, 0, 1005, 1006, 5, 3, 0, 0, 1006, 1008, 1, 0, 0, 0, 1007, 991, 1, 0, 0, 0, 1007, 992, 1, 0, 0, 0, 1007, 994, 1, 0, 0, 0, 1007, 1003, 1, 0, 0, 0, 1008, 51, 1, 0, 0, 0, 1009, 1011, 3, 84, 42, 0, 1010, 1012, 7, 7, 0, 0, 1011, 1010, 1, 0, 0, 0, 1011, 1012, 1, 0, 0, 0, 1012, 1015, 1, 0, 0, 0, 1013, 1014, 5, 129, 0, 0, 1014, 1016, 7, 8, 0, 0, 1015, 1013, 1, 0, 0, 0, 1015, 1016, 1, 0, 0, 0, 1016, 53, 1, 0, 0, 0, 1017, 1019, 5, 172, 0, 0, 1018, 1020, 3, 64, 32, 0, 1019, 1018, 1, 0, 0, 0, 1019, 1020, 1, 0, 0, 0, 1020, 1021, 1, 0, 0, 0, 1021, 1026, 3, 66, 33, 0, 1022, 1023, 5, 4, 0, 0, 1023, 1025, 3, 66, 33, 0, 1024, 1022, 1, 0, 0, 0, 1025, 1028, 1, 0, 0, 0, 1026, 1024, 1, 0, 0, 0, 1026, 1027, 1, 0, 0, 0, 1027, 1038, 1, 0, 0, 0, 1028, 1026, 1, 0, 0, 0, 1029, 1030, 5, 74, 0, 0, 1030, 1035, 3, 68, 34, 0, 1031, 1032, 5, 4, 0, 0, 1032, 1034, 3, 68, 34, 0, 1033, 1031, 1, 0, 0, 0, 1034, 1037, 1, 0, 0, 0, 1035, 1033, 1, 0, 0, 0, 1035, 1036, 1, 0, 0, 0, 1036, 1039, 1, 0, 0, 0, 1037, 1035, 1, 0, 0, 0, 1038, 1029, 1, 0, 0, 0, 1038, 1039, 1, 0, 0, 0, 1039, 1042, 1, 0, 0, 0, 1040, 1041, 5, 215, 0, 0, 1041, 1043, 3, 86, 43, 0, 1042, 1040, 1, 0, 0, 0, 1042, 1043, 1, 0, 0, 0, 1043, 1047, 1, 0, 0, 0, 1044, 1045, 5, 82, 0, 0, 1045, 1046, 5, 23, 0, 0, 1046, 1048, 3, 56, 28, 0, 1047, 1044, 1, 0, 0, 0, 1047, 1048, 1, 0, 0, 0, 1048, 1051, 1, 0, 0, 0, 1049, 1050, 5, 85, 0, 0, 1050, 1052, 3, 86, 43, 0, 1051, 1049, 1, 0, 0, 0, 1051, 1052, 1, 0, 0, 0, 1052, 55, 1, 0, 0, 0, 1053, 1055, 3, 64, 32, 0, 1054, 1053, 1, 0, 0, 0, 1054, 1055, 1, 0, 0, 0, 1055, 1056, 1, 0, 0, 0, 1056, 1061, 3, 58, 29, 0, 1057, 1058, 5, 4, 0, 0, 1058, 1060, 3, 58, 29, 0, 1059, 1057, 1, 0, 0, 0, 1060, 1063, 1, 0, 0, 0, 1061, 1059, 1, 0, 0, 0, 1061, 1062, 1, 0, 0, 0, 1062, 57, 1, 0, 0, 0, 1063, 1061, 1, 0, 0, 0, 1064, 1105, 3, 60, 30, 0, 1065, 1066, 5, 165, 0, 0, 1066, 1075, 5, 2, 0, 0, 1067, 1072, 3, 84, 42, 0, 1068, 1069, 5, 4, 0, 0, 1069, 1071, 3, 84, 42, 0, 1070, 1068, 1, 0, 0, 0, 1071, 1074, 1, 0, 0, 0, 1072, 1070, 1, 0, 0, 0, 1072, 1073, 1, 0, 0, 0, 1073, 1076, 1, 0, 0, 0, 1074, 1072, 1, 0, 0, 0, 1075, 1067, 1, 0, 0, 0, 1075, 1076, 1, 0, 0, 0, 1076, 1077, 1, 0, 0, 0, 1077, 1105, 5, 3, 0, 0, 1078, 1079, 5, 38, 0, 0, 1079, 1088, 5, 2, 0, 0, 1080, 1085, 3, 84, 42, 0, 1081, 1082, 5, 4, 0, 0, 1082, 1084, 3, 84, 42, 0, 1083, 1081, 1, 0, 0, 0, 1084, 1087, 1, 0, 0, 0, 1085, 1083, 1, 0, 0, 0, 1085, 1086, 1, 0, 0, 0, 1086, 1089, 1, 0, 0, 0, 1087, 1085, 1, 0, 0, 0, 1088, 1080, 1, 0, 0, 0, 1088, 1089, 1, 0, 0, 0, 1089, 1090, 1, 0, 0, 0, 1090, 1105, 5, 3, 0, 0, 1091, 1092, 5, 83, 0, 0, 1092, 1093, 5, 176, 0, 0, 1093, 1094, 5, 2, 0, 0, 1094, 1099, 3, 60, 30, 0, 1095, 1096, 5, 4, 0, 0, 1096, 1098, 3, 60, 30, 0, 1097, 1095, 1, 0, 0, 0, 1098, 1101, 1, 0, 0, 0, 1099, 1097, 1, 0, 0, 0, 1099, 1100, 1, 0, 0, 0, 1100, 1102, 1, 0, 0, 0, 1101, 1099, 1, 0, 0, 0, 1102, 1103, 5, 3, 0, 0, 1103, 1105, 1, 0, 0, 0, 1104, 1064, 1, 0, 0, 0, 1104, 1065, 1, 0, 0, 0, 1104, 1078, 1, 0, 0, 0, 1104, 1091, 1, 0, 0, 0, 1105, 59, 1, 0, 0, 0, 1106, 1115, 5, 2, 0, 0, 1107, 1112, 3, 84, 42, 0, 1108, 1109, 5, 4, 0, 0, 1109, 1111, 3, 84, 42, 0, 1110, 1108, 1, 0, 0, 0, 1111, 1114, 1, 0, 0, 0, 1112, 1110, 1, 0, 0, 0, 1112, 1113, 1, 0, 0, 0, 1113, 1116, 1, 0, 0, 0, 1114, 1112, 1, 0, 0, 0, 1115, 1107, 1, 0, 0, 0, 1115, 1116, 1, 0, 0, 0, 1116, 1117, 1, 0, 0, 0, 1117, 1120, 5, 3, 0, 0, 1118, 1120, 3, 84, 42, 0, 1119, 1106, 1, 0, 0, 0, 1119, 1118, 1, 0, 0, 0, 1120, 61, 1, 0, 0, 0, 1121, 1123, 3, 152, 76, 0, 1122, 1124, 3, 80, 40, 0, 1123, 1122, 1, 0, 0, 0, 1123, 1124, 1, 0, 0, 0, 1124, 1125, 1, 0, 0, 0, 1125, 1126, 5, 18, 0, 0, 1126, 1127, 5, 2, 0, 0, 1127, 1128, 3, 8, 4, 0, 1128, 1129, 5, 3, 0, 0, 1129, 63, 1, 0, 0, 0, 1130, 1131, 7, 9, 0, 0, 1131, 65, 1, 0, 0, 0, 1132, 1137, 3, 84, 42, 0, 1133, 1135, 5, 18, 0, 0, 1134, 1133, 1, 0, 0, 0, 1134, 1135, 1, 0, 0, 0, 1135, 1136, 1, 0, 0, 0, 1136, 1138, 3, 152, 76, 0, 1137, 1134, 1, 0, 0, 0, 1137, 1138, 1, 0, 0, 0, 1138, 1145, 1, 0, 0, 0, 1139, 1140, 3, 142, 71, 0, 1140, 1141, 5, 1, 0, 0, 1141, 1142, 5, 229, 0, 0, 1142, 1145, 1, 0, 0, 0, 1143, 1145, 5, 229, 0, 0, 1144, 1132, 1, 0, 0, 0, 1144, 1139, 1, 0, 0, 0, 1144, 1143, 1, 0, 0, 0, 1145, 67, 1, 0, 0, 0, 1146, 1147, 6, 34, -1, 0, 1147, 1148, 3, 74, 37, 0, 1148, 1167, 1, 0, 0, 0, 1149, 1163, 10, 2, 0, 0, 1150, 1151, 5, 37, 0, 0, 1151, 1152, 5, 102, 0, 0, 1152, 1164, 3, 74, 37, 0, 1153, 1154, 3, 70, 35, 0, 1154, 1155, 5, 102, 0, 0, 1155, 1156, 3, 68, 34, 0, 1156, 1157, 3, 72, 36, 0, 1157, 1164, 1, 0, 0, 0, 1158, 1159, 5, 118, 0, 0, 1159, 1160, 3, 70, 35, 0, 1160, 1161, 5, 102, 0, 0, 1161, 1162, 3, 74, 37, 0, 1162, 1164, 1, 0, 0, 0, 1163, 1150, 1, 0, 0, 0, 1163, 1153, 1, 0, 0, 0, 1163, 1158, 1, 0, 0, 0, 1164, 1166, 1, 0, 0, 0, 1165, 1149, 1, 0, 0, 0, 1166, 1169, 1, 0, 0, 0, 1167, 1165, 1, 0, 0, 0, 1167, 1168, 1, 0, 0, 0, 1168, 69, 1, 0, 0, 0, 1169, 1167, 1, 0, 0, 0, 1170, 1172, 5, 91, 0, 0, 1171, 1170, 1, 0, 0, 0, 1171, 1172, 1, 0, 0, 0, 1172, 1186, 1, 0, 0, 0, 1173, 1175, 5, 106, 0, 0, 1174, 1176, 5, 138, 0, 0, 1175, 1174, 1, 0, 0, 0, 1175, 1176, 1, 0, 0, 0, 1176, 1186, 1, 0, 0, 0, 1177, 1179, 5, 161, 0, 0, 1178, 1180, 5, 138, 0, 0, 1179, 1178, 1, 0, 0, 0, 1179, 1180, 1, 0, 0, 0, 1180, 1186, 1, 0, 0, 0, 1181, 1183, 5, 75, 0, 0, 1182, 1184, 5, 138, 0, 0, 1183, 1182, 1, 0, 0, 0, 1183, 1184, 1, 0, 0, 0, 1184, 1186, 1, 0, 0, 0, 1185, 1171, 1, 0, 0, 0, 1185, 1173, 1, 0, 0, 0, 1185, 1177, 1, 0, 0, 0, 1185, 1181, 1, 0, 0, 0, 1186, 71, 1, 0, 0, 0, 1187, 1188, 5, 132, 0, 0, 1188, 1202, 3, 86, 43, 0, 1189, 1190, 5, 208, 0, 0, 1190, 1191, 5, 2, 0, 0, 1191, 1196, 3, 152, 76, 0, 1192, 1193, 5, 4, 0, 0, 1193, 1195, 3, 152, 76, 0, 1194, 1192, 1, 0, 0, 0, 1195, 1198, 1, 0, 0, 0, 1196, 1194, 1, 0, 0, 0, 1196, 1197, 1, 0, 0, 0, 1197, 1199, 1, 0, 0, 0, 1198, 1196, 1, 0, 0, 0, 1199, 1200, 5, 3, 0, 0, 1200, 1202, 1, 0, 0, 0, 1201, 1187, 1, 0, 0, 0, 1201, 1189, 1, 0, 0, 0, 1202, 73, 1, 0, 0, 0, 1203, 1210, 3, 78, 39, 0, 1204, 1205, 5, 188, 0, 0, 1205, 1206, 3, 76, 38, 0, 1206, 1207, 5, 2, 0, 0, 1207, 1208, 3, 84, 42, 0, 1208, 1209, 5, 3, 0, 0, 1209, 1211, 1, 0, 0, 0, 1210, 1204, 1, 0, 0, 0, 1210, 1211, 1, 0, 0, 0, 1211, 75, 1, 0, 0, 0, 1212, 1213, 7, 10, 0, 0, 1213, 77, 1, 0, 0, 0, 1214, 1222, 3, 82, 41, 0, 1215, 1217, 5, 18, 0, 0, 1216, 1215, 1, 0, 0, 0, 1216, 1217, 1, 0, 0, 0, 1217, 1218, 1, 0, 0, 0, 1218, 1220, 3, 152, 76, 0, 1219, 1221, 3, 80, 40, 0, 1220, 1219, 1, 0, 0, 0, 1220, 1221, 1, 0, 0, 0, 1221, 1223, 1, 0, 0, 0, 1222, 1216, 1, 0, 0, 0, 1222, 1223, 1, 0, 0, 0, 1223, 79, 1, 0, 0, 0, 1224, 1225, 5, 2, 0, 0, 1225, 1230, 3, 152, 76, 0, 1226, 1227, 5, 4, 0, 0, 1227, 1229, 3, 152, 76, 0, 1228, 1226, 1, 0, 0, 0, 1229, 1232, 1, 0, 0, 0, 1230, 1228, 1, 0, 0, 0, 1230, 1231, 1, 0, 0, 0, 1231, 1233, 1, 0, 0, 0, 1232, 1230, 1, 0, 0, 0, 1233, 1234, 5, 3, 0, 0, 1234, 81, 1, 0, 0, 0, 1235, 1237, 3, 142, 71, 0, 1236, 1238, 3, 144, 72, 0, 1237, 1236, 1, 0, 0, 0, 1237, 1238, 1, 0, 0, 0, 1238, 1268, 1, 0, 0, 0, 1239, 1240, 5, 2, 0, 0, 1240, 1241, 3, 8, 4, 0, 1241, 1242, 5, 3, 0, 0, 1242, 1268, 1, 0, 0, 0, 1243, 1244, 5, 204, 0, 0, 1244, 1245, 5, 2, 0, 0, 1245, 1250, 3, 84, 42, 0, 1246, 1247, 5, 4, 0, 0, 1247, 1249, 3, 84, 42, 0, 1248, 1246, 1, 0, 0, 0, 1249, 1252, 1, 0, 0, 0, 1250, 1248, 1, 0, 0, 0, 1250, 1251, 1, 0, 0, 0, 1251, 1253, 1, 0, 0, 0, 1252, 1250, 1, 0, 0, 0, 1253, 1256, 5, 3, 0, 0, 1254, 1255, 5, 216, 0, 0, 1255, 1257, 5, 137, 0, 0, 1256, 1254, 1, 0, 0, 0, 1256, 1257, 1, 0, 0, 0, 1257, 1268, 1, 0, 0, 0, 1258, 1259, 5, 105, 0, 0, 1259, 1260, 5, 2, 0, 0, 1260, 1261, 3, 8, 4, 0, 1261, 1262, 5, 3, 0, 0, 1262, 1268, 1, 0, 0, 0, 1263, 1264, 5, 2, 0, 0, 1264, 1265, 3, 68, 34, 0, 1265, 1266, 5, 3, 0, 0, 1266, 1268, 1, 0, 0, 0, 1267, 1235, 1, 0, 0, 0, 1267, 1239, 1, 0, 0, 0, 1267, 1243, 1, 0, 0, 0, 1267, 1258, 1, 0, 0, 0, 1267, 1263, 1, 0, 0, 0, 1268, 83, 1, 0, 0, 0, 1269, 1270, 3, 86, 43, 0, 1270, 85, 1, 0, 0, 0, 1271, 1272, 6, 43, -1, 0, 1272, 1274, 3, 90, 45, 0, 1273, 1275, 3, 88, 44, 0, 1274, 1273, 1, 0, 0, 0, 1274, 1275, 1, 0, 0, 0, 1275, 1279, 1, 0, 0, 0, 1276, 1277, 5, 126, 0, 0, 1277, 1279, 3, 86, 43, 3, 1278, 1271, 1, 0, 0, 0, 1278, 1276, 1, 0, 0, 0, 1279, 1288, 1, 0, 0, 0, 1280, 1281, 10, 2, 0, 0, 1281, 1282, 5, 15, 0, 0, 1282, 1287, 3, 86, 43, 3, 1283, 1284, 10, 1, 0, 0, 1284, 1285, 5, 135, 0, 0, 1285, 1287, 3, 86, 43, 2, 1286, 1280, 1, 0, 0, 0, 1286, 1283, 1, 0, 0, 0, 1287, 1290, 1, 0, 0, 0, 1288, 1286, 1, 0, 0, 0, 1288, 1289, 1, 0, 0, 0, 1289, 87, 1, 0, 0, 0, 1290, 1288, 1, 0, 0, 0, 1291, 1292, 3, 100, 50, 0, 1292, 1293, 3, 90, 45, 0, 1293, 1353, 1, 0, 0, 0, 1294, 1295, 3, 100, 50, 0, 1295, 1296, 3, 102, 51, 0, 1296, 1297, 5, 2, 0, 0, 1297, 1298, 3, 8, 4, 0, 1298, 1299, 5, 3, 0, 0, 1299, 1353, 1, 0, 0, 0, 1300, 1302, 5, 126, 0, 0, 1301, 1300, 1, 0, 0, 0, 1301, 1302, 1, 0, 0, 0, 1302, 1303, 1, 0, 0, 0, 1303, 1304, 5, 22, 0, 0, 1304, 1305, 3, 90, 45, 0, 1305, 1306, 5, 15, 0, 0, 1306, 1307, 3, 90, 45, 0, 1307, 1353, 1, 0, 0, 0, 1308, 1310, 5, 126, 0, 0, 1309, 1308, 1, 0, 0, 0, 1309, 1310, 1, 0, 0, 0, 1310, 1311, 1, 0, 0, 0, 1311, 1312, 5, 89, 0, 0, 1312, 1313, 5, 2, 0, 0, 1313, 1318, 3, 84, 42, 0, 1314, 1315, 5, 4, 0, 0, 1315, 1317, 3, 84, 42, 0, 1316, 1314, 1, 0, 0, 0, 1317, 1320, 1, 0, 0, 0, 1318, 1316, 1, 0, 0, 0, 1318, 1319, 1, 0, 0, 0, 1319, 1321, 1, 0, 0, 0, 1320, 1318, 1, 0, 0, 0, 1321, 1322, 5, 3, 0, 0, 1322, 1353, 1, 0, 0, 0, 1323, 1325, 5, 126, 0, 0, 1324, 1323, 1, 0, 0, 0, 1324, 1325, 1, 0, 0, 0, 1325, 1326, 1, 0, 0, 0, 1326, 1327, 5, 89, 0, 0, 1327, 1328, 5, 2, 0, 0, 1328, 1329, 3, 8, 4, 0, 1329, 1330, 5, 3, 0, 0, 1330, 1353, 1, 0, 0, 0, 1331, 1333, 5, 126, 0, 0, 1332, 1331, 1, 0, 0, 0, 1332, 1333, 1, 0, 0, 0, 1333, 1334, 1, 0, 0, 0, 1334, 1335, 5, 108, 0, 0, 1335, 1338, 3, 90, 45, 0, 1336, 1337, 5, 59, 0, 0, 1337, 1339, 3, 90, 45, 0, 1338, 1336, 1, 0, 0, 0, 1338, 1339, 1, 0, 0, 0, 1339, 1353, 1, 0, 0, 0, 1340, 1342, 5, 99, 0, 0, 1341, 1343, 5, 126, 0, 0, 1342, 1341, 1, 0, 0, 0, 1342, 1343, 1, 0, 0, 0, 1343, 1344, 1, 0, 0, 0, 1344, 1353, 5, 127, 0, 0, 1345, 1347, 5, 99, 0, 0, 1346, 1348, 5, 126, 0, 0, 1347, 1346, 1, 0, 0, 0, 1347, 1348, 1, 0, 0, 0, 1348, 1349, 1, 0, 0, 0, 1349, 1350, 5, 54, 0, 0, 1350, 1351, 5, 74, 0, 0, 1351, 1353, 3, 90, 45, 0, 1352, 1291, 1, 0, 0, 0, 1352, 1294, 1, 0, 0, 0, 1352, 1301, 1, 0, 0, 0, 1352, 1309, 1, 0, 0, 0, 1352, 1324, 1, 0, 0, 0, 1352, 1332, 1, 0, 0, 0, 1352, 1340, 1, 0, 0, 0, 1352, 1345, 1, 0, 0, 0, 1353, 89, 1, 0, 0, 0, 1354, 1355, 6, 45, -1, 0, 1355, 1359, 3, 92, 46, 0, 1356, 1357, 7, 11, 0, 0, 1357, 1359, 3, 90, 45, 4, 1358, 1354, 1, 0, 0, 0, 1358, 1356, 1, 0, 0, 0, 1359, 1374, 1, 0, 0, 0, 1360, 1361, 10, 3, 0, 0, 1361, 1362, 7, 12, 0, 0, 1362, 1373, 3, 90, 45, 4, 1363, 1364, 10, 2, 0, 0, 1364, 1365, 7, 11, 0, 0, 1365, 1373, 3, 90, 45, 3, 1366, 1367, 10, 1, 0, 0, 1367, 1368, 5, 232, 0, 0, 1368, 1373, 3, 90, 45, 2, 1369, 1370, 10, 5, 0, 0, 1370, 1371, 5, 20, 0, 0, 1371, 1373, 3, 98, 49, 0, 1372, 1360, 1, 0, 0, 0, 1372, 1363, 1, 0, 0, 0, 1372, 1366, 1, 0, 0, 0, 1372, 1369, 1, 0, 0, 0, 1373, 1376, 1, 0, 0, 0, 1374, 1372, 1, 0, 0, 0, 1374, 1375, 1, 0, 0, 0, 1375, 91, 1, 0, 0, 0, 1376, 1374, 1, 0, 0, 0, 1377, 1378, 6, 46, -1, 0, 1378, 1617, 5, 127, 0, 0, 1379, 1617, 3, 106, 53, 0, 1380, 1381, 3, 152, 76, 0, 1381, 1382, 3, 94, 47, 0, 1382, 1617, 1, 0, 0, 0, 1383, 1384, 5, 245, 0, 0, 1384, 1617, 3, 94, 47, 0, 1385, 1617, 3, 154, 77, 0, 1386, 1617, 3, 104, 52, 0, 1387, 1617, 3, 94, 47, 0, 1388, 1617, 5, 235, 0, 0, 1389, 1617, 5, 5, 0, 0, 1390, 1391, 5, 143, 0, 0, 1391, 1392, 5, 2, 0, 0, 1392, 1393, 3, 90, 45, 0, 1393, 1394, 5, 89, 0, 0, 1394, 1395, 3, 90, 45, 0, 1395, 1396, 5, 3, 0, 0, 1396, 1617, 1, 0, 0, 0, 1397, 1398, 5, 2, 0, 0, 1398, 1401, 3, 84, 42, 0, 1399, 1400, 5, 4, 0, 0, 1400, 1402, 3, 84, 42, 0, 1401, 1399, 1, 0, 0, 0, 1402, 1403, 1, 0, 0, 0, 1403, 1401, 1, 0, 0, 0, 1403, 1404, 1, 0, 0, 0, 1404, 1405, 1, 0, 0, 0, 1405, 1406, 5, 3, 0, 0, 1406, 1617, 1, 0, 0, 0, 1407, 1408, 5, 166, 0, 0, 1408, 1409, 5, 2, 0, 0, 1409, 1414, 3, 84, 42, 0, 1410, 1411, 5, 4, 0, 0, 1411, 1413, 3, 84, 42, 0, 1412, 1410, 1, 0, 0, 0, 1413, 1416, 1, 0, 0, 0, 1414, 1412, 1, 0, 0, 0, 1414, 1415, 1, 0, 0, 0, 1415, 1417, 1, 0, 0, 0, 1416, 1414, 1, 0, 0, 0, 1417, 1418, 5, 3, 0, 0, 1418, 1617, 1, 0, 0, 0, 1419, 1420, 3, 142, 71, 0, 1420, 1421, 5, 2, 0, 0, 1421, 1422, 5, 229, 0, 0, 1422, 1424, 5, 3, 0, 0, 1423, 1425, 3, 122, 61, 0, 1424, 1423, 1, 0, 0, 0, 1424, 1425, 1, 0, 0, 0, 1425, 1427, 1, 0, 0, 0, 1426, 1428, 3, 124, 62, 0, 1427, 1426, 1, 0, 0, 0, 1427, 1428, 1, 0, 0, 0, 1428, 1617, 1, 0, 0, 0, 1429, 1430, 3, 142, 71, 0, 1430, 1442, 5, 2, 0, 0, 1431, 1433, 3, 64, 32, 0, 1432, 1431, 1, 0, 0, 0, 1432, 1433, 1, 0, 0, 0, 1433, 1434, 1, 0, 0, 0, 1434, 1439, 3, 84, 42, 0, 1435, 1436, 5, 4, 0, 0, 1436, 1438, 3, 84, 42, 0, 1437, 1435, 1, 0, 0, 0, 1438, 1441, 1, 0, 0, 0, 1439, 1437, 1, 0, 0, 0, 1439, 1440, 1, 0, 0, 0, 1440, 1443, 1, 0, 0, 0, 1441, 1439, 1, 0, 0, 0, 1442, 1432, 1, 0, 0, 0, 1442, 1443, 1, 0, 0, 0, 1443, 1454, 1, 0, 0, 0, 1444, 1445, 5, 136, 0, 0, 1445, 1446, 5, 23, 0, 0, 1446, 1451, 3, 52, 26, 0, 1447, 1448, 5, 4, 0, 0, 1448, 1450, 3, 52, 26, 0, 1449, 1447, 1, 0, 0, 0, 1450, 1453, 1, 0, 0, 0, 1451, 1449, 1, 0, 0, 0, 1451, 1452, 1, 0, 0, 0, 1452, 1455, 1, 0, 0, 0, 1453, 1451, 1, 0, 0, 0, 1454, 1444, 1, 0, 0, 0, 1454, 1455, 1, 0, 0, 0, 1455, 1456, 1, 0, 0, 0, 1456, 1458, 5, 3, 0, 0, 1457, 1459, 3, 122, 61, 0, 1458, 1457, 1, 0, 0, 0, 1458, 1459, 1, 0, 0, 0, 1459, 1464, 1, 0, 0, 0, 1460, 1462, 3, 96, 48, 0, 1461, 1460, 1, 0, 0, 0, 1461, 1462, 1, 0, 0, 0, 1462, 1463, 1, 0, 0, 0, 1463, 1465, 3, 124, 62, 0, 1464, 1461, 1, 0, 0, 0, 1464, 1465, 1, 0, 0, 0, 1465, 1617, 1, 0, 0, 0, 1466, 1467, 3, 152, 76, 0, 1467, 1468, 5, 6, 0, 0, 1468, 1469, 3, 84, 42, 0, 1469, 1617, 1, 0, 0, 0, 1470, 1479, 5, 2, 0, 0, 1471, 1476, 3, 152, 76, 0, 1472, 1473, 5, 4, 0, 0, 1473, 1475, 3, 152, 76, 0, 1474, 1472, 1, 0, 0, 0, 1475, 1478, 1, 0, 0, 0, 1476, 1474, 1, 0, 0, 0, 1476, 1477, 1, 0, 0, 0, 1477, 1480, 1, 0, 0, 0, 1478, 1476, 1, 0, 0, 0, 1479, 1471, 1, 0, 0, 0, 1479, 1480, 1, 0, 0, 0, 1480, 1481, 1, 0, 0, 0, 1481, 1482, 5, 3, 0, 0, 1482, 1483, 5, 6, 0, 0, 1483, 1617, 3, 84, 42, 0, 1484, 1485, 5, 2, 0, 0, 1485, 1486, 3, 8, 4, 0, 1486, 1487, 5, 3, 0, 0, 1487, 1617, 1, 0, 0, 0, 1488, 1489, 5, 63, 0, 0, 1489, 1490, 5, 2, 0, 0, 1490, 1491, 3, 8, 4, 0, 1491, 1492, 5, 3, 0, 0, 1492, 1617, 1, 0, 0, 0, 1493, 1494, 5, 27, 0, 0, 1494, 1496, 3, 90, 45, 0, 1495, 1497, 3, 120, 60, 0, 1496, 1495, 1, 0, 0, 0, 1497, 1498, 1, 0, 0, 0, 1498, 1496, 1, 0, 0, 0, 1498, 1499, 1, 0, 0, 0, 1499, 1502, 1, 0, 0, 0, 1500, 1501, 5, 57, 0, 0, 1501, 1503, 3, 84, 42, 0, 1502, 1500, 1, 0, 0, 0, 1502, 1503, 1, 0, 0, 0, 1503, 1504, 1, 0, 0, 0, 1504, 1505, 5, 58, 0, 0, 1505, 1617, 1, 0, 0, 0, 1506, 1508, 5, 27, 0, 0, 1507, 1509, 3, 120, 60, 0, 1508, 1507, 1, 0, 0, 0, 1509, 1510, 1, 0, 0, 0, 1510, 1508, 1, 0, 0, 0, 1510, 1511, 1, 0, 0, 0, 1511, 1514, 1, 0, 0, 0, 1512, 1513, 5, 57, 0, 0, 1513, 1515, 3, 84, 42, 0, 1514, 1512, 1, 0, 0, 0, 1514, 1515, 1, 0, 0, 0, 1515, 1516, 1, 0, 0, 0, 1516, 1517, 5, 58, 0, 0, 1517, 1617, 1, 0, 0, 0, 1518, 1519, 5, 28, 0, 0, 1519, 1520, 5, 2, 0, 0, 1520, 1521, 3, 84, 42, 0, 1521, 1522, 5, 18, 0, 0, 1522, 1523, 3, 114, 57, 0, 1523, 1524, 5, 3, 0, 0, 1524, 1617, 1, 0, 0, 0, 1525, 1526, 5, 198, 0, 0, 1526, 1527, 5, 2, 0, 0, 1527, 1528, 3, 84, 42, 0, 1528, 1529, 5, 18, 0, 0, 1529, 1530, 3, 114, 57, 0, 1530, 1531, 5, 3, 0, 0, 1531, 1617, 1, 0, 0, 0, 1532, 1533, 5, 17, 0, 0, 1533, 1542, 5, 7, 0, 0, 1534, 1539, 3, 84, 42, 0, 1535, 1536, 5, 4, 0, 0, 1536, 1538, 3, 84, 42, 0, 1537, 1535, 1, 0, 0, 0, 1538, 1541, 1, 0, 0, 0, 1539, 1537, 1, 0, 0, 0, 1539, 1540, 1, 0, 0, 0, 1540, 1543, 1, 0, 0, 0, 1541, 1539, 1, 0, 0, 0, 1542, 1534, 1, 0, 0, 0, 1542, 1543, 1, 0, 0, 0, 1543, 1544, 1, 0, 0, 0, 1544, 1617, 5, 8, 0, 0, 1545, 1617, 3, 152, 76, 0, 1546, 1617, 5, 40, 0, 0, 1547, 1551, 5, 42, 0, 0, 1548, 1549, 5, 2, 0, 0, 1549, 1550, 5, 236, 0, 0, 1550, 1552, 5, 3, 0, 0, 1551, 1548, 1, 0, 0, 0, 1551, 1552, 1, 0, 0, 0, 1552, 1617, 1, 0, 0, 0, 1553, 1557, 5, 43, 0, 0, 1554, 1555, 5, 2, 0, 0, 1555, 1556, 5, 236, 0, 0, 1556, 1558, 5, 3, 0, 0, 1557, 1554, 1, 0, 0, 0, 1557, 1558, 1, 0, 0, 0, 1558, 1617, 1, 0, 0, 0, 1559, 1563, 5, 110, 0, 0, 1560, 1561, 5, 2, 0, 0, 1561, 1562, 5, 236, 0, 0, 1562, 1564, 5, 3, 0, 0, 1563, 1560, 1, 0, 0, 0, 1563, 1564, 1, 0, 0, 0, 1564, 1617, 1, 0, 0, 0, 1565, 1569, 5, 111, 0, 0, 1566, 1567, 5, 2, 0, 0, 1567, 1568, 5, 236, 0, 0, 1568, 1570, 5, 3, 0, 0, 1569, 1566, 1, 0, 0, 0, 1569, 1570, 1, 0, 0, 0, 1570, 1617, 1, 0, 0, 0, 1571, 1617, 5, 44, 0, 0, 1572, 1573, 5, 182, 0, 0, 1573, 1574, 5, 2, 0, 0, 1574, 1575, 3, 90, 45, 0, 1575, 1576, 5, 74, 0, 0, 1576, 1579, 3, 90, 45, 0, 1577, 1578, 5, 72, 0, 0, 1578, 1580, 3, 90, 45, 0, 1579, 1577, 1, 0, 0, 0, 1579, 1580, 1, 0, 0, 0, 1580, 1581, 1, 0, 0, 0, 1581, 1582, 5, 3, 0, 0, 1582, 1617, 1, 0, 0, 0, 1583, 1584, 5, 125, 0, 0, 1584, 1585, 5, 2, 0, 0, 1585, 1588, 3, 90, 45, 0, 1586, 1587, 5, 4, 0, 0, 1587, 1589, 3, 110, 55, 0, 1588, 1586, 1, 0, 0, 0, 1588, 1589, 1, 0, 0, 0, 1589, 1590, 1, 0, 0, 0, 1590, 1591, 5, 3, 0, 0, 1591, 1617, 1, 0, 0, 0, 1592, 1593, 5, 65, 0, 0, 1593, 1594, 5, 2, 0, 0, 1594, 1595, 3, 152, 76, 0, 1595, 1596, 5, 74, 0, 0, 1596, 1597, 3, 90, 45, 0, 1597, 1598, 5, 3, 0, 0, 1598, 1617, 1, 0, 0, 0, 1599, 1600, 5, 2, 0, 0, 1600, 1601, 3, 84, 42, 0, 1601, 1602, 5, 3, 0, 0, 1602, 1617, 1, 0, 0, 0, 1603, 1604, 5, 83, 0, 0, 1604, 1613, 5, 2, 0, 0, 1605, 1610, 3, 142, 71, 0, 1606, 1607, 5, 4, 0, 0, 1607, 1609, 3, 142, 71, 0, 1608, 1606, 1, 0, 0, 0, 1609, 1612, 1, 0, 0, 0, 1610, 1608, 1, 0, 0, 0, 1610, 1611, 1, 0, 0, 0, 1611, 1614, 1, 0, 0, 0, 1612, 1610, 1, 0, 0, 0, 1613, 1605, 1, 0, 0, 0, 1613, 1614, 1, 0, 0, 0, 1614, 1615, 1, 0, 0, 0, 1615, 1617, 5, 3, 0, 0, 1616, 1377, 1, 0, 0, 0, 1616, 1379, 1, 0, 0, 0, 1616, 1380, 1, 0, 0, 0, 1616, 1383, 1, 0, 0, 0, 1616, 1385, 1, 0, 0, 0, 1616, 1386, 1, 0, 0, 0, 1616, 1387, 1, 0, 0, 0, 1616, 1388, 1, 0, 0, 0, 1616, 1389, 1, 0, 0, 0, 1616, 1390, 1, 0, 0, 0, 1616, 1397, 1, 0, 0, 0, 1616, 1407, 1, 0, 0, 0, 1616, 1419, 1, 0, 0, 0, 1616, 1429, 1, 0, 0, 0, 1616, 1466, 1, 0, 0, 0, 1616, 1470, 1, 0, 0, 0, 1616, 1484, 1, 0, 0, 0, 1616, 1488, 1, 0, 0, 0, 1616, 1493, 1, 0, 0, 0, 1616, 1506, 1, 0, 0, 0, 1616, 1518, 1, 0, 0, 0, 1616, 1525, 1, 0, 0, 0, 1616, 1532, 1, 0, 0, 0, 1616, 1545, 1, 0, 0, 0, 1616, 1546, 1, 0, 0, 0, 1616, 1547, 1, 0, 0, 0, 1616, 1553, 1, 0, 0, 0, 1616, 1559, 1, 0, 0, 0, 1616, 1565, 1, 0, 0, 0, 1616, 1571, 1, 0, 0, 0, 1616, 1572, 1, 0, 0, 0, 1616, 1583, 1, 0, 0, 0, 1616, 1592, 1, 0, 0, 0, 1616, 1599, 1, 0, 0, 0, 1616, 1603, 1, 0, 0, 0, 1617, 1628, 1, 0, 0, 0, 1618, 1619, 10, 14, 0, 0, 1619, 1620, 5, 7, 0, 0, 1620, 1621, 3, 90, 45, 0, 1621, 1622, 5, 8, 0, 0, 1622, 1627, 1, 0, 0, 0, 1623, 1624, 10, 12, 0, 0, 1624, 1625, 5, 1, 0, 0, 1625, 1627, 3, 152, 76, 0, 1626, 1618, 1, 0, 0, 0, 1626, 1623, 1, 0, 0, 0, 1627, 1630, 1, 0, 0, 0, 1628, 1626, 1, 0, 0, 0, 1628, 1629, 1, 0, 0, 0, 1629, 93, 1, 0, 0, 0, 1630, 1628, 1, 0, 0, 0, 1631, 1638, 5, 233, 0, 0, 1632, 1635, 5, 234, 0, 0, 1633, 1634, 5, 200, 0, 0, 1634, 1636, 5, 233, 0, 0, 1635, 1633, 1, 0, 0, 0, 1635, 1636, 1, 0, 0, 0, 1636, 1638, 1, 0, 0, 0, 1637, 1631, 1, 0, 0, 0, 1637, 1632, 1, 0, 0, 0, 1638, 95, 1, 0, 0, 0, 1639, 1640, 5, 88, 0, 0, 1640, 1644, 5, 129, 0, 0, 1641, 1642, 5, 156, 0, 0, 1642, 1644, 5, 129, 0, 0, 1643, 1639, 1, 0, 0, 0, 1643, 1641, 1, 0, 0, 0, 1644, 97, 1, 0, 0, 0, 1645, 1646, 5, 192, 0, 0, 1646, 1647, 5, 220, 0, 0, 1647, 1652, 3, 106, 53, 0, 1648, 1649, 5, 192, 0, 0, 1649, 1650, 5, 220, 0, 0, 1650, 1652, 3, 94, 47, 0, 1651, 1645, 1, 0, 0, 0, 1651, 1648, 1, 0, 0, 0, 1652, 99, 1, 0, 0, 0, 1653, 1654, 7, 13, 0, 0, 1654, 101, 1, 0, 0, 0, 1655, 1656, 7, 14, 0, 0, 1656, 103, 1, 0, 0, 0, 1657, 1658, 7, 15, 0, 0, 1658, 105, 1, 0, 0, 0, 1659, 1661, 5, 95, 0, 0, 1660, 1662, 7, 11, 0, 0, 1661, 1660, 1, 0, 0, 0, 1661, 1662, 1, 0, 0, 0, 1662, 1663, 1, 0, 0, 0, 1663, 1664, 3, 94, 47, 0, 1664, 1667, 3, 108, 54, 0, 1665, 1666, 5, 194, 0, 0, 1666, 1668, 3, 108, 54, 0, 1667, 1665, 1, 0, 0, 0, 1667, 1668, 1, 0, 0, 0, 1668, 107, 1, 0, 0, 0, 1669, 1670, 7, 16, 0, 0, 1670, 109, 1, 0, 0, 0, 1671, 1672, 7, 17, 0, 0, 1672, 111, 1, 0, 0, 0, 1673, 1682, 5, 2, 0, 0, 1674, 1679, 3, 114, 57, 0, 1675, 1676, 5, 4, 0, 0, 1676, 1678, 3, 114, 57, 0, 1677, 1675, 1, 0, 0, 0, 1678, 1681, 1, 0, 0, 0, 1679, 1677, 1, 0, 0, 0, 1679, 1680, 1, 0, 0, 0, 1680, 1683, 1, 0, 0, 0, 1681, 1679, 1, 0, 0, 0, 1682, 1674, 1, 0, 0, 0, 1682, 1683, 1, 0, 0, 0, 1683, 1684, 1, 0, 0, 0, 1684, 1685, 5, 3, 0, 0, 1685, 113, 1, 0, 0, 0, 1686, 1687, 6, 57, -1, 0, 1687, 1688, 5, 17, 0, 0, 1688, 1689, 5, 223, 0, 0, 1689, 1690, 3, 114, 57, 0, 1690, 1691, 5, 225, 0, 0, 1691, 1734, 1, 0, 0, 0, 1692, 1693, 5, 113, 0, 0, 1693, 1694, 5, 223, 0, 0, 1694, 1695, 3, 114, 57, 0, 1695, 1696, 5, 4, 0, 0, 1696, 1697, 3, 114, 57, 0, 1697, 1698, 5, 225, 0, 0, 1698, 1734, 1, 0, 0, 0, 1699, 1700, 5, 166, 0, 0, 1700, 1701, 5, 2, 0, 0, 1701, 1702, 3, 152, 76, 0, 1702, 1709, 3, 114, 57, 0, 1703, 1704, 5, 4, 0, 0, 1704, 1705, 3, 152, 76, 0, 1705, 1706, 3, 114, 57, 0, 1706, 1708, 1, 0, 0, 0, 1707, 1703, 1, 0, 0, 0, 1708, 1711, 1, 0, 0, 0, 1709, 1707, 1, 0, 0, 0, 1709, 1710, 1, 0, 0, 0, 1710, 1712, 1, 0, 0, 0, 1711, 1709, 1, 0, 0, 0, 1712, 1713, 5, 3, 0, 0, 1713, 1734, 1, 0, 0, 0, 1714, 1726, 3, 118, 59, 0, 1715, 1716, 5, 2, 0, 0, 1716, 1721, 3, 116, 58, 0, 1717, 1718, 5, 4, 0, 0, 1718, 1720, 3, 116, 58, 0, 1719, 1717, 1, 0, 0, 0, 1720, 1723, 1, 0, 0, 0, 1721, 1719, 1, 0, 0, 0, 1721, 1722, 1, 0, 0, 0, 1722, 1724, 1, 0, 0, 0, 1723, 1721, 1, 0, 0, 0, 1724, 1725, 5, 3, 0, 0, 1725, 1727, 1, 0, 0, 0, 1726, 1715, 1, 0, 0, 0, 1726, 1727, 1, 0, 0, 0, 1727, 1734, 1, 0, 0, 0, 1728, 1729, 5, 95, 0, 0, 1729, 1730, 3, 108, 54, 0, 1730, 1731, 5, 194, 0, 0, 1731, 1732, 3, 108, 54, 0, 1732, 1734, 1, 0, 0, 0, 1733, 1686, 1, 0, 0, 0, 1733, 1692, 1, 0, 0, 0, 1733, 1699, 1, 0, 0, 0, 1733, 1714, 1, 0, 0, 0, 1733, 1728, 1, 0, 0, 0, 1734, 1739, 1, 0, 0, 0, 1735, 1736, 10, 6, 0, 0, 1736, 1738, 5, 17, 0, 0, 1737, 1735, 1, 0, 0, 0, 1738, 1741, 1, 0, 0, 0, 1739, 1737, 1, 0, 0, 0, 1739, 1740, 1, 0, 0, 0, 1740, 115, 1, 0, 0, 0, 1741, 1739, 1, 0, 0, 0, 1742, 1745, 5, 236, 0, 0, 1743, 1745, 3, 114, 57, 0, 1744, 1742, 1, 0, 0, 0, 1744, 1743, 1, 0, 0, 0, 1745, 117, 1, 0, 0, 0, 1746, 1751, 5, 243, 0, 0, 1747, 1751, 5, 244, 0, 0, 1748, 1751, 5, 245, 0, 0, 1749, 1751, 3, 142, 71, 0, 1750, 1746, 1, 0, 0, 0, 1750, 1747, 1, 0, 0, 0, 1750, 1748, 1, 0, 0, 0, 1750, 1749, 1, 0, 0, 0, 1751, 119, 1, 0, 0, 0, 1752, 1753, 5, 214, 0, 0, 1753, 1754, 3, 84, 42, 0, 1754, 1755, 5, 191, 0, 0, 1755, 1756, 3, 84, 42, 0, 1756, 121, 1, 0, 0, 0, 1757, 1758, 5, 69, 0, 0, 1758, 1759, 5, 2, 0, 0, 1759, 1760, 5, 215, 0, 0, 1760, 1761, 3, 86, 43, 0, 1761, 1762, 5, 3, 0, 0, 1762, 123, 1, 0, 0, 0, 1763, 1764, 5, 140, 0, 0, 1764, 1775, 5, 2, 0, 0, 1765, 1766, 5, 141, 0, 0, 1766, 1767, 5, 23, 0, 0, 1767, 1772, 3, 84, 42, 0, 1768, 1769, 5, 4, 0, 0, 1769, 1771, 3, 84, 42, 0, 1770, 1768, 1, 0, 0, 0, 1771, 1774, 1, 0, 0, 0, 1772, 1770, 1, 0, 0, 0, 1772, 1773, 1, 0, 0, 0, 1773, 1776, 1, 0, 0, 0, 1774, 1772, 1, 0, 0, 0, 1775, 1765, 1, 0, 0, 0, 1775, 1776, 1, 0, 0, 0, 1776, 1787, 1, 0, 0, 0, 1777, 1778, 5, 136, 0, 0, 1778, 1779, 5, 23, 0, 0, 1779, 1784, 3, 52, 26, 0, 1780, 1781, 5, 4, 0, 0, 1781, 1783, 3, 52, 26, 0, 1782, 1780, 1, 0, 0, 0, 1783, 1786, 1, 0, 0, 0, 1784, 1782, 1, 0, 0, 0, 1784, 1785, 1, 0, 0, 0, 1785, 1788, 1, 0, 0, 0, 1786, 1784, 1, 0, 0, 0, 1787, 1777, 1, 0, 0, 0, 1787, 1788, 1, 0, 0, 0, 1788, 1790, 1, 0, 0, 0, 1789, 1791, 3, 126, 63, 0, 1790, 1789, 1, 0, 0, 0, 1790, 1791, 1, 0, 0, 0, 1791, 1792, 1, 0, 0, 0, 1792, 1793, 5, 3, 0, 0, 1793, 125, 1, 0, 0, 0, 1794, 1795, 5, 148, 0, 0, 1795, 1819, 3, 128, 64, 0, 1796, 1797, 5, 167, 0, 0, 1797, 1819, 3, 128, 64, 0, 1798, 1799, 5, 84, 0, 0, 1799, 1819, 3, 128, 64, 0, 1800, 1801, 5, 148, 0, 0, 1801, 1802, 5, 22, 0, 0, 1802, 1803, 3, 128, 64, 0, 1803, 1804, 5, 15, 0, 0, 1804, 1805, 3, 128, 64, 0, 1805, 1819, 1, 0, 0, 0, 1806, 1807, 5, 167, 0, 0, 1807, 1808, 5, 22, 0, 0, 1808, 1809, 3, 128, 64, 0, 1809, 1810, 5, 15, 0, 0, 1810, 1811, 3, 128, 64, 0, 1811, 1819, 1, 0, 0, 0, 1812, 1813, 5, 84, 0, 0, 1813, 1814, 5, 22, 0, 0, 1814, 1815, 3, 128, 64, 0, 1815, 1816, 5, 15, 0, 0, 1816, 1817, 3, 128, 64, 0, 1817, 1819, 1, 0, 0, 0, 1818, 1794, 1, 0, 0, 0, 1818, 1796, 1, 0, 0, 0, 1818, 1798, 1, 0, 0, 0, 1818, 1800, 1, 0, 0, 0, 1818, 1806, 1, 0, 0, 0, 1818, 1812, 1, 0, 0, 0, 1819, 127, 1, 0, 0, 0, 1820, 1821, 5, 201, 0, 0, 1821, 1830, 5, 144, 0, 0, 1822, 1823, 5, 201, 0, 0, 1823, 1830, 5, 71, 0, 0, 1824, 1825, 5, 39, 0, 0, 1825, 1830, 5, 166, 0, 0, 1826, 1827, 3, 84, 42, 0, 1827, 1828, 7, 18, 0, 0, 1828, 1830, 1, 0, 0, 0, 1829, 1820, 1, 0, 0, 0, 1829, 1822, 1, 0, 0, 0, 1829, 1824, 1, 0, 0, 0, 1829, 1826, 1, 0, 0, 0, 1830, 129, 1, 0, 0, 0, 1831, 1832, 3, 152, 76, 0, 1832, 1833, 5, 221, 0, 0, 1833, 1834, 3, 84, 42, 0, 1834, 131, 1, 0, 0, 0, 1835, 1836, 5, 73, 0, 0, 1836, 1840, 7, 19, 0, 0, 1837, 1838, 5, 199, 0, 0, 1838, 1840, 7, 20, 0, 0, 1839, 1835, 1, 0, 0, 0, 1839, 1837, 1, 0, 0, 0, 1840, 133, 1, 0, 0, 0, 1841, 1842, 5, 100, 0, 0, 1842, 1843, 5, 107, 0, 0, 1843, 1847, 3, 136, 68, 0, 1844, 1845, 5, 149, 0, 0, 1845, 1847, 7, 21, 0, 0, 1846, 1841, 1, 0, 0, 0, 1846, 1844, 1, 0, 0, 0, 1847, 135, 1, 0, 0, 0, 1848, 1849, 5, 149, 0, 0, 1849, 1856, 5, 202, 0, 0, 1850, 1851, 5, 149, 0, 0, 1851, 1856, 5, 34, 0, 0, 1852, 1853, 5, 153, 0, 0, 1853, 1856, 5, 149, 0, 0, 1854, 1856, 5, 173, 0, 0, 1855, 1848, 1, 0, 0, 0, 1855, 1850, 1, 0, 0, 0, 1855, 1852, 1, 0, 0, 0, 1855, 1854, 1, 0, 0, 0, 1856, 137, 1, 0, 0, 0, 1857, 1863, 3, 84, 42, 0, 1858, 1859, 3, 152, 76, 0, 1859, 1860, 5, 9, 0, 0, 1860, 1861, 3, 84, 42, 0, 1861, 1863, 1, 0, 0, 0, 1862, 1857, 1, 0, 0, 0, 1862, 1858, 1, 0, 0, 0, 1863, 139, 1, 0, 0, 0, 1864, 1869, 5, 172, 0, 0, 1865, 1869, 5, 50, 0, 0, 1866, 1869, 5, 93, 0, 0, 1867, 1869, 3, 152, 76, 0, 1868, 1864, 1, 0, 0, 0, 1868, 1865, 1, 0, 0, 0, 1868, 1866, 1, 0, 0, 0, 1868, 1867, 1, 0, 0, 0, 1869, 141, 1, 0, 0, 0, 1870, 1875, 3, 152, 76, 0, 1871, 1872, 5, 1, 0, 0, 1872, 1874, 3, 152, 76, 0, 1873, 1871, 1, 0, 0, 0, 1874, 1877, 1, 0, 0, 0, 1875, 1873, 1, 0, 0, 0, 1875, 1876, 1, 0, 0, 0, 1876, 143, 1, 0, 0, 0, 1877, 1875, 1, 0, 0, 0, 1878, 1879, 5, 72, 0, 0, 1879, 1880, 7, 22, 0, 0, 1880, 1881, 5, 18, 0, 0, 1881, 1882, 5, 130, 0, 0, 1882, 1883, 3, 90, 45, 0, 1883, 145, 1, 0, 0, 0, 1884, 1888, 5, 44, 0, 0, 1885, 1888, 5, 41, 0, 0, 1886, 1888, 3, 148, 74, 0, 1887, 1884, 1, 0, 0, 0, 1887, 1885, 1, 0, 0, 0, 1887, 1886, 1, 0, 0, 0, 1888, 147, 1, 0, 0, 0, 1889, 1890, 5, 207, 0, 0, 1890, 1895, 3, 152, 76, 0, 1891, 1892, 5, 162, 0, 0, 1892, 1895, 3, 152, 76, 0, 1893, 1895, 3, 152, 76, 0, 1894, 1889, 1, 0, 0, 0, 1894, 1891, 1, 0, 0, 0, 1894, 1893, 1, 0, 0, 0, 1895, 149, 1, 0, 0, 0, 1896, 1901, 3, 152, 76, 0, 1897, 1898, 5, 4, 0, 0, 1898, 1900, 3, 152, 76, 0, 1899, 1897, 1, 0, 0, 0, 1900, 1903, 1, 0, 0, 0, 1901, 1899, 1, 0, 0, 0, 1901, 1902, 1, 0, 0, 0, 1902, 151, 1, 0, 0, 0, 1903, 1901, 1, 0, 0, 0, 1904, 1910, 5, 239, 0, 0, 1905, 1910, 5, 241, 0, 0, 1906, 1910, 3, 156, 78, 0, 1907, 1910, 5, 242, 0, 0, 1908, 1910, 5, 240, 0, 0, 1909, 1904, 1, 0, 0, 0, 1909, 1905, 1, 0, 0, 0, 1909, 1906, 1, 0, 0, 0, 1909, 1907, 1, 0, 0, 0, 1909, 1908, 1, 0, 0, 0, 1910, 153, 1, 0, 0, 0, 1911, 1915, 5, 237, 0, 0, 1912, 1915, 5, 238, 0, 0, 1913, 1915, 5, 236, 0, 0, 1914, 1911, 1, 0, 0, 0, 1914, 1912, 1, 0, 0, 0, 1914, 1913, 1, 0, 0, 0, 1915, 155, 1, 0, 0, 0, 1916, 1917, 7, 23, 0, 0, 1917, 157, 1, 0, 0, 0, 245, 180, 185, 191, 195, 209, 213, 217, 221, 229, 233, 236, 243, 252, 258, 262, 268, 275, 284, 293, 304, 311, 321, 328, 336, 344, 352, 364, 370, 375, 381, 390, 399, 404, 408, 416, 423, 436, 439, 449, 452, 459, 468, 474, 479, 483, 493, 496, 506, 519, 525, 530, 536, 545, 551, 558, 566, 571, 575, 583, 589, 596, 601, 605, 615, 618, 622, 625, 633, 638, 659, 665, 671, 673, 679, 685, 687, 695, 697, 716, 721, 728, 740, 742, 750, 752, 770, 773, 777, 781, 799, 802, 818, 823, 825, 828, 834, 841, 846, 852, 856, 860, 866, 874, 889, 896, 901, 908, 916, 920, 925, 936, 948, 951, 956, 958, 967, 969, 977, 983, 986, 988, 1000, 1007, 1011, 1015, 1019, 1026, 1035, 1038, 1042, 1047, 1051, 1054, 1061, 1072, 1075, 1085, 1088, 1099, 1104, 1112, 1115, 1119, 1123, 1134, 1137, 1144, 1163, 1167, 1171, 1175, 1179, 1183, 1185, 1196, 1201, 1210, 1216, 1220, 1222, 1230, 1237, 1250, 1256, 1267, 1274, 1278, 1286, 1288, 1301, 1309, 1318, 1324, 1332, 1338, 1342, 1347, 1352, 1358, 1372, 1374, 1403, 1414, 1424, 1427, 1432, 1439, 1442, 1451, 1454, 1458, 1461, 1464, 1476, 1479, 1498, 1502, 1510, 1514, 1539, 1542, 1551, 1557, 1563, 1569, 1579, 1588, 1610, 1613, 1616, 1626, 1628, 1635, 1637, 1643, 1651, 1661, 1667, 1679, 1682, 1709, 1721, 1726, 1733, 1739, 1744, 1750, 1772, 1775, 1784, 1787, 1790, 1818, 1829, 1839, 1846, 1855, 1862, 1868, 1875, 1887, 1894, 1901, 1909, 1914] \ No newline at end of file +[4, 1, 265, 2304, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 2, 58, 7, 58, 2, 59, 7, 59, 2, 60, 7, 60, 2, 61, 7, 61, 2, 62, 7, 62, 2, 63, 7, 63, 2, 64, 7, 64, 2, 65, 7, 65, 2, 66, 7, 66, 2, 67, 7, 67, 2, 68, 7, 68, 2, 69, 7, 69, 2, 70, 7, 70, 2, 71, 7, 71, 2, 72, 7, 72, 2, 73, 7, 73, 2, 74, 7, 74, 2, 75, 7, 75, 2, 76, 7, 76, 2, 77, 7, 77, 2, 78, 7, 78, 2, 79, 7, 79, 2, 80, 7, 80, 2, 81, 7, 81, 2, 82, 7, 82, 2, 83, 7, 83, 2, 84, 7, 84, 2, 85, 7, 85, 2, 86, 7, 86, 2, 87, 7, 87, 2, 88, 7, 88, 2, 89, 7, 89, 2, 90, 7, 90, 2, 91, 7, 91, 2, 92, 7, 92, 2, 93, 7, 93, 2, 94, 7, 94, 2, 95, 7, 95, 2, 96, 7, 96, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 217, 8, 3, 1, 3, 1, 3, 1, 3, 3, 3, 222, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 228, 8, 3, 1, 3, 1, 3, 3, 3, 232, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 246, 8, 3, 1, 3, 1, 3, 3, 3, 250, 8, 3, 1, 3, 1, 3, 3, 3, 254, 8, 3, 1, 3, 1, 3, 3, 3, 258, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 266, 8, 3, 1, 3, 1, 3, 3, 3, 270, 8, 3, 1, 3, 3, 3, 273, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 280, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 5, 3, 287, 8, 3, 10, 3, 12, 3, 290, 9, 3, 1, 3, 1, 3, 1, 3, 3, 3, 295, 8, 3, 1, 3, 1, 3, 3, 3, 299, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 305, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 312, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 321, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 330, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 341, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 348, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 358, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 365, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 373, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 381, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 389, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 399, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 406, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 414, 8, 3, 1, 3, 1, 3, 1, 3, 3, 3, 419, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 430, 8, 3, 1, 3, 1, 3, 1, 3, 3, 3, 435, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 446, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 457, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 5, 3, 467, 8, 3, 10, 3, 12, 3, 470, 9, 3, 1, 3, 1, 3, 1, 3, 3, 3, 475, 8, 3, 1, 3, 1, 3, 1, 3, 3, 3, 480, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 486, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 495, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 506, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 515, 8, 3, 1, 3, 1, 3, 1, 3, 3, 3, 520, 8, 3, 1, 3, 1, 3, 3, 3, 524, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 532, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 539, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 548, 8, 3, 1, 3, 1, 3, 1, 3, 3, 3, 553, 8, 3, 1, 3, 3, 3, 556, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 5, 3, 564, 8, 3, 10, 3, 12, 3, 567, 9, 3, 3, 3, 569, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 576, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 585, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 591, 8, 3, 1, 3, 1, 3, 1, 3, 3, 3, 596, 8, 3, 1, 3, 1, 3, 3, 3, 600, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 5, 3, 608, 8, 3, 10, 3, 12, 3, 611, 9, 3, 3, 3, 613, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 623, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 5, 3, 634, 8, 3, 10, 3, 12, 3, 637, 9, 3, 1, 3, 1, 3, 1, 3, 3, 3, 642, 8, 3, 1, 3, 1, 3, 1, 3, 3, 3, 647, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 653, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 5, 3, 660, 8, 3, 10, 3, 12, 3, 663, 9, 3, 1, 3, 1, 3, 1, 3, 3, 3, 668, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 675, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 5, 3, 681, 8, 3, 10, 3, 12, 3, 684, 9, 3, 1, 3, 1, 3, 3, 3, 688, 8, 3, 1, 3, 1, 3, 3, 3, 692, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 700, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 706, 8, 3, 1, 3, 1, 3, 1, 3, 5, 3, 711, 8, 3, 10, 3, 12, 3, 714, 9, 3, 1, 3, 1, 3, 3, 3, 718, 8, 3, 1, 3, 1, 3, 3, 3, 722, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 732, 8, 3, 1, 3, 3, 3, 735, 8, 3, 1, 3, 1, 3, 3, 3, 739, 8, 3, 1, 3, 3, 3, 742, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 5, 3, 748, 8, 3, 10, 3, 12, 3, 751, 9, 3, 1, 3, 1, 3, 3, 3, 755, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 780, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 786, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 792, 8, 3, 3, 3, 794, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 800, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 806, 8, 3, 3, 3, 808, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 816, 8, 3, 3, 3, 818, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 837, 8, 3, 1, 3, 1, 3, 1, 3, 3, 3, 842, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 849, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 861, 8, 3, 3, 3, 863, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 871, 8, 3, 3, 3, 873, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 5, 3, 889, 8, 3, 10, 3, 12, 3, 892, 9, 3, 3, 3, 894, 8, 3, 1, 3, 1, 3, 3, 3, 898, 8, 3, 1, 3, 1, 3, 3, 3, 902, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 5, 3, 918, 8, 3, 10, 3, 12, 3, 921, 9, 3, 3, 3, 923, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 5, 3, 937, 8, 3, 10, 3, 12, 3, 940, 9, 3, 1, 3, 1, 3, 3, 3, 944, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 950, 8, 3, 1, 3, 3, 3, 953, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 4, 3, 960, 8, 3, 11, 3, 12, 3, 961, 3, 3, 964, 8, 3, 1, 4, 3, 4, 967, 8, 4, 1, 4, 1, 4, 1, 5, 1, 5, 3, 5, 973, 8, 5, 1, 5, 1, 5, 1, 5, 5, 5, 978, 8, 5, 10, 5, 12, 5, 981, 9, 5, 1, 6, 1, 6, 1, 6, 3, 6, 986, 8, 6, 1, 7, 1, 7, 1, 7, 1, 7, 3, 7, 992, 8, 7, 1, 7, 1, 7, 3, 7, 996, 8, 7, 1, 7, 1, 7, 3, 7, 1000, 8, 7, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 1006, 8, 8, 1, 9, 1, 9, 1, 9, 1, 9, 5, 9, 1012, 8, 9, 10, 9, 12, 9, 1015, 9, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 12, 5, 12, 1027, 8, 12, 10, 12, 12, 12, 1030, 9, 12, 1, 13, 1, 13, 1, 13, 1, 13, 3, 13, 1036, 8, 13, 1, 14, 5, 14, 1039, 8, 14, 10, 14, 12, 14, 1042, 9, 14, 1, 15, 1, 15, 1, 16, 1, 16, 3, 16, 1048, 8, 16, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 3, 18, 1056, 8, 18, 1, 19, 1, 19, 3, 19, 1060, 8, 19, 1, 20, 1, 20, 1, 20, 3, 20, 1065, 8, 20, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 3, 21, 1076, 8, 21, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 5, 23, 1086, 8, 23, 10, 23, 12, 23, 1089, 9, 23, 3, 23, 1091, 8, 23, 1, 23, 1, 23, 1, 23, 3, 23, 1096, 8, 23, 3, 23, 1098, 8, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 3, 23, 1107, 8, 23, 3, 23, 1109, 8, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 3, 24, 1117, 8, 24, 1, 24, 1, 24, 1, 24, 1, 24, 3, 24, 1123, 8, 24, 1, 24, 5, 24, 1126, 8, 24, 10, 24, 12, 24, 1129, 9, 24, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 5, 25, 1138, 8, 25, 10, 25, 12, 25, 1141, 9, 25, 1, 25, 1, 25, 1, 25, 1, 25, 3, 25, 1147, 8, 25, 1, 26, 1, 26, 3, 26, 1151, 8, 26, 1, 26, 1, 26, 3, 26, 1155, 8, 26, 1, 27, 1, 27, 3, 27, 1159, 8, 27, 1, 27, 1, 27, 1, 27, 5, 27, 1164, 8, 27, 10, 27, 12, 27, 1167, 9, 27, 1, 27, 1, 27, 1, 27, 1, 27, 5, 27, 1173, 8, 27, 10, 27, 12, 27, 1176, 9, 27, 3, 27, 1178, 8, 27, 1, 27, 1, 27, 3, 27, 1182, 8, 27, 1, 27, 1, 27, 1, 27, 3, 27, 1187, 8, 27, 1, 27, 1, 27, 3, 27, 1191, 8, 27, 1, 28, 3, 28, 1194, 8, 28, 1, 28, 1, 28, 1, 28, 5, 28, 1199, 8, 28, 10, 28, 12, 28, 1202, 9, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 5, 29, 1210, 8, 29, 10, 29, 12, 29, 1213, 9, 29, 3, 29, 1215, 8, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 5, 29, 1223, 8, 29, 10, 29, 12, 29, 1226, 9, 29, 3, 29, 1228, 8, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 5, 29, 1237, 8, 29, 10, 29, 12, 29, 1240, 9, 29, 1, 29, 1, 29, 3, 29, 1244, 8, 29, 1, 30, 1, 30, 1, 30, 1, 30, 5, 30, 1250, 8, 30, 10, 30, 12, 30, 1253, 9, 30, 3, 30, 1255, 8, 30, 1, 30, 1, 30, 3, 30, 1259, 8, 30, 1, 31, 1, 31, 3, 31, 1263, 8, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 33, 1, 33, 3, 33, 1274, 8, 33, 1, 33, 3, 33, 1277, 8, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 3, 33, 1284, 8, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 1303, 8, 34, 5, 34, 1305, 8, 34, 10, 34, 12, 34, 1308, 9, 34, 1, 35, 3, 35, 1311, 8, 35, 1, 35, 1, 35, 3, 35, 1315, 8, 35, 1, 35, 1, 35, 3, 35, 1319, 8, 35, 1, 35, 1, 35, 3, 35, 1323, 8, 35, 3, 35, 1325, 8, 35, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 5, 36, 1334, 8, 36, 10, 36, 12, 36, 1337, 9, 36, 1, 36, 1, 36, 3, 36, 1341, 8, 36, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 3, 37, 1350, 8, 37, 1, 38, 1, 38, 1, 39, 1, 39, 3, 39, 1356, 8, 39, 1, 39, 1, 39, 3, 39, 1360, 8, 39, 3, 39, 1362, 8, 39, 1, 40, 1, 40, 1, 40, 1, 40, 5, 40, 1368, 8, 40, 10, 40, 12, 40, 1371, 9, 40, 1, 40, 1, 40, 1, 41, 1, 41, 3, 41, 1377, 8, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 5, 41, 1388, 8, 41, 10, 41, 12, 41, 1391, 9, 41, 1, 41, 1, 41, 1, 41, 3, 41, 1396, 8, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 3, 41, 1412, 8, 41, 1, 42, 1, 42, 1, 43, 1, 43, 1, 43, 3, 43, 1419, 8, 43, 1, 43, 1, 43, 3, 43, 1423, 8, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 5, 43, 1431, 8, 43, 10, 43, 12, 43, 1434, 9, 43, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 3, 44, 1446, 8, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 3, 44, 1454, 8, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 5, 44, 1461, 8, 44, 10, 44, 12, 44, 1464, 9, 44, 1, 44, 1, 44, 1, 44, 3, 44, 1469, 8, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 3, 44, 1477, 8, 44, 1, 44, 1, 44, 1, 44, 1, 44, 3, 44, 1483, 8, 44, 1, 44, 1, 44, 3, 44, 1487, 8, 44, 1, 44, 1, 44, 1, 44, 3, 44, 1492, 8, 44, 1, 44, 1, 44, 1, 44, 3, 44, 1497, 8, 44, 1, 45, 1, 45, 1, 45, 1, 45, 3, 45, 1503, 8, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 5, 45, 1517, 8, 45, 10, 45, 12, 45, 1520, 9, 45, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 4, 46, 1546, 8, 46, 11, 46, 12, 46, 1547, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 5, 46, 1557, 8, 46, 10, 46, 12, 46, 1560, 9, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 3, 46, 1569, 8, 46, 1, 46, 3, 46, 1572, 8, 46, 1, 46, 1, 46, 1, 46, 3, 46, 1577, 8, 46, 1, 46, 1, 46, 1, 46, 5, 46, 1582, 8, 46, 10, 46, 12, 46, 1585, 9, 46, 3, 46, 1587, 8, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 5, 46, 1594, 8, 46, 10, 46, 12, 46, 1597, 9, 46, 3, 46, 1599, 8, 46, 1, 46, 1, 46, 3, 46, 1603, 8, 46, 1, 46, 3, 46, 1606, 8, 46, 1, 46, 3, 46, 1609, 8, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 5, 46, 1619, 8, 46, 10, 46, 12, 46, 1622, 9, 46, 3, 46, 1624, 8, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 4, 46, 1641, 8, 46, 11, 46, 12, 46, 1642, 1, 46, 1, 46, 3, 46, 1647, 8, 46, 1, 46, 1, 46, 1, 46, 1, 46, 4, 46, 1653, 8, 46, 11, 46, 12, 46, 1654, 1, 46, 1, 46, 3, 46, 1659, 8, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 5, 46, 1682, 8, 46, 10, 46, 12, 46, 1685, 9, 46, 3, 46, 1687, 8, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 3, 46, 1696, 8, 46, 1, 46, 1, 46, 1, 46, 1, 46, 3, 46, 1702, 8, 46, 1, 46, 1, 46, 1, 46, 1, 46, 3, 46, 1708, 8, 46, 1, 46, 1, 46, 1, 46, 1, 46, 3, 46, 1714, 8, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 3, 46, 1724, 8, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 3, 46, 1733, 8, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 5, 46, 1753, 8, 46, 10, 46, 12, 46, 1756, 9, 46, 3, 46, 1758, 8, 46, 1, 46, 3, 46, 1761, 8, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 5, 46, 1771, 8, 46, 10, 46, 12, 46, 1774, 9, 46, 1, 47, 1, 47, 1, 47, 1, 47, 3, 47, 1780, 8, 47, 3, 47, 1782, 8, 47, 1, 48, 1, 48, 1, 48, 1, 48, 3, 48, 1788, 8, 48, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 3, 49, 1796, 8, 49, 1, 50, 1, 50, 1, 51, 1, 51, 1, 52, 1, 52, 1, 53, 1, 53, 3, 53, 1806, 8, 53, 1, 53, 1, 53, 1, 53, 1, 53, 3, 53, 1812, 8, 53, 1, 54, 1, 54, 1, 55, 1, 55, 1, 56, 1, 56, 1, 56, 1, 56, 5, 56, 1822, 8, 56, 10, 56, 12, 56, 1825, 9, 56, 3, 56, 1827, 8, 56, 1, 56, 1, 56, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 5, 57, 1852, 8, 57, 10, 57, 12, 57, 1855, 9, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 5, 57, 1864, 8, 57, 10, 57, 12, 57, 1867, 9, 57, 1, 57, 1, 57, 3, 57, 1871, 8, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 3, 57, 1878, 8, 57, 1, 57, 1, 57, 5, 57, 1882, 8, 57, 10, 57, 12, 57, 1885, 9, 57, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 5, 58, 1892, 8, 58, 10, 58, 12, 58, 1895, 9, 58, 3, 58, 1897, 8, 58, 1, 58, 1, 58, 1, 58, 1, 58, 5, 58, 1903, 8, 58, 10, 58, 12, 58, 1906, 9, 58, 3, 58, 1908, 8, 58, 1, 58, 1, 58, 1, 59, 1, 59, 1, 59, 3, 59, 1915, 8, 59, 1, 59, 1, 59, 1, 59, 3, 59, 1920, 8, 59, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 5, 60, 1929, 8, 60, 10, 60, 12, 60, 1932, 9, 60, 3, 60, 1934, 8, 60, 1, 60, 1, 60, 3, 60, 1938, 8, 60, 3, 60, 1940, 8, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 3, 60, 1948, 8, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 5, 60, 1956, 8, 60, 10, 60, 12, 60, 1959, 9, 60, 1, 60, 1, 60, 1, 60, 3, 60, 1964, 8, 60, 3, 60, 1966, 8, 60, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 3, 61, 1973, 8, 61, 1, 61, 1, 61, 3, 61, 1977, 8, 61, 3, 61, 1979, 8, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 3, 61, 1986, 8, 61, 1, 61, 1, 61, 3, 61, 1990, 8, 61, 3, 61, 1992, 8, 61, 3, 61, 1994, 8, 61, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 5, 62, 2001, 8, 62, 10, 62, 12, 62, 2004, 9, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 3, 62, 2014, 8, 62, 1, 63, 1, 63, 3, 63, 2018, 8, 63, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 5, 64, 2026, 8, 64, 10, 64, 12, 64, 2029, 9, 64, 1, 64, 1, 64, 1, 65, 1, 65, 3, 65, 2035, 8, 65, 1, 66, 1, 66, 1, 66, 1, 66, 3, 66, 2041, 8, 66, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 5, 69, 2067, 8, 69, 10, 69, 12, 69, 2070, 9, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 5, 69, 2081, 8, 69, 10, 69, 12, 69, 2084, 9, 69, 1, 69, 1, 69, 3, 69, 2088, 8, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 5, 69, 2095, 8, 69, 10, 69, 12, 69, 2098, 9, 69, 1, 69, 1, 69, 3, 69, 2102, 8, 69, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 5, 70, 2111, 8, 70, 10, 70, 12, 70, 2114, 9, 70, 3, 70, 2116, 8, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 5, 70, 2123, 8, 70, 10, 70, 12, 70, 2126, 9, 70, 3, 70, 2128, 8, 70, 1, 70, 3, 70, 2131, 8, 70, 1, 70, 1, 70, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 3, 71, 2159, 8, 71, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 3, 72, 2170, 8, 72, 1, 73, 1, 73, 1, 73, 1, 73, 1, 74, 1, 74, 1, 74, 1, 74, 3, 74, 2180, 8, 74, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 3, 75, 2187, 8, 75, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 3, 76, 2196, 8, 76, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 3, 77, 2203, 8, 77, 1, 78, 1, 78, 1, 78, 1, 78, 3, 78, 2209, 8, 78, 1, 79, 1, 79, 1, 79, 5, 79, 2214, 8, 79, 10, 79, 12, 79, 2217, 9, 79, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 81, 1, 81, 1, 81, 3, 81, 2227, 8, 81, 1, 82, 1, 82, 1, 82, 3, 82, 2232, 8, 82, 1, 83, 1, 83, 1, 83, 1, 83, 1, 83, 3, 83, 2239, 8, 83, 1, 84, 1, 84, 1, 84, 5, 84, 2244, 8, 84, 10, 84, 12, 84, 2247, 9, 84, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 3, 85, 2254, 8, 85, 1, 86, 1, 86, 1, 86, 3, 86, 2259, 8, 86, 1, 87, 1, 87, 3, 87, 2263, 8, 87, 1, 88, 1, 88, 1, 88, 1, 88, 1, 89, 1, 89, 1, 89, 3, 89, 2272, 8, 89, 1, 90, 1, 90, 1, 90, 3, 90, 2277, 8, 90, 1, 91, 5, 91, 2280, 8, 91, 10, 91, 12, 91, 2283, 9, 91, 1, 92, 1, 92, 1, 92, 3, 92, 2288, 8, 92, 1, 93, 1, 93, 1, 93, 3, 93, 2293, 8, 93, 1, 94, 1, 94, 1, 95, 1, 95, 1, 95, 3, 95, 2300, 8, 95, 1, 96, 1, 96, 1, 96, 0, 6, 48, 68, 86, 90, 92, 114, 97, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164, 166, 168, 170, 172, 174, 176, 178, 180, 182, 184, 186, 188, 190, 192, 0, 25, 2, 0, 27, 27, 171, 171, 2, 0, 51, 51, 104, 104, 2, 0, 81, 81, 96, 96, 2, 0, 68, 68, 97, 97, 1, 0, 180, 181, 2, 0, 12, 12, 251, 251, 2, 0, 67, 67, 217, 217, 2, 0, 19, 19, 53, 53, 2, 0, 77, 77, 113, 113, 2, 0, 12, 12, 58, 58, 2, 0, 22, 22, 197, 197, 1, 0, 242, 243, 1, 0, 244, 246, 1, 0, 236, 241, 3, 0, 12, 12, 16, 16, 192, 192, 2, 0, 74, 74, 210, 210, 5, 0, 49, 49, 93, 93, 126, 127, 184, 184, 234, 234, 1, 0, 130, 133, 2, 0, 78, 78, 155, 155, 3, 0, 88, 88, 108, 108, 204, 204, 4, 0, 59, 59, 105, 105, 121, 121, 224, 224, 2, 0, 144, 144, 233, 233, 3, 0, 198, 199, 207, 207, 227, 227, 2, 0, 57, 57, 63, 63, 52, 0, 10, 12, 14, 14, 16, 17, 19, 22, 25, 27, 30, 35, 38, 38, 41, 41, 43, 43, 47, 49, 51, 51, 53, 53, 55, 57, 59, 59, 62, 63, 65, 65, 68, 68, 71, 71, 73, 73, 75, 78, 80, 80, 83, 88, 91, 91, 93, 95, 97, 97, 99, 99, 102, 102, 104, 105, 107, 108, 110, 114, 116, 116, 118, 118, 121, 128, 130, 135, 139, 142, 144, 145, 148, 148, 150, 155, 157, 162, 164, 174, 176, 178, 180, 185, 187, 199, 201, 204, 206, 209, 211, 213, 215, 216, 218, 218, 220, 222, 224, 224, 226, 228, 232, 235, 2651, 0, 194, 1, 0, 0, 0, 2, 197, 1, 0, 0, 0, 4, 200, 1, 0, 0, 0, 6, 963, 1, 0, 0, 0, 8, 966, 1, 0, 0, 0, 10, 970, 1, 0, 0, 0, 12, 985, 1, 0, 0, 0, 14, 987, 1, 0, 0, 0, 16, 1001, 1, 0, 0, 0, 18, 1007, 1, 0, 0, 0, 20, 1018, 1, 0, 0, 0, 22, 1022, 1, 0, 0, 0, 24, 1028, 1, 0, 0, 0, 26, 1035, 1, 0, 0, 0, 28, 1040, 1, 0, 0, 0, 30, 1043, 1, 0, 0, 0, 32, 1047, 1, 0, 0, 0, 34, 1049, 1, 0, 0, 0, 36, 1052, 1, 0, 0, 0, 38, 1059, 1, 0, 0, 0, 40, 1064, 1, 0, 0, 0, 42, 1075, 1, 0, 0, 0, 44, 1077, 1, 0, 0, 0, 46, 1079, 1, 0, 0, 0, 48, 1110, 1, 0, 0, 0, 50, 1146, 1, 0, 0, 0, 52, 1148, 1, 0, 0, 0, 54, 1156, 1, 0, 0, 0, 56, 1193, 1, 0, 0, 0, 58, 1243, 1, 0, 0, 0, 60, 1258, 1, 0, 0, 0, 62, 1260, 1, 0, 0, 0, 64, 1269, 1, 0, 0, 0, 66, 1283, 1, 0, 0, 0, 68, 1285, 1, 0, 0, 0, 70, 1324, 1, 0, 0, 0, 72, 1340, 1, 0, 0, 0, 74, 1342, 1, 0, 0, 0, 76, 1351, 1, 0, 0, 0, 78, 1353, 1, 0, 0, 0, 80, 1363, 1, 0, 0, 0, 82, 1411, 1, 0, 0, 0, 84, 1413, 1, 0, 0, 0, 86, 1422, 1, 0, 0, 0, 88, 1496, 1, 0, 0, 0, 90, 1502, 1, 0, 0, 0, 92, 1760, 1, 0, 0, 0, 94, 1781, 1, 0, 0, 0, 96, 1787, 1, 0, 0, 0, 98, 1795, 1, 0, 0, 0, 100, 1797, 1, 0, 0, 0, 102, 1799, 1, 0, 0, 0, 104, 1801, 1, 0, 0, 0, 106, 1803, 1, 0, 0, 0, 108, 1813, 1, 0, 0, 0, 110, 1815, 1, 0, 0, 0, 112, 1817, 1, 0, 0, 0, 114, 1877, 1, 0, 0, 0, 116, 1886, 1, 0, 0, 0, 118, 1914, 1, 0, 0, 0, 120, 1921, 1, 0, 0, 0, 122, 1993, 1, 0, 0, 0, 124, 2013, 1, 0, 0, 0, 126, 2015, 1, 0, 0, 0, 128, 2019, 1, 0, 0, 0, 130, 2034, 1, 0, 0, 0, 132, 2040, 1, 0, 0, 0, 134, 2042, 1, 0, 0, 0, 136, 2047, 1, 0, 0, 0, 138, 2101, 1, 0, 0, 0, 140, 2103, 1, 0, 0, 0, 142, 2158, 1, 0, 0, 0, 144, 2169, 1, 0, 0, 0, 146, 2171, 1, 0, 0, 0, 148, 2179, 1, 0, 0, 0, 150, 2186, 1, 0, 0, 0, 152, 2195, 1, 0, 0, 0, 154, 2202, 1, 0, 0, 0, 156, 2208, 1, 0, 0, 0, 158, 2210, 1, 0, 0, 0, 160, 2218, 1, 0, 0, 0, 162, 2226, 1, 0, 0, 0, 164, 2231, 1, 0, 0, 0, 166, 2238, 1, 0, 0, 0, 168, 2240, 1, 0, 0, 0, 170, 2253, 1, 0, 0, 0, 172, 2258, 1, 0, 0, 0, 174, 2262, 1, 0, 0, 0, 176, 2264, 1, 0, 0, 0, 178, 2268, 1, 0, 0, 0, 180, 2276, 1, 0, 0, 0, 182, 2281, 1, 0, 0, 0, 184, 2287, 1, 0, 0, 0, 186, 2292, 1, 0, 0, 0, 188, 2294, 1, 0, 0, 0, 190, 2299, 1, 0, 0, 0, 192, 2301, 1, 0, 0, 0, 194, 195, 3, 6, 3, 0, 195, 196, 5, 0, 0, 1, 196, 1, 1, 0, 0, 0, 197, 198, 3, 84, 42, 0, 198, 199, 5, 0, 0, 1, 199, 3, 1, 0, 0, 0, 200, 201, 3, 32, 16, 0, 201, 202, 5, 0, 0, 1, 202, 5, 1, 0, 0, 0, 203, 964, 3, 8, 4, 0, 204, 205, 5, 221, 0, 0, 205, 964, 3, 170, 85, 0, 206, 207, 5, 221, 0, 0, 207, 208, 3, 170, 85, 0, 208, 209, 5, 1, 0, 0, 209, 210, 3, 170, 85, 0, 210, 964, 1, 0, 0, 0, 211, 212, 5, 37, 0, 0, 212, 216, 5, 182, 0, 0, 213, 214, 5, 94, 0, 0, 214, 215, 5, 137, 0, 0, 215, 217, 5, 70, 0, 0, 216, 213, 1, 0, 0, 0, 216, 217, 1, 0, 0, 0, 217, 218, 1, 0, 0, 0, 218, 221, 3, 158, 79, 0, 219, 220, 5, 231, 0, 0, 220, 222, 3, 18, 9, 0, 221, 219, 1, 0, 0, 0, 221, 222, 1, 0, 0, 0, 222, 964, 1, 0, 0, 0, 223, 224, 5, 60, 0, 0, 224, 227, 5, 182, 0, 0, 225, 226, 5, 94, 0, 0, 226, 228, 5, 70, 0, 0, 227, 225, 1, 0, 0, 0, 227, 228, 1, 0, 0, 0, 228, 229, 1, 0, 0, 0, 229, 231, 3, 158, 79, 0, 230, 232, 7, 0, 0, 0, 231, 230, 1, 0, 0, 0, 231, 232, 1, 0, 0, 0, 232, 964, 1, 0, 0, 0, 233, 234, 5, 13, 0, 0, 234, 235, 5, 182, 0, 0, 235, 236, 3, 158, 79, 0, 236, 237, 5, 166, 0, 0, 237, 238, 5, 208, 0, 0, 238, 239, 3, 170, 85, 0, 239, 964, 1, 0, 0, 0, 240, 241, 5, 37, 0, 0, 241, 245, 5, 200, 0, 0, 242, 243, 5, 94, 0, 0, 243, 244, 5, 137, 0, 0, 244, 246, 5, 70, 0, 0, 245, 242, 1, 0, 0, 0, 245, 246, 1, 0, 0, 0, 246, 247, 1, 0, 0, 0, 247, 249, 3, 158, 79, 0, 248, 250, 3, 80, 40, 0, 249, 248, 1, 0, 0, 0, 249, 250, 1, 0, 0, 0, 250, 253, 1, 0, 0, 0, 251, 252, 5, 33, 0, 0, 252, 254, 3, 94, 47, 0, 253, 251, 1, 0, 0, 0, 253, 254, 1, 0, 0, 0, 254, 257, 1, 0, 0, 0, 255, 256, 5, 231, 0, 0, 256, 258, 3, 18, 9, 0, 257, 255, 1, 0, 0, 0, 257, 258, 1, 0, 0, 0, 258, 259, 1, 0, 0, 0, 259, 265, 5, 18, 0, 0, 260, 266, 3, 8, 4, 0, 261, 262, 5, 2, 0, 0, 262, 263, 3, 8, 4, 0, 263, 264, 5, 3, 0, 0, 264, 266, 1, 0, 0, 0, 265, 260, 1, 0, 0, 0, 265, 261, 1, 0, 0, 0, 266, 272, 1, 0, 0, 0, 267, 269, 5, 231, 0, 0, 268, 270, 5, 134, 0, 0, 269, 268, 1, 0, 0, 0, 269, 270, 1, 0, 0, 0, 270, 271, 1, 0, 0, 0, 271, 273, 5, 47, 0, 0, 272, 267, 1, 0, 0, 0, 272, 273, 1, 0, 0, 0, 273, 964, 1, 0, 0, 0, 274, 275, 5, 37, 0, 0, 275, 279, 5, 200, 0, 0, 276, 277, 5, 94, 0, 0, 277, 278, 5, 137, 0, 0, 278, 280, 5, 70, 0, 0, 279, 276, 1, 0, 0, 0, 279, 280, 1, 0, 0, 0, 280, 281, 1, 0, 0, 0, 281, 282, 3, 158, 79, 0, 282, 283, 5, 2, 0, 0, 283, 288, 3, 12, 6, 0, 284, 285, 5, 4, 0, 0, 285, 287, 3, 12, 6, 0, 286, 284, 1, 0, 0, 0, 287, 290, 1, 0, 0, 0, 288, 286, 1, 0, 0, 0, 288, 289, 1, 0, 0, 0, 289, 291, 1, 0, 0, 0, 290, 288, 1, 0, 0, 0, 291, 294, 5, 3, 0, 0, 292, 293, 5, 33, 0, 0, 293, 295, 3, 94, 47, 0, 294, 292, 1, 0, 0, 0, 294, 295, 1, 0, 0, 0, 295, 298, 1, 0, 0, 0, 296, 297, 5, 231, 0, 0, 297, 299, 3, 18, 9, 0, 298, 296, 1, 0, 0, 0, 298, 299, 1, 0, 0, 0, 299, 964, 1, 0, 0, 0, 300, 301, 5, 60, 0, 0, 301, 304, 5, 200, 0, 0, 302, 303, 5, 94, 0, 0, 303, 305, 5, 70, 0, 0, 304, 302, 1, 0, 0, 0, 304, 305, 1, 0, 0, 0, 305, 306, 1, 0, 0, 0, 306, 964, 3, 158, 79, 0, 307, 308, 5, 100, 0, 0, 308, 309, 5, 103, 0, 0, 309, 311, 3, 158, 79, 0, 310, 312, 3, 80, 40, 0, 311, 310, 1, 0, 0, 0, 311, 312, 1, 0, 0, 0, 312, 313, 1, 0, 0, 0, 313, 314, 3, 8, 4, 0, 314, 964, 1, 0, 0, 0, 315, 316, 5, 52, 0, 0, 316, 317, 5, 81, 0, 0, 317, 320, 3, 158, 79, 0, 318, 319, 5, 230, 0, 0, 319, 321, 3, 86, 43, 0, 320, 318, 1, 0, 0, 0, 320, 321, 1, 0, 0, 0, 321, 964, 1, 0, 0, 0, 322, 323, 5, 211, 0, 0, 323, 324, 5, 200, 0, 0, 324, 964, 3, 158, 79, 0, 325, 326, 5, 13, 0, 0, 326, 329, 5, 200, 0, 0, 327, 328, 5, 94, 0, 0, 328, 330, 5, 70, 0, 0, 329, 327, 1, 0, 0, 0, 329, 330, 1, 0, 0, 0, 330, 331, 1, 0, 0, 0, 331, 332, 3, 158, 79, 0, 332, 333, 5, 166, 0, 0, 333, 334, 5, 208, 0, 0, 334, 335, 3, 158, 79, 0, 335, 964, 1, 0, 0, 0, 336, 337, 5, 13, 0, 0, 337, 340, 5, 200, 0, 0, 338, 339, 5, 94, 0, 0, 339, 341, 5, 70, 0, 0, 340, 338, 1, 0, 0, 0, 340, 341, 1, 0, 0, 0, 341, 342, 1, 0, 0, 0, 342, 343, 3, 158, 79, 0, 343, 344, 5, 166, 0, 0, 344, 347, 5, 31, 0, 0, 345, 346, 5, 94, 0, 0, 346, 348, 5, 70, 0, 0, 347, 345, 1, 0, 0, 0, 347, 348, 1, 0, 0, 0, 348, 349, 1, 0, 0, 0, 349, 350, 3, 170, 85, 0, 350, 351, 5, 208, 0, 0, 351, 352, 3, 170, 85, 0, 352, 964, 1, 0, 0, 0, 353, 354, 5, 13, 0, 0, 354, 357, 5, 200, 0, 0, 355, 356, 5, 94, 0, 0, 356, 358, 5, 70, 0, 0, 357, 355, 1, 0, 0, 0, 357, 358, 1, 0, 0, 0, 358, 359, 1, 0, 0, 0, 359, 360, 3, 158, 79, 0, 360, 361, 5, 60, 0, 0, 361, 364, 5, 31, 0, 0, 362, 363, 5, 94, 0, 0, 363, 365, 5, 70, 0, 0, 364, 362, 1, 0, 0, 0, 364, 365, 1, 0, 0, 0, 365, 366, 1, 0, 0, 0, 366, 367, 3, 158, 79, 0, 367, 964, 1, 0, 0, 0, 368, 369, 5, 13, 0, 0, 369, 372, 5, 200, 0, 0, 370, 371, 5, 94, 0, 0, 371, 373, 5, 70, 0, 0, 372, 370, 1, 0, 0, 0, 372, 373, 1, 0, 0, 0, 373, 374, 1, 0, 0, 0, 374, 375, 3, 158, 79, 0, 375, 376, 5, 10, 0, 0, 376, 380, 5, 31, 0, 0, 377, 378, 5, 94, 0, 0, 378, 379, 5, 137, 0, 0, 379, 381, 5, 70, 0, 0, 380, 377, 1, 0, 0, 0, 380, 381, 1, 0, 0, 0, 381, 382, 1, 0, 0, 0, 382, 383, 3, 14, 7, 0, 383, 964, 1, 0, 0, 0, 384, 385, 5, 13, 0, 0, 385, 388, 5, 200, 0, 0, 386, 387, 5, 94, 0, 0, 387, 389, 5, 70, 0, 0, 388, 386, 1, 0, 0, 0, 388, 389, 1, 0, 0, 0, 389, 390, 1, 0, 0, 0, 390, 391, 3, 158, 79, 0, 391, 392, 5, 10, 0, 0, 392, 393, 3, 174, 87, 0, 393, 964, 1, 0, 0, 0, 394, 395, 5, 13, 0, 0, 395, 398, 5, 200, 0, 0, 396, 397, 5, 94, 0, 0, 397, 399, 5, 70, 0, 0, 398, 396, 1, 0, 0, 0, 398, 399, 1, 0, 0, 0, 399, 400, 1, 0, 0, 0, 400, 401, 3, 158, 79, 0, 401, 402, 5, 60, 0, 0, 402, 405, 5, 36, 0, 0, 403, 404, 5, 94, 0, 0, 404, 406, 5, 70, 0, 0, 405, 403, 1, 0, 0, 0, 405, 406, 1, 0, 0, 0, 406, 407, 1, 0, 0, 0, 407, 408, 3, 170, 85, 0, 408, 964, 1, 0, 0, 0, 409, 410, 5, 13, 0, 0, 410, 413, 5, 200, 0, 0, 411, 412, 5, 94, 0, 0, 412, 414, 5, 70, 0, 0, 413, 411, 1, 0, 0, 0, 413, 414, 1, 0, 0, 0, 414, 415, 1, 0, 0, 0, 415, 416, 3, 158, 79, 0, 416, 418, 5, 13, 0, 0, 417, 419, 5, 31, 0, 0, 418, 417, 1, 0, 0, 0, 418, 419, 1, 0, 0, 0, 419, 420, 1, 0, 0, 0, 420, 421, 3, 170, 85, 0, 421, 422, 5, 189, 0, 0, 422, 423, 5, 137, 0, 0, 423, 424, 5, 138, 0, 0, 424, 964, 1, 0, 0, 0, 425, 426, 5, 13, 0, 0, 426, 429, 5, 200, 0, 0, 427, 428, 5, 94, 0, 0, 428, 430, 5, 70, 0, 0, 429, 427, 1, 0, 0, 0, 429, 430, 1, 0, 0, 0, 430, 431, 1, 0, 0, 0, 431, 432, 3, 158, 79, 0, 432, 434, 5, 13, 0, 0, 433, 435, 5, 31, 0, 0, 434, 433, 1, 0, 0, 0, 434, 435, 1, 0, 0, 0, 435, 436, 1, 0, 0, 0, 436, 437, 3, 170, 85, 0, 437, 438, 5, 60, 0, 0, 438, 439, 5, 137, 0, 0, 439, 440, 5, 138, 0, 0, 440, 964, 1, 0, 0, 0, 441, 442, 5, 13, 0, 0, 442, 445, 5, 200, 0, 0, 443, 444, 5, 94, 0, 0, 444, 446, 5, 70, 0, 0, 445, 443, 1, 0, 0, 0, 445, 446, 1, 0, 0, 0, 446, 447, 1, 0, 0, 0, 447, 448, 3, 158, 79, 0, 448, 449, 5, 189, 0, 0, 449, 450, 5, 159, 0, 0, 450, 451, 3, 18, 9, 0, 451, 964, 1, 0, 0, 0, 452, 453, 5, 14, 0, 0, 453, 456, 3, 158, 79, 0, 454, 455, 5, 231, 0, 0, 455, 457, 3, 18, 9, 0, 456, 454, 1, 0, 0, 0, 456, 457, 1, 0, 0, 0, 457, 964, 1, 0, 0, 0, 458, 459, 5, 37, 0, 0, 459, 460, 5, 213, 0, 0, 460, 461, 3, 158, 79, 0, 461, 474, 5, 18, 0, 0, 462, 463, 5, 2, 0, 0, 463, 468, 3, 22, 11, 0, 464, 465, 5, 4, 0, 0, 465, 467, 3, 22, 11, 0, 466, 464, 1, 0, 0, 0, 467, 470, 1, 0, 0, 0, 468, 466, 1, 0, 0, 0, 468, 469, 1, 0, 0, 0, 469, 471, 1, 0, 0, 0, 470, 468, 1, 0, 0, 0, 471, 472, 5, 3, 0, 0, 472, 475, 1, 0, 0, 0, 473, 475, 3, 114, 57, 0, 474, 462, 1, 0, 0, 0, 474, 473, 1, 0, 0, 0, 475, 964, 1, 0, 0, 0, 476, 479, 5, 37, 0, 0, 477, 478, 5, 146, 0, 0, 478, 480, 5, 168, 0, 0, 479, 477, 1, 0, 0, 0, 479, 480, 1, 0, 0, 0, 480, 481, 1, 0, 0, 0, 481, 482, 5, 228, 0, 0, 482, 485, 3, 158, 79, 0, 483, 484, 5, 185, 0, 0, 484, 486, 7, 1, 0, 0, 485, 483, 1, 0, 0, 0, 485, 486, 1, 0, 0, 0, 486, 487, 1, 0, 0, 0, 487, 488, 5, 18, 0, 0, 488, 489, 3, 8, 4, 0, 489, 964, 1, 0, 0, 0, 490, 491, 5, 13, 0, 0, 491, 494, 5, 228, 0, 0, 492, 493, 5, 94, 0, 0, 493, 495, 5, 70, 0, 0, 494, 492, 1, 0, 0, 0, 494, 495, 1, 0, 0, 0, 495, 496, 1, 0, 0, 0, 496, 497, 3, 158, 79, 0, 497, 498, 5, 166, 0, 0, 498, 499, 5, 208, 0, 0, 499, 500, 3, 158, 79, 0, 500, 964, 1, 0, 0, 0, 501, 502, 5, 60, 0, 0, 502, 505, 5, 228, 0, 0, 503, 504, 5, 94, 0, 0, 504, 506, 5, 70, 0, 0, 505, 503, 1, 0, 0, 0, 505, 506, 1, 0, 0, 0, 506, 507, 1, 0, 0, 0, 507, 964, 3, 158, 79, 0, 508, 509, 5, 37, 0, 0, 509, 510, 5, 124, 0, 0, 510, 514, 5, 228, 0, 0, 511, 512, 5, 94, 0, 0, 512, 513, 5, 137, 0, 0, 513, 515, 5, 70, 0, 0, 514, 511, 1, 0, 0, 0, 514, 515, 1, 0, 0, 0, 515, 516, 1, 0, 0, 0, 516, 519, 3, 158, 79, 0, 517, 518, 5, 33, 0, 0, 518, 520, 3, 94, 47, 0, 519, 517, 1, 0, 0, 0, 519, 520, 1, 0, 0, 0, 520, 523, 1, 0, 0, 0, 521, 522, 5, 231, 0, 0, 522, 524, 3, 18, 9, 0, 523, 521, 1, 0, 0, 0, 523, 524, 1, 0, 0, 0, 524, 525, 1, 0, 0, 0, 525, 531, 5, 18, 0, 0, 526, 532, 3, 8, 4, 0, 527, 528, 5, 2, 0, 0, 528, 529, 3, 8, 4, 0, 529, 530, 5, 3, 0, 0, 530, 532, 1, 0, 0, 0, 531, 526, 1, 0, 0, 0, 531, 527, 1, 0, 0, 0, 532, 964, 1, 0, 0, 0, 533, 534, 5, 60, 0, 0, 534, 535, 5, 124, 0, 0, 535, 538, 5, 228, 0, 0, 536, 537, 5, 94, 0, 0, 537, 539, 5, 70, 0, 0, 538, 536, 1, 0, 0, 0, 538, 539, 1, 0, 0, 0, 539, 540, 1, 0, 0, 0, 540, 964, 3, 158, 79, 0, 541, 542, 5, 164, 0, 0, 542, 543, 5, 124, 0, 0, 543, 544, 5, 228, 0, 0, 544, 547, 3, 158, 79, 0, 545, 546, 5, 230, 0, 0, 546, 548, 3, 86, 43, 0, 547, 545, 1, 0, 0, 0, 547, 548, 1, 0, 0, 0, 548, 964, 1, 0, 0, 0, 549, 552, 5, 37, 0, 0, 550, 551, 5, 146, 0, 0, 551, 553, 5, 168, 0, 0, 552, 550, 1, 0, 0, 0, 552, 553, 1, 0, 0, 0, 553, 555, 1, 0, 0, 0, 554, 556, 5, 203, 0, 0, 555, 554, 1, 0, 0, 0, 555, 556, 1, 0, 0, 0, 556, 557, 1, 0, 0, 0, 557, 558, 5, 83, 0, 0, 558, 559, 3, 158, 79, 0, 559, 568, 5, 2, 0, 0, 560, 565, 3, 22, 11, 0, 561, 562, 5, 4, 0, 0, 562, 564, 3, 22, 11, 0, 563, 561, 1, 0, 0, 0, 564, 567, 1, 0, 0, 0, 565, 563, 1, 0, 0, 0, 565, 566, 1, 0, 0, 0, 566, 569, 1, 0, 0, 0, 567, 565, 1, 0, 0, 0, 568, 560, 1, 0, 0, 0, 568, 569, 1, 0, 0, 0, 569, 570, 1, 0, 0, 0, 570, 571, 5, 3, 0, 0, 571, 572, 5, 173, 0, 0, 572, 575, 3, 114, 57, 0, 573, 574, 5, 33, 0, 0, 574, 576, 3, 94, 47, 0, 575, 573, 1, 0, 0, 0, 575, 576, 1, 0, 0, 0, 576, 577, 1, 0, 0, 0, 577, 578, 3, 24, 12, 0, 578, 579, 3, 32, 16, 0, 579, 964, 1, 0, 0, 0, 580, 581, 5, 13, 0, 0, 581, 582, 5, 83, 0, 0, 582, 584, 3, 158, 79, 0, 583, 585, 3, 112, 56, 0, 584, 583, 1, 0, 0, 0, 584, 585, 1, 0, 0, 0, 585, 586, 1, 0, 0, 0, 586, 587, 3, 28, 14, 0, 587, 964, 1, 0, 0, 0, 588, 590, 5, 60, 0, 0, 589, 591, 5, 203, 0, 0, 590, 589, 1, 0, 0, 0, 590, 591, 1, 0, 0, 0, 591, 592, 1, 0, 0, 0, 592, 595, 5, 83, 0, 0, 593, 594, 5, 94, 0, 0, 594, 596, 5, 70, 0, 0, 595, 593, 1, 0, 0, 0, 595, 596, 1, 0, 0, 0, 596, 597, 1, 0, 0, 0, 597, 599, 3, 158, 79, 0, 598, 600, 3, 112, 56, 0, 599, 598, 1, 0, 0, 0, 599, 600, 1, 0, 0, 0, 600, 964, 1, 0, 0, 0, 601, 602, 5, 25, 0, 0, 602, 603, 3, 158, 79, 0, 603, 612, 5, 2, 0, 0, 604, 609, 3, 154, 77, 0, 605, 606, 5, 4, 0, 0, 606, 608, 3, 154, 77, 0, 607, 605, 1, 0, 0, 0, 608, 611, 1, 0, 0, 0, 609, 607, 1, 0, 0, 0, 609, 610, 1, 0, 0, 0, 610, 613, 1, 0, 0, 0, 611, 609, 1, 0, 0, 0, 612, 604, 1, 0, 0, 0, 612, 613, 1, 0, 0, 0, 613, 614, 1, 0, 0, 0, 614, 615, 5, 3, 0, 0, 615, 964, 1, 0, 0, 0, 616, 617, 5, 37, 0, 0, 617, 618, 5, 176, 0, 0, 618, 622, 3, 170, 85, 0, 619, 620, 5, 231, 0, 0, 620, 621, 5, 11, 0, 0, 621, 623, 3, 164, 82, 0, 622, 619, 1, 0, 0, 0, 622, 623, 1, 0, 0, 0, 623, 964, 1, 0, 0, 0, 624, 625, 5, 60, 0, 0, 625, 626, 5, 176, 0, 0, 626, 964, 3, 170, 85, 0, 627, 628, 5, 85, 0, 0, 628, 629, 3, 168, 84, 0, 629, 630, 5, 208, 0, 0, 630, 635, 3, 166, 83, 0, 631, 632, 5, 4, 0, 0, 632, 634, 3, 166, 83, 0, 633, 631, 1, 0, 0, 0, 634, 637, 1, 0, 0, 0, 635, 633, 1, 0, 0, 0, 635, 636, 1, 0, 0, 0, 636, 641, 1, 0, 0, 0, 637, 635, 1, 0, 0, 0, 638, 639, 5, 231, 0, 0, 639, 640, 5, 11, 0, 0, 640, 642, 5, 145, 0, 0, 641, 638, 1, 0, 0, 0, 641, 642, 1, 0, 0, 0, 642, 646, 1, 0, 0, 0, 643, 644, 5, 86, 0, 0, 644, 645, 5, 24, 0, 0, 645, 647, 3, 164, 82, 0, 646, 643, 1, 0, 0, 0, 646, 647, 1, 0, 0, 0, 647, 964, 1, 0, 0, 0, 648, 652, 5, 174, 0, 0, 649, 650, 5, 11, 0, 0, 650, 651, 5, 145, 0, 0, 651, 653, 5, 79, 0, 0, 652, 649, 1, 0, 0, 0, 652, 653, 1, 0, 0, 0, 653, 654, 1, 0, 0, 0, 654, 655, 3, 168, 84, 0, 655, 656, 5, 81, 0, 0, 656, 661, 3, 166, 83, 0, 657, 658, 5, 4, 0, 0, 658, 660, 3, 166, 83, 0, 659, 657, 1, 0, 0, 0, 660, 663, 1, 0, 0, 0, 661, 659, 1, 0, 0, 0, 661, 662, 1, 0, 0, 0, 662, 667, 1, 0, 0, 0, 663, 661, 1, 0, 0, 0, 664, 665, 5, 86, 0, 0, 665, 666, 5, 24, 0, 0, 666, 668, 3, 164, 82, 0, 667, 664, 1, 0, 0, 0, 667, 668, 1, 0, 0, 0, 668, 964, 1, 0, 0, 0, 669, 670, 5, 189, 0, 0, 670, 674, 5, 176, 0, 0, 671, 675, 5, 12, 0, 0, 672, 675, 5, 135, 0, 0, 673, 675, 3, 170, 85, 0, 674, 671, 1, 0, 0, 0, 674, 672, 1, 0, 0, 0, 674, 673, 1, 0, 0, 0, 675, 964, 1, 0, 0, 0, 676, 687, 5, 85, 0, 0, 677, 682, 3, 156, 78, 0, 678, 679, 5, 4, 0, 0, 679, 681, 3, 156, 78, 0, 680, 678, 1, 0, 0, 0, 681, 684, 1, 0, 0, 0, 682, 680, 1, 0, 0, 0, 682, 683, 1, 0, 0, 0, 683, 688, 1, 0, 0, 0, 684, 682, 1, 0, 0, 0, 685, 686, 5, 12, 0, 0, 686, 688, 5, 158, 0, 0, 687, 677, 1, 0, 0, 0, 687, 685, 1, 0, 0, 0, 688, 689, 1, 0, 0, 0, 689, 691, 5, 143, 0, 0, 690, 692, 5, 200, 0, 0, 691, 690, 1, 0, 0, 0, 691, 692, 1, 0, 0, 0, 692, 693, 1, 0, 0, 0, 693, 694, 3, 158, 79, 0, 694, 695, 5, 208, 0, 0, 695, 699, 3, 166, 83, 0, 696, 697, 5, 231, 0, 0, 697, 698, 5, 85, 0, 0, 698, 700, 5, 145, 0, 0, 699, 696, 1, 0, 0, 0, 699, 700, 1, 0, 0, 0, 700, 964, 1, 0, 0, 0, 701, 705, 5, 174, 0, 0, 702, 703, 5, 85, 0, 0, 703, 704, 5, 145, 0, 0, 704, 706, 5, 79, 0, 0, 705, 702, 1, 0, 0, 0, 705, 706, 1, 0, 0, 0, 706, 717, 1, 0, 0, 0, 707, 712, 3, 156, 78, 0, 708, 709, 5, 4, 0, 0, 709, 711, 3, 156, 78, 0, 710, 708, 1, 0, 0, 0, 711, 714, 1, 0, 0, 0, 712, 710, 1, 0, 0, 0, 712, 713, 1, 0, 0, 0, 713, 718, 1, 0, 0, 0, 714, 712, 1, 0, 0, 0, 715, 716, 5, 12, 0, 0, 716, 718, 5, 158, 0, 0, 717, 707, 1, 0, 0, 0, 717, 715, 1, 0, 0, 0, 718, 719, 1, 0, 0, 0, 719, 721, 5, 143, 0, 0, 720, 722, 5, 200, 0, 0, 721, 720, 1, 0, 0, 0, 721, 722, 1, 0, 0, 0, 722, 723, 1, 0, 0, 0, 723, 724, 3, 158, 79, 0, 724, 725, 5, 81, 0, 0, 725, 726, 3, 166, 83, 0, 726, 964, 1, 0, 0, 0, 727, 728, 5, 191, 0, 0, 728, 734, 5, 87, 0, 0, 729, 731, 5, 143, 0, 0, 730, 732, 5, 200, 0, 0, 731, 730, 1, 0, 0, 0, 731, 732, 1, 0, 0, 0, 732, 733, 1, 0, 0, 0, 733, 735, 3, 158, 79, 0, 734, 729, 1, 0, 0, 0, 734, 735, 1, 0, 0, 0, 735, 964, 1, 0, 0, 0, 736, 738, 5, 71, 0, 0, 737, 739, 5, 14, 0, 0, 738, 737, 1, 0, 0, 0, 738, 739, 1, 0, 0, 0, 739, 741, 1, 0, 0, 0, 740, 742, 5, 226, 0, 0, 741, 740, 1, 0, 0, 0, 741, 742, 1, 0, 0, 0, 742, 754, 1, 0, 0, 0, 743, 744, 5, 2, 0, 0, 744, 749, 3, 148, 74, 0, 745, 746, 5, 4, 0, 0, 746, 748, 3, 148, 74, 0, 747, 745, 1, 0, 0, 0, 748, 751, 1, 0, 0, 0, 749, 747, 1, 0, 0, 0, 749, 750, 1, 0, 0, 0, 750, 752, 1, 0, 0, 0, 751, 749, 1, 0, 0, 0, 752, 753, 5, 3, 0, 0, 753, 755, 1, 0, 0, 0, 754, 743, 1, 0, 0, 0, 754, 755, 1, 0, 0, 0, 755, 756, 1, 0, 0, 0, 756, 964, 3, 6, 3, 0, 757, 758, 5, 191, 0, 0, 758, 759, 5, 37, 0, 0, 759, 760, 5, 200, 0, 0, 760, 964, 3, 158, 79, 0, 761, 762, 5, 191, 0, 0, 762, 763, 5, 37, 0, 0, 763, 764, 5, 182, 0, 0, 764, 964, 3, 158, 79, 0, 765, 766, 5, 191, 0, 0, 766, 767, 5, 37, 0, 0, 767, 768, 5, 228, 0, 0, 768, 964, 3, 158, 79, 0, 769, 770, 5, 191, 0, 0, 770, 771, 5, 37, 0, 0, 771, 772, 5, 124, 0, 0, 772, 773, 5, 228, 0, 0, 773, 964, 3, 158, 79, 0, 774, 775, 5, 191, 0, 0, 775, 776, 5, 37, 0, 0, 776, 777, 5, 83, 0, 0, 777, 779, 3, 158, 79, 0, 778, 780, 3, 112, 56, 0, 779, 778, 1, 0, 0, 0, 779, 780, 1, 0, 0, 0, 780, 964, 1, 0, 0, 0, 781, 782, 5, 191, 0, 0, 782, 785, 5, 201, 0, 0, 783, 784, 7, 2, 0, 0, 784, 786, 3, 158, 79, 0, 785, 783, 1, 0, 0, 0, 785, 786, 1, 0, 0, 0, 786, 793, 1, 0, 0, 0, 787, 788, 5, 117, 0, 0, 788, 791, 3, 94, 47, 0, 789, 790, 5, 66, 0, 0, 790, 792, 3, 94, 47, 0, 791, 789, 1, 0, 0, 0, 791, 792, 1, 0, 0, 0, 792, 794, 1, 0, 0, 0, 793, 787, 1, 0, 0, 0, 793, 794, 1, 0, 0, 0, 794, 964, 1, 0, 0, 0, 795, 796, 5, 191, 0, 0, 796, 799, 5, 183, 0, 0, 797, 798, 7, 2, 0, 0, 798, 800, 3, 170, 85, 0, 799, 797, 1, 0, 0, 0, 799, 800, 1, 0, 0, 0, 800, 807, 1, 0, 0, 0, 801, 802, 5, 117, 0, 0, 802, 805, 3, 94, 47, 0, 803, 804, 5, 66, 0, 0, 804, 806, 3, 94, 47, 0, 805, 803, 1, 0, 0, 0, 805, 806, 1, 0, 0, 0, 806, 808, 1, 0, 0, 0, 807, 801, 1, 0, 0, 0, 807, 808, 1, 0, 0, 0, 808, 964, 1, 0, 0, 0, 809, 810, 5, 191, 0, 0, 810, 817, 5, 30, 0, 0, 811, 812, 5, 117, 0, 0, 812, 815, 3, 94, 47, 0, 813, 814, 5, 66, 0, 0, 814, 816, 3, 94, 47, 0, 815, 813, 1, 0, 0, 0, 815, 816, 1, 0, 0, 0, 816, 818, 1, 0, 0, 0, 817, 811, 1, 0, 0, 0, 817, 818, 1, 0, 0, 0, 818, 964, 1, 0, 0, 0, 819, 820, 5, 191, 0, 0, 820, 821, 5, 32, 0, 0, 821, 822, 7, 2, 0, 0, 822, 964, 3, 158, 79, 0, 823, 824, 5, 191, 0, 0, 824, 825, 5, 195, 0, 0, 825, 826, 5, 79, 0, 0, 826, 964, 3, 158, 79, 0, 827, 828, 5, 191, 0, 0, 828, 829, 5, 195, 0, 0, 829, 830, 5, 79, 0, 0, 830, 831, 5, 2, 0, 0, 831, 832, 3, 54, 27, 0, 832, 833, 5, 3, 0, 0, 833, 964, 1, 0, 0, 0, 834, 836, 5, 191, 0, 0, 835, 837, 5, 41, 0, 0, 836, 835, 1, 0, 0, 0, 836, 837, 1, 0, 0, 0, 837, 838, 1, 0, 0, 0, 838, 841, 5, 177, 0, 0, 839, 840, 7, 2, 0, 0, 840, 842, 3, 170, 85, 0, 841, 839, 1, 0, 0, 0, 841, 842, 1, 0, 0, 0, 842, 964, 1, 0, 0, 0, 843, 844, 5, 191, 0, 0, 844, 845, 5, 176, 0, 0, 845, 848, 5, 87, 0, 0, 846, 847, 7, 2, 0, 0, 847, 849, 3, 170, 85, 0, 848, 846, 1, 0, 0, 0, 848, 849, 1, 0, 0, 0, 849, 964, 1, 0, 0, 0, 850, 851, 5, 54, 0, 0, 851, 964, 3, 158, 79, 0, 852, 853, 5, 53, 0, 0, 853, 964, 3, 158, 79, 0, 854, 855, 5, 191, 0, 0, 855, 862, 5, 84, 0, 0, 856, 857, 5, 117, 0, 0, 857, 860, 3, 94, 47, 0, 858, 859, 5, 66, 0, 0, 859, 861, 3, 94, 47, 0, 860, 858, 1, 0, 0, 0, 860, 861, 1, 0, 0, 0, 861, 863, 1, 0, 0, 0, 862, 856, 1, 0, 0, 0, 862, 863, 1, 0, 0, 0, 863, 964, 1, 0, 0, 0, 864, 865, 5, 191, 0, 0, 865, 872, 5, 188, 0, 0, 866, 867, 5, 117, 0, 0, 867, 870, 3, 94, 47, 0, 868, 869, 5, 66, 0, 0, 869, 871, 3, 94, 47, 0, 870, 868, 1, 0, 0, 0, 870, 871, 1, 0, 0, 0, 871, 873, 1, 0, 0, 0, 872, 866, 1, 0, 0, 0, 872, 873, 1, 0, 0, 0, 873, 964, 1, 0, 0, 0, 874, 875, 5, 189, 0, 0, 875, 876, 5, 188, 0, 0, 876, 877, 3, 158, 79, 0, 877, 878, 5, 236, 0, 0, 878, 879, 3, 84, 42, 0, 879, 964, 1, 0, 0, 0, 880, 881, 5, 169, 0, 0, 881, 882, 5, 188, 0, 0, 882, 964, 3, 158, 79, 0, 883, 884, 5, 194, 0, 0, 884, 893, 5, 209, 0, 0, 885, 890, 3, 150, 75, 0, 886, 887, 5, 4, 0, 0, 887, 889, 3, 150, 75, 0, 888, 886, 1, 0, 0, 0, 889, 892, 1, 0, 0, 0, 890, 888, 1, 0, 0, 0, 890, 891, 1, 0, 0, 0, 891, 894, 1, 0, 0, 0, 892, 890, 1, 0, 0, 0, 893, 885, 1, 0, 0, 0, 893, 894, 1, 0, 0, 0, 894, 964, 1, 0, 0, 0, 895, 897, 5, 34, 0, 0, 896, 898, 5, 232, 0, 0, 897, 896, 1, 0, 0, 0, 897, 898, 1, 0, 0, 0, 898, 964, 1, 0, 0, 0, 899, 901, 5, 178, 0, 0, 900, 902, 5, 232, 0, 0, 901, 900, 1, 0, 0, 0, 901, 902, 1, 0, 0, 0, 902, 964, 1, 0, 0, 0, 903, 904, 5, 156, 0, 0, 904, 905, 3, 170, 85, 0, 905, 906, 5, 81, 0, 0, 906, 907, 3, 6, 3, 0, 907, 964, 1, 0, 0, 0, 908, 909, 5, 50, 0, 0, 909, 910, 5, 156, 0, 0, 910, 964, 3, 170, 85, 0, 911, 912, 5, 69, 0, 0, 912, 922, 3, 170, 85, 0, 913, 914, 5, 223, 0, 0, 914, 919, 3, 84, 42, 0, 915, 916, 5, 4, 0, 0, 916, 918, 3, 84, 42, 0, 917, 915, 1, 0, 0, 0, 918, 921, 1, 0, 0, 0, 919, 917, 1, 0, 0, 0, 919, 920, 1, 0, 0, 0, 920, 923, 1, 0, 0, 0, 921, 919, 1, 0, 0, 0, 922, 913, 1, 0, 0, 0, 922, 923, 1, 0, 0, 0, 923, 964, 1, 0, 0, 0, 924, 925, 5, 54, 0, 0, 925, 926, 5, 99, 0, 0, 926, 964, 3, 170, 85, 0, 927, 928, 5, 54, 0, 0, 928, 929, 5, 150, 0, 0, 929, 964, 3, 170, 85, 0, 930, 931, 5, 220, 0, 0, 931, 932, 3, 158, 79, 0, 932, 933, 5, 189, 0, 0, 933, 938, 3, 146, 73, 0, 934, 935, 5, 4, 0, 0, 935, 937, 3, 146, 73, 0, 936, 934, 1, 0, 0, 0, 937, 940, 1, 0, 0, 0, 938, 936, 1, 0, 0, 0, 938, 939, 1, 0, 0, 0, 939, 943, 1, 0, 0, 0, 940, 938, 1, 0, 0, 0, 941, 942, 5, 230, 0, 0, 942, 944, 3, 86, 43, 0, 943, 941, 1, 0, 0, 0, 943, 944, 1, 0, 0, 0, 944, 964, 1, 0, 0, 0, 945, 946, 5, 125, 0, 0, 946, 947, 5, 103, 0, 0, 947, 952, 3, 158, 79, 0, 948, 950, 5, 18, 0, 0, 949, 948, 1, 0, 0, 0, 949, 950, 1, 0, 0, 0, 950, 951, 1, 0, 0, 0, 951, 953, 3, 170, 85, 0, 952, 949, 1, 0, 0, 0, 952, 953, 1, 0, 0, 0, 953, 954, 1, 0, 0, 0, 954, 955, 5, 223, 0, 0, 955, 956, 3, 68, 34, 0, 956, 957, 5, 143, 0, 0, 957, 959, 3, 84, 42, 0, 958, 960, 3, 138, 69, 0, 959, 958, 1, 0, 0, 0, 960, 961, 1, 0, 0, 0, 961, 959, 1, 0, 0, 0, 961, 962, 1, 0, 0, 0, 962, 964, 1, 0, 0, 0, 963, 203, 1, 0, 0, 0, 963, 204, 1, 0, 0, 0, 963, 206, 1, 0, 0, 0, 963, 211, 1, 0, 0, 0, 963, 223, 1, 0, 0, 0, 963, 233, 1, 0, 0, 0, 963, 240, 1, 0, 0, 0, 963, 274, 1, 0, 0, 0, 963, 300, 1, 0, 0, 0, 963, 307, 1, 0, 0, 0, 963, 315, 1, 0, 0, 0, 963, 322, 1, 0, 0, 0, 963, 325, 1, 0, 0, 0, 963, 336, 1, 0, 0, 0, 963, 353, 1, 0, 0, 0, 963, 368, 1, 0, 0, 0, 963, 384, 1, 0, 0, 0, 963, 394, 1, 0, 0, 0, 963, 409, 1, 0, 0, 0, 963, 425, 1, 0, 0, 0, 963, 441, 1, 0, 0, 0, 963, 452, 1, 0, 0, 0, 963, 458, 1, 0, 0, 0, 963, 476, 1, 0, 0, 0, 963, 490, 1, 0, 0, 0, 963, 501, 1, 0, 0, 0, 963, 508, 1, 0, 0, 0, 963, 533, 1, 0, 0, 0, 963, 541, 1, 0, 0, 0, 963, 549, 1, 0, 0, 0, 963, 580, 1, 0, 0, 0, 963, 588, 1, 0, 0, 0, 963, 601, 1, 0, 0, 0, 963, 616, 1, 0, 0, 0, 963, 624, 1, 0, 0, 0, 963, 627, 1, 0, 0, 0, 963, 648, 1, 0, 0, 0, 963, 669, 1, 0, 0, 0, 963, 676, 1, 0, 0, 0, 963, 701, 1, 0, 0, 0, 963, 727, 1, 0, 0, 0, 963, 736, 1, 0, 0, 0, 963, 757, 1, 0, 0, 0, 963, 761, 1, 0, 0, 0, 963, 765, 1, 0, 0, 0, 963, 769, 1, 0, 0, 0, 963, 774, 1, 0, 0, 0, 963, 781, 1, 0, 0, 0, 963, 795, 1, 0, 0, 0, 963, 809, 1, 0, 0, 0, 963, 819, 1, 0, 0, 0, 963, 823, 1, 0, 0, 0, 963, 827, 1, 0, 0, 0, 963, 834, 1, 0, 0, 0, 963, 843, 1, 0, 0, 0, 963, 850, 1, 0, 0, 0, 963, 852, 1, 0, 0, 0, 963, 854, 1, 0, 0, 0, 963, 864, 1, 0, 0, 0, 963, 874, 1, 0, 0, 0, 963, 880, 1, 0, 0, 0, 963, 883, 1, 0, 0, 0, 963, 895, 1, 0, 0, 0, 963, 899, 1, 0, 0, 0, 963, 903, 1, 0, 0, 0, 963, 908, 1, 0, 0, 0, 963, 911, 1, 0, 0, 0, 963, 924, 1, 0, 0, 0, 963, 927, 1, 0, 0, 0, 963, 930, 1, 0, 0, 0, 963, 945, 1, 0, 0, 0, 964, 7, 1, 0, 0, 0, 965, 967, 3, 10, 5, 0, 966, 965, 1, 0, 0, 0, 966, 967, 1, 0, 0, 0, 967, 968, 1, 0, 0, 0, 968, 969, 3, 46, 23, 0, 969, 9, 1, 0, 0, 0, 970, 972, 5, 231, 0, 0, 971, 973, 5, 163, 0, 0, 972, 971, 1, 0, 0, 0, 972, 973, 1, 0, 0, 0, 973, 974, 1, 0, 0, 0, 974, 979, 3, 62, 31, 0, 975, 976, 5, 4, 0, 0, 976, 978, 3, 62, 31, 0, 977, 975, 1, 0, 0, 0, 978, 981, 1, 0, 0, 0, 979, 977, 1, 0, 0, 0, 979, 980, 1, 0, 0, 0, 980, 11, 1, 0, 0, 0, 981, 979, 1, 0, 0, 0, 982, 986, 3, 174, 87, 0, 983, 986, 3, 14, 7, 0, 984, 986, 3, 16, 8, 0, 985, 982, 1, 0, 0, 0, 985, 983, 1, 0, 0, 0, 985, 984, 1, 0, 0, 0, 986, 13, 1, 0, 0, 0, 987, 988, 3, 170, 85, 0, 988, 991, 3, 114, 57, 0, 989, 990, 5, 137, 0, 0, 990, 992, 5, 138, 0, 0, 991, 989, 1, 0, 0, 0, 991, 992, 1, 0, 0, 0, 992, 995, 1, 0, 0, 0, 993, 994, 5, 33, 0, 0, 994, 996, 3, 94, 47, 0, 995, 993, 1, 0, 0, 0, 995, 996, 1, 0, 0, 0, 996, 999, 1, 0, 0, 0, 997, 998, 5, 231, 0, 0, 998, 1000, 3, 18, 9, 0, 999, 997, 1, 0, 0, 0, 999, 1000, 1, 0, 0, 0, 1000, 15, 1, 0, 0, 0, 1001, 1002, 5, 117, 0, 0, 1002, 1005, 3, 158, 79, 0, 1003, 1004, 7, 3, 0, 0, 1004, 1006, 5, 159, 0, 0, 1005, 1003, 1, 0, 0, 0, 1005, 1006, 1, 0, 0, 0, 1006, 17, 1, 0, 0, 0, 1007, 1008, 5, 2, 0, 0, 1008, 1013, 3, 20, 10, 0, 1009, 1010, 5, 4, 0, 0, 1010, 1012, 3, 20, 10, 0, 1011, 1009, 1, 0, 0, 0, 1012, 1015, 1, 0, 0, 0, 1013, 1011, 1, 0, 0, 0, 1013, 1014, 1, 0, 0, 0, 1014, 1016, 1, 0, 0, 0, 1015, 1013, 1, 0, 0, 0, 1016, 1017, 5, 3, 0, 0, 1017, 19, 1, 0, 0, 0, 1018, 1019, 3, 170, 85, 0, 1019, 1020, 5, 236, 0, 0, 1020, 1021, 3, 84, 42, 0, 1021, 21, 1, 0, 0, 0, 1022, 1023, 3, 170, 85, 0, 1023, 1024, 3, 114, 57, 0, 1024, 23, 1, 0, 0, 0, 1025, 1027, 3, 26, 13, 0, 1026, 1025, 1, 0, 0, 0, 1027, 1030, 1, 0, 0, 0, 1028, 1026, 1, 0, 0, 0, 1028, 1029, 1, 0, 0, 0, 1029, 25, 1, 0, 0, 0, 1030, 1028, 1, 0, 0, 0, 1031, 1032, 5, 112, 0, 0, 1032, 1036, 3, 38, 19, 0, 1033, 1036, 3, 40, 20, 0, 1034, 1036, 3, 42, 21, 0, 1035, 1031, 1, 0, 0, 0, 1035, 1033, 1, 0, 0, 0, 1035, 1034, 1, 0, 0, 0, 1036, 27, 1, 0, 0, 0, 1037, 1039, 3, 30, 15, 0, 1038, 1037, 1, 0, 0, 0, 1039, 1042, 1, 0, 0, 0, 1040, 1038, 1, 0, 0, 0, 1040, 1041, 1, 0, 0, 0, 1041, 29, 1, 0, 0, 0, 1042, 1040, 1, 0, 0, 0, 1043, 1044, 3, 42, 21, 0, 1044, 31, 1, 0, 0, 0, 1045, 1048, 3, 34, 17, 0, 1046, 1048, 3, 36, 18, 0, 1047, 1045, 1, 0, 0, 0, 1047, 1046, 1, 0, 0, 0, 1048, 33, 1, 0, 0, 0, 1049, 1050, 5, 172, 0, 0, 1050, 1051, 3, 84, 42, 0, 1051, 35, 1, 0, 0, 0, 1052, 1055, 5, 73, 0, 0, 1053, 1054, 5, 128, 0, 0, 1054, 1056, 3, 44, 22, 0, 1055, 1053, 1, 0, 0, 0, 1055, 1056, 1, 0, 0, 0, 1056, 37, 1, 0, 0, 0, 1057, 1060, 5, 193, 0, 0, 1058, 1060, 3, 170, 85, 0, 1059, 1057, 1, 0, 0, 0, 1059, 1058, 1, 0, 0, 0, 1060, 39, 1, 0, 0, 0, 1061, 1065, 5, 56, 0, 0, 1062, 1063, 5, 137, 0, 0, 1063, 1065, 5, 56, 0, 0, 1064, 1061, 1, 0, 0, 0, 1064, 1062, 1, 0, 0, 0, 1065, 41, 1, 0, 0, 0, 1066, 1067, 5, 173, 0, 0, 1067, 1068, 5, 138, 0, 0, 1068, 1069, 5, 143, 0, 0, 1069, 1070, 5, 138, 0, 0, 1070, 1076, 5, 99, 0, 0, 1071, 1072, 5, 26, 0, 0, 1072, 1073, 5, 143, 0, 0, 1073, 1074, 5, 138, 0, 0, 1074, 1076, 5, 99, 0, 0, 1075, 1066, 1, 0, 0, 0, 1075, 1071, 1, 0, 0, 0, 1076, 43, 1, 0, 0, 0, 1077, 1078, 3, 170, 85, 0, 1078, 45, 1, 0, 0, 0, 1079, 1090, 3, 48, 24, 0, 1080, 1081, 5, 147, 0, 0, 1081, 1082, 5, 24, 0, 0, 1082, 1087, 3, 52, 26, 0, 1083, 1084, 5, 4, 0, 0, 1084, 1086, 3, 52, 26, 0, 1085, 1083, 1, 0, 0, 0, 1086, 1089, 1, 0, 0, 0, 1087, 1085, 1, 0, 0, 0, 1087, 1088, 1, 0, 0, 0, 1088, 1091, 1, 0, 0, 0, 1089, 1087, 1, 0, 0, 0, 1090, 1080, 1, 0, 0, 0, 1090, 1091, 1, 0, 0, 0, 1091, 1097, 1, 0, 0, 0, 1092, 1093, 5, 142, 0, 0, 1093, 1095, 5, 251, 0, 0, 1094, 1096, 7, 4, 0, 0, 1095, 1094, 1, 0, 0, 0, 1095, 1096, 1, 0, 0, 0, 1096, 1098, 1, 0, 0, 0, 1097, 1092, 1, 0, 0, 0, 1097, 1098, 1, 0, 0, 0, 1098, 1108, 1, 0, 0, 0, 1099, 1100, 5, 118, 0, 0, 1100, 1107, 7, 5, 0, 0, 1101, 1102, 5, 75, 0, 0, 1102, 1103, 5, 77, 0, 0, 1103, 1104, 5, 251, 0, 0, 1104, 1105, 5, 181, 0, 0, 1105, 1107, 5, 144, 0, 0, 1106, 1099, 1, 0, 0, 0, 1106, 1101, 1, 0, 0, 0, 1107, 1109, 1, 0, 0, 0, 1108, 1106, 1, 0, 0, 0, 1108, 1109, 1, 0, 0, 0, 1109, 47, 1, 0, 0, 0, 1110, 1111, 6, 24, -1, 0, 1111, 1112, 3, 50, 25, 0, 1112, 1127, 1, 0, 0, 0, 1113, 1114, 10, 2, 0, 0, 1114, 1116, 5, 101, 0, 0, 1115, 1117, 3, 64, 32, 0, 1116, 1115, 1, 0, 0, 0, 1116, 1117, 1, 0, 0, 0, 1117, 1118, 1, 0, 0, 0, 1118, 1126, 3, 48, 24, 3, 1119, 1120, 10, 1, 0, 0, 1120, 1122, 7, 6, 0, 0, 1121, 1123, 3, 64, 32, 0, 1122, 1121, 1, 0, 0, 0, 1122, 1123, 1, 0, 0, 0, 1123, 1124, 1, 0, 0, 0, 1124, 1126, 3, 48, 24, 2, 1125, 1113, 1, 0, 0, 0, 1125, 1119, 1, 0, 0, 0, 1126, 1129, 1, 0, 0, 0, 1127, 1125, 1, 0, 0, 0, 1127, 1128, 1, 0, 0, 0, 1128, 49, 1, 0, 0, 0, 1129, 1127, 1, 0, 0, 0, 1130, 1147, 3, 54, 27, 0, 1131, 1132, 5, 200, 0, 0, 1132, 1147, 3, 158, 79, 0, 1133, 1134, 5, 225, 0, 0, 1134, 1139, 3, 84, 42, 0, 1135, 1136, 5, 4, 0, 0, 1136, 1138, 3, 84, 42, 0, 1137, 1135, 1, 0, 0, 0, 1138, 1141, 1, 0, 0, 0, 1139, 1137, 1, 0, 0, 0, 1139, 1140, 1, 0, 0, 0, 1140, 1147, 1, 0, 0, 0, 1141, 1139, 1, 0, 0, 0, 1142, 1143, 5, 2, 0, 0, 1143, 1144, 3, 46, 23, 0, 1144, 1145, 5, 3, 0, 0, 1145, 1147, 1, 0, 0, 0, 1146, 1130, 1, 0, 0, 0, 1146, 1131, 1, 0, 0, 0, 1146, 1133, 1, 0, 0, 0, 1146, 1142, 1, 0, 0, 0, 1147, 51, 1, 0, 0, 0, 1148, 1150, 3, 84, 42, 0, 1149, 1151, 7, 7, 0, 0, 1150, 1149, 1, 0, 0, 0, 1150, 1151, 1, 0, 0, 0, 1151, 1154, 1, 0, 0, 0, 1152, 1153, 5, 140, 0, 0, 1153, 1155, 7, 8, 0, 0, 1154, 1152, 1, 0, 0, 0, 1154, 1155, 1, 0, 0, 0, 1155, 53, 1, 0, 0, 0, 1156, 1158, 5, 186, 0, 0, 1157, 1159, 3, 64, 32, 0, 1158, 1157, 1, 0, 0, 0, 1158, 1159, 1, 0, 0, 0, 1159, 1160, 1, 0, 0, 0, 1160, 1165, 3, 66, 33, 0, 1161, 1162, 5, 4, 0, 0, 1162, 1164, 3, 66, 33, 0, 1163, 1161, 1, 0, 0, 0, 1164, 1167, 1, 0, 0, 0, 1165, 1163, 1, 0, 0, 0, 1165, 1166, 1, 0, 0, 0, 1166, 1177, 1, 0, 0, 0, 1167, 1165, 1, 0, 0, 0, 1168, 1169, 5, 81, 0, 0, 1169, 1174, 3, 68, 34, 0, 1170, 1171, 5, 4, 0, 0, 1171, 1173, 3, 68, 34, 0, 1172, 1170, 1, 0, 0, 0, 1173, 1176, 1, 0, 0, 0, 1174, 1172, 1, 0, 0, 0, 1174, 1175, 1, 0, 0, 0, 1175, 1178, 1, 0, 0, 0, 1176, 1174, 1, 0, 0, 0, 1177, 1168, 1, 0, 0, 0, 1177, 1178, 1, 0, 0, 0, 1178, 1181, 1, 0, 0, 0, 1179, 1180, 5, 230, 0, 0, 1180, 1182, 3, 86, 43, 0, 1181, 1179, 1, 0, 0, 0, 1181, 1182, 1, 0, 0, 0, 1182, 1186, 1, 0, 0, 0, 1183, 1184, 5, 89, 0, 0, 1184, 1185, 5, 24, 0, 0, 1185, 1187, 3, 56, 28, 0, 1186, 1183, 1, 0, 0, 0, 1186, 1187, 1, 0, 0, 0, 1187, 1190, 1, 0, 0, 0, 1188, 1189, 5, 92, 0, 0, 1189, 1191, 3, 86, 43, 0, 1190, 1188, 1, 0, 0, 0, 1190, 1191, 1, 0, 0, 0, 1191, 55, 1, 0, 0, 0, 1192, 1194, 3, 64, 32, 0, 1193, 1192, 1, 0, 0, 0, 1193, 1194, 1, 0, 0, 0, 1194, 1195, 1, 0, 0, 0, 1195, 1200, 3, 58, 29, 0, 1196, 1197, 5, 4, 0, 0, 1197, 1199, 3, 58, 29, 0, 1198, 1196, 1, 0, 0, 0, 1199, 1202, 1, 0, 0, 0, 1200, 1198, 1, 0, 0, 0, 1200, 1201, 1, 0, 0, 0, 1201, 57, 1, 0, 0, 0, 1202, 1200, 1, 0, 0, 0, 1203, 1244, 3, 60, 30, 0, 1204, 1205, 5, 179, 0, 0, 1205, 1214, 5, 2, 0, 0, 1206, 1211, 3, 84, 42, 0, 1207, 1208, 5, 4, 0, 0, 1208, 1210, 3, 84, 42, 0, 1209, 1207, 1, 0, 0, 0, 1210, 1213, 1, 0, 0, 0, 1211, 1209, 1, 0, 0, 0, 1211, 1212, 1, 0, 0, 0, 1212, 1215, 1, 0, 0, 0, 1213, 1211, 1, 0, 0, 0, 1214, 1206, 1, 0, 0, 0, 1214, 1215, 1, 0, 0, 0, 1215, 1216, 1, 0, 0, 0, 1216, 1244, 5, 3, 0, 0, 1217, 1218, 5, 40, 0, 0, 1218, 1227, 5, 2, 0, 0, 1219, 1224, 3, 84, 42, 0, 1220, 1221, 5, 4, 0, 0, 1221, 1223, 3, 84, 42, 0, 1222, 1220, 1, 0, 0, 0, 1223, 1226, 1, 0, 0, 0, 1224, 1222, 1, 0, 0, 0, 1224, 1225, 1, 0, 0, 0, 1225, 1228, 1, 0, 0, 0, 1226, 1224, 1, 0, 0, 0, 1227, 1219, 1, 0, 0, 0, 1227, 1228, 1, 0, 0, 0, 1228, 1229, 1, 0, 0, 0, 1229, 1244, 5, 3, 0, 0, 1230, 1231, 5, 90, 0, 0, 1231, 1232, 5, 190, 0, 0, 1232, 1233, 5, 2, 0, 0, 1233, 1238, 3, 60, 30, 0, 1234, 1235, 5, 4, 0, 0, 1235, 1237, 3, 60, 30, 0, 1236, 1234, 1, 0, 0, 0, 1237, 1240, 1, 0, 0, 0, 1238, 1236, 1, 0, 0, 0, 1238, 1239, 1, 0, 0, 0, 1239, 1241, 1, 0, 0, 0, 1240, 1238, 1, 0, 0, 0, 1241, 1242, 5, 3, 0, 0, 1242, 1244, 1, 0, 0, 0, 1243, 1203, 1, 0, 0, 0, 1243, 1204, 1, 0, 0, 0, 1243, 1217, 1, 0, 0, 0, 1243, 1230, 1, 0, 0, 0, 1244, 59, 1, 0, 0, 0, 1245, 1254, 5, 2, 0, 0, 1246, 1251, 3, 84, 42, 0, 1247, 1248, 5, 4, 0, 0, 1248, 1250, 3, 84, 42, 0, 1249, 1247, 1, 0, 0, 0, 1250, 1253, 1, 0, 0, 0, 1251, 1249, 1, 0, 0, 0, 1251, 1252, 1, 0, 0, 0, 1252, 1255, 1, 0, 0, 0, 1253, 1251, 1, 0, 0, 0, 1254, 1246, 1, 0, 0, 0, 1254, 1255, 1, 0, 0, 0, 1255, 1256, 1, 0, 0, 0, 1256, 1259, 5, 3, 0, 0, 1257, 1259, 3, 84, 42, 0, 1258, 1245, 1, 0, 0, 0, 1258, 1257, 1, 0, 0, 0, 1259, 61, 1, 0, 0, 0, 1260, 1262, 3, 170, 85, 0, 1261, 1263, 3, 80, 40, 0, 1262, 1261, 1, 0, 0, 0, 1262, 1263, 1, 0, 0, 0, 1263, 1264, 1, 0, 0, 0, 1264, 1265, 5, 18, 0, 0, 1265, 1266, 5, 2, 0, 0, 1266, 1267, 3, 8, 4, 0, 1267, 1268, 5, 3, 0, 0, 1268, 63, 1, 0, 0, 0, 1269, 1270, 7, 9, 0, 0, 1270, 65, 1, 0, 0, 0, 1271, 1276, 3, 84, 42, 0, 1272, 1274, 5, 18, 0, 0, 1273, 1272, 1, 0, 0, 0, 1273, 1274, 1, 0, 0, 0, 1274, 1275, 1, 0, 0, 0, 1275, 1277, 3, 170, 85, 0, 1276, 1273, 1, 0, 0, 0, 1276, 1277, 1, 0, 0, 0, 1277, 1284, 1, 0, 0, 0, 1278, 1279, 3, 158, 79, 0, 1279, 1280, 5, 1, 0, 0, 1280, 1281, 5, 244, 0, 0, 1281, 1284, 1, 0, 0, 0, 1282, 1284, 5, 244, 0, 0, 1283, 1271, 1, 0, 0, 0, 1283, 1278, 1, 0, 0, 0, 1283, 1282, 1, 0, 0, 0, 1284, 67, 1, 0, 0, 0, 1285, 1286, 6, 34, -1, 0, 1286, 1287, 3, 74, 37, 0, 1287, 1306, 1, 0, 0, 0, 1288, 1302, 10, 2, 0, 0, 1289, 1290, 5, 39, 0, 0, 1290, 1291, 5, 109, 0, 0, 1291, 1303, 3, 74, 37, 0, 1292, 1293, 3, 70, 35, 0, 1293, 1294, 5, 109, 0, 0, 1294, 1295, 3, 68, 34, 0, 1295, 1296, 3, 72, 36, 0, 1296, 1303, 1, 0, 0, 0, 1297, 1298, 5, 129, 0, 0, 1298, 1299, 3, 70, 35, 0, 1299, 1300, 5, 109, 0, 0, 1300, 1301, 3, 74, 37, 0, 1301, 1303, 1, 0, 0, 0, 1302, 1289, 1, 0, 0, 0, 1302, 1292, 1, 0, 0, 0, 1302, 1297, 1, 0, 0, 0, 1303, 1305, 1, 0, 0, 0, 1304, 1288, 1, 0, 0, 0, 1305, 1308, 1, 0, 0, 0, 1306, 1304, 1, 0, 0, 0, 1306, 1307, 1, 0, 0, 0, 1307, 69, 1, 0, 0, 0, 1308, 1306, 1, 0, 0, 0, 1309, 1311, 5, 98, 0, 0, 1310, 1309, 1, 0, 0, 0, 1310, 1311, 1, 0, 0, 0, 1311, 1325, 1, 0, 0, 0, 1312, 1314, 5, 115, 0, 0, 1313, 1315, 5, 149, 0, 0, 1314, 1313, 1, 0, 0, 0, 1314, 1315, 1, 0, 0, 0, 1315, 1325, 1, 0, 0, 0, 1316, 1318, 5, 175, 0, 0, 1317, 1319, 5, 149, 0, 0, 1318, 1317, 1, 0, 0, 0, 1318, 1319, 1, 0, 0, 0, 1319, 1325, 1, 0, 0, 0, 1320, 1322, 5, 82, 0, 0, 1321, 1323, 5, 149, 0, 0, 1322, 1321, 1, 0, 0, 0, 1322, 1323, 1, 0, 0, 0, 1323, 1325, 1, 0, 0, 0, 1324, 1310, 1, 0, 0, 0, 1324, 1312, 1, 0, 0, 0, 1324, 1316, 1, 0, 0, 0, 1324, 1320, 1, 0, 0, 0, 1325, 71, 1, 0, 0, 0, 1326, 1327, 5, 143, 0, 0, 1327, 1341, 3, 86, 43, 0, 1328, 1329, 5, 223, 0, 0, 1329, 1330, 5, 2, 0, 0, 1330, 1335, 3, 170, 85, 0, 1331, 1332, 5, 4, 0, 0, 1332, 1334, 3, 170, 85, 0, 1333, 1331, 1, 0, 0, 0, 1334, 1337, 1, 0, 0, 0, 1335, 1333, 1, 0, 0, 0, 1335, 1336, 1, 0, 0, 0, 1336, 1338, 1, 0, 0, 0, 1337, 1335, 1, 0, 0, 0, 1338, 1339, 5, 3, 0, 0, 1339, 1341, 1, 0, 0, 0, 1340, 1326, 1, 0, 0, 0, 1340, 1328, 1, 0, 0, 0, 1341, 73, 1, 0, 0, 0, 1342, 1349, 3, 78, 39, 0, 1343, 1344, 5, 202, 0, 0, 1344, 1345, 3, 76, 38, 0, 1345, 1346, 5, 2, 0, 0, 1346, 1347, 3, 84, 42, 0, 1347, 1348, 5, 3, 0, 0, 1348, 1350, 1, 0, 0, 0, 1349, 1343, 1, 0, 0, 0, 1349, 1350, 1, 0, 0, 0, 1350, 75, 1, 0, 0, 0, 1351, 1352, 7, 10, 0, 0, 1352, 77, 1, 0, 0, 0, 1353, 1361, 3, 82, 41, 0, 1354, 1356, 5, 18, 0, 0, 1355, 1354, 1, 0, 0, 0, 1355, 1356, 1, 0, 0, 0, 1356, 1357, 1, 0, 0, 0, 1357, 1359, 3, 170, 85, 0, 1358, 1360, 3, 80, 40, 0, 1359, 1358, 1, 0, 0, 0, 1359, 1360, 1, 0, 0, 0, 1360, 1362, 1, 0, 0, 0, 1361, 1355, 1, 0, 0, 0, 1361, 1362, 1, 0, 0, 0, 1362, 79, 1, 0, 0, 0, 1363, 1364, 5, 2, 0, 0, 1364, 1369, 3, 170, 85, 0, 1365, 1366, 5, 4, 0, 0, 1366, 1368, 3, 170, 85, 0, 1367, 1365, 1, 0, 0, 0, 1368, 1371, 1, 0, 0, 0, 1369, 1367, 1, 0, 0, 0, 1369, 1370, 1, 0, 0, 0, 1370, 1372, 1, 0, 0, 0, 1371, 1369, 1, 0, 0, 0, 1372, 1373, 5, 3, 0, 0, 1373, 81, 1, 0, 0, 0, 1374, 1376, 3, 158, 79, 0, 1375, 1377, 3, 160, 80, 0, 1376, 1375, 1, 0, 0, 0, 1376, 1377, 1, 0, 0, 0, 1377, 1412, 1, 0, 0, 0, 1378, 1379, 5, 2, 0, 0, 1379, 1380, 3, 8, 4, 0, 1380, 1381, 5, 3, 0, 0, 1381, 1412, 1, 0, 0, 0, 1382, 1383, 5, 219, 0, 0, 1383, 1384, 5, 2, 0, 0, 1384, 1389, 3, 84, 42, 0, 1385, 1386, 5, 4, 0, 0, 1386, 1388, 3, 84, 42, 0, 1387, 1385, 1, 0, 0, 0, 1388, 1391, 1, 0, 0, 0, 1389, 1387, 1, 0, 0, 0, 1389, 1390, 1, 0, 0, 0, 1390, 1392, 1, 0, 0, 0, 1391, 1389, 1, 0, 0, 0, 1392, 1395, 5, 3, 0, 0, 1393, 1394, 5, 231, 0, 0, 1394, 1396, 5, 148, 0, 0, 1395, 1393, 1, 0, 0, 0, 1395, 1396, 1, 0, 0, 0, 1396, 1412, 1, 0, 0, 0, 1397, 1398, 5, 114, 0, 0, 1398, 1399, 5, 2, 0, 0, 1399, 1400, 3, 8, 4, 0, 1400, 1401, 5, 3, 0, 0, 1401, 1412, 1, 0, 0, 0, 1402, 1403, 5, 2, 0, 0, 1403, 1404, 3, 68, 34, 0, 1404, 1405, 5, 3, 0, 0, 1405, 1412, 1, 0, 0, 0, 1406, 1407, 5, 200, 0, 0, 1407, 1408, 5, 2, 0, 0, 1408, 1409, 3, 116, 58, 0, 1409, 1410, 5, 3, 0, 0, 1410, 1412, 1, 0, 0, 0, 1411, 1374, 1, 0, 0, 0, 1411, 1378, 1, 0, 0, 0, 1411, 1382, 1, 0, 0, 0, 1411, 1397, 1, 0, 0, 0, 1411, 1402, 1, 0, 0, 0, 1411, 1406, 1, 0, 0, 0, 1412, 83, 1, 0, 0, 0, 1413, 1414, 3, 86, 43, 0, 1414, 85, 1, 0, 0, 0, 1415, 1416, 6, 43, -1, 0, 1416, 1418, 3, 90, 45, 0, 1417, 1419, 3, 88, 44, 0, 1418, 1417, 1, 0, 0, 0, 1418, 1419, 1, 0, 0, 0, 1419, 1423, 1, 0, 0, 0, 1420, 1421, 5, 137, 0, 0, 1421, 1423, 3, 86, 43, 3, 1422, 1415, 1, 0, 0, 0, 1422, 1420, 1, 0, 0, 0, 1423, 1432, 1, 0, 0, 0, 1424, 1425, 10, 2, 0, 0, 1425, 1426, 5, 15, 0, 0, 1426, 1431, 3, 86, 43, 3, 1427, 1428, 10, 1, 0, 0, 1428, 1429, 5, 146, 0, 0, 1429, 1431, 3, 86, 43, 2, 1430, 1424, 1, 0, 0, 0, 1430, 1427, 1, 0, 0, 0, 1431, 1434, 1, 0, 0, 0, 1432, 1430, 1, 0, 0, 0, 1432, 1433, 1, 0, 0, 0, 1433, 87, 1, 0, 0, 0, 1434, 1432, 1, 0, 0, 0, 1435, 1436, 3, 100, 50, 0, 1436, 1437, 3, 90, 45, 0, 1437, 1497, 1, 0, 0, 0, 1438, 1439, 3, 100, 50, 0, 1439, 1440, 3, 102, 51, 0, 1440, 1441, 5, 2, 0, 0, 1441, 1442, 3, 8, 4, 0, 1442, 1443, 5, 3, 0, 0, 1443, 1497, 1, 0, 0, 0, 1444, 1446, 5, 137, 0, 0, 1445, 1444, 1, 0, 0, 0, 1445, 1446, 1, 0, 0, 0, 1446, 1447, 1, 0, 0, 0, 1447, 1448, 5, 23, 0, 0, 1448, 1449, 3, 90, 45, 0, 1449, 1450, 5, 15, 0, 0, 1450, 1451, 3, 90, 45, 0, 1451, 1497, 1, 0, 0, 0, 1452, 1454, 5, 137, 0, 0, 1453, 1452, 1, 0, 0, 0, 1453, 1454, 1, 0, 0, 0, 1454, 1455, 1, 0, 0, 0, 1455, 1456, 5, 96, 0, 0, 1456, 1457, 5, 2, 0, 0, 1457, 1462, 3, 84, 42, 0, 1458, 1459, 5, 4, 0, 0, 1459, 1461, 3, 84, 42, 0, 1460, 1458, 1, 0, 0, 0, 1461, 1464, 1, 0, 0, 0, 1462, 1460, 1, 0, 0, 0, 1462, 1463, 1, 0, 0, 0, 1463, 1465, 1, 0, 0, 0, 1464, 1462, 1, 0, 0, 0, 1465, 1466, 5, 3, 0, 0, 1466, 1497, 1, 0, 0, 0, 1467, 1469, 5, 137, 0, 0, 1468, 1467, 1, 0, 0, 0, 1468, 1469, 1, 0, 0, 0, 1469, 1470, 1, 0, 0, 0, 1470, 1471, 5, 96, 0, 0, 1471, 1472, 5, 2, 0, 0, 1472, 1473, 3, 8, 4, 0, 1473, 1474, 5, 3, 0, 0, 1474, 1497, 1, 0, 0, 0, 1475, 1477, 5, 137, 0, 0, 1476, 1475, 1, 0, 0, 0, 1476, 1477, 1, 0, 0, 0, 1477, 1478, 1, 0, 0, 0, 1478, 1479, 5, 117, 0, 0, 1479, 1482, 3, 90, 45, 0, 1480, 1481, 5, 66, 0, 0, 1481, 1483, 3, 90, 45, 0, 1482, 1480, 1, 0, 0, 0, 1482, 1483, 1, 0, 0, 0, 1483, 1497, 1, 0, 0, 0, 1484, 1486, 5, 106, 0, 0, 1485, 1487, 5, 137, 0, 0, 1486, 1485, 1, 0, 0, 0, 1486, 1487, 1, 0, 0, 0, 1487, 1488, 1, 0, 0, 0, 1488, 1497, 5, 138, 0, 0, 1489, 1491, 5, 106, 0, 0, 1490, 1492, 5, 137, 0, 0, 1491, 1490, 1, 0, 0, 0, 1491, 1492, 1, 0, 0, 0, 1492, 1493, 1, 0, 0, 0, 1493, 1494, 5, 58, 0, 0, 1494, 1495, 5, 81, 0, 0, 1495, 1497, 3, 90, 45, 0, 1496, 1435, 1, 0, 0, 0, 1496, 1438, 1, 0, 0, 0, 1496, 1445, 1, 0, 0, 0, 1496, 1453, 1, 0, 0, 0, 1496, 1468, 1, 0, 0, 0, 1496, 1476, 1, 0, 0, 0, 1496, 1484, 1, 0, 0, 0, 1496, 1489, 1, 0, 0, 0, 1497, 89, 1, 0, 0, 0, 1498, 1499, 6, 45, -1, 0, 1499, 1503, 3, 92, 46, 0, 1500, 1501, 7, 11, 0, 0, 1501, 1503, 3, 90, 45, 4, 1502, 1498, 1, 0, 0, 0, 1502, 1500, 1, 0, 0, 0, 1503, 1518, 1, 0, 0, 0, 1504, 1505, 10, 3, 0, 0, 1505, 1506, 7, 12, 0, 0, 1506, 1517, 3, 90, 45, 4, 1507, 1508, 10, 2, 0, 0, 1508, 1509, 7, 11, 0, 0, 1509, 1517, 3, 90, 45, 3, 1510, 1511, 10, 1, 0, 0, 1511, 1512, 5, 247, 0, 0, 1512, 1517, 3, 90, 45, 2, 1513, 1514, 10, 5, 0, 0, 1514, 1515, 5, 20, 0, 0, 1515, 1517, 3, 98, 49, 0, 1516, 1504, 1, 0, 0, 0, 1516, 1507, 1, 0, 0, 0, 1516, 1510, 1, 0, 0, 0, 1516, 1513, 1, 0, 0, 0, 1517, 1520, 1, 0, 0, 0, 1518, 1516, 1, 0, 0, 0, 1518, 1519, 1, 0, 0, 0, 1519, 91, 1, 0, 0, 0, 1520, 1518, 1, 0, 0, 0, 1521, 1522, 6, 46, -1, 0, 1522, 1761, 5, 138, 0, 0, 1523, 1761, 3, 106, 53, 0, 1524, 1525, 3, 170, 85, 0, 1525, 1526, 3, 94, 47, 0, 1526, 1761, 1, 0, 0, 0, 1527, 1528, 5, 260, 0, 0, 1528, 1761, 3, 94, 47, 0, 1529, 1761, 3, 172, 86, 0, 1530, 1761, 3, 104, 52, 0, 1531, 1761, 3, 94, 47, 0, 1532, 1761, 5, 250, 0, 0, 1533, 1761, 5, 5, 0, 0, 1534, 1535, 5, 154, 0, 0, 1535, 1536, 5, 2, 0, 0, 1536, 1537, 3, 90, 45, 0, 1537, 1538, 5, 96, 0, 0, 1538, 1539, 3, 90, 45, 0, 1539, 1540, 5, 3, 0, 0, 1540, 1761, 1, 0, 0, 0, 1541, 1542, 5, 2, 0, 0, 1542, 1545, 3, 84, 42, 0, 1543, 1544, 5, 4, 0, 0, 1544, 1546, 3, 84, 42, 0, 1545, 1543, 1, 0, 0, 0, 1546, 1547, 1, 0, 0, 0, 1547, 1545, 1, 0, 0, 0, 1547, 1548, 1, 0, 0, 0, 1548, 1549, 1, 0, 0, 0, 1549, 1550, 5, 3, 0, 0, 1550, 1761, 1, 0, 0, 0, 1551, 1552, 5, 180, 0, 0, 1552, 1553, 5, 2, 0, 0, 1553, 1558, 3, 84, 42, 0, 1554, 1555, 5, 4, 0, 0, 1555, 1557, 3, 84, 42, 0, 1556, 1554, 1, 0, 0, 0, 1557, 1560, 1, 0, 0, 0, 1558, 1556, 1, 0, 0, 0, 1558, 1559, 1, 0, 0, 0, 1559, 1561, 1, 0, 0, 0, 1560, 1558, 1, 0, 0, 0, 1561, 1562, 5, 3, 0, 0, 1562, 1761, 1, 0, 0, 0, 1563, 1564, 3, 158, 79, 0, 1564, 1565, 5, 2, 0, 0, 1565, 1566, 5, 244, 0, 0, 1566, 1568, 5, 3, 0, 0, 1567, 1569, 3, 136, 68, 0, 1568, 1567, 1, 0, 0, 0, 1568, 1569, 1, 0, 0, 0, 1569, 1571, 1, 0, 0, 0, 1570, 1572, 3, 140, 70, 0, 1571, 1570, 1, 0, 0, 0, 1571, 1572, 1, 0, 0, 0, 1572, 1761, 1, 0, 0, 0, 1573, 1574, 3, 158, 79, 0, 1574, 1586, 5, 2, 0, 0, 1575, 1577, 3, 64, 32, 0, 1576, 1575, 1, 0, 0, 0, 1576, 1577, 1, 0, 0, 0, 1577, 1578, 1, 0, 0, 0, 1578, 1583, 3, 84, 42, 0, 1579, 1580, 5, 4, 0, 0, 1580, 1582, 3, 84, 42, 0, 1581, 1579, 1, 0, 0, 0, 1582, 1585, 1, 0, 0, 0, 1583, 1581, 1, 0, 0, 0, 1583, 1584, 1, 0, 0, 0, 1584, 1587, 1, 0, 0, 0, 1585, 1583, 1, 0, 0, 0, 1586, 1576, 1, 0, 0, 0, 1586, 1587, 1, 0, 0, 0, 1587, 1598, 1, 0, 0, 0, 1588, 1589, 5, 147, 0, 0, 1589, 1590, 5, 24, 0, 0, 1590, 1595, 3, 52, 26, 0, 1591, 1592, 5, 4, 0, 0, 1592, 1594, 3, 52, 26, 0, 1593, 1591, 1, 0, 0, 0, 1594, 1597, 1, 0, 0, 0, 1595, 1593, 1, 0, 0, 0, 1595, 1596, 1, 0, 0, 0, 1596, 1599, 1, 0, 0, 0, 1597, 1595, 1, 0, 0, 0, 1598, 1588, 1, 0, 0, 0, 1598, 1599, 1, 0, 0, 0, 1599, 1600, 1, 0, 0, 0, 1600, 1602, 5, 3, 0, 0, 1601, 1603, 3, 136, 68, 0, 1602, 1601, 1, 0, 0, 0, 1602, 1603, 1, 0, 0, 0, 1603, 1608, 1, 0, 0, 0, 1604, 1606, 3, 96, 48, 0, 1605, 1604, 1, 0, 0, 0, 1605, 1606, 1, 0, 0, 0, 1606, 1607, 1, 0, 0, 0, 1607, 1609, 3, 140, 70, 0, 1608, 1605, 1, 0, 0, 0, 1608, 1609, 1, 0, 0, 0, 1609, 1761, 1, 0, 0, 0, 1610, 1611, 3, 170, 85, 0, 1611, 1612, 5, 6, 0, 0, 1612, 1613, 3, 84, 42, 0, 1613, 1761, 1, 0, 0, 0, 1614, 1623, 5, 2, 0, 0, 1615, 1620, 3, 170, 85, 0, 1616, 1617, 5, 4, 0, 0, 1617, 1619, 3, 170, 85, 0, 1618, 1616, 1, 0, 0, 0, 1619, 1622, 1, 0, 0, 0, 1620, 1618, 1, 0, 0, 0, 1620, 1621, 1, 0, 0, 0, 1621, 1624, 1, 0, 0, 0, 1622, 1620, 1, 0, 0, 0, 1623, 1615, 1, 0, 0, 0, 1623, 1624, 1, 0, 0, 0, 1624, 1625, 1, 0, 0, 0, 1625, 1626, 5, 3, 0, 0, 1626, 1627, 5, 6, 0, 0, 1627, 1761, 3, 84, 42, 0, 1628, 1629, 5, 2, 0, 0, 1629, 1630, 3, 8, 4, 0, 1630, 1631, 5, 3, 0, 0, 1631, 1761, 1, 0, 0, 0, 1632, 1633, 5, 70, 0, 0, 1633, 1634, 5, 2, 0, 0, 1634, 1635, 3, 8, 4, 0, 1635, 1636, 5, 3, 0, 0, 1636, 1761, 1, 0, 0, 0, 1637, 1638, 5, 28, 0, 0, 1638, 1640, 3, 90, 45, 0, 1639, 1641, 3, 134, 67, 0, 1640, 1639, 1, 0, 0, 0, 1641, 1642, 1, 0, 0, 0, 1642, 1640, 1, 0, 0, 0, 1642, 1643, 1, 0, 0, 0, 1643, 1646, 1, 0, 0, 0, 1644, 1645, 5, 61, 0, 0, 1645, 1647, 3, 84, 42, 0, 1646, 1644, 1, 0, 0, 0, 1646, 1647, 1, 0, 0, 0, 1647, 1648, 1, 0, 0, 0, 1648, 1649, 5, 64, 0, 0, 1649, 1761, 1, 0, 0, 0, 1650, 1652, 5, 28, 0, 0, 1651, 1653, 3, 134, 67, 0, 1652, 1651, 1, 0, 0, 0, 1653, 1654, 1, 0, 0, 0, 1654, 1652, 1, 0, 0, 0, 1654, 1655, 1, 0, 0, 0, 1655, 1658, 1, 0, 0, 0, 1656, 1657, 5, 61, 0, 0, 1657, 1659, 3, 84, 42, 0, 1658, 1656, 1, 0, 0, 0, 1658, 1659, 1, 0, 0, 0, 1659, 1660, 1, 0, 0, 0, 1660, 1661, 5, 64, 0, 0, 1661, 1761, 1, 0, 0, 0, 1662, 1663, 5, 29, 0, 0, 1663, 1664, 5, 2, 0, 0, 1664, 1665, 3, 84, 42, 0, 1665, 1666, 5, 18, 0, 0, 1666, 1667, 3, 114, 57, 0, 1667, 1668, 5, 3, 0, 0, 1668, 1761, 1, 0, 0, 0, 1669, 1670, 5, 212, 0, 0, 1670, 1671, 5, 2, 0, 0, 1671, 1672, 3, 84, 42, 0, 1672, 1673, 5, 18, 0, 0, 1673, 1674, 3, 114, 57, 0, 1674, 1675, 5, 3, 0, 0, 1675, 1761, 1, 0, 0, 0, 1676, 1677, 5, 17, 0, 0, 1677, 1686, 5, 7, 0, 0, 1678, 1683, 3, 84, 42, 0, 1679, 1680, 5, 4, 0, 0, 1680, 1682, 3, 84, 42, 0, 1681, 1679, 1, 0, 0, 0, 1682, 1685, 1, 0, 0, 0, 1683, 1681, 1, 0, 0, 0, 1683, 1684, 1, 0, 0, 0, 1684, 1687, 1, 0, 0, 0, 1685, 1683, 1, 0, 0, 0, 1686, 1678, 1, 0, 0, 0, 1686, 1687, 1, 0, 0, 0, 1687, 1688, 1, 0, 0, 0, 1688, 1761, 5, 8, 0, 0, 1689, 1761, 3, 170, 85, 0, 1690, 1761, 5, 42, 0, 0, 1691, 1695, 5, 44, 0, 0, 1692, 1693, 5, 2, 0, 0, 1693, 1694, 5, 251, 0, 0, 1694, 1696, 5, 3, 0, 0, 1695, 1692, 1, 0, 0, 0, 1695, 1696, 1, 0, 0, 0, 1696, 1761, 1, 0, 0, 0, 1697, 1701, 5, 45, 0, 0, 1698, 1699, 5, 2, 0, 0, 1699, 1700, 5, 251, 0, 0, 1700, 1702, 5, 3, 0, 0, 1701, 1698, 1, 0, 0, 0, 1701, 1702, 1, 0, 0, 0, 1702, 1761, 1, 0, 0, 0, 1703, 1707, 5, 119, 0, 0, 1704, 1705, 5, 2, 0, 0, 1705, 1706, 5, 251, 0, 0, 1706, 1708, 5, 3, 0, 0, 1707, 1704, 1, 0, 0, 0, 1707, 1708, 1, 0, 0, 0, 1708, 1761, 1, 0, 0, 0, 1709, 1713, 5, 120, 0, 0, 1710, 1711, 5, 2, 0, 0, 1711, 1712, 5, 251, 0, 0, 1712, 1714, 5, 3, 0, 0, 1713, 1710, 1, 0, 0, 0, 1713, 1714, 1, 0, 0, 0, 1714, 1761, 1, 0, 0, 0, 1715, 1761, 5, 46, 0, 0, 1716, 1717, 5, 196, 0, 0, 1717, 1718, 5, 2, 0, 0, 1718, 1719, 3, 90, 45, 0, 1719, 1720, 5, 81, 0, 0, 1720, 1723, 3, 90, 45, 0, 1721, 1722, 5, 79, 0, 0, 1722, 1724, 3, 90, 45, 0, 1723, 1721, 1, 0, 0, 0, 1723, 1724, 1, 0, 0, 0, 1724, 1725, 1, 0, 0, 0, 1725, 1726, 5, 3, 0, 0, 1726, 1761, 1, 0, 0, 0, 1727, 1728, 5, 136, 0, 0, 1728, 1729, 5, 2, 0, 0, 1729, 1732, 3, 90, 45, 0, 1730, 1731, 5, 4, 0, 0, 1731, 1733, 3, 110, 55, 0, 1732, 1730, 1, 0, 0, 0, 1732, 1733, 1, 0, 0, 0, 1733, 1734, 1, 0, 0, 0, 1734, 1735, 5, 3, 0, 0, 1735, 1761, 1, 0, 0, 0, 1736, 1737, 5, 72, 0, 0, 1737, 1738, 5, 2, 0, 0, 1738, 1739, 3, 170, 85, 0, 1739, 1740, 5, 81, 0, 0, 1740, 1741, 3, 90, 45, 0, 1741, 1742, 5, 3, 0, 0, 1742, 1761, 1, 0, 0, 0, 1743, 1744, 5, 2, 0, 0, 1744, 1745, 3, 84, 42, 0, 1745, 1746, 5, 3, 0, 0, 1746, 1761, 1, 0, 0, 0, 1747, 1748, 5, 90, 0, 0, 1748, 1757, 5, 2, 0, 0, 1749, 1754, 3, 158, 79, 0, 1750, 1751, 5, 4, 0, 0, 1751, 1753, 3, 158, 79, 0, 1752, 1750, 1, 0, 0, 0, 1753, 1756, 1, 0, 0, 0, 1754, 1752, 1, 0, 0, 0, 1754, 1755, 1, 0, 0, 0, 1755, 1758, 1, 0, 0, 0, 1756, 1754, 1, 0, 0, 0, 1757, 1749, 1, 0, 0, 0, 1757, 1758, 1, 0, 0, 0, 1758, 1759, 1, 0, 0, 0, 1759, 1761, 5, 3, 0, 0, 1760, 1521, 1, 0, 0, 0, 1760, 1523, 1, 0, 0, 0, 1760, 1524, 1, 0, 0, 0, 1760, 1527, 1, 0, 0, 0, 1760, 1529, 1, 0, 0, 0, 1760, 1530, 1, 0, 0, 0, 1760, 1531, 1, 0, 0, 0, 1760, 1532, 1, 0, 0, 0, 1760, 1533, 1, 0, 0, 0, 1760, 1534, 1, 0, 0, 0, 1760, 1541, 1, 0, 0, 0, 1760, 1551, 1, 0, 0, 0, 1760, 1563, 1, 0, 0, 0, 1760, 1573, 1, 0, 0, 0, 1760, 1610, 1, 0, 0, 0, 1760, 1614, 1, 0, 0, 0, 1760, 1628, 1, 0, 0, 0, 1760, 1632, 1, 0, 0, 0, 1760, 1637, 1, 0, 0, 0, 1760, 1650, 1, 0, 0, 0, 1760, 1662, 1, 0, 0, 0, 1760, 1669, 1, 0, 0, 0, 1760, 1676, 1, 0, 0, 0, 1760, 1689, 1, 0, 0, 0, 1760, 1690, 1, 0, 0, 0, 1760, 1691, 1, 0, 0, 0, 1760, 1697, 1, 0, 0, 0, 1760, 1703, 1, 0, 0, 0, 1760, 1709, 1, 0, 0, 0, 1760, 1715, 1, 0, 0, 0, 1760, 1716, 1, 0, 0, 0, 1760, 1727, 1, 0, 0, 0, 1760, 1736, 1, 0, 0, 0, 1760, 1743, 1, 0, 0, 0, 1760, 1747, 1, 0, 0, 0, 1761, 1772, 1, 0, 0, 0, 1762, 1763, 10, 14, 0, 0, 1763, 1764, 5, 7, 0, 0, 1764, 1765, 3, 90, 45, 0, 1765, 1766, 5, 8, 0, 0, 1766, 1771, 1, 0, 0, 0, 1767, 1768, 10, 12, 0, 0, 1768, 1769, 5, 1, 0, 0, 1769, 1771, 3, 170, 85, 0, 1770, 1762, 1, 0, 0, 0, 1770, 1767, 1, 0, 0, 0, 1771, 1774, 1, 0, 0, 0, 1772, 1770, 1, 0, 0, 0, 1772, 1773, 1, 0, 0, 0, 1773, 93, 1, 0, 0, 0, 1774, 1772, 1, 0, 0, 0, 1775, 1782, 5, 248, 0, 0, 1776, 1779, 5, 249, 0, 0, 1777, 1778, 5, 214, 0, 0, 1778, 1780, 5, 248, 0, 0, 1779, 1777, 1, 0, 0, 0, 1779, 1780, 1, 0, 0, 0, 1780, 1782, 1, 0, 0, 0, 1781, 1775, 1, 0, 0, 0, 1781, 1776, 1, 0, 0, 0, 1782, 95, 1, 0, 0, 0, 1783, 1784, 5, 95, 0, 0, 1784, 1788, 5, 140, 0, 0, 1785, 1786, 5, 170, 0, 0, 1786, 1788, 5, 140, 0, 0, 1787, 1783, 1, 0, 0, 0, 1787, 1785, 1, 0, 0, 0, 1788, 97, 1, 0, 0, 0, 1789, 1790, 5, 206, 0, 0, 1790, 1791, 5, 235, 0, 0, 1791, 1796, 3, 106, 53, 0, 1792, 1793, 5, 206, 0, 0, 1793, 1794, 5, 235, 0, 0, 1794, 1796, 3, 94, 47, 0, 1795, 1789, 1, 0, 0, 0, 1795, 1792, 1, 0, 0, 0, 1796, 99, 1, 0, 0, 0, 1797, 1798, 7, 13, 0, 0, 1798, 101, 1, 0, 0, 0, 1799, 1800, 7, 14, 0, 0, 1800, 103, 1, 0, 0, 0, 1801, 1802, 7, 15, 0, 0, 1802, 105, 1, 0, 0, 0, 1803, 1805, 5, 102, 0, 0, 1804, 1806, 7, 11, 0, 0, 1805, 1804, 1, 0, 0, 0, 1805, 1806, 1, 0, 0, 0, 1806, 1807, 1, 0, 0, 0, 1807, 1808, 3, 94, 47, 0, 1808, 1811, 3, 108, 54, 0, 1809, 1810, 5, 208, 0, 0, 1810, 1812, 3, 108, 54, 0, 1811, 1809, 1, 0, 0, 0, 1811, 1812, 1, 0, 0, 0, 1812, 107, 1, 0, 0, 0, 1813, 1814, 7, 16, 0, 0, 1814, 109, 1, 0, 0, 0, 1815, 1816, 7, 17, 0, 0, 1816, 111, 1, 0, 0, 0, 1817, 1826, 5, 2, 0, 0, 1818, 1823, 3, 114, 57, 0, 1819, 1820, 5, 4, 0, 0, 1820, 1822, 3, 114, 57, 0, 1821, 1819, 1, 0, 0, 0, 1822, 1825, 1, 0, 0, 0, 1823, 1821, 1, 0, 0, 0, 1823, 1824, 1, 0, 0, 0, 1824, 1827, 1, 0, 0, 0, 1825, 1823, 1, 0, 0, 0, 1826, 1818, 1, 0, 0, 0, 1826, 1827, 1, 0, 0, 0, 1827, 1828, 1, 0, 0, 0, 1828, 1829, 5, 3, 0, 0, 1829, 113, 1, 0, 0, 0, 1830, 1831, 6, 57, -1, 0, 1831, 1832, 5, 17, 0, 0, 1832, 1833, 5, 238, 0, 0, 1833, 1834, 3, 114, 57, 0, 1834, 1835, 5, 240, 0, 0, 1835, 1878, 1, 0, 0, 0, 1836, 1837, 5, 122, 0, 0, 1837, 1838, 5, 238, 0, 0, 1838, 1839, 3, 114, 57, 0, 1839, 1840, 5, 4, 0, 0, 1840, 1841, 3, 114, 57, 0, 1841, 1842, 5, 240, 0, 0, 1842, 1878, 1, 0, 0, 0, 1843, 1844, 5, 180, 0, 0, 1844, 1845, 5, 2, 0, 0, 1845, 1846, 3, 170, 85, 0, 1846, 1853, 3, 114, 57, 0, 1847, 1848, 5, 4, 0, 0, 1848, 1849, 3, 170, 85, 0, 1849, 1850, 3, 114, 57, 0, 1850, 1852, 1, 0, 0, 0, 1851, 1847, 1, 0, 0, 0, 1852, 1855, 1, 0, 0, 0, 1853, 1851, 1, 0, 0, 0, 1853, 1854, 1, 0, 0, 0, 1854, 1856, 1, 0, 0, 0, 1855, 1853, 1, 0, 0, 0, 1856, 1857, 5, 3, 0, 0, 1857, 1878, 1, 0, 0, 0, 1858, 1870, 3, 132, 66, 0, 1859, 1860, 5, 2, 0, 0, 1860, 1865, 3, 130, 65, 0, 1861, 1862, 5, 4, 0, 0, 1862, 1864, 3, 130, 65, 0, 1863, 1861, 1, 0, 0, 0, 1864, 1867, 1, 0, 0, 0, 1865, 1863, 1, 0, 0, 0, 1865, 1866, 1, 0, 0, 0, 1866, 1868, 1, 0, 0, 0, 1867, 1865, 1, 0, 0, 0, 1868, 1869, 5, 3, 0, 0, 1869, 1871, 1, 0, 0, 0, 1870, 1859, 1, 0, 0, 0, 1870, 1871, 1, 0, 0, 0, 1871, 1878, 1, 0, 0, 0, 1872, 1873, 5, 102, 0, 0, 1873, 1874, 3, 108, 54, 0, 1874, 1875, 5, 208, 0, 0, 1875, 1876, 3, 108, 54, 0, 1876, 1878, 1, 0, 0, 0, 1877, 1830, 1, 0, 0, 0, 1877, 1836, 1, 0, 0, 0, 1877, 1843, 1, 0, 0, 0, 1877, 1858, 1, 0, 0, 0, 1877, 1872, 1, 0, 0, 0, 1878, 1883, 1, 0, 0, 0, 1879, 1880, 10, 6, 0, 0, 1880, 1882, 5, 17, 0, 0, 1881, 1879, 1, 0, 0, 0, 1882, 1885, 1, 0, 0, 0, 1883, 1881, 1, 0, 0, 0, 1883, 1884, 1, 0, 0, 0, 1884, 115, 1, 0, 0, 0, 1885, 1883, 1, 0, 0, 0, 1886, 1887, 3, 158, 79, 0, 1887, 1896, 5, 2, 0, 0, 1888, 1893, 3, 118, 59, 0, 1889, 1890, 5, 4, 0, 0, 1890, 1892, 3, 118, 59, 0, 1891, 1889, 1, 0, 0, 0, 1892, 1895, 1, 0, 0, 0, 1893, 1891, 1, 0, 0, 0, 1893, 1894, 1, 0, 0, 0, 1894, 1897, 1, 0, 0, 0, 1895, 1893, 1, 0, 0, 0, 1896, 1888, 1, 0, 0, 0, 1896, 1897, 1, 0, 0, 0, 1897, 1907, 1, 0, 0, 0, 1898, 1899, 5, 38, 0, 0, 1899, 1904, 3, 128, 64, 0, 1900, 1901, 5, 4, 0, 0, 1901, 1903, 3, 128, 64, 0, 1902, 1900, 1, 0, 0, 0, 1903, 1906, 1, 0, 0, 0, 1904, 1902, 1, 0, 0, 0, 1904, 1905, 1, 0, 0, 0, 1905, 1908, 1, 0, 0, 0, 1906, 1904, 1, 0, 0, 0, 1907, 1898, 1, 0, 0, 0, 1907, 1908, 1, 0, 0, 0, 1908, 1909, 1, 0, 0, 0, 1909, 1910, 5, 3, 0, 0, 1910, 117, 1, 0, 0, 0, 1911, 1912, 3, 170, 85, 0, 1912, 1913, 5, 9, 0, 0, 1913, 1915, 1, 0, 0, 0, 1914, 1911, 1, 0, 0, 0, 1914, 1915, 1, 0, 0, 0, 1915, 1919, 1, 0, 0, 0, 1916, 1920, 3, 120, 60, 0, 1917, 1920, 3, 124, 62, 0, 1918, 1920, 3, 84, 42, 0, 1919, 1916, 1, 0, 0, 0, 1919, 1917, 1, 0, 0, 0, 1919, 1918, 1, 0, 0, 0, 1920, 119, 1, 0, 0, 0, 1921, 1939, 3, 122, 61, 0, 1922, 1923, 5, 152, 0, 0, 1923, 1937, 5, 24, 0, 0, 1924, 1933, 5, 2, 0, 0, 1925, 1930, 3, 84, 42, 0, 1926, 1927, 5, 4, 0, 0, 1927, 1929, 3, 84, 42, 0, 1928, 1926, 1, 0, 0, 0, 1929, 1932, 1, 0, 0, 0, 1930, 1928, 1, 0, 0, 0, 1930, 1931, 1, 0, 0, 0, 1931, 1934, 1, 0, 0, 0, 1932, 1930, 1, 0, 0, 0, 1933, 1925, 1, 0, 0, 0, 1933, 1934, 1, 0, 0, 0, 1934, 1935, 1, 0, 0, 0, 1935, 1938, 5, 3, 0, 0, 1936, 1938, 3, 84, 42, 0, 1937, 1924, 1, 0, 0, 0, 1937, 1936, 1, 0, 0, 0, 1938, 1940, 1, 0, 0, 0, 1939, 1922, 1, 0, 0, 0, 1939, 1940, 1, 0, 0, 0, 1940, 1947, 1, 0, 0, 0, 1941, 1942, 5, 160, 0, 0, 1942, 1943, 5, 229, 0, 0, 1943, 1948, 5, 62, 0, 0, 1944, 1945, 5, 110, 0, 0, 1945, 1946, 5, 229, 0, 0, 1946, 1948, 5, 62, 0, 0, 1947, 1941, 1, 0, 0, 0, 1947, 1944, 1, 0, 0, 0, 1947, 1948, 1, 0, 0, 0, 1948, 1965, 1, 0, 0, 0, 1949, 1950, 5, 147, 0, 0, 1950, 1963, 5, 24, 0, 0, 1951, 1952, 5, 2, 0, 0, 1952, 1957, 3, 52, 26, 0, 1953, 1954, 5, 4, 0, 0, 1954, 1956, 3, 52, 26, 0, 1955, 1953, 1, 0, 0, 0, 1956, 1959, 1, 0, 0, 0, 1957, 1955, 1, 0, 0, 0, 1957, 1958, 1, 0, 0, 0, 1958, 1960, 1, 0, 0, 0, 1959, 1957, 1, 0, 0, 0, 1960, 1961, 5, 3, 0, 0, 1961, 1964, 1, 0, 0, 0, 1962, 1964, 3, 52, 26, 0, 1963, 1951, 1, 0, 0, 0, 1963, 1962, 1, 0, 0, 0, 1964, 1966, 1, 0, 0, 0, 1965, 1949, 1, 0, 0, 0, 1965, 1966, 1, 0, 0, 0, 1966, 121, 1, 0, 0, 0, 1967, 1968, 5, 200, 0, 0, 1968, 1969, 5, 2, 0, 0, 1969, 1970, 3, 158, 79, 0, 1970, 1978, 5, 3, 0, 0, 1971, 1973, 5, 18, 0, 0, 1972, 1971, 1, 0, 0, 0, 1972, 1973, 1, 0, 0, 0, 1973, 1974, 1, 0, 0, 0, 1974, 1976, 3, 170, 85, 0, 1975, 1977, 3, 80, 40, 0, 1976, 1975, 1, 0, 0, 0, 1976, 1977, 1, 0, 0, 0, 1977, 1979, 1, 0, 0, 0, 1978, 1972, 1, 0, 0, 0, 1978, 1979, 1, 0, 0, 0, 1979, 1994, 1, 0, 0, 0, 1980, 1981, 5, 200, 0, 0, 1981, 1982, 5, 2, 0, 0, 1982, 1983, 3, 8, 4, 0, 1983, 1991, 5, 3, 0, 0, 1984, 1986, 5, 18, 0, 0, 1985, 1984, 1, 0, 0, 0, 1985, 1986, 1, 0, 0, 0, 1986, 1987, 1, 0, 0, 0, 1987, 1989, 3, 170, 85, 0, 1988, 1990, 3, 80, 40, 0, 1989, 1988, 1, 0, 0, 0, 1989, 1990, 1, 0, 0, 0, 1990, 1992, 1, 0, 0, 0, 1991, 1985, 1, 0, 0, 0, 1991, 1992, 1, 0, 0, 0, 1992, 1994, 1, 0, 0, 0, 1993, 1967, 1, 0, 0, 0, 1993, 1980, 1, 0, 0, 0, 1994, 123, 1, 0, 0, 0, 1995, 1996, 5, 55, 0, 0, 1996, 1997, 5, 2, 0, 0, 1997, 2002, 3, 126, 63, 0, 1998, 1999, 5, 4, 0, 0, 1999, 2001, 3, 126, 63, 0, 2000, 1998, 1, 0, 0, 0, 2001, 2004, 1, 0, 0, 0, 2002, 2000, 1, 0, 0, 0, 2002, 2003, 1, 0, 0, 0, 2003, 2005, 1, 0, 0, 0, 2004, 2002, 1, 0, 0, 0, 2005, 2006, 5, 3, 0, 0, 2006, 2014, 1, 0, 0, 0, 2007, 2008, 5, 29, 0, 0, 2008, 2009, 5, 2, 0, 0, 2009, 2010, 5, 138, 0, 0, 2010, 2011, 5, 18, 0, 0, 2011, 2012, 5, 55, 0, 0, 2012, 2014, 5, 3, 0, 0, 2013, 1995, 1, 0, 0, 0, 2013, 2007, 1, 0, 0, 0, 2014, 125, 1, 0, 0, 0, 2015, 2017, 3, 170, 85, 0, 2016, 2018, 3, 114, 57, 0, 2017, 2016, 1, 0, 0, 0, 2017, 2018, 1, 0, 0, 0, 2018, 127, 1, 0, 0, 0, 2019, 2020, 5, 2, 0, 0, 2020, 2021, 3, 158, 79, 0, 2021, 2022, 5, 4, 0, 0, 2022, 2027, 3, 158, 79, 0, 2023, 2024, 5, 4, 0, 0, 2024, 2026, 3, 158, 79, 0, 2025, 2023, 1, 0, 0, 0, 2026, 2029, 1, 0, 0, 0, 2027, 2025, 1, 0, 0, 0, 2027, 2028, 1, 0, 0, 0, 2028, 2030, 1, 0, 0, 0, 2029, 2027, 1, 0, 0, 0, 2030, 2031, 5, 3, 0, 0, 2031, 129, 1, 0, 0, 0, 2032, 2035, 5, 251, 0, 0, 2033, 2035, 3, 114, 57, 0, 2034, 2032, 1, 0, 0, 0, 2034, 2033, 1, 0, 0, 0, 2035, 131, 1, 0, 0, 0, 2036, 2041, 5, 258, 0, 0, 2037, 2041, 5, 259, 0, 0, 2038, 2041, 5, 260, 0, 0, 2039, 2041, 3, 158, 79, 0, 2040, 2036, 1, 0, 0, 0, 2040, 2037, 1, 0, 0, 0, 2040, 2038, 1, 0, 0, 0, 2040, 2039, 1, 0, 0, 0, 2041, 133, 1, 0, 0, 0, 2042, 2043, 5, 229, 0, 0, 2043, 2044, 3, 84, 42, 0, 2044, 2045, 5, 205, 0, 0, 2045, 2046, 3, 84, 42, 0, 2046, 135, 1, 0, 0, 0, 2047, 2048, 5, 76, 0, 0, 2048, 2049, 5, 2, 0, 0, 2049, 2050, 5, 230, 0, 0, 2050, 2051, 3, 86, 43, 0, 2051, 2052, 5, 3, 0, 0, 2052, 137, 1, 0, 0, 0, 2053, 2054, 5, 229, 0, 0, 2054, 2055, 5, 123, 0, 0, 2055, 2056, 5, 205, 0, 0, 2056, 2057, 5, 220, 0, 0, 2057, 2058, 5, 189, 0, 0, 2058, 2059, 3, 170, 85, 0, 2059, 2060, 5, 236, 0, 0, 2060, 2068, 3, 84, 42, 0, 2061, 2062, 5, 4, 0, 0, 2062, 2063, 3, 170, 85, 0, 2063, 2064, 5, 236, 0, 0, 2064, 2065, 3, 84, 42, 0, 2065, 2067, 1, 0, 0, 0, 2066, 2061, 1, 0, 0, 0, 2067, 2070, 1, 0, 0, 0, 2068, 2066, 1, 0, 0, 0, 2068, 2069, 1, 0, 0, 0, 2069, 2102, 1, 0, 0, 0, 2070, 2068, 1, 0, 0, 0, 2071, 2072, 5, 229, 0, 0, 2072, 2073, 5, 137, 0, 0, 2073, 2074, 5, 123, 0, 0, 2074, 2075, 5, 205, 0, 0, 2075, 2087, 5, 100, 0, 0, 2076, 2077, 5, 2, 0, 0, 2077, 2082, 3, 170, 85, 0, 2078, 2079, 5, 4, 0, 0, 2079, 2081, 3, 170, 85, 0, 2080, 2078, 1, 0, 0, 0, 2081, 2084, 1, 0, 0, 0, 2082, 2080, 1, 0, 0, 0, 2082, 2083, 1, 0, 0, 0, 2083, 2085, 1, 0, 0, 0, 2084, 2082, 1, 0, 0, 0, 2085, 2086, 5, 3, 0, 0, 2086, 2088, 1, 0, 0, 0, 2087, 2076, 1, 0, 0, 0, 2087, 2088, 1, 0, 0, 0, 2088, 2089, 1, 0, 0, 0, 2089, 2090, 5, 225, 0, 0, 2090, 2091, 5, 2, 0, 0, 2091, 2096, 3, 84, 42, 0, 2092, 2093, 5, 4, 0, 0, 2093, 2095, 3, 84, 42, 0, 2094, 2092, 1, 0, 0, 0, 2095, 2098, 1, 0, 0, 0, 2096, 2094, 1, 0, 0, 0, 2096, 2097, 1, 0, 0, 0, 2097, 2099, 1, 0, 0, 0, 2098, 2096, 1, 0, 0, 0, 2099, 2100, 5, 3, 0, 0, 2100, 2102, 1, 0, 0, 0, 2101, 2053, 1, 0, 0, 0, 2101, 2071, 1, 0, 0, 0, 2102, 139, 1, 0, 0, 0, 2103, 2104, 5, 151, 0, 0, 2104, 2115, 5, 2, 0, 0, 2105, 2106, 5, 152, 0, 0, 2106, 2107, 5, 24, 0, 0, 2107, 2112, 3, 84, 42, 0, 2108, 2109, 5, 4, 0, 0, 2109, 2111, 3, 84, 42, 0, 2110, 2108, 1, 0, 0, 0, 2111, 2114, 1, 0, 0, 0, 2112, 2110, 1, 0, 0, 0, 2112, 2113, 1, 0, 0, 0, 2113, 2116, 1, 0, 0, 0, 2114, 2112, 1, 0, 0, 0, 2115, 2105, 1, 0, 0, 0, 2115, 2116, 1, 0, 0, 0, 2116, 2127, 1, 0, 0, 0, 2117, 2118, 5, 147, 0, 0, 2118, 2119, 5, 24, 0, 0, 2119, 2124, 3, 52, 26, 0, 2120, 2121, 5, 4, 0, 0, 2121, 2123, 3, 52, 26, 0, 2122, 2120, 1, 0, 0, 0, 2123, 2126, 1, 0, 0, 0, 2124, 2122, 1, 0, 0, 0, 2124, 2125, 1, 0, 0, 0, 2125, 2128, 1, 0, 0, 0, 2126, 2124, 1, 0, 0, 0, 2127, 2117, 1, 0, 0, 0, 2127, 2128, 1, 0, 0, 0, 2128, 2130, 1, 0, 0, 0, 2129, 2131, 3, 142, 71, 0, 2130, 2129, 1, 0, 0, 0, 2130, 2131, 1, 0, 0, 0, 2131, 2132, 1, 0, 0, 0, 2132, 2133, 5, 3, 0, 0, 2133, 141, 1, 0, 0, 0, 2134, 2135, 5, 161, 0, 0, 2135, 2159, 3, 144, 72, 0, 2136, 2137, 5, 181, 0, 0, 2137, 2159, 3, 144, 72, 0, 2138, 2139, 5, 91, 0, 0, 2139, 2159, 3, 144, 72, 0, 2140, 2141, 5, 161, 0, 0, 2141, 2142, 5, 23, 0, 0, 2142, 2143, 3, 144, 72, 0, 2143, 2144, 5, 15, 0, 0, 2144, 2145, 3, 144, 72, 0, 2145, 2159, 1, 0, 0, 0, 2146, 2147, 5, 181, 0, 0, 2147, 2148, 5, 23, 0, 0, 2148, 2149, 3, 144, 72, 0, 2149, 2150, 5, 15, 0, 0, 2150, 2151, 3, 144, 72, 0, 2151, 2159, 1, 0, 0, 0, 2152, 2153, 5, 91, 0, 0, 2153, 2154, 5, 23, 0, 0, 2154, 2155, 3, 144, 72, 0, 2155, 2156, 5, 15, 0, 0, 2156, 2157, 3, 144, 72, 0, 2157, 2159, 1, 0, 0, 0, 2158, 2134, 1, 0, 0, 0, 2158, 2136, 1, 0, 0, 0, 2158, 2138, 1, 0, 0, 0, 2158, 2140, 1, 0, 0, 0, 2158, 2146, 1, 0, 0, 0, 2158, 2152, 1, 0, 0, 0, 2159, 143, 1, 0, 0, 0, 2160, 2161, 5, 215, 0, 0, 2161, 2170, 5, 155, 0, 0, 2162, 2163, 5, 215, 0, 0, 2163, 2170, 5, 78, 0, 0, 2164, 2165, 5, 41, 0, 0, 2165, 2170, 5, 180, 0, 0, 2166, 2167, 3, 84, 42, 0, 2167, 2168, 7, 18, 0, 0, 2168, 2170, 1, 0, 0, 0, 2169, 2160, 1, 0, 0, 0, 2169, 2162, 1, 0, 0, 0, 2169, 2164, 1, 0, 0, 0, 2169, 2166, 1, 0, 0, 0, 2170, 145, 1, 0, 0, 0, 2171, 2172, 3, 170, 85, 0, 2172, 2173, 5, 236, 0, 0, 2173, 2174, 3, 84, 42, 0, 2174, 147, 1, 0, 0, 0, 2175, 2176, 5, 80, 0, 0, 2176, 2180, 7, 19, 0, 0, 2177, 2178, 5, 213, 0, 0, 2178, 2180, 7, 20, 0, 0, 2179, 2175, 1, 0, 0, 0, 2179, 2177, 1, 0, 0, 0, 2180, 149, 1, 0, 0, 0, 2181, 2182, 5, 107, 0, 0, 2182, 2183, 5, 116, 0, 0, 2183, 2187, 3, 152, 76, 0, 2184, 2185, 5, 162, 0, 0, 2185, 2187, 7, 21, 0, 0, 2186, 2181, 1, 0, 0, 0, 2186, 2184, 1, 0, 0, 0, 2187, 151, 1, 0, 0, 0, 2188, 2189, 5, 162, 0, 0, 2189, 2196, 5, 216, 0, 0, 2190, 2191, 5, 162, 0, 0, 2191, 2196, 5, 35, 0, 0, 2192, 2193, 5, 167, 0, 0, 2193, 2196, 5, 162, 0, 0, 2194, 2196, 5, 187, 0, 0, 2195, 2188, 1, 0, 0, 0, 2195, 2190, 1, 0, 0, 0, 2195, 2192, 1, 0, 0, 0, 2195, 2194, 1, 0, 0, 0, 2196, 153, 1, 0, 0, 0, 2197, 2203, 3, 84, 42, 0, 2198, 2199, 3, 170, 85, 0, 2199, 2200, 5, 9, 0, 0, 2200, 2201, 3, 84, 42, 0, 2201, 2203, 1, 0, 0, 0, 2202, 2197, 1, 0, 0, 0, 2202, 2198, 1, 0, 0, 0, 2203, 155, 1, 0, 0, 0, 2204, 2209, 5, 186, 0, 0, 2205, 2209, 5, 52, 0, 0, 2206, 2209, 5, 100, 0, 0, 2207, 2209, 3, 170, 85, 0, 2208, 2204, 1, 0, 0, 0, 2208, 2205, 1, 0, 0, 0, 2208, 2206, 1, 0, 0, 0, 2208, 2207, 1, 0, 0, 0, 2209, 157, 1, 0, 0, 0, 2210, 2215, 3, 170, 85, 0, 2211, 2212, 5, 1, 0, 0, 2212, 2214, 3, 170, 85, 0, 2213, 2211, 1, 0, 0, 0, 2214, 2217, 1, 0, 0, 0, 2215, 2213, 1, 0, 0, 0, 2215, 2216, 1, 0, 0, 0, 2216, 159, 1, 0, 0, 0, 2217, 2215, 1, 0, 0, 0, 2218, 2219, 5, 79, 0, 0, 2219, 2220, 7, 22, 0, 0, 2220, 2221, 3, 162, 81, 0, 2221, 2222, 3, 90, 45, 0, 2222, 161, 1, 0, 0, 0, 2223, 2224, 5, 18, 0, 0, 2224, 2227, 5, 141, 0, 0, 2225, 2227, 5, 21, 0, 0, 2226, 2223, 1, 0, 0, 0, 2226, 2225, 1, 0, 0, 0, 2227, 163, 1, 0, 0, 0, 2228, 2232, 5, 46, 0, 0, 2229, 2232, 5, 43, 0, 0, 2230, 2232, 3, 166, 83, 0, 2231, 2228, 1, 0, 0, 0, 2231, 2229, 1, 0, 0, 0, 2231, 2230, 1, 0, 0, 0, 2232, 165, 1, 0, 0, 0, 2233, 2234, 5, 222, 0, 0, 2234, 2239, 3, 170, 85, 0, 2235, 2236, 5, 176, 0, 0, 2236, 2239, 3, 170, 85, 0, 2237, 2239, 3, 170, 85, 0, 2238, 2233, 1, 0, 0, 0, 2238, 2235, 1, 0, 0, 0, 2238, 2237, 1, 0, 0, 0, 2239, 167, 1, 0, 0, 0, 2240, 2245, 3, 170, 85, 0, 2241, 2242, 5, 4, 0, 0, 2242, 2244, 3, 170, 85, 0, 2243, 2241, 1, 0, 0, 0, 2244, 2247, 1, 0, 0, 0, 2245, 2243, 1, 0, 0, 0, 2245, 2246, 1, 0, 0, 0, 2246, 169, 1, 0, 0, 0, 2247, 2245, 1, 0, 0, 0, 2248, 2254, 5, 254, 0, 0, 2249, 2254, 5, 256, 0, 0, 2250, 2254, 3, 192, 96, 0, 2251, 2254, 5, 257, 0, 0, 2252, 2254, 5, 255, 0, 0, 2253, 2248, 1, 0, 0, 0, 2253, 2249, 1, 0, 0, 0, 2253, 2250, 1, 0, 0, 0, 2253, 2251, 1, 0, 0, 0, 2253, 2252, 1, 0, 0, 0, 2254, 171, 1, 0, 0, 0, 2255, 2259, 5, 252, 0, 0, 2256, 2259, 5, 253, 0, 0, 2257, 2259, 5, 251, 0, 0, 2258, 2255, 1, 0, 0, 0, 2258, 2256, 1, 0, 0, 0, 2258, 2257, 1, 0, 0, 0, 2259, 173, 1, 0, 0, 0, 2260, 2263, 3, 176, 88, 0, 2261, 2263, 3, 178, 89, 0, 2262, 2260, 1, 0, 0, 0, 2262, 2261, 1, 0, 0, 0, 2263, 175, 1, 0, 0, 0, 2264, 2265, 5, 36, 0, 0, 2265, 2266, 3, 170, 85, 0, 2266, 2267, 3, 178, 89, 0, 2267, 177, 1, 0, 0, 0, 2268, 2269, 3, 180, 90, 0, 2269, 2271, 3, 80, 40, 0, 2270, 2272, 3, 182, 91, 0, 2271, 2270, 1, 0, 0, 0, 2271, 2272, 1, 0, 0, 0, 2272, 179, 1, 0, 0, 0, 2273, 2277, 5, 218, 0, 0, 2274, 2275, 5, 157, 0, 0, 2275, 2277, 5, 111, 0, 0, 2276, 2273, 1, 0, 0, 0, 2276, 2274, 1, 0, 0, 0, 2277, 181, 1, 0, 0, 0, 2278, 2280, 3, 184, 92, 0, 2279, 2278, 1, 0, 0, 0, 2280, 2283, 1, 0, 0, 0, 2281, 2279, 1, 0, 0, 0, 2281, 2282, 1, 0, 0, 0, 2282, 183, 1, 0, 0, 0, 2283, 2281, 1, 0, 0, 0, 2284, 2288, 3, 188, 94, 0, 2285, 2288, 3, 186, 93, 0, 2286, 2288, 3, 190, 95, 0, 2287, 2284, 1, 0, 0, 0, 2287, 2285, 1, 0, 0, 0, 2287, 2286, 1, 0, 0, 0, 2288, 185, 1, 0, 0, 0, 2289, 2293, 5, 165, 0, 0, 2290, 2291, 5, 137, 0, 0, 2291, 2293, 5, 165, 0, 0, 2292, 2289, 1, 0, 0, 0, 2292, 2290, 1, 0, 0, 0, 2293, 187, 1, 0, 0, 0, 2294, 2295, 7, 23, 0, 0, 2295, 189, 1, 0, 0, 0, 2296, 2300, 5, 65, 0, 0, 2297, 2298, 5, 137, 0, 0, 2298, 2300, 5, 65, 0, 0, 2299, 2296, 1, 0, 0, 0, 2299, 2297, 1, 0, 0, 0, 2300, 191, 1, 0, 0, 0, 2301, 2302, 7, 24, 0, 0, 2302, 193, 1, 0, 0, 0, 296, 216, 221, 227, 231, 245, 249, 253, 257, 265, 269, 272, 279, 288, 294, 298, 304, 311, 320, 329, 340, 347, 357, 364, 372, 380, 388, 398, 405, 413, 418, 429, 434, 445, 456, 468, 474, 479, 485, 494, 505, 514, 519, 523, 531, 538, 547, 552, 555, 565, 568, 575, 584, 590, 595, 599, 609, 612, 622, 635, 641, 646, 652, 661, 667, 674, 682, 687, 691, 699, 705, 712, 717, 721, 731, 734, 738, 741, 749, 754, 779, 785, 791, 793, 799, 805, 807, 815, 817, 836, 841, 848, 860, 862, 870, 872, 890, 893, 897, 901, 919, 922, 938, 943, 949, 952, 961, 963, 966, 972, 979, 985, 991, 995, 999, 1005, 1013, 1028, 1035, 1040, 1047, 1055, 1059, 1064, 1075, 1087, 1090, 1095, 1097, 1106, 1108, 1116, 1122, 1125, 1127, 1139, 1146, 1150, 1154, 1158, 1165, 1174, 1177, 1181, 1186, 1190, 1193, 1200, 1211, 1214, 1224, 1227, 1238, 1243, 1251, 1254, 1258, 1262, 1273, 1276, 1283, 1302, 1306, 1310, 1314, 1318, 1322, 1324, 1335, 1340, 1349, 1355, 1359, 1361, 1369, 1376, 1389, 1395, 1411, 1418, 1422, 1430, 1432, 1445, 1453, 1462, 1468, 1476, 1482, 1486, 1491, 1496, 1502, 1516, 1518, 1547, 1558, 1568, 1571, 1576, 1583, 1586, 1595, 1598, 1602, 1605, 1608, 1620, 1623, 1642, 1646, 1654, 1658, 1683, 1686, 1695, 1701, 1707, 1713, 1723, 1732, 1754, 1757, 1760, 1770, 1772, 1779, 1781, 1787, 1795, 1805, 1811, 1823, 1826, 1853, 1865, 1870, 1877, 1883, 1893, 1896, 1904, 1907, 1914, 1919, 1930, 1933, 1937, 1939, 1947, 1957, 1963, 1965, 1972, 1976, 1978, 1985, 1989, 1991, 1993, 2002, 2013, 2017, 2027, 2034, 2040, 2068, 2082, 2087, 2096, 2101, 2112, 2115, 2124, 2127, 2130, 2158, 2169, 2179, 2186, 2195, 2202, 2208, 2215, 2226, 2231, 2238, 2245, 2253, 2258, 2262, 2271, 2276, 2281, 2287, 2292, 2299] \ No newline at end of file diff --git a/presto-ui/src/sql-parser/SqlBase.tokens b/presto-ui/src/sql-parser/SqlBase.tokens index e344d5d4a10c5..906bef8bf71a3 100644 --- a/presto-ui/src/sql-parser/SqlBase.tokens +++ b/presto-ui/src/sql-parser/SqlBase.tokens @@ -18,236 +18,251 @@ ARRAY=17 AS=18 ASC=19 AT=20 -BERNOULLI=21 -BETWEEN=22 -BY=23 -CALL=24 -CALLED=25 -CASCADE=26 -CASE=27 -CAST=28 -CATALOGS=29 -COLUMN=30 -COLUMNS=31 -COMMENT=32 -COMMIT=33 -COMMITTED=34 -CONSTRAINT=35 -CREATE=36 -CROSS=37 -CUBE=38 -CURRENT=39 -CURRENT_DATE=40 -CURRENT_ROLE=41 -CURRENT_TIME=42 -CURRENT_TIMESTAMP=43 -CURRENT_USER=44 -DATA=45 -DATE=46 -DAY=47 -DEALLOCATE=48 -DEFINER=49 -DELETE=50 -DESC=51 -DESCRIBE=52 -DETERMINISTIC=53 -DISTINCT=54 -DISTRIBUTED=55 -DROP=56 -ELSE=57 -END=58 -ESCAPE=59 -EXCEPT=60 -EXCLUDING=61 -EXECUTE=62 -EXISTS=63 -EXPLAIN=64 -EXTRACT=65 -EXTERNAL=66 -FALSE=67 -FETCH=68 -FILTER=69 -FIRST=70 -FOLLOWING=71 -FOR=72 -FORMAT=73 -FROM=74 -FULL=75 -FUNCTION=76 -FUNCTIONS=77 -GRANT=78 -GRANTED=79 -GRANTS=80 -GRAPHVIZ=81 -GROUP=82 -GROUPING=83 -GROUPS=84 -HAVING=85 -HOUR=86 -IF=87 -IGNORE=88 -IN=89 -INCLUDING=90 -INNER=91 -INPUT=92 -INSERT=93 -INTERSECT=94 -INTERVAL=95 -INTO=96 -INVOKER=97 -IO=98 -IS=99 -ISOLATION=100 -JSON=101 -JOIN=102 -LANGUAGE=103 -LAST=104 -LATERAL=105 -LEFT=106 -LEVEL=107 -LIKE=108 -LIMIT=109 -LOCALTIME=110 -LOCALTIMESTAMP=111 -LOGICAL=112 -MAP=113 -MATERIALIZED=114 -MINUTE=115 -MONTH=116 -NAME=117 -NATURAL=118 -NFC=119 -NFD=120 -NFKC=121 -NFKD=122 -NO=123 -NONE=124 -NORMALIZE=125 -NOT=126 -NULL=127 -NULLIF=128 -NULLS=129 -OF=130 -OFFSET=131 -ON=132 -ONLY=133 -OPTION=134 -OR=135 -ORDER=136 -ORDINALITY=137 -OUTER=138 -OUTPUT=139 -OVER=140 -PARTITION=141 -PARTITIONS=142 -POSITION=143 -PRECEDING=144 -PREPARE=145 -PRIVILEGES=146 -PROPERTIES=147 -RANGE=148 -READ=149 -RECURSIVE=150 -REFRESH=151 -RENAME=152 -REPEATABLE=153 -REPLACE=154 -RESET=155 -RESPECT=156 -RESTRICT=157 -RETURN=158 -RETURNS=159 -REVOKE=160 -RIGHT=161 -ROLE=162 -ROLES=163 -ROLLBACK=164 -ROLLUP=165 -ROW=166 -ROWS=167 -SCHEMA=168 -SCHEMAS=169 -SECOND=170 -SECURITY=171 -SELECT=172 -SERIALIZABLE=173 -SESSION=174 -SET=175 -SETS=176 -SHOW=177 -SOME=178 -SQL=179 -START=180 -STATS=181 -SUBSTRING=182 -SYSTEM=183 -SYSTEM_TIME=184 -SYSTEM_VERSION=185 -TABLE=186 -TABLES=187 -TABLESAMPLE=188 -TEMPORARY=189 -TEXT=190 -THEN=191 -TIME=192 -TIMESTAMP=193 -TO=194 -TRANSACTION=195 -TRUE=196 -TRUNCATE=197 -TRY_CAST=198 -TYPE=199 -UESCAPE=200 -UNBOUNDED=201 -UNCOMMITTED=202 -UNION=203 -UNNEST=204 -UPDATE=205 -USE=206 -USER=207 -USING=208 -VALIDATE=209 -VALUES=210 -VERBOSE=211 -VERSION=212 -VIEW=213 -WHEN=214 -WHERE=215 -WITH=216 -WORK=217 -WRITE=218 -YEAR=219 -ZONE=220 -EQ=221 -NEQ=222 -LT=223 -LTE=224 -GT=225 -GTE=226 -PLUS=227 -MINUS=228 -ASTERISK=229 -SLASH=230 -PERCENT=231 -CONCAT=232 -STRING=233 -UNICODE_STRING=234 -BINARY_LITERAL=235 -INTEGER_VALUE=236 -DECIMAL_VALUE=237 -DOUBLE_VALUE=238 -IDENTIFIER=239 -DIGIT_IDENTIFIER=240 -QUOTED_IDENTIFIER=241 -BACKQUOTED_IDENTIFIER=242 -TIME_WITH_TIME_ZONE=243 -TIMESTAMP_WITH_TIME_ZONE=244 -DOUBLE_PRECISION=245 -SIMPLE_COMMENT=246 -BRACKETED_COMMENT=247 -WS=248 -UNRECOGNIZED=249 -DELIMITER=250 +BEFORE=21 +BERNOULLI=22 +BETWEEN=23 +BY=24 +CALL=25 +CALLED=26 +CASCADE=27 +CASE=28 +CAST=29 +CATALOGS=30 +COLUMN=31 +COLUMNS=32 +COMMENT=33 +COMMIT=34 +COMMITTED=35 +CONSTRAINT=36 +CREATE=37 +COPARTITION=38 +CROSS=39 +CUBE=40 +CURRENT=41 +CURRENT_DATE=42 +CURRENT_ROLE=43 +CURRENT_TIME=44 +CURRENT_TIMESTAMP=45 +CURRENT_USER=46 +DATA=47 +DATE=48 +DAY=49 +DEALLOCATE=50 +DEFINER=51 +DELETE=52 +DESC=53 +DESCRIBE=54 +DESCRIPTOR=55 +DETERMINISTIC=56 +DISABLED=57 +DISTINCT=58 +DISTRIBUTED=59 +DROP=60 +ELSE=61 +EMPTY=62 +ENABLED=63 +END=64 +ENFORCED=65 +ESCAPE=66 +EXCEPT=67 +EXCLUDING=68 +EXECUTE=69 +EXISTS=70 +EXPLAIN=71 +EXTRACT=72 +EXTERNAL=73 +FALSE=74 +FETCH=75 +FILTER=76 +FIRST=77 +FOLLOWING=78 +FOR=79 +FORMAT=80 +FROM=81 +FULL=82 +FUNCTION=83 +FUNCTIONS=84 +GRANT=85 +GRANTED=86 +GRANTS=87 +GRAPHVIZ=88 +GROUP=89 +GROUPING=90 +GROUPS=91 +HAVING=92 +HOUR=93 +IF=94 +IGNORE=95 +IN=96 +INCLUDING=97 +INNER=98 +INPUT=99 +INSERT=100 +INTERSECT=101 +INTERVAL=102 +INTO=103 +INVOKER=104 +IO=105 +IS=106 +ISOLATION=107 +JSON=108 +JOIN=109 +KEEP=110 +KEY=111 +LANGUAGE=112 +LAST=113 +LATERAL=114 +LEFT=115 +LEVEL=116 +LIKE=117 +LIMIT=118 +LOCALTIME=119 +LOCALTIMESTAMP=120 +LOGICAL=121 +MAP=122 +MATCHED=123 +MATERIALIZED=124 +MERGE=125 +MINUTE=126 +MONTH=127 +NAME=128 +NATURAL=129 +NFC=130 +NFD=131 +NFKC=132 +NFKD=133 +NO=134 +NONE=135 +NORMALIZE=136 +NOT=137 +NULL=138 +NULLIF=139 +NULLS=140 +OF=141 +OFFSET=142 +ON=143 +ONLY=144 +OPTION=145 +OR=146 +ORDER=147 +ORDINALITY=148 +OUTER=149 +OUTPUT=150 +OVER=151 +PARTITION=152 +PARTITIONS=153 +POSITION=154 +PRECEDING=155 +PREPARE=156 +PRIMARY=157 +PRIVILEGES=158 +PROPERTIES=159 +PRUNE=160 +RANGE=161 +READ=162 +RECURSIVE=163 +REFRESH=164 +RELY=165 +RENAME=166 +REPEATABLE=167 +REPLACE=168 +RESET=169 +RESPECT=170 +RESTRICT=171 +RETURN=172 +RETURNS=173 +REVOKE=174 +RIGHT=175 +ROLE=176 +ROLES=177 +ROLLBACK=178 +ROLLUP=179 +ROW=180 +ROWS=181 +SCHEMA=182 +SCHEMAS=183 +SECOND=184 +SECURITY=185 +SELECT=186 +SERIALIZABLE=187 +SESSION=188 +SET=189 +SETS=190 +SHOW=191 +SOME=192 +SQL=193 +START=194 +STATS=195 +SUBSTRING=196 +SYSTEM=197 +SYSTEM_TIME=198 +SYSTEM_VERSION=199 +TABLE=200 +TABLES=201 +TABLESAMPLE=202 +TEMPORARY=203 +TEXT=204 +THEN=205 +TIME=206 +TIMESTAMP=207 +TO=208 +TRANSACTION=209 +TRUE=210 +TRUNCATE=211 +TRY_CAST=212 +TYPE=213 +UESCAPE=214 +UNBOUNDED=215 +UNCOMMITTED=216 +UNION=217 +UNIQUE=218 +UNNEST=219 +UPDATE=220 +USE=221 +USER=222 +USING=223 +VALIDATE=224 +VALUES=225 +VERBOSE=226 +VERSION=227 +VIEW=228 +WHEN=229 +WHERE=230 +WITH=231 +WORK=232 +WRITE=233 +YEAR=234 +ZONE=235 +EQ=236 +NEQ=237 +LT=238 +LTE=239 +GT=240 +GTE=241 +PLUS=242 +MINUS=243 +ASTERISK=244 +SLASH=245 +PERCENT=246 +CONCAT=247 +STRING=248 +UNICODE_STRING=249 +BINARY_LITERAL=250 +INTEGER_VALUE=251 +DECIMAL_VALUE=252 +DOUBLE_VALUE=253 +IDENTIFIER=254 +DIGIT_IDENTIFIER=255 +QUOTED_IDENTIFIER=256 +BACKQUOTED_IDENTIFIER=257 +TIME_WITH_TIME_ZONE=258 +TIMESTAMP_WITH_TIME_ZONE=259 +DOUBLE_PRECISION=260 +SIMPLE_COMMENT=261 +BRACKETED_COMMENT=262 +WS=263 +UNRECOGNIZED=264 +DELIMITER=265 '.'=1 '('=2 ')'=3 @@ -268,214 +283,229 @@ DELIMITER=250 'AS'=18 'ASC'=19 'AT'=20 -'BERNOULLI'=21 -'BETWEEN'=22 -'BY'=23 -'CALL'=24 -'CALLED'=25 -'CASCADE'=26 -'CASE'=27 -'CAST'=28 -'CATALOGS'=29 -'COLUMN'=30 -'COLUMNS'=31 -'COMMENT'=32 -'COMMIT'=33 -'COMMITTED'=34 -'CONSTRAINT'=35 -'CREATE'=36 -'CROSS'=37 -'CUBE'=38 -'CURRENT'=39 -'CURRENT_DATE'=40 -'CURRENT_ROLE'=41 -'CURRENT_TIME'=42 -'CURRENT_TIMESTAMP'=43 -'CURRENT_USER'=44 -'DATA'=45 -'DATE'=46 -'DAY'=47 -'DEALLOCATE'=48 -'DEFINER'=49 -'DELETE'=50 -'DESC'=51 -'DESCRIBE'=52 -'DETERMINISTIC'=53 -'DISTINCT'=54 -'DISTRIBUTED'=55 -'DROP'=56 -'ELSE'=57 -'END'=58 -'ESCAPE'=59 -'EXCEPT'=60 -'EXCLUDING'=61 -'EXECUTE'=62 -'EXISTS'=63 -'EXPLAIN'=64 -'EXTRACT'=65 -'EXTERNAL'=66 -'FALSE'=67 -'FETCH'=68 -'FILTER'=69 -'FIRST'=70 -'FOLLOWING'=71 -'FOR'=72 -'FORMAT'=73 -'FROM'=74 -'FULL'=75 -'FUNCTION'=76 -'FUNCTIONS'=77 -'GRANT'=78 -'GRANTED'=79 -'GRANTS'=80 -'GRAPHVIZ'=81 -'GROUP'=82 -'GROUPING'=83 -'GROUPS'=84 -'HAVING'=85 -'HOUR'=86 -'IF'=87 -'IGNORE'=88 -'IN'=89 -'INCLUDING'=90 -'INNER'=91 -'INPUT'=92 -'INSERT'=93 -'INTERSECT'=94 -'INTERVAL'=95 -'INTO'=96 -'INVOKER'=97 -'IO'=98 -'IS'=99 -'ISOLATION'=100 -'JSON'=101 -'JOIN'=102 -'LANGUAGE'=103 -'LAST'=104 -'LATERAL'=105 -'LEFT'=106 -'LEVEL'=107 -'LIKE'=108 -'LIMIT'=109 -'LOCALTIME'=110 -'LOCALTIMESTAMP'=111 -'LOGICAL'=112 -'MAP'=113 -'MATERIALIZED'=114 -'MINUTE'=115 -'MONTH'=116 -'NAME'=117 -'NATURAL'=118 -'NFC'=119 -'NFD'=120 -'NFKC'=121 -'NFKD'=122 -'NO'=123 -'NONE'=124 -'NORMALIZE'=125 -'NOT'=126 -'NULL'=127 -'NULLIF'=128 -'NULLS'=129 -'OF'=130 -'OFFSET'=131 -'ON'=132 -'ONLY'=133 -'OPTION'=134 -'OR'=135 -'ORDER'=136 -'ORDINALITY'=137 -'OUTER'=138 -'OUTPUT'=139 -'OVER'=140 -'PARTITION'=141 -'PARTITIONS'=142 -'POSITION'=143 -'PRECEDING'=144 -'PREPARE'=145 -'PRIVILEGES'=146 -'PROPERTIES'=147 -'RANGE'=148 -'READ'=149 -'RECURSIVE'=150 -'REFRESH'=151 -'RENAME'=152 -'REPEATABLE'=153 -'REPLACE'=154 -'RESET'=155 -'RESPECT'=156 -'RESTRICT'=157 -'RETURN'=158 -'RETURNS'=159 -'REVOKE'=160 -'RIGHT'=161 -'ROLE'=162 -'ROLES'=163 -'ROLLBACK'=164 -'ROLLUP'=165 -'ROW'=166 -'ROWS'=167 -'SCHEMA'=168 -'SCHEMAS'=169 -'SECOND'=170 -'SECURITY'=171 -'SELECT'=172 -'SERIALIZABLE'=173 -'SESSION'=174 -'SET'=175 -'SETS'=176 -'SHOW'=177 -'SOME'=178 -'SQL'=179 -'START'=180 -'STATS'=181 -'SUBSTRING'=182 -'SYSTEM'=183 -'SYSTEM_TIME'=184 -'SYSTEM_VERSION'=185 -'TABLE'=186 -'TABLES'=187 -'TABLESAMPLE'=188 -'TEMPORARY'=189 -'TEXT'=190 -'THEN'=191 -'TIME'=192 -'TIMESTAMP'=193 -'TO'=194 -'TRANSACTION'=195 -'TRUE'=196 -'TRUNCATE'=197 -'TRY_CAST'=198 -'TYPE'=199 -'UESCAPE'=200 -'UNBOUNDED'=201 -'UNCOMMITTED'=202 -'UNION'=203 -'UNNEST'=204 -'UPDATE'=205 -'USE'=206 -'USER'=207 -'USING'=208 -'VALIDATE'=209 -'VALUES'=210 -'VERBOSE'=211 -'VERSION'=212 -'VIEW'=213 -'WHEN'=214 -'WHERE'=215 -'WITH'=216 -'WORK'=217 -'WRITE'=218 -'YEAR'=219 -'ZONE'=220 -'='=221 -'<'=223 -'<='=224 -'>'=225 -'>='=226 -'+'=227 -'-'=228 -'*'=229 -'/'=230 -'%'=231 -'||'=232 +'BEFORE'=21 +'BERNOULLI'=22 +'BETWEEN'=23 +'BY'=24 +'CALL'=25 +'CALLED'=26 +'CASCADE'=27 +'CASE'=28 +'CAST'=29 +'CATALOGS'=30 +'COLUMN'=31 +'COLUMNS'=32 +'COMMENT'=33 +'COMMIT'=34 +'COMMITTED'=35 +'CONSTRAINT'=36 +'CREATE'=37 +'COPARTITION'=38 +'CROSS'=39 +'CUBE'=40 +'CURRENT'=41 +'CURRENT_DATE'=42 +'CURRENT_ROLE'=43 +'CURRENT_TIME'=44 +'CURRENT_TIMESTAMP'=45 +'CURRENT_USER'=46 +'DATA'=47 +'DATE'=48 +'DAY'=49 +'DEALLOCATE'=50 +'DEFINER'=51 +'DELETE'=52 +'DESC'=53 +'DESCRIBE'=54 +'DESCRIPTOR'=55 +'DETERMINISTIC'=56 +'DISABLED'=57 +'DISTINCT'=58 +'DISTRIBUTED'=59 +'DROP'=60 +'ELSE'=61 +'EMPTY'=62 +'ENABLED'=63 +'END'=64 +'ENFORCED'=65 +'ESCAPE'=66 +'EXCEPT'=67 +'EXCLUDING'=68 +'EXECUTE'=69 +'EXISTS'=70 +'EXPLAIN'=71 +'EXTRACT'=72 +'EXTERNAL'=73 +'FALSE'=74 +'FETCH'=75 +'FILTER'=76 +'FIRST'=77 +'FOLLOWING'=78 +'FOR'=79 +'FORMAT'=80 +'FROM'=81 +'FULL'=82 +'FUNCTION'=83 +'FUNCTIONS'=84 +'GRANT'=85 +'GRANTED'=86 +'GRANTS'=87 +'GRAPHVIZ'=88 +'GROUP'=89 +'GROUPING'=90 +'GROUPS'=91 +'HAVING'=92 +'HOUR'=93 +'IF'=94 +'IGNORE'=95 +'IN'=96 +'INCLUDING'=97 +'INNER'=98 +'INPUT'=99 +'INSERT'=100 +'INTERSECT'=101 +'INTERVAL'=102 +'INTO'=103 +'INVOKER'=104 +'IO'=105 +'IS'=106 +'ISOLATION'=107 +'JSON'=108 +'JOIN'=109 +'KEEP'=110 +'KEY'=111 +'LANGUAGE'=112 +'LAST'=113 +'LATERAL'=114 +'LEFT'=115 +'LEVEL'=116 +'LIKE'=117 +'LIMIT'=118 +'LOCALTIME'=119 +'LOCALTIMESTAMP'=120 +'LOGICAL'=121 +'MAP'=122 +'MATCHED'=123 +'MATERIALIZED'=124 +'MERGE'=125 +'MINUTE'=126 +'MONTH'=127 +'NAME'=128 +'NATURAL'=129 +'NFC'=130 +'NFD'=131 +'NFKC'=132 +'NFKD'=133 +'NO'=134 +'NONE'=135 +'NORMALIZE'=136 +'NOT'=137 +'NULL'=138 +'NULLIF'=139 +'NULLS'=140 +'OF'=141 +'OFFSET'=142 +'ON'=143 +'ONLY'=144 +'OPTION'=145 +'OR'=146 +'ORDER'=147 +'ORDINALITY'=148 +'OUTER'=149 +'OUTPUT'=150 +'OVER'=151 +'PARTITION'=152 +'PARTITIONS'=153 +'POSITION'=154 +'PRECEDING'=155 +'PREPARE'=156 +'PRIMARY'=157 +'PRIVILEGES'=158 +'PROPERTIES'=159 +'PRUNE'=160 +'RANGE'=161 +'READ'=162 +'RECURSIVE'=163 +'REFRESH'=164 +'RELY'=165 +'RENAME'=166 +'REPEATABLE'=167 +'REPLACE'=168 +'RESET'=169 +'RESPECT'=170 +'RESTRICT'=171 +'RETURN'=172 +'RETURNS'=173 +'REVOKE'=174 +'RIGHT'=175 +'ROLE'=176 +'ROLES'=177 +'ROLLBACK'=178 +'ROLLUP'=179 +'ROW'=180 +'ROWS'=181 +'SCHEMA'=182 +'SCHEMAS'=183 +'SECOND'=184 +'SECURITY'=185 +'SELECT'=186 +'SERIALIZABLE'=187 +'SESSION'=188 +'SET'=189 +'SETS'=190 +'SHOW'=191 +'SOME'=192 +'SQL'=193 +'START'=194 +'STATS'=195 +'SUBSTRING'=196 +'SYSTEM'=197 +'SYSTEM_TIME'=198 +'SYSTEM_VERSION'=199 +'TABLE'=200 +'TABLES'=201 +'TABLESAMPLE'=202 +'TEMPORARY'=203 +'TEXT'=204 +'THEN'=205 +'TIME'=206 +'TIMESTAMP'=207 +'TO'=208 +'TRANSACTION'=209 +'TRUE'=210 +'TRUNCATE'=211 +'TRY_CAST'=212 +'TYPE'=213 +'UESCAPE'=214 +'UNBOUNDED'=215 +'UNCOMMITTED'=216 +'UNION'=217 +'UNIQUE'=218 +'UNNEST'=219 +'UPDATE'=220 +'USE'=221 +'USER'=222 +'USING'=223 +'VALIDATE'=224 +'VALUES'=225 +'VERBOSE'=226 +'VERSION'=227 +'VIEW'=228 +'WHEN'=229 +'WHERE'=230 +'WITH'=231 +'WORK'=232 +'WRITE'=233 +'YEAR'=234 +'ZONE'=235 +'='=236 +'<'=238 +'<='=239 +'>'=240 +'>='=241 +'+'=242 +'-'=243 +'*'=244 +'/'=245 +'%'=246 +'||'=247 diff --git a/presto-ui/src/sql-parser/SqlBaseLexer.interp b/presto-ui/src/sql-parser/SqlBaseLexer.interp index 22de5542d6ede..d85624cfab87f 100644 --- a/presto-ui/src/sql-parser/SqlBaseLexer.interp +++ b/presto-ui/src/sql-parser/SqlBaseLexer.interp @@ -20,6 +20,7 @@ null 'AS' 'ASC' 'AT' +'BEFORE' 'BERNOULLI' 'BETWEEN' 'BY' @@ -36,6 +37,7 @@ null 'COMMITTED' 'CONSTRAINT' 'CREATE' +'COPARTITION' 'CROSS' 'CUBE' 'CURRENT' @@ -52,12 +54,17 @@ null 'DELETE' 'DESC' 'DESCRIBE' +'DESCRIPTOR' 'DETERMINISTIC' +'DISABLED' 'DISTINCT' 'DISTRIBUTED' 'DROP' 'ELSE' +'EMPTY' +'ENABLED' 'END' +'ENFORCED' 'ESCAPE' 'EXCEPT' 'EXCLUDING' @@ -102,6 +109,8 @@ null 'ISOLATION' 'JSON' 'JOIN' +'KEEP' +'KEY' 'LANGUAGE' 'LAST' 'LATERAL' @@ -113,7 +122,9 @@ null 'LOCALTIMESTAMP' 'LOGICAL' 'MAP' +'MATCHED' 'MATERIALIZED' +'MERGE' 'MINUTE' 'MONTH' 'NAME' @@ -145,12 +156,15 @@ null 'POSITION' 'PRECEDING' 'PREPARE' +'PRIMARY' 'PRIVILEGES' 'PROPERTIES' +'PRUNE' 'RANGE' 'READ' 'RECURSIVE' 'REFRESH' +'RELY' 'RENAME' 'REPEATABLE' 'REPLACE' @@ -203,6 +217,7 @@ null 'UNBOUNDED' 'UNCOMMITTED' 'UNION' +'UNIQUE' 'UNNEST' 'UPDATE' 'USE' @@ -272,6 +287,7 @@ ARRAY AS ASC AT +BEFORE BERNOULLI BETWEEN BY @@ -288,6 +304,7 @@ COMMIT COMMITTED CONSTRAINT CREATE +COPARTITION CROSS CUBE CURRENT @@ -304,12 +321,17 @@ DEFINER DELETE DESC DESCRIBE +DESCRIPTOR DETERMINISTIC +DISABLED DISTINCT DISTRIBUTED DROP ELSE +EMPTY +ENABLED END +ENFORCED ESCAPE EXCEPT EXCLUDING @@ -354,6 +376,8 @@ IS ISOLATION JSON JOIN +KEEP +KEY LANGUAGE LAST LATERAL @@ -365,7 +389,9 @@ LOCALTIME LOCALTIMESTAMP LOGICAL MAP +MATCHED MATERIALIZED +MERGE MINUTE MONTH NAME @@ -397,12 +423,15 @@ PARTITIONS POSITION PRECEDING PREPARE +PRIMARY PRIVILEGES PROPERTIES +PRUNE RANGE READ RECURSIVE REFRESH +RELY RENAME REPEATABLE REPLACE @@ -455,6 +484,7 @@ UESCAPE UNBOUNDED UNCOMMITTED UNION +UNIQUE UNNEST UPDATE USE @@ -523,6 +553,7 @@ ARRAY AS ASC AT +BEFORE BERNOULLI BETWEEN BY @@ -539,6 +570,7 @@ COMMIT COMMITTED CONSTRAINT CREATE +COPARTITION CROSS CUBE CURRENT @@ -555,12 +587,17 @@ DEFINER DELETE DESC DESCRIBE +DESCRIPTOR DETERMINISTIC +DISABLED DISTINCT DISTRIBUTED DROP ELSE +EMPTY +ENABLED END +ENFORCED ESCAPE EXCEPT EXCLUDING @@ -605,6 +642,8 @@ IS ISOLATION JSON JOIN +KEEP +KEY LANGUAGE LAST LATERAL @@ -616,7 +655,9 @@ LOCALTIME LOCALTIMESTAMP LOGICAL MAP +MATCHED MATERIALIZED +MERGE MINUTE MONTH NAME @@ -648,12 +689,15 @@ PARTITIONS POSITION PRECEDING PREPARE +PRIMARY PRIVILEGES PROPERTIES +PRUNE RANGE READ RECURSIVE REFRESH +RELY RENAME REPEATABLE REPLACE @@ -706,6 +750,7 @@ UESCAPE UNBOUNDED UNCOMMITTED UNION +UNIQUE UNNEST UPDATE USE @@ -764,4 +809,4 @@ mode names: DEFAULT_MODE atn: -[4, 0, 249, 2305, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 2, 58, 7, 58, 2, 59, 7, 59, 2, 60, 7, 60, 2, 61, 7, 61, 2, 62, 7, 62, 2, 63, 7, 63, 2, 64, 7, 64, 2, 65, 7, 65, 2, 66, 7, 66, 2, 67, 7, 67, 2, 68, 7, 68, 2, 69, 7, 69, 2, 70, 7, 70, 2, 71, 7, 71, 2, 72, 7, 72, 2, 73, 7, 73, 2, 74, 7, 74, 2, 75, 7, 75, 2, 76, 7, 76, 2, 77, 7, 77, 2, 78, 7, 78, 2, 79, 7, 79, 2, 80, 7, 80, 2, 81, 7, 81, 2, 82, 7, 82, 2, 83, 7, 83, 2, 84, 7, 84, 2, 85, 7, 85, 2, 86, 7, 86, 2, 87, 7, 87, 2, 88, 7, 88, 2, 89, 7, 89, 2, 90, 7, 90, 2, 91, 7, 91, 2, 92, 7, 92, 2, 93, 7, 93, 2, 94, 7, 94, 2, 95, 7, 95, 2, 96, 7, 96, 2, 97, 7, 97, 2, 98, 7, 98, 2, 99, 7, 99, 2, 100, 7, 100, 2, 101, 7, 101, 2, 102, 7, 102, 2, 103, 7, 103, 2, 104, 7, 104, 2, 105, 7, 105, 2, 106, 7, 106, 2, 107, 7, 107, 2, 108, 7, 108, 2, 109, 7, 109, 2, 110, 7, 110, 2, 111, 7, 111, 2, 112, 7, 112, 2, 113, 7, 113, 2, 114, 7, 114, 2, 115, 7, 115, 2, 116, 7, 116, 2, 117, 7, 117, 2, 118, 7, 118, 2, 119, 7, 119, 2, 120, 7, 120, 2, 121, 7, 121, 2, 122, 7, 122, 2, 123, 7, 123, 2, 124, 7, 124, 2, 125, 7, 125, 2, 126, 7, 126, 2, 127, 7, 127, 2, 128, 7, 128, 2, 129, 7, 129, 2, 130, 7, 130, 2, 131, 7, 131, 2, 132, 7, 132, 2, 133, 7, 133, 2, 134, 7, 134, 2, 135, 7, 135, 2, 136, 7, 136, 2, 137, 7, 137, 2, 138, 7, 138, 2, 139, 7, 139, 2, 140, 7, 140, 2, 141, 7, 141, 2, 142, 7, 142, 2, 143, 7, 143, 2, 144, 7, 144, 2, 145, 7, 145, 2, 146, 7, 146, 2, 147, 7, 147, 2, 148, 7, 148, 2, 149, 7, 149, 2, 150, 7, 150, 2, 151, 7, 151, 2, 152, 7, 152, 2, 153, 7, 153, 2, 154, 7, 154, 2, 155, 7, 155, 2, 156, 7, 156, 2, 157, 7, 157, 2, 158, 7, 158, 2, 159, 7, 159, 2, 160, 7, 160, 2, 161, 7, 161, 2, 162, 7, 162, 2, 163, 7, 163, 2, 164, 7, 164, 2, 165, 7, 165, 2, 166, 7, 166, 2, 167, 7, 167, 2, 168, 7, 168, 2, 169, 7, 169, 2, 170, 7, 170, 2, 171, 7, 171, 2, 172, 7, 172, 2, 173, 7, 173, 2, 174, 7, 174, 2, 175, 7, 175, 2, 176, 7, 176, 2, 177, 7, 177, 2, 178, 7, 178, 2, 179, 7, 179, 2, 180, 7, 180, 2, 181, 7, 181, 2, 182, 7, 182, 2, 183, 7, 183, 2, 184, 7, 184, 2, 185, 7, 185, 2, 186, 7, 186, 2, 187, 7, 187, 2, 188, 7, 188, 2, 189, 7, 189, 2, 190, 7, 190, 2, 191, 7, 191, 2, 192, 7, 192, 2, 193, 7, 193, 2, 194, 7, 194, 2, 195, 7, 195, 2, 196, 7, 196, 2, 197, 7, 197, 2, 198, 7, 198, 2, 199, 7, 199, 2, 200, 7, 200, 2, 201, 7, 201, 2, 202, 7, 202, 2, 203, 7, 203, 2, 204, 7, 204, 2, 205, 7, 205, 2, 206, 7, 206, 2, 207, 7, 207, 2, 208, 7, 208, 2, 209, 7, 209, 2, 210, 7, 210, 2, 211, 7, 211, 2, 212, 7, 212, 2, 213, 7, 213, 2, 214, 7, 214, 2, 215, 7, 215, 2, 216, 7, 216, 2, 217, 7, 217, 2, 218, 7, 218, 2, 219, 7, 219, 2, 220, 7, 220, 2, 221, 7, 221, 2, 222, 7, 222, 2, 223, 7, 223, 2, 224, 7, 224, 2, 225, 7, 225, 2, 226, 7, 226, 2, 227, 7, 227, 2, 228, 7, 228, 2, 229, 7, 229, 2, 230, 7, 230, 2, 231, 7, 231, 2, 232, 7, 232, 2, 233, 7, 233, 2, 234, 7, 234, 2, 235, 7, 235, 2, 236, 7, 236, 2, 237, 7, 237, 2, 238, 7, 238, 2, 239, 7, 239, 2, 240, 7, 240, 2, 241, 7, 241, 2, 242, 7, 242, 2, 243, 7, 243, 2, 244, 7, 244, 2, 245, 7, 245, 2, 246, 7, 246, 2, 247, 7, 247, 2, 248, 7, 248, 2, 249, 7, 249, 2, 250, 7, 250, 2, 251, 7, 251, 1, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 3, 1, 3, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 46, 1, 46, 1, 46, 1, 46, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 57, 1, 57, 1, 57, 1, 57, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 71, 1, 71, 1, 71, 1, 71, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 82, 1, 82, 1, 82, 1, 82, 1, 82, 1, 82, 1, 82, 1, 82, 1, 82, 1, 83, 1, 83, 1, 83, 1, 83, 1, 83, 1, 83, 1, 83, 1, 84, 1, 84, 1, 84, 1, 84, 1, 84, 1, 84, 1, 84, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 86, 1, 86, 1, 86, 1, 87, 1, 87, 1, 87, 1, 87, 1, 87, 1, 87, 1, 87, 1, 88, 1, 88, 1, 88, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 90, 1, 90, 1, 90, 1, 90, 1, 90, 1, 90, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 92, 1, 92, 1, 92, 1, 92, 1, 92, 1, 92, 1, 92, 1, 93, 1, 93, 1, 93, 1, 93, 1, 93, 1, 93, 1, 93, 1, 93, 1, 93, 1, 93, 1, 94, 1, 94, 1, 94, 1, 94, 1, 94, 1, 94, 1, 94, 1, 94, 1, 94, 1, 95, 1, 95, 1, 95, 1, 95, 1, 95, 1, 96, 1, 96, 1, 96, 1, 96, 1, 96, 1, 96, 1, 96, 1, 96, 1, 97, 1, 97, 1, 97, 1, 98, 1, 98, 1, 98, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 101, 1, 101, 1, 101, 1, 101, 1, 101, 1, 102, 1, 102, 1, 102, 1, 102, 1, 102, 1, 102, 1, 102, 1, 102, 1, 102, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, 105, 1, 105, 1, 105, 1, 105, 1, 105, 1, 106, 1, 106, 1, 106, 1, 106, 1, 106, 1, 106, 1, 107, 1, 107, 1, 107, 1, 107, 1, 107, 1, 108, 1, 108, 1, 108, 1, 108, 1, 108, 1, 108, 1, 109, 1, 109, 1, 109, 1, 109, 1, 109, 1, 109, 1, 109, 1, 109, 1, 109, 1, 109, 1, 110, 1, 110, 1, 110, 1, 110, 1, 110, 1, 110, 1, 110, 1, 110, 1, 110, 1, 110, 1, 110, 1, 110, 1, 110, 1, 110, 1, 110, 1, 111, 1, 111, 1, 111, 1, 111, 1, 111, 1, 111, 1, 111, 1, 111, 1, 112, 1, 112, 1, 112, 1, 112, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 114, 1, 114, 1, 114, 1, 114, 1, 114, 1, 114, 1, 114, 1, 115, 1, 115, 1, 115, 1, 115, 1, 115, 1, 115, 1, 116, 1, 116, 1, 116, 1, 116, 1, 116, 1, 117, 1, 117, 1, 117, 1, 117, 1, 117, 1, 117, 1, 117, 1, 117, 1, 118, 1, 118, 1, 118, 1, 118, 1, 119, 1, 119, 1, 119, 1, 119, 1, 120, 1, 120, 1, 120, 1, 120, 1, 120, 1, 121, 1, 121, 1, 121, 1, 121, 1, 121, 1, 122, 1, 122, 1, 122, 1, 123, 1, 123, 1, 123, 1, 123, 1, 123, 1, 124, 1, 124, 1, 124, 1, 124, 1, 124, 1, 124, 1, 124, 1, 124, 1, 124, 1, 124, 1, 125, 1, 125, 1, 125, 1, 125, 1, 126, 1, 126, 1, 126, 1, 126, 1, 126, 1, 127, 1, 127, 1, 127, 1, 127, 1, 127, 1, 127, 1, 127, 1, 128, 1, 128, 1, 128, 1, 128, 1, 128, 1, 128, 1, 129, 1, 129, 1, 129, 1, 130, 1, 130, 1, 130, 1, 130, 1, 130, 1, 130, 1, 130, 1, 131, 1, 131, 1, 131, 1, 132, 1, 132, 1, 132, 1, 132, 1, 132, 1, 133, 1, 133, 1, 133, 1, 133, 1, 133, 1, 133, 1, 133, 1, 134, 1, 134, 1, 134, 1, 135, 1, 135, 1, 135, 1, 135, 1, 135, 1, 135, 1, 136, 1, 136, 1, 136, 1, 136, 1, 136, 1, 136, 1, 136, 1, 136, 1, 136, 1, 136, 1, 136, 1, 137, 1, 137, 1, 137, 1, 137, 1, 137, 1, 137, 1, 138, 1, 138, 1, 138, 1, 138, 1, 138, 1, 138, 1, 138, 1, 139, 1, 139, 1, 139, 1, 139, 1, 139, 1, 140, 1, 140, 1, 140, 1, 140, 1, 140, 1, 140, 1, 140, 1, 140, 1, 140, 1, 140, 1, 141, 1, 141, 1, 141, 1, 141, 1, 141, 1, 141, 1, 141, 1, 141, 1, 141, 1, 141, 1, 141, 1, 142, 1, 142, 1, 142, 1, 142, 1, 142, 1, 142, 1, 142, 1, 142, 1, 142, 1, 143, 1, 143, 1, 143, 1, 143, 1, 143, 1, 143, 1, 143, 1, 143, 1, 143, 1, 143, 1, 144, 1, 144, 1, 144, 1, 144, 1, 144, 1, 144, 1, 144, 1, 144, 1, 145, 1, 145, 1, 145, 1, 145, 1, 145, 1, 145, 1, 145, 1, 145, 1, 145, 1, 145, 1, 145, 1, 146, 1, 146, 1, 146, 1, 146, 1, 146, 1, 146, 1, 146, 1, 146, 1, 146, 1, 146, 1, 146, 1, 147, 1, 147, 1, 147, 1, 147, 1, 147, 1, 147, 1, 148, 1, 148, 1, 148, 1, 148, 1, 148, 1, 149, 1, 149, 1, 149, 1, 149, 1, 149, 1, 149, 1, 149, 1, 149, 1, 149, 1, 149, 1, 150, 1, 150, 1, 150, 1, 150, 1, 150, 1, 150, 1, 150, 1, 150, 1, 151, 1, 151, 1, 151, 1, 151, 1, 151, 1, 151, 1, 151, 1, 152, 1, 152, 1, 152, 1, 152, 1, 152, 1, 152, 1, 152, 1, 152, 1, 152, 1, 152, 1, 152, 1, 153, 1, 153, 1, 153, 1, 153, 1, 153, 1, 153, 1, 153, 1, 153, 1, 154, 1, 154, 1, 154, 1, 154, 1, 154, 1, 154, 1, 155, 1, 155, 1, 155, 1, 155, 1, 155, 1, 155, 1, 155, 1, 155, 1, 156, 1, 156, 1, 156, 1, 156, 1, 156, 1, 156, 1, 156, 1, 156, 1, 156, 1, 157, 1, 157, 1, 157, 1, 157, 1, 157, 1, 157, 1, 157, 1, 158, 1, 158, 1, 158, 1, 158, 1, 158, 1, 158, 1, 158, 1, 158, 1, 159, 1, 159, 1, 159, 1, 159, 1, 159, 1, 159, 1, 159, 1, 160, 1, 160, 1, 160, 1, 160, 1, 160, 1, 160, 1, 161, 1, 161, 1, 161, 1, 161, 1, 161, 1, 162, 1, 162, 1, 162, 1, 162, 1, 162, 1, 162, 1, 163, 1, 163, 1, 163, 1, 163, 1, 163, 1, 163, 1, 163, 1, 163, 1, 163, 1, 164, 1, 164, 1, 164, 1, 164, 1, 164, 1, 164, 1, 164, 1, 165, 1, 165, 1, 165, 1, 165, 1, 166, 1, 166, 1, 166, 1, 166, 1, 166, 1, 167, 1, 167, 1, 167, 1, 167, 1, 167, 1, 167, 1, 167, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 169, 1, 169, 1, 169, 1, 169, 1, 169, 1, 169, 1, 169, 1, 170, 1, 170, 1, 170, 1, 170, 1, 170, 1, 170, 1, 170, 1, 170, 1, 170, 1, 171, 1, 171, 1, 171, 1, 171, 1, 171, 1, 171, 1, 171, 1, 172, 1, 172, 1, 172, 1, 172, 1, 172, 1, 172, 1, 172, 1, 172, 1, 172, 1, 172, 1, 172, 1, 172, 1, 172, 1, 173, 1, 173, 1, 173, 1, 173, 1, 173, 1, 173, 1, 173, 1, 173, 1, 174, 1, 174, 1, 174, 1, 174, 1, 175, 1, 175, 1, 175, 1, 175, 1, 175, 1, 176, 1, 176, 1, 176, 1, 176, 1, 176, 1, 177, 1, 177, 1, 177, 1, 177, 1, 177, 1, 178, 1, 178, 1, 178, 1, 178, 1, 179, 1, 179, 1, 179, 1, 179, 1, 179, 1, 179, 1, 180, 1, 180, 1, 180, 1, 180, 1, 180, 1, 180, 1, 181, 1, 181, 1, 181, 1, 181, 1, 181, 1, 181, 1, 181, 1, 181, 1, 181, 1, 181, 1, 182, 1, 182, 1, 182, 1, 182, 1, 182, 1, 182, 1, 182, 1, 183, 1, 183, 1, 183, 1, 183, 1, 183, 1, 183, 1, 183, 1, 183, 1, 183, 1, 183, 1, 183, 1, 183, 1, 184, 1, 184, 1, 184, 1, 184, 1, 184, 1, 184, 1, 184, 1, 184, 1, 184, 1, 184, 1, 184, 1, 184, 1, 184, 1, 184, 1, 184, 1, 185, 1, 185, 1, 185, 1, 185, 1, 185, 1, 185, 1, 186, 1, 186, 1, 186, 1, 186, 1, 186, 1, 186, 1, 186, 1, 187, 1, 187, 1, 187, 1, 187, 1, 187, 1, 187, 1, 187, 1, 187, 1, 187, 1, 187, 1, 187, 1, 187, 1, 188, 1, 188, 1, 188, 1, 188, 1, 188, 1, 188, 1, 188, 1, 188, 1, 188, 1, 188, 1, 189, 1, 189, 1, 189, 1, 189, 1, 189, 1, 190, 1, 190, 1, 190, 1, 190, 1, 190, 1, 191, 1, 191, 1, 191, 1, 191, 1, 191, 1, 192, 1, 192, 1, 192, 1, 192, 1, 192, 1, 192, 1, 192, 1, 192, 1, 192, 1, 192, 1, 193, 1, 193, 1, 193, 1, 194, 1, 194, 1, 194, 1, 194, 1, 194, 1, 194, 1, 194, 1, 194, 1, 194, 1, 194, 1, 194, 1, 194, 1, 195, 1, 195, 1, 195, 1, 195, 1, 195, 1, 196, 1, 196, 1, 196, 1, 196, 1, 196, 1, 196, 1, 196, 1, 196, 1, 196, 1, 197, 1, 197, 1, 197, 1, 197, 1, 197, 1, 197, 1, 197, 1, 197, 1, 197, 1, 198, 1, 198, 1, 198, 1, 198, 1, 198, 1, 199, 1, 199, 1, 199, 1, 199, 1, 199, 1, 199, 1, 199, 1, 199, 1, 200, 1, 200, 1, 200, 1, 200, 1, 200, 1, 200, 1, 200, 1, 200, 1, 200, 1, 200, 1, 201, 1, 201, 1, 201, 1, 201, 1, 201, 1, 201, 1, 201, 1, 201, 1, 201, 1, 201, 1, 201, 1, 201, 1, 202, 1, 202, 1, 202, 1, 202, 1, 202, 1, 202, 1, 203, 1, 203, 1, 203, 1, 203, 1, 203, 1, 203, 1, 203, 1, 204, 1, 204, 1, 204, 1, 204, 1, 204, 1, 204, 1, 204, 1, 205, 1, 205, 1, 205, 1, 205, 1, 206, 1, 206, 1, 206, 1, 206, 1, 206, 1, 207, 1, 207, 1, 207, 1, 207, 1, 207, 1, 207, 1, 208, 1, 208, 1, 208, 1, 208, 1, 208, 1, 208, 1, 208, 1, 208, 1, 208, 1, 209, 1, 209, 1, 209, 1, 209, 1, 209, 1, 209, 1, 209, 1, 210, 1, 210, 1, 210, 1, 210, 1, 210, 1, 210, 1, 210, 1, 210, 1, 211, 1, 211, 1, 211, 1, 211, 1, 211, 1, 211, 1, 211, 1, 211, 1, 212, 1, 212, 1, 212, 1, 212, 1, 212, 1, 213, 1, 213, 1, 213, 1, 213, 1, 213, 1, 214, 1, 214, 1, 214, 1, 214, 1, 214, 1, 214, 1, 215, 1, 215, 1, 215, 1, 215, 1, 215, 1, 216, 1, 216, 1, 216, 1, 216, 1, 216, 1, 217, 1, 217, 1, 217, 1, 217, 1, 217, 1, 217, 1, 218, 1, 218, 1, 218, 1, 218, 1, 218, 1, 219, 1, 219, 1, 219, 1, 219, 1, 219, 1, 220, 1, 220, 1, 221, 1, 221, 1, 221, 1, 221, 3, 221, 2030, 8, 221, 1, 222, 1, 222, 1, 223, 1, 223, 1, 223, 1, 224, 1, 224, 1, 225, 1, 225, 1, 225, 1, 226, 1, 226, 1, 227, 1, 227, 1, 228, 1, 228, 1, 229, 1, 229, 1, 230, 1, 230, 1, 231, 1, 231, 1, 231, 1, 232, 1, 232, 1, 232, 1, 232, 5, 232, 2059, 8, 232, 10, 232, 12, 232, 2062, 9, 232, 1, 232, 1, 232, 1, 233, 1, 233, 1, 233, 1, 233, 1, 233, 1, 233, 1, 233, 5, 233, 2073, 8, 233, 10, 233, 12, 233, 2076, 9, 233, 1, 233, 1, 233, 1, 234, 1, 234, 1, 234, 1, 234, 5, 234, 2084, 8, 234, 10, 234, 12, 234, 2087, 9, 234, 1, 234, 1, 234, 1, 235, 4, 235, 2092, 8, 235, 11, 235, 12, 235, 2093, 1, 236, 4, 236, 2097, 8, 236, 11, 236, 12, 236, 2098, 1, 236, 1, 236, 5, 236, 2103, 8, 236, 10, 236, 12, 236, 2106, 9, 236, 1, 236, 1, 236, 4, 236, 2110, 8, 236, 11, 236, 12, 236, 2111, 3, 236, 2114, 8, 236, 1, 237, 4, 237, 2117, 8, 237, 11, 237, 12, 237, 2118, 1, 237, 1, 237, 5, 237, 2123, 8, 237, 10, 237, 12, 237, 2126, 9, 237, 3, 237, 2128, 8, 237, 1, 237, 1, 237, 1, 237, 1, 237, 4, 237, 2134, 8, 237, 11, 237, 12, 237, 2135, 1, 237, 1, 237, 3, 237, 2140, 8, 237, 1, 238, 1, 238, 3, 238, 2144, 8, 238, 1, 238, 1, 238, 1, 238, 5, 238, 2149, 8, 238, 10, 238, 12, 238, 2152, 9, 238, 1, 239, 1, 239, 1, 239, 1, 239, 4, 239, 2158, 8, 239, 11, 239, 12, 239, 2159, 1, 240, 1, 240, 1, 240, 1, 240, 5, 240, 2166, 8, 240, 10, 240, 12, 240, 2169, 9, 240, 1, 240, 1, 240, 1, 241, 1, 241, 1, 241, 1, 241, 5, 241, 2177, 8, 241, 10, 241, 12, 241, 2180, 9, 241, 1, 241, 1, 241, 1, 242, 1, 242, 1, 242, 1, 242, 1, 242, 1, 242, 1, 242, 1, 242, 1, 242, 1, 242, 1, 242, 1, 242, 1, 242, 1, 242, 1, 242, 1, 242, 1, 242, 1, 242, 1, 242, 1, 242, 1, 242, 1, 242, 1, 242, 1, 243, 1, 243, 1, 243, 1, 243, 1, 243, 1, 243, 1, 243, 1, 243, 1, 243, 1, 243, 1, 243, 1, 243, 1, 243, 1, 243, 1, 243, 1, 243, 1, 243, 1, 243, 1, 243, 1, 243, 1, 243, 1, 243, 1, 243, 1, 243, 1, 243, 1, 243, 1, 243, 1, 243, 1, 244, 1, 244, 1, 244, 1, 244, 1, 244, 1, 244, 1, 244, 1, 244, 1, 244, 1, 244, 1, 244, 1, 244, 1, 244, 1, 244, 1, 244, 1, 244, 1, 244, 1, 244, 1, 245, 1, 245, 3, 245, 2255, 8, 245, 1, 245, 4, 245, 2258, 8, 245, 11, 245, 12, 245, 2259, 1, 246, 1, 246, 1, 247, 1, 247, 1, 248, 1, 248, 1, 248, 1, 248, 5, 248, 2270, 8, 248, 10, 248, 12, 248, 2273, 9, 248, 1, 248, 3, 248, 2276, 8, 248, 1, 248, 3, 248, 2279, 8, 248, 1, 248, 1, 248, 1, 249, 1, 249, 1, 249, 1, 249, 5, 249, 2287, 8, 249, 10, 249, 12, 249, 2290, 9, 249, 1, 249, 1, 249, 1, 249, 1, 249, 1, 249, 1, 250, 4, 250, 2298, 8, 250, 11, 250, 12, 250, 2299, 1, 250, 1, 250, 1, 251, 1, 251, 1, 2288, 0, 252, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, 32, 65, 33, 67, 34, 69, 35, 71, 36, 73, 37, 75, 38, 77, 39, 79, 40, 81, 41, 83, 42, 85, 43, 87, 44, 89, 45, 91, 46, 93, 47, 95, 48, 97, 49, 99, 50, 101, 51, 103, 52, 105, 53, 107, 54, 109, 55, 111, 56, 113, 57, 115, 58, 117, 59, 119, 60, 121, 61, 123, 62, 125, 63, 127, 64, 129, 65, 131, 66, 133, 67, 135, 68, 137, 69, 139, 70, 141, 71, 143, 72, 145, 73, 147, 74, 149, 75, 151, 76, 153, 77, 155, 78, 157, 79, 159, 80, 161, 81, 163, 82, 165, 83, 167, 84, 169, 85, 171, 86, 173, 87, 175, 88, 177, 89, 179, 90, 181, 91, 183, 92, 185, 93, 187, 94, 189, 95, 191, 96, 193, 97, 195, 98, 197, 99, 199, 100, 201, 101, 203, 102, 205, 103, 207, 104, 209, 105, 211, 106, 213, 107, 215, 108, 217, 109, 219, 110, 221, 111, 223, 112, 225, 113, 227, 114, 229, 115, 231, 116, 233, 117, 235, 118, 237, 119, 239, 120, 241, 121, 243, 122, 245, 123, 247, 124, 249, 125, 251, 126, 253, 127, 255, 128, 257, 129, 259, 130, 261, 131, 263, 132, 265, 133, 267, 134, 269, 135, 271, 136, 273, 137, 275, 138, 277, 139, 279, 140, 281, 141, 283, 142, 285, 143, 287, 144, 289, 145, 291, 146, 293, 147, 295, 148, 297, 149, 299, 150, 301, 151, 303, 152, 305, 153, 307, 154, 309, 155, 311, 156, 313, 157, 315, 158, 317, 159, 319, 160, 321, 161, 323, 162, 325, 163, 327, 164, 329, 165, 331, 166, 333, 167, 335, 168, 337, 169, 339, 170, 341, 171, 343, 172, 345, 173, 347, 174, 349, 175, 351, 176, 353, 177, 355, 178, 357, 179, 359, 180, 361, 181, 363, 182, 365, 183, 367, 184, 369, 185, 371, 186, 373, 187, 375, 188, 377, 189, 379, 190, 381, 191, 383, 192, 385, 193, 387, 194, 389, 195, 391, 196, 393, 197, 395, 198, 397, 199, 399, 200, 401, 201, 403, 202, 405, 203, 407, 204, 409, 205, 411, 206, 413, 207, 415, 208, 417, 209, 419, 210, 421, 211, 423, 212, 425, 213, 427, 214, 429, 215, 431, 216, 433, 217, 435, 218, 437, 219, 439, 220, 441, 221, 443, 222, 445, 223, 447, 224, 449, 225, 451, 226, 453, 227, 455, 228, 457, 229, 459, 230, 461, 231, 463, 232, 465, 233, 467, 234, 469, 235, 471, 236, 473, 237, 475, 238, 477, 239, 479, 240, 481, 241, 483, 242, 485, 243, 487, 244, 489, 245, 491, 0, 493, 0, 495, 0, 497, 246, 499, 247, 501, 248, 503, 249, 1, 0, 9, 1, 0, 39, 39, 3, 0, 58, 58, 64, 64, 95, 95, 1, 0, 34, 34, 1, 0, 96, 96, 2, 0, 43, 43, 45, 45, 1, 0, 48, 57, 1, 0, 65, 90, 2, 0, 10, 10, 13, 13, 3, 0, 9, 10, 13, 13, 32, 32, 2335, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, 0, 91, 1, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 95, 1, 0, 0, 0, 0, 97, 1, 0, 0, 0, 0, 99, 1, 0, 0, 0, 0, 101, 1, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0, 105, 1, 0, 0, 0, 0, 107, 1, 0, 0, 0, 0, 109, 1, 0, 0, 0, 0, 111, 1, 0, 0, 0, 0, 113, 1, 0, 0, 0, 0, 115, 1, 0, 0, 0, 0, 117, 1, 0, 0, 0, 0, 119, 1, 0, 0, 0, 0, 121, 1, 0, 0, 0, 0, 123, 1, 0, 0, 0, 0, 125, 1, 0, 0, 0, 0, 127, 1, 0, 0, 0, 0, 129, 1, 0, 0, 0, 0, 131, 1, 0, 0, 0, 0, 133, 1, 0, 0, 0, 0, 135, 1, 0, 0, 0, 0, 137, 1, 0, 0, 0, 0, 139, 1, 0, 0, 0, 0, 141, 1, 0, 0, 0, 0, 143, 1, 0, 0, 0, 0, 145, 1, 0, 0, 0, 0, 147, 1, 0, 0, 0, 0, 149, 1, 0, 0, 0, 0, 151, 1, 0, 0, 0, 0, 153, 1, 0, 0, 0, 0, 155, 1, 0, 0, 0, 0, 157, 1, 0, 0, 0, 0, 159, 1, 0, 0, 0, 0, 161, 1, 0, 0, 0, 0, 163, 1, 0, 0, 0, 0, 165, 1, 0, 0, 0, 0, 167, 1, 0, 0, 0, 0, 169, 1, 0, 0, 0, 0, 171, 1, 0, 0, 0, 0, 173, 1, 0, 0, 0, 0, 175, 1, 0, 0, 0, 0, 177, 1, 0, 0, 0, 0, 179, 1, 0, 0, 0, 0, 181, 1, 0, 0, 0, 0, 183, 1, 0, 0, 0, 0, 185, 1, 0, 0, 0, 0, 187, 1, 0, 0, 0, 0, 189, 1, 0, 0, 0, 0, 191, 1, 0, 0, 0, 0, 193, 1, 0, 0, 0, 0, 195, 1, 0, 0, 0, 0, 197, 1, 0, 0, 0, 0, 199, 1, 0, 0, 0, 0, 201, 1, 0, 0, 0, 0, 203, 1, 0, 0, 0, 0, 205, 1, 0, 0, 0, 0, 207, 1, 0, 0, 0, 0, 209, 1, 0, 0, 0, 0, 211, 1, 0, 0, 0, 0, 213, 1, 0, 0, 0, 0, 215, 1, 0, 0, 0, 0, 217, 1, 0, 0, 0, 0, 219, 1, 0, 0, 0, 0, 221, 1, 0, 0, 0, 0, 223, 1, 0, 0, 0, 0, 225, 1, 0, 0, 0, 0, 227, 1, 0, 0, 0, 0, 229, 1, 0, 0, 0, 0, 231, 1, 0, 0, 0, 0, 233, 1, 0, 0, 0, 0, 235, 1, 0, 0, 0, 0, 237, 1, 0, 0, 0, 0, 239, 1, 0, 0, 0, 0, 241, 1, 0, 0, 0, 0, 243, 1, 0, 0, 0, 0, 245, 1, 0, 0, 0, 0, 247, 1, 0, 0, 0, 0, 249, 1, 0, 0, 0, 0, 251, 1, 0, 0, 0, 0, 253, 1, 0, 0, 0, 0, 255, 1, 0, 0, 0, 0, 257, 1, 0, 0, 0, 0, 259, 1, 0, 0, 0, 0, 261, 1, 0, 0, 0, 0, 263, 1, 0, 0, 0, 0, 265, 1, 0, 0, 0, 0, 267, 1, 0, 0, 0, 0, 269, 1, 0, 0, 0, 0, 271, 1, 0, 0, 0, 0, 273, 1, 0, 0, 0, 0, 275, 1, 0, 0, 0, 0, 277, 1, 0, 0, 0, 0, 279, 1, 0, 0, 0, 0, 281, 1, 0, 0, 0, 0, 283, 1, 0, 0, 0, 0, 285, 1, 0, 0, 0, 0, 287, 1, 0, 0, 0, 0, 289, 1, 0, 0, 0, 0, 291, 1, 0, 0, 0, 0, 293, 1, 0, 0, 0, 0, 295, 1, 0, 0, 0, 0, 297, 1, 0, 0, 0, 0, 299, 1, 0, 0, 0, 0, 301, 1, 0, 0, 0, 0, 303, 1, 0, 0, 0, 0, 305, 1, 0, 0, 0, 0, 307, 1, 0, 0, 0, 0, 309, 1, 0, 0, 0, 0, 311, 1, 0, 0, 0, 0, 313, 1, 0, 0, 0, 0, 315, 1, 0, 0, 0, 0, 317, 1, 0, 0, 0, 0, 319, 1, 0, 0, 0, 0, 321, 1, 0, 0, 0, 0, 323, 1, 0, 0, 0, 0, 325, 1, 0, 0, 0, 0, 327, 1, 0, 0, 0, 0, 329, 1, 0, 0, 0, 0, 331, 1, 0, 0, 0, 0, 333, 1, 0, 0, 0, 0, 335, 1, 0, 0, 0, 0, 337, 1, 0, 0, 0, 0, 339, 1, 0, 0, 0, 0, 341, 1, 0, 0, 0, 0, 343, 1, 0, 0, 0, 0, 345, 1, 0, 0, 0, 0, 347, 1, 0, 0, 0, 0, 349, 1, 0, 0, 0, 0, 351, 1, 0, 0, 0, 0, 353, 1, 0, 0, 0, 0, 355, 1, 0, 0, 0, 0, 357, 1, 0, 0, 0, 0, 359, 1, 0, 0, 0, 0, 361, 1, 0, 0, 0, 0, 363, 1, 0, 0, 0, 0, 365, 1, 0, 0, 0, 0, 367, 1, 0, 0, 0, 0, 369, 1, 0, 0, 0, 0, 371, 1, 0, 0, 0, 0, 373, 1, 0, 0, 0, 0, 375, 1, 0, 0, 0, 0, 377, 1, 0, 0, 0, 0, 379, 1, 0, 0, 0, 0, 381, 1, 0, 0, 0, 0, 383, 1, 0, 0, 0, 0, 385, 1, 0, 0, 0, 0, 387, 1, 0, 0, 0, 0, 389, 1, 0, 0, 0, 0, 391, 1, 0, 0, 0, 0, 393, 1, 0, 0, 0, 0, 395, 1, 0, 0, 0, 0, 397, 1, 0, 0, 0, 0, 399, 1, 0, 0, 0, 0, 401, 1, 0, 0, 0, 0, 403, 1, 0, 0, 0, 0, 405, 1, 0, 0, 0, 0, 407, 1, 0, 0, 0, 0, 409, 1, 0, 0, 0, 0, 411, 1, 0, 0, 0, 0, 413, 1, 0, 0, 0, 0, 415, 1, 0, 0, 0, 0, 417, 1, 0, 0, 0, 0, 419, 1, 0, 0, 0, 0, 421, 1, 0, 0, 0, 0, 423, 1, 0, 0, 0, 0, 425, 1, 0, 0, 0, 0, 427, 1, 0, 0, 0, 0, 429, 1, 0, 0, 0, 0, 431, 1, 0, 0, 0, 0, 433, 1, 0, 0, 0, 0, 435, 1, 0, 0, 0, 0, 437, 1, 0, 0, 0, 0, 439, 1, 0, 0, 0, 0, 441, 1, 0, 0, 0, 0, 443, 1, 0, 0, 0, 0, 445, 1, 0, 0, 0, 0, 447, 1, 0, 0, 0, 0, 449, 1, 0, 0, 0, 0, 451, 1, 0, 0, 0, 0, 453, 1, 0, 0, 0, 0, 455, 1, 0, 0, 0, 0, 457, 1, 0, 0, 0, 0, 459, 1, 0, 0, 0, 0, 461, 1, 0, 0, 0, 0, 463, 1, 0, 0, 0, 0, 465, 1, 0, 0, 0, 0, 467, 1, 0, 0, 0, 0, 469, 1, 0, 0, 0, 0, 471, 1, 0, 0, 0, 0, 473, 1, 0, 0, 0, 0, 475, 1, 0, 0, 0, 0, 477, 1, 0, 0, 0, 0, 479, 1, 0, 0, 0, 0, 481, 1, 0, 0, 0, 0, 483, 1, 0, 0, 0, 0, 485, 1, 0, 0, 0, 0, 487, 1, 0, 0, 0, 0, 489, 1, 0, 0, 0, 0, 497, 1, 0, 0, 0, 0, 499, 1, 0, 0, 0, 0, 501, 1, 0, 0, 0, 0, 503, 1, 0, 0, 0, 1, 505, 1, 0, 0, 0, 3, 507, 1, 0, 0, 0, 5, 509, 1, 0, 0, 0, 7, 511, 1, 0, 0, 0, 9, 513, 1, 0, 0, 0, 11, 515, 1, 0, 0, 0, 13, 518, 1, 0, 0, 0, 15, 520, 1, 0, 0, 0, 17, 522, 1, 0, 0, 0, 19, 525, 1, 0, 0, 0, 21, 529, 1, 0, 0, 0, 23, 535, 1, 0, 0, 0, 25, 539, 1, 0, 0, 0, 27, 545, 1, 0, 0, 0, 29, 553, 1, 0, 0, 0, 31, 557, 1, 0, 0, 0, 33, 561, 1, 0, 0, 0, 35, 567, 1, 0, 0, 0, 37, 570, 1, 0, 0, 0, 39, 574, 1, 0, 0, 0, 41, 577, 1, 0, 0, 0, 43, 587, 1, 0, 0, 0, 45, 595, 1, 0, 0, 0, 47, 598, 1, 0, 0, 0, 49, 603, 1, 0, 0, 0, 51, 610, 1, 0, 0, 0, 53, 618, 1, 0, 0, 0, 55, 623, 1, 0, 0, 0, 57, 628, 1, 0, 0, 0, 59, 637, 1, 0, 0, 0, 61, 644, 1, 0, 0, 0, 63, 652, 1, 0, 0, 0, 65, 660, 1, 0, 0, 0, 67, 667, 1, 0, 0, 0, 69, 677, 1, 0, 0, 0, 71, 688, 1, 0, 0, 0, 73, 695, 1, 0, 0, 0, 75, 701, 1, 0, 0, 0, 77, 706, 1, 0, 0, 0, 79, 714, 1, 0, 0, 0, 81, 727, 1, 0, 0, 0, 83, 740, 1, 0, 0, 0, 85, 753, 1, 0, 0, 0, 87, 771, 1, 0, 0, 0, 89, 784, 1, 0, 0, 0, 91, 789, 1, 0, 0, 0, 93, 794, 1, 0, 0, 0, 95, 798, 1, 0, 0, 0, 97, 809, 1, 0, 0, 0, 99, 817, 1, 0, 0, 0, 101, 824, 1, 0, 0, 0, 103, 829, 1, 0, 0, 0, 105, 838, 1, 0, 0, 0, 107, 852, 1, 0, 0, 0, 109, 861, 1, 0, 0, 0, 111, 873, 1, 0, 0, 0, 113, 878, 1, 0, 0, 0, 115, 883, 1, 0, 0, 0, 117, 887, 1, 0, 0, 0, 119, 894, 1, 0, 0, 0, 121, 901, 1, 0, 0, 0, 123, 911, 1, 0, 0, 0, 125, 919, 1, 0, 0, 0, 127, 926, 1, 0, 0, 0, 129, 934, 1, 0, 0, 0, 131, 942, 1, 0, 0, 0, 133, 951, 1, 0, 0, 0, 135, 957, 1, 0, 0, 0, 137, 963, 1, 0, 0, 0, 139, 970, 1, 0, 0, 0, 141, 976, 1, 0, 0, 0, 143, 986, 1, 0, 0, 0, 145, 990, 1, 0, 0, 0, 147, 997, 1, 0, 0, 0, 149, 1002, 1, 0, 0, 0, 151, 1007, 1, 0, 0, 0, 153, 1016, 1, 0, 0, 0, 155, 1026, 1, 0, 0, 0, 157, 1032, 1, 0, 0, 0, 159, 1040, 1, 0, 0, 0, 161, 1047, 1, 0, 0, 0, 163, 1056, 1, 0, 0, 0, 165, 1062, 1, 0, 0, 0, 167, 1071, 1, 0, 0, 0, 169, 1078, 1, 0, 0, 0, 171, 1085, 1, 0, 0, 0, 173, 1090, 1, 0, 0, 0, 175, 1093, 1, 0, 0, 0, 177, 1100, 1, 0, 0, 0, 179, 1103, 1, 0, 0, 0, 181, 1113, 1, 0, 0, 0, 183, 1119, 1, 0, 0, 0, 185, 1125, 1, 0, 0, 0, 187, 1132, 1, 0, 0, 0, 189, 1142, 1, 0, 0, 0, 191, 1151, 1, 0, 0, 0, 193, 1156, 1, 0, 0, 0, 195, 1164, 1, 0, 0, 0, 197, 1167, 1, 0, 0, 0, 199, 1170, 1, 0, 0, 0, 201, 1180, 1, 0, 0, 0, 203, 1185, 1, 0, 0, 0, 205, 1190, 1, 0, 0, 0, 207, 1199, 1, 0, 0, 0, 209, 1204, 1, 0, 0, 0, 211, 1212, 1, 0, 0, 0, 213, 1217, 1, 0, 0, 0, 215, 1223, 1, 0, 0, 0, 217, 1228, 1, 0, 0, 0, 219, 1234, 1, 0, 0, 0, 221, 1244, 1, 0, 0, 0, 223, 1259, 1, 0, 0, 0, 225, 1267, 1, 0, 0, 0, 227, 1271, 1, 0, 0, 0, 229, 1284, 1, 0, 0, 0, 231, 1291, 1, 0, 0, 0, 233, 1297, 1, 0, 0, 0, 235, 1302, 1, 0, 0, 0, 237, 1310, 1, 0, 0, 0, 239, 1314, 1, 0, 0, 0, 241, 1318, 1, 0, 0, 0, 243, 1323, 1, 0, 0, 0, 245, 1328, 1, 0, 0, 0, 247, 1331, 1, 0, 0, 0, 249, 1336, 1, 0, 0, 0, 251, 1346, 1, 0, 0, 0, 253, 1350, 1, 0, 0, 0, 255, 1355, 1, 0, 0, 0, 257, 1362, 1, 0, 0, 0, 259, 1368, 1, 0, 0, 0, 261, 1371, 1, 0, 0, 0, 263, 1378, 1, 0, 0, 0, 265, 1381, 1, 0, 0, 0, 267, 1386, 1, 0, 0, 0, 269, 1393, 1, 0, 0, 0, 271, 1396, 1, 0, 0, 0, 273, 1402, 1, 0, 0, 0, 275, 1413, 1, 0, 0, 0, 277, 1419, 1, 0, 0, 0, 279, 1426, 1, 0, 0, 0, 281, 1431, 1, 0, 0, 0, 283, 1441, 1, 0, 0, 0, 285, 1452, 1, 0, 0, 0, 287, 1461, 1, 0, 0, 0, 289, 1471, 1, 0, 0, 0, 291, 1479, 1, 0, 0, 0, 293, 1490, 1, 0, 0, 0, 295, 1501, 1, 0, 0, 0, 297, 1507, 1, 0, 0, 0, 299, 1512, 1, 0, 0, 0, 301, 1522, 1, 0, 0, 0, 303, 1530, 1, 0, 0, 0, 305, 1537, 1, 0, 0, 0, 307, 1548, 1, 0, 0, 0, 309, 1556, 1, 0, 0, 0, 311, 1562, 1, 0, 0, 0, 313, 1570, 1, 0, 0, 0, 315, 1579, 1, 0, 0, 0, 317, 1586, 1, 0, 0, 0, 319, 1594, 1, 0, 0, 0, 321, 1601, 1, 0, 0, 0, 323, 1607, 1, 0, 0, 0, 325, 1612, 1, 0, 0, 0, 327, 1618, 1, 0, 0, 0, 329, 1627, 1, 0, 0, 0, 331, 1634, 1, 0, 0, 0, 333, 1638, 1, 0, 0, 0, 335, 1643, 1, 0, 0, 0, 337, 1650, 1, 0, 0, 0, 339, 1658, 1, 0, 0, 0, 341, 1665, 1, 0, 0, 0, 343, 1674, 1, 0, 0, 0, 345, 1681, 1, 0, 0, 0, 347, 1694, 1, 0, 0, 0, 349, 1702, 1, 0, 0, 0, 351, 1706, 1, 0, 0, 0, 353, 1711, 1, 0, 0, 0, 355, 1716, 1, 0, 0, 0, 357, 1721, 1, 0, 0, 0, 359, 1725, 1, 0, 0, 0, 361, 1731, 1, 0, 0, 0, 363, 1737, 1, 0, 0, 0, 365, 1747, 1, 0, 0, 0, 367, 1754, 1, 0, 0, 0, 369, 1766, 1, 0, 0, 0, 371, 1781, 1, 0, 0, 0, 373, 1787, 1, 0, 0, 0, 375, 1794, 1, 0, 0, 0, 377, 1806, 1, 0, 0, 0, 379, 1816, 1, 0, 0, 0, 381, 1821, 1, 0, 0, 0, 383, 1826, 1, 0, 0, 0, 385, 1831, 1, 0, 0, 0, 387, 1841, 1, 0, 0, 0, 389, 1844, 1, 0, 0, 0, 391, 1856, 1, 0, 0, 0, 393, 1861, 1, 0, 0, 0, 395, 1870, 1, 0, 0, 0, 397, 1879, 1, 0, 0, 0, 399, 1884, 1, 0, 0, 0, 401, 1892, 1, 0, 0, 0, 403, 1902, 1, 0, 0, 0, 405, 1914, 1, 0, 0, 0, 407, 1920, 1, 0, 0, 0, 409, 1927, 1, 0, 0, 0, 411, 1934, 1, 0, 0, 0, 413, 1938, 1, 0, 0, 0, 415, 1943, 1, 0, 0, 0, 417, 1949, 1, 0, 0, 0, 419, 1958, 1, 0, 0, 0, 421, 1965, 1, 0, 0, 0, 423, 1973, 1, 0, 0, 0, 425, 1981, 1, 0, 0, 0, 427, 1986, 1, 0, 0, 0, 429, 1991, 1, 0, 0, 0, 431, 1997, 1, 0, 0, 0, 433, 2002, 1, 0, 0, 0, 435, 2007, 1, 0, 0, 0, 437, 2013, 1, 0, 0, 0, 439, 2018, 1, 0, 0, 0, 441, 2023, 1, 0, 0, 0, 443, 2029, 1, 0, 0, 0, 445, 2031, 1, 0, 0, 0, 447, 2033, 1, 0, 0, 0, 449, 2036, 1, 0, 0, 0, 451, 2038, 1, 0, 0, 0, 453, 2041, 1, 0, 0, 0, 455, 2043, 1, 0, 0, 0, 457, 2045, 1, 0, 0, 0, 459, 2047, 1, 0, 0, 0, 461, 2049, 1, 0, 0, 0, 463, 2051, 1, 0, 0, 0, 465, 2054, 1, 0, 0, 0, 467, 2065, 1, 0, 0, 0, 469, 2079, 1, 0, 0, 0, 471, 2091, 1, 0, 0, 0, 473, 2113, 1, 0, 0, 0, 475, 2139, 1, 0, 0, 0, 477, 2143, 1, 0, 0, 0, 479, 2153, 1, 0, 0, 0, 481, 2161, 1, 0, 0, 0, 483, 2172, 1, 0, 0, 0, 485, 2183, 1, 0, 0, 0, 487, 2206, 1, 0, 0, 0, 489, 2234, 1, 0, 0, 0, 491, 2252, 1, 0, 0, 0, 493, 2261, 1, 0, 0, 0, 495, 2263, 1, 0, 0, 0, 497, 2265, 1, 0, 0, 0, 499, 2282, 1, 0, 0, 0, 501, 2297, 1, 0, 0, 0, 503, 2303, 1, 0, 0, 0, 505, 506, 5, 46, 0, 0, 506, 2, 1, 0, 0, 0, 507, 508, 5, 40, 0, 0, 508, 4, 1, 0, 0, 0, 509, 510, 5, 41, 0, 0, 510, 6, 1, 0, 0, 0, 511, 512, 5, 44, 0, 0, 512, 8, 1, 0, 0, 0, 513, 514, 5, 63, 0, 0, 514, 10, 1, 0, 0, 0, 515, 516, 5, 45, 0, 0, 516, 517, 5, 62, 0, 0, 517, 12, 1, 0, 0, 0, 518, 519, 5, 91, 0, 0, 519, 14, 1, 0, 0, 0, 520, 521, 5, 93, 0, 0, 521, 16, 1, 0, 0, 0, 522, 523, 5, 61, 0, 0, 523, 524, 5, 62, 0, 0, 524, 18, 1, 0, 0, 0, 525, 526, 5, 65, 0, 0, 526, 527, 5, 68, 0, 0, 527, 528, 5, 68, 0, 0, 528, 20, 1, 0, 0, 0, 529, 530, 5, 65, 0, 0, 530, 531, 5, 68, 0, 0, 531, 532, 5, 77, 0, 0, 532, 533, 5, 73, 0, 0, 533, 534, 5, 78, 0, 0, 534, 22, 1, 0, 0, 0, 535, 536, 5, 65, 0, 0, 536, 537, 5, 76, 0, 0, 537, 538, 5, 76, 0, 0, 538, 24, 1, 0, 0, 0, 539, 540, 5, 65, 0, 0, 540, 541, 5, 76, 0, 0, 541, 542, 5, 84, 0, 0, 542, 543, 5, 69, 0, 0, 543, 544, 5, 82, 0, 0, 544, 26, 1, 0, 0, 0, 545, 546, 5, 65, 0, 0, 546, 547, 5, 78, 0, 0, 547, 548, 5, 65, 0, 0, 548, 549, 5, 76, 0, 0, 549, 550, 5, 89, 0, 0, 550, 551, 5, 90, 0, 0, 551, 552, 5, 69, 0, 0, 552, 28, 1, 0, 0, 0, 553, 554, 5, 65, 0, 0, 554, 555, 5, 78, 0, 0, 555, 556, 5, 68, 0, 0, 556, 30, 1, 0, 0, 0, 557, 558, 5, 65, 0, 0, 558, 559, 5, 78, 0, 0, 559, 560, 5, 89, 0, 0, 560, 32, 1, 0, 0, 0, 561, 562, 5, 65, 0, 0, 562, 563, 5, 82, 0, 0, 563, 564, 5, 82, 0, 0, 564, 565, 5, 65, 0, 0, 565, 566, 5, 89, 0, 0, 566, 34, 1, 0, 0, 0, 567, 568, 5, 65, 0, 0, 568, 569, 5, 83, 0, 0, 569, 36, 1, 0, 0, 0, 570, 571, 5, 65, 0, 0, 571, 572, 5, 83, 0, 0, 572, 573, 5, 67, 0, 0, 573, 38, 1, 0, 0, 0, 574, 575, 5, 65, 0, 0, 575, 576, 5, 84, 0, 0, 576, 40, 1, 0, 0, 0, 577, 578, 5, 66, 0, 0, 578, 579, 5, 69, 0, 0, 579, 580, 5, 82, 0, 0, 580, 581, 5, 78, 0, 0, 581, 582, 5, 79, 0, 0, 582, 583, 5, 85, 0, 0, 583, 584, 5, 76, 0, 0, 584, 585, 5, 76, 0, 0, 585, 586, 5, 73, 0, 0, 586, 42, 1, 0, 0, 0, 587, 588, 5, 66, 0, 0, 588, 589, 5, 69, 0, 0, 589, 590, 5, 84, 0, 0, 590, 591, 5, 87, 0, 0, 591, 592, 5, 69, 0, 0, 592, 593, 5, 69, 0, 0, 593, 594, 5, 78, 0, 0, 594, 44, 1, 0, 0, 0, 595, 596, 5, 66, 0, 0, 596, 597, 5, 89, 0, 0, 597, 46, 1, 0, 0, 0, 598, 599, 5, 67, 0, 0, 599, 600, 5, 65, 0, 0, 600, 601, 5, 76, 0, 0, 601, 602, 5, 76, 0, 0, 602, 48, 1, 0, 0, 0, 603, 604, 5, 67, 0, 0, 604, 605, 5, 65, 0, 0, 605, 606, 5, 76, 0, 0, 606, 607, 5, 76, 0, 0, 607, 608, 5, 69, 0, 0, 608, 609, 5, 68, 0, 0, 609, 50, 1, 0, 0, 0, 610, 611, 5, 67, 0, 0, 611, 612, 5, 65, 0, 0, 612, 613, 5, 83, 0, 0, 613, 614, 5, 67, 0, 0, 614, 615, 5, 65, 0, 0, 615, 616, 5, 68, 0, 0, 616, 617, 5, 69, 0, 0, 617, 52, 1, 0, 0, 0, 618, 619, 5, 67, 0, 0, 619, 620, 5, 65, 0, 0, 620, 621, 5, 83, 0, 0, 621, 622, 5, 69, 0, 0, 622, 54, 1, 0, 0, 0, 623, 624, 5, 67, 0, 0, 624, 625, 5, 65, 0, 0, 625, 626, 5, 83, 0, 0, 626, 627, 5, 84, 0, 0, 627, 56, 1, 0, 0, 0, 628, 629, 5, 67, 0, 0, 629, 630, 5, 65, 0, 0, 630, 631, 5, 84, 0, 0, 631, 632, 5, 65, 0, 0, 632, 633, 5, 76, 0, 0, 633, 634, 5, 79, 0, 0, 634, 635, 5, 71, 0, 0, 635, 636, 5, 83, 0, 0, 636, 58, 1, 0, 0, 0, 637, 638, 5, 67, 0, 0, 638, 639, 5, 79, 0, 0, 639, 640, 5, 76, 0, 0, 640, 641, 5, 85, 0, 0, 641, 642, 5, 77, 0, 0, 642, 643, 5, 78, 0, 0, 643, 60, 1, 0, 0, 0, 644, 645, 5, 67, 0, 0, 645, 646, 5, 79, 0, 0, 646, 647, 5, 76, 0, 0, 647, 648, 5, 85, 0, 0, 648, 649, 5, 77, 0, 0, 649, 650, 5, 78, 0, 0, 650, 651, 5, 83, 0, 0, 651, 62, 1, 0, 0, 0, 652, 653, 5, 67, 0, 0, 653, 654, 5, 79, 0, 0, 654, 655, 5, 77, 0, 0, 655, 656, 5, 77, 0, 0, 656, 657, 5, 69, 0, 0, 657, 658, 5, 78, 0, 0, 658, 659, 5, 84, 0, 0, 659, 64, 1, 0, 0, 0, 660, 661, 5, 67, 0, 0, 661, 662, 5, 79, 0, 0, 662, 663, 5, 77, 0, 0, 663, 664, 5, 77, 0, 0, 664, 665, 5, 73, 0, 0, 665, 666, 5, 84, 0, 0, 666, 66, 1, 0, 0, 0, 667, 668, 5, 67, 0, 0, 668, 669, 5, 79, 0, 0, 669, 670, 5, 77, 0, 0, 670, 671, 5, 77, 0, 0, 671, 672, 5, 73, 0, 0, 672, 673, 5, 84, 0, 0, 673, 674, 5, 84, 0, 0, 674, 675, 5, 69, 0, 0, 675, 676, 5, 68, 0, 0, 676, 68, 1, 0, 0, 0, 677, 678, 5, 67, 0, 0, 678, 679, 5, 79, 0, 0, 679, 680, 5, 78, 0, 0, 680, 681, 5, 83, 0, 0, 681, 682, 5, 84, 0, 0, 682, 683, 5, 82, 0, 0, 683, 684, 5, 65, 0, 0, 684, 685, 5, 73, 0, 0, 685, 686, 5, 78, 0, 0, 686, 687, 5, 84, 0, 0, 687, 70, 1, 0, 0, 0, 688, 689, 5, 67, 0, 0, 689, 690, 5, 82, 0, 0, 690, 691, 5, 69, 0, 0, 691, 692, 5, 65, 0, 0, 692, 693, 5, 84, 0, 0, 693, 694, 5, 69, 0, 0, 694, 72, 1, 0, 0, 0, 695, 696, 5, 67, 0, 0, 696, 697, 5, 82, 0, 0, 697, 698, 5, 79, 0, 0, 698, 699, 5, 83, 0, 0, 699, 700, 5, 83, 0, 0, 700, 74, 1, 0, 0, 0, 701, 702, 5, 67, 0, 0, 702, 703, 5, 85, 0, 0, 703, 704, 5, 66, 0, 0, 704, 705, 5, 69, 0, 0, 705, 76, 1, 0, 0, 0, 706, 707, 5, 67, 0, 0, 707, 708, 5, 85, 0, 0, 708, 709, 5, 82, 0, 0, 709, 710, 5, 82, 0, 0, 710, 711, 5, 69, 0, 0, 711, 712, 5, 78, 0, 0, 712, 713, 5, 84, 0, 0, 713, 78, 1, 0, 0, 0, 714, 715, 5, 67, 0, 0, 715, 716, 5, 85, 0, 0, 716, 717, 5, 82, 0, 0, 717, 718, 5, 82, 0, 0, 718, 719, 5, 69, 0, 0, 719, 720, 5, 78, 0, 0, 720, 721, 5, 84, 0, 0, 721, 722, 5, 95, 0, 0, 722, 723, 5, 68, 0, 0, 723, 724, 5, 65, 0, 0, 724, 725, 5, 84, 0, 0, 725, 726, 5, 69, 0, 0, 726, 80, 1, 0, 0, 0, 727, 728, 5, 67, 0, 0, 728, 729, 5, 85, 0, 0, 729, 730, 5, 82, 0, 0, 730, 731, 5, 82, 0, 0, 731, 732, 5, 69, 0, 0, 732, 733, 5, 78, 0, 0, 733, 734, 5, 84, 0, 0, 734, 735, 5, 95, 0, 0, 735, 736, 5, 82, 0, 0, 736, 737, 5, 79, 0, 0, 737, 738, 5, 76, 0, 0, 738, 739, 5, 69, 0, 0, 739, 82, 1, 0, 0, 0, 740, 741, 5, 67, 0, 0, 741, 742, 5, 85, 0, 0, 742, 743, 5, 82, 0, 0, 743, 744, 5, 82, 0, 0, 744, 745, 5, 69, 0, 0, 745, 746, 5, 78, 0, 0, 746, 747, 5, 84, 0, 0, 747, 748, 5, 95, 0, 0, 748, 749, 5, 84, 0, 0, 749, 750, 5, 73, 0, 0, 750, 751, 5, 77, 0, 0, 751, 752, 5, 69, 0, 0, 752, 84, 1, 0, 0, 0, 753, 754, 5, 67, 0, 0, 754, 755, 5, 85, 0, 0, 755, 756, 5, 82, 0, 0, 756, 757, 5, 82, 0, 0, 757, 758, 5, 69, 0, 0, 758, 759, 5, 78, 0, 0, 759, 760, 5, 84, 0, 0, 760, 761, 5, 95, 0, 0, 761, 762, 5, 84, 0, 0, 762, 763, 5, 73, 0, 0, 763, 764, 5, 77, 0, 0, 764, 765, 5, 69, 0, 0, 765, 766, 5, 83, 0, 0, 766, 767, 5, 84, 0, 0, 767, 768, 5, 65, 0, 0, 768, 769, 5, 77, 0, 0, 769, 770, 5, 80, 0, 0, 770, 86, 1, 0, 0, 0, 771, 772, 5, 67, 0, 0, 772, 773, 5, 85, 0, 0, 773, 774, 5, 82, 0, 0, 774, 775, 5, 82, 0, 0, 775, 776, 5, 69, 0, 0, 776, 777, 5, 78, 0, 0, 777, 778, 5, 84, 0, 0, 778, 779, 5, 95, 0, 0, 779, 780, 5, 85, 0, 0, 780, 781, 5, 83, 0, 0, 781, 782, 5, 69, 0, 0, 782, 783, 5, 82, 0, 0, 783, 88, 1, 0, 0, 0, 784, 785, 5, 68, 0, 0, 785, 786, 5, 65, 0, 0, 786, 787, 5, 84, 0, 0, 787, 788, 5, 65, 0, 0, 788, 90, 1, 0, 0, 0, 789, 790, 5, 68, 0, 0, 790, 791, 5, 65, 0, 0, 791, 792, 5, 84, 0, 0, 792, 793, 5, 69, 0, 0, 793, 92, 1, 0, 0, 0, 794, 795, 5, 68, 0, 0, 795, 796, 5, 65, 0, 0, 796, 797, 5, 89, 0, 0, 797, 94, 1, 0, 0, 0, 798, 799, 5, 68, 0, 0, 799, 800, 5, 69, 0, 0, 800, 801, 5, 65, 0, 0, 801, 802, 5, 76, 0, 0, 802, 803, 5, 76, 0, 0, 803, 804, 5, 79, 0, 0, 804, 805, 5, 67, 0, 0, 805, 806, 5, 65, 0, 0, 806, 807, 5, 84, 0, 0, 807, 808, 5, 69, 0, 0, 808, 96, 1, 0, 0, 0, 809, 810, 5, 68, 0, 0, 810, 811, 5, 69, 0, 0, 811, 812, 5, 70, 0, 0, 812, 813, 5, 73, 0, 0, 813, 814, 5, 78, 0, 0, 814, 815, 5, 69, 0, 0, 815, 816, 5, 82, 0, 0, 816, 98, 1, 0, 0, 0, 817, 818, 5, 68, 0, 0, 818, 819, 5, 69, 0, 0, 819, 820, 5, 76, 0, 0, 820, 821, 5, 69, 0, 0, 821, 822, 5, 84, 0, 0, 822, 823, 5, 69, 0, 0, 823, 100, 1, 0, 0, 0, 824, 825, 5, 68, 0, 0, 825, 826, 5, 69, 0, 0, 826, 827, 5, 83, 0, 0, 827, 828, 5, 67, 0, 0, 828, 102, 1, 0, 0, 0, 829, 830, 5, 68, 0, 0, 830, 831, 5, 69, 0, 0, 831, 832, 5, 83, 0, 0, 832, 833, 5, 67, 0, 0, 833, 834, 5, 82, 0, 0, 834, 835, 5, 73, 0, 0, 835, 836, 5, 66, 0, 0, 836, 837, 5, 69, 0, 0, 837, 104, 1, 0, 0, 0, 838, 839, 5, 68, 0, 0, 839, 840, 5, 69, 0, 0, 840, 841, 5, 84, 0, 0, 841, 842, 5, 69, 0, 0, 842, 843, 5, 82, 0, 0, 843, 844, 5, 77, 0, 0, 844, 845, 5, 73, 0, 0, 845, 846, 5, 78, 0, 0, 846, 847, 5, 73, 0, 0, 847, 848, 5, 83, 0, 0, 848, 849, 5, 84, 0, 0, 849, 850, 5, 73, 0, 0, 850, 851, 5, 67, 0, 0, 851, 106, 1, 0, 0, 0, 852, 853, 5, 68, 0, 0, 853, 854, 5, 73, 0, 0, 854, 855, 5, 83, 0, 0, 855, 856, 5, 84, 0, 0, 856, 857, 5, 73, 0, 0, 857, 858, 5, 78, 0, 0, 858, 859, 5, 67, 0, 0, 859, 860, 5, 84, 0, 0, 860, 108, 1, 0, 0, 0, 861, 862, 5, 68, 0, 0, 862, 863, 5, 73, 0, 0, 863, 864, 5, 83, 0, 0, 864, 865, 5, 84, 0, 0, 865, 866, 5, 82, 0, 0, 866, 867, 5, 73, 0, 0, 867, 868, 5, 66, 0, 0, 868, 869, 5, 85, 0, 0, 869, 870, 5, 84, 0, 0, 870, 871, 5, 69, 0, 0, 871, 872, 5, 68, 0, 0, 872, 110, 1, 0, 0, 0, 873, 874, 5, 68, 0, 0, 874, 875, 5, 82, 0, 0, 875, 876, 5, 79, 0, 0, 876, 877, 5, 80, 0, 0, 877, 112, 1, 0, 0, 0, 878, 879, 5, 69, 0, 0, 879, 880, 5, 76, 0, 0, 880, 881, 5, 83, 0, 0, 881, 882, 5, 69, 0, 0, 882, 114, 1, 0, 0, 0, 883, 884, 5, 69, 0, 0, 884, 885, 5, 78, 0, 0, 885, 886, 5, 68, 0, 0, 886, 116, 1, 0, 0, 0, 887, 888, 5, 69, 0, 0, 888, 889, 5, 83, 0, 0, 889, 890, 5, 67, 0, 0, 890, 891, 5, 65, 0, 0, 891, 892, 5, 80, 0, 0, 892, 893, 5, 69, 0, 0, 893, 118, 1, 0, 0, 0, 894, 895, 5, 69, 0, 0, 895, 896, 5, 88, 0, 0, 896, 897, 5, 67, 0, 0, 897, 898, 5, 69, 0, 0, 898, 899, 5, 80, 0, 0, 899, 900, 5, 84, 0, 0, 900, 120, 1, 0, 0, 0, 901, 902, 5, 69, 0, 0, 902, 903, 5, 88, 0, 0, 903, 904, 5, 67, 0, 0, 904, 905, 5, 76, 0, 0, 905, 906, 5, 85, 0, 0, 906, 907, 5, 68, 0, 0, 907, 908, 5, 73, 0, 0, 908, 909, 5, 78, 0, 0, 909, 910, 5, 71, 0, 0, 910, 122, 1, 0, 0, 0, 911, 912, 5, 69, 0, 0, 912, 913, 5, 88, 0, 0, 913, 914, 5, 69, 0, 0, 914, 915, 5, 67, 0, 0, 915, 916, 5, 85, 0, 0, 916, 917, 5, 84, 0, 0, 917, 918, 5, 69, 0, 0, 918, 124, 1, 0, 0, 0, 919, 920, 5, 69, 0, 0, 920, 921, 5, 88, 0, 0, 921, 922, 5, 73, 0, 0, 922, 923, 5, 83, 0, 0, 923, 924, 5, 84, 0, 0, 924, 925, 5, 83, 0, 0, 925, 126, 1, 0, 0, 0, 926, 927, 5, 69, 0, 0, 927, 928, 5, 88, 0, 0, 928, 929, 5, 80, 0, 0, 929, 930, 5, 76, 0, 0, 930, 931, 5, 65, 0, 0, 931, 932, 5, 73, 0, 0, 932, 933, 5, 78, 0, 0, 933, 128, 1, 0, 0, 0, 934, 935, 5, 69, 0, 0, 935, 936, 5, 88, 0, 0, 936, 937, 5, 84, 0, 0, 937, 938, 5, 82, 0, 0, 938, 939, 5, 65, 0, 0, 939, 940, 5, 67, 0, 0, 940, 941, 5, 84, 0, 0, 941, 130, 1, 0, 0, 0, 942, 943, 5, 69, 0, 0, 943, 944, 5, 88, 0, 0, 944, 945, 5, 84, 0, 0, 945, 946, 5, 69, 0, 0, 946, 947, 5, 82, 0, 0, 947, 948, 5, 78, 0, 0, 948, 949, 5, 65, 0, 0, 949, 950, 5, 76, 0, 0, 950, 132, 1, 0, 0, 0, 951, 952, 5, 70, 0, 0, 952, 953, 5, 65, 0, 0, 953, 954, 5, 76, 0, 0, 954, 955, 5, 83, 0, 0, 955, 956, 5, 69, 0, 0, 956, 134, 1, 0, 0, 0, 957, 958, 5, 70, 0, 0, 958, 959, 5, 69, 0, 0, 959, 960, 5, 84, 0, 0, 960, 961, 5, 67, 0, 0, 961, 962, 5, 72, 0, 0, 962, 136, 1, 0, 0, 0, 963, 964, 5, 70, 0, 0, 964, 965, 5, 73, 0, 0, 965, 966, 5, 76, 0, 0, 966, 967, 5, 84, 0, 0, 967, 968, 5, 69, 0, 0, 968, 969, 5, 82, 0, 0, 969, 138, 1, 0, 0, 0, 970, 971, 5, 70, 0, 0, 971, 972, 5, 73, 0, 0, 972, 973, 5, 82, 0, 0, 973, 974, 5, 83, 0, 0, 974, 975, 5, 84, 0, 0, 975, 140, 1, 0, 0, 0, 976, 977, 5, 70, 0, 0, 977, 978, 5, 79, 0, 0, 978, 979, 5, 76, 0, 0, 979, 980, 5, 76, 0, 0, 980, 981, 5, 79, 0, 0, 981, 982, 5, 87, 0, 0, 982, 983, 5, 73, 0, 0, 983, 984, 5, 78, 0, 0, 984, 985, 5, 71, 0, 0, 985, 142, 1, 0, 0, 0, 986, 987, 5, 70, 0, 0, 987, 988, 5, 79, 0, 0, 988, 989, 5, 82, 0, 0, 989, 144, 1, 0, 0, 0, 990, 991, 5, 70, 0, 0, 991, 992, 5, 79, 0, 0, 992, 993, 5, 82, 0, 0, 993, 994, 5, 77, 0, 0, 994, 995, 5, 65, 0, 0, 995, 996, 5, 84, 0, 0, 996, 146, 1, 0, 0, 0, 997, 998, 5, 70, 0, 0, 998, 999, 5, 82, 0, 0, 999, 1000, 5, 79, 0, 0, 1000, 1001, 5, 77, 0, 0, 1001, 148, 1, 0, 0, 0, 1002, 1003, 5, 70, 0, 0, 1003, 1004, 5, 85, 0, 0, 1004, 1005, 5, 76, 0, 0, 1005, 1006, 5, 76, 0, 0, 1006, 150, 1, 0, 0, 0, 1007, 1008, 5, 70, 0, 0, 1008, 1009, 5, 85, 0, 0, 1009, 1010, 5, 78, 0, 0, 1010, 1011, 5, 67, 0, 0, 1011, 1012, 5, 84, 0, 0, 1012, 1013, 5, 73, 0, 0, 1013, 1014, 5, 79, 0, 0, 1014, 1015, 5, 78, 0, 0, 1015, 152, 1, 0, 0, 0, 1016, 1017, 5, 70, 0, 0, 1017, 1018, 5, 85, 0, 0, 1018, 1019, 5, 78, 0, 0, 1019, 1020, 5, 67, 0, 0, 1020, 1021, 5, 84, 0, 0, 1021, 1022, 5, 73, 0, 0, 1022, 1023, 5, 79, 0, 0, 1023, 1024, 5, 78, 0, 0, 1024, 1025, 5, 83, 0, 0, 1025, 154, 1, 0, 0, 0, 1026, 1027, 5, 71, 0, 0, 1027, 1028, 5, 82, 0, 0, 1028, 1029, 5, 65, 0, 0, 1029, 1030, 5, 78, 0, 0, 1030, 1031, 5, 84, 0, 0, 1031, 156, 1, 0, 0, 0, 1032, 1033, 5, 71, 0, 0, 1033, 1034, 5, 82, 0, 0, 1034, 1035, 5, 65, 0, 0, 1035, 1036, 5, 78, 0, 0, 1036, 1037, 5, 84, 0, 0, 1037, 1038, 5, 69, 0, 0, 1038, 1039, 5, 68, 0, 0, 1039, 158, 1, 0, 0, 0, 1040, 1041, 5, 71, 0, 0, 1041, 1042, 5, 82, 0, 0, 1042, 1043, 5, 65, 0, 0, 1043, 1044, 5, 78, 0, 0, 1044, 1045, 5, 84, 0, 0, 1045, 1046, 5, 83, 0, 0, 1046, 160, 1, 0, 0, 0, 1047, 1048, 5, 71, 0, 0, 1048, 1049, 5, 82, 0, 0, 1049, 1050, 5, 65, 0, 0, 1050, 1051, 5, 80, 0, 0, 1051, 1052, 5, 72, 0, 0, 1052, 1053, 5, 86, 0, 0, 1053, 1054, 5, 73, 0, 0, 1054, 1055, 5, 90, 0, 0, 1055, 162, 1, 0, 0, 0, 1056, 1057, 5, 71, 0, 0, 1057, 1058, 5, 82, 0, 0, 1058, 1059, 5, 79, 0, 0, 1059, 1060, 5, 85, 0, 0, 1060, 1061, 5, 80, 0, 0, 1061, 164, 1, 0, 0, 0, 1062, 1063, 5, 71, 0, 0, 1063, 1064, 5, 82, 0, 0, 1064, 1065, 5, 79, 0, 0, 1065, 1066, 5, 85, 0, 0, 1066, 1067, 5, 80, 0, 0, 1067, 1068, 5, 73, 0, 0, 1068, 1069, 5, 78, 0, 0, 1069, 1070, 5, 71, 0, 0, 1070, 166, 1, 0, 0, 0, 1071, 1072, 5, 71, 0, 0, 1072, 1073, 5, 82, 0, 0, 1073, 1074, 5, 79, 0, 0, 1074, 1075, 5, 85, 0, 0, 1075, 1076, 5, 80, 0, 0, 1076, 1077, 5, 83, 0, 0, 1077, 168, 1, 0, 0, 0, 1078, 1079, 5, 72, 0, 0, 1079, 1080, 5, 65, 0, 0, 1080, 1081, 5, 86, 0, 0, 1081, 1082, 5, 73, 0, 0, 1082, 1083, 5, 78, 0, 0, 1083, 1084, 5, 71, 0, 0, 1084, 170, 1, 0, 0, 0, 1085, 1086, 5, 72, 0, 0, 1086, 1087, 5, 79, 0, 0, 1087, 1088, 5, 85, 0, 0, 1088, 1089, 5, 82, 0, 0, 1089, 172, 1, 0, 0, 0, 1090, 1091, 5, 73, 0, 0, 1091, 1092, 5, 70, 0, 0, 1092, 174, 1, 0, 0, 0, 1093, 1094, 5, 73, 0, 0, 1094, 1095, 5, 71, 0, 0, 1095, 1096, 5, 78, 0, 0, 1096, 1097, 5, 79, 0, 0, 1097, 1098, 5, 82, 0, 0, 1098, 1099, 5, 69, 0, 0, 1099, 176, 1, 0, 0, 0, 1100, 1101, 5, 73, 0, 0, 1101, 1102, 5, 78, 0, 0, 1102, 178, 1, 0, 0, 0, 1103, 1104, 5, 73, 0, 0, 1104, 1105, 5, 78, 0, 0, 1105, 1106, 5, 67, 0, 0, 1106, 1107, 5, 76, 0, 0, 1107, 1108, 5, 85, 0, 0, 1108, 1109, 5, 68, 0, 0, 1109, 1110, 5, 73, 0, 0, 1110, 1111, 5, 78, 0, 0, 1111, 1112, 5, 71, 0, 0, 1112, 180, 1, 0, 0, 0, 1113, 1114, 5, 73, 0, 0, 1114, 1115, 5, 78, 0, 0, 1115, 1116, 5, 78, 0, 0, 1116, 1117, 5, 69, 0, 0, 1117, 1118, 5, 82, 0, 0, 1118, 182, 1, 0, 0, 0, 1119, 1120, 5, 73, 0, 0, 1120, 1121, 5, 78, 0, 0, 1121, 1122, 5, 80, 0, 0, 1122, 1123, 5, 85, 0, 0, 1123, 1124, 5, 84, 0, 0, 1124, 184, 1, 0, 0, 0, 1125, 1126, 5, 73, 0, 0, 1126, 1127, 5, 78, 0, 0, 1127, 1128, 5, 83, 0, 0, 1128, 1129, 5, 69, 0, 0, 1129, 1130, 5, 82, 0, 0, 1130, 1131, 5, 84, 0, 0, 1131, 186, 1, 0, 0, 0, 1132, 1133, 5, 73, 0, 0, 1133, 1134, 5, 78, 0, 0, 1134, 1135, 5, 84, 0, 0, 1135, 1136, 5, 69, 0, 0, 1136, 1137, 5, 82, 0, 0, 1137, 1138, 5, 83, 0, 0, 1138, 1139, 5, 69, 0, 0, 1139, 1140, 5, 67, 0, 0, 1140, 1141, 5, 84, 0, 0, 1141, 188, 1, 0, 0, 0, 1142, 1143, 5, 73, 0, 0, 1143, 1144, 5, 78, 0, 0, 1144, 1145, 5, 84, 0, 0, 1145, 1146, 5, 69, 0, 0, 1146, 1147, 5, 82, 0, 0, 1147, 1148, 5, 86, 0, 0, 1148, 1149, 5, 65, 0, 0, 1149, 1150, 5, 76, 0, 0, 1150, 190, 1, 0, 0, 0, 1151, 1152, 5, 73, 0, 0, 1152, 1153, 5, 78, 0, 0, 1153, 1154, 5, 84, 0, 0, 1154, 1155, 5, 79, 0, 0, 1155, 192, 1, 0, 0, 0, 1156, 1157, 5, 73, 0, 0, 1157, 1158, 5, 78, 0, 0, 1158, 1159, 5, 86, 0, 0, 1159, 1160, 5, 79, 0, 0, 1160, 1161, 5, 75, 0, 0, 1161, 1162, 5, 69, 0, 0, 1162, 1163, 5, 82, 0, 0, 1163, 194, 1, 0, 0, 0, 1164, 1165, 5, 73, 0, 0, 1165, 1166, 5, 79, 0, 0, 1166, 196, 1, 0, 0, 0, 1167, 1168, 5, 73, 0, 0, 1168, 1169, 5, 83, 0, 0, 1169, 198, 1, 0, 0, 0, 1170, 1171, 5, 73, 0, 0, 1171, 1172, 5, 83, 0, 0, 1172, 1173, 5, 79, 0, 0, 1173, 1174, 5, 76, 0, 0, 1174, 1175, 5, 65, 0, 0, 1175, 1176, 5, 84, 0, 0, 1176, 1177, 5, 73, 0, 0, 1177, 1178, 5, 79, 0, 0, 1178, 1179, 5, 78, 0, 0, 1179, 200, 1, 0, 0, 0, 1180, 1181, 5, 74, 0, 0, 1181, 1182, 5, 83, 0, 0, 1182, 1183, 5, 79, 0, 0, 1183, 1184, 5, 78, 0, 0, 1184, 202, 1, 0, 0, 0, 1185, 1186, 5, 74, 0, 0, 1186, 1187, 5, 79, 0, 0, 1187, 1188, 5, 73, 0, 0, 1188, 1189, 5, 78, 0, 0, 1189, 204, 1, 0, 0, 0, 1190, 1191, 5, 76, 0, 0, 1191, 1192, 5, 65, 0, 0, 1192, 1193, 5, 78, 0, 0, 1193, 1194, 5, 71, 0, 0, 1194, 1195, 5, 85, 0, 0, 1195, 1196, 5, 65, 0, 0, 1196, 1197, 5, 71, 0, 0, 1197, 1198, 5, 69, 0, 0, 1198, 206, 1, 0, 0, 0, 1199, 1200, 5, 76, 0, 0, 1200, 1201, 5, 65, 0, 0, 1201, 1202, 5, 83, 0, 0, 1202, 1203, 5, 84, 0, 0, 1203, 208, 1, 0, 0, 0, 1204, 1205, 5, 76, 0, 0, 1205, 1206, 5, 65, 0, 0, 1206, 1207, 5, 84, 0, 0, 1207, 1208, 5, 69, 0, 0, 1208, 1209, 5, 82, 0, 0, 1209, 1210, 5, 65, 0, 0, 1210, 1211, 5, 76, 0, 0, 1211, 210, 1, 0, 0, 0, 1212, 1213, 5, 76, 0, 0, 1213, 1214, 5, 69, 0, 0, 1214, 1215, 5, 70, 0, 0, 1215, 1216, 5, 84, 0, 0, 1216, 212, 1, 0, 0, 0, 1217, 1218, 5, 76, 0, 0, 1218, 1219, 5, 69, 0, 0, 1219, 1220, 5, 86, 0, 0, 1220, 1221, 5, 69, 0, 0, 1221, 1222, 5, 76, 0, 0, 1222, 214, 1, 0, 0, 0, 1223, 1224, 5, 76, 0, 0, 1224, 1225, 5, 73, 0, 0, 1225, 1226, 5, 75, 0, 0, 1226, 1227, 5, 69, 0, 0, 1227, 216, 1, 0, 0, 0, 1228, 1229, 5, 76, 0, 0, 1229, 1230, 5, 73, 0, 0, 1230, 1231, 5, 77, 0, 0, 1231, 1232, 5, 73, 0, 0, 1232, 1233, 5, 84, 0, 0, 1233, 218, 1, 0, 0, 0, 1234, 1235, 5, 76, 0, 0, 1235, 1236, 5, 79, 0, 0, 1236, 1237, 5, 67, 0, 0, 1237, 1238, 5, 65, 0, 0, 1238, 1239, 5, 76, 0, 0, 1239, 1240, 5, 84, 0, 0, 1240, 1241, 5, 73, 0, 0, 1241, 1242, 5, 77, 0, 0, 1242, 1243, 5, 69, 0, 0, 1243, 220, 1, 0, 0, 0, 1244, 1245, 5, 76, 0, 0, 1245, 1246, 5, 79, 0, 0, 1246, 1247, 5, 67, 0, 0, 1247, 1248, 5, 65, 0, 0, 1248, 1249, 5, 76, 0, 0, 1249, 1250, 5, 84, 0, 0, 1250, 1251, 5, 73, 0, 0, 1251, 1252, 5, 77, 0, 0, 1252, 1253, 5, 69, 0, 0, 1253, 1254, 5, 83, 0, 0, 1254, 1255, 5, 84, 0, 0, 1255, 1256, 5, 65, 0, 0, 1256, 1257, 5, 77, 0, 0, 1257, 1258, 5, 80, 0, 0, 1258, 222, 1, 0, 0, 0, 1259, 1260, 5, 76, 0, 0, 1260, 1261, 5, 79, 0, 0, 1261, 1262, 5, 71, 0, 0, 1262, 1263, 5, 73, 0, 0, 1263, 1264, 5, 67, 0, 0, 1264, 1265, 5, 65, 0, 0, 1265, 1266, 5, 76, 0, 0, 1266, 224, 1, 0, 0, 0, 1267, 1268, 5, 77, 0, 0, 1268, 1269, 5, 65, 0, 0, 1269, 1270, 5, 80, 0, 0, 1270, 226, 1, 0, 0, 0, 1271, 1272, 5, 77, 0, 0, 1272, 1273, 5, 65, 0, 0, 1273, 1274, 5, 84, 0, 0, 1274, 1275, 5, 69, 0, 0, 1275, 1276, 5, 82, 0, 0, 1276, 1277, 5, 73, 0, 0, 1277, 1278, 5, 65, 0, 0, 1278, 1279, 5, 76, 0, 0, 1279, 1280, 5, 73, 0, 0, 1280, 1281, 5, 90, 0, 0, 1281, 1282, 5, 69, 0, 0, 1282, 1283, 5, 68, 0, 0, 1283, 228, 1, 0, 0, 0, 1284, 1285, 5, 77, 0, 0, 1285, 1286, 5, 73, 0, 0, 1286, 1287, 5, 78, 0, 0, 1287, 1288, 5, 85, 0, 0, 1288, 1289, 5, 84, 0, 0, 1289, 1290, 5, 69, 0, 0, 1290, 230, 1, 0, 0, 0, 1291, 1292, 5, 77, 0, 0, 1292, 1293, 5, 79, 0, 0, 1293, 1294, 5, 78, 0, 0, 1294, 1295, 5, 84, 0, 0, 1295, 1296, 5, 72, 0, 0, 1296, 232, 1, 0, 0, 0, 1297, 1298, 5, 78, 0, 0, 1298, 1299, 5, 65, 0, 0, 1299, 1300, 5, 77, 0, 0, 1300, 1301, 5, 69, 0, 0, 1301, 234, 1, 0, 0, 0, 1302, 1303, 5, 78, 0, 0, 1303, 1304, 5, 65, 0, 0, 1304, 1305, 5, 84, 0, 0, 1305, 1306, 5, 85, 0, 0, 1306, 1307, 5, 82, 0, 0, 1307, 1308, 5, 65, 0, 0, 1308, 1309, 5, 76, 0, 0, 1309, 236, 1, 0, 0, 0, 1310, 1311, 5, 78, 0, 0, 1311, 1312, 5, 70, 0, 0, 1312, 1313, 5, 67, 0, 0, 1313, 238, 1, 0, 0, 0, 1314, 1315, 5, 78, 0, 0, 1315, 1316, 5, 70, 0, 0, 1316, 1317, 5, 68, 0, 0, 1317, 240, 1, 0, 0, 0, 1318, 1319, 5, 78, 0, 0, 1319, 1320, 5, 70, 0, 0, 1320, 1321, 5, 75, 0, 0, 1321, 1322, 5, 67, 0, 0, 1322, 242, 1, 0, 0, 0, 1323, 1324, 5, 78, 0, 0, 1324, 1325, 5, 70, 0, 0, 1325, 1326, 5, 75, 0, 0, 1326, 1327, 5, 68, 0, 0, 1327, 244, 1, 0, 0, 0, 1328, 1329, 5, 78, 0, 0, 1329, 1330, 5, 79, 0, 0, 1330, 246, 1, 0, 0, 0, 1331, 1332, 5, 78, 0, 0, 1332, 1333, 5, 79, 0, 0, 1333, 1334, 5, 78, 0, 0, 1334, 1335, 5, 69, 0, 0, 1335, 248, 1, 0, 0, 0, 1336, 1337, 5, 78, 0, 0, 1337, 1338, 5, 79, 0, 0, 1338, 1339, 5, 82, 0, 0, 1339, 1340, 5, 77, 0, 0, 1340, 1341, 5, 65, 0, 0, 1341, 1342, 5, 76, 0, 0, 1342, 1343, 5, 73, 0, 0, 1343, 1344, 5, 90, 0, 0, 1344, 1345, 5, 69, 0, 0, 1345, 250, 1, 0, 0, 0, 1346, 1347, 5, 78, 0, 0, 1347, 1348, 5, 79, 0, 0, 1348, 1349, 5, 84, 0, 0, 1349, 252, 1, 0, 0, 0, 1350, 1351, 5, 78, 0, 0, 1351, 1352, 5, 85, 0, 0, 1352, 1353, 5, 76, 0, 0, 1353, 1354, 5, 76, 0, 0, 1354, 254, 1, 0, 0, 0, 1355, 1356, 5, 78, 0, 0, 1356, 1357, 5, 85, 0, 0, 1357, 1358, 5, 76, 0, 0, 1358, 1359, 5, 76, 0, 0, 1359, 1360, 5, 73, 0, 0, 1360, 1361, 5, 70, 0, 0, 1361, 256, 1, 0, 0, 0, 1362, 1363, 5, 78, 0, 0, 1363, 1364, 5, 85, 0, 0, 1364, 1365, 5, 76, 0, 0, 1365, 1366, 5, 76, 0, 0, 1366, 1367, 5, 83, 0, 0, 1367, 258, 1, 0, 0, 0, 1368, 1369, 5, 79, 0, 0, 1369, 1370, 5, 70, 0, 0, 1370, 260, 1, 0, 0, 0, 1371, 1372, 5, 79, 0, 0, 1372, 1373, 5, 70, 0, 0, 1373, 1374, 5, 70, 0, 0, 1374, 1375, 5, 83, 0, 0, 1375, 1376, 5, 69, 0, 0, 1376, 1377, 5, 84, 0, 0, 1377, 262, 1, 0, 0, 0, 1378, 1379, 5, 79, 0, 0, 1379, 1380, 5, 78, 0, 0, 1380, 264, 1, 0, 0, 0, 1381, 1382, 5, 79, 0, 0, 1382, 1383, 5, 78, 0, 0, 1383, 1384, 5, 76, 0, 0, 1384, 1385, 5, 89, 0, 0, 1385, 266, 1, 0, 0, 0, 1386, 1387, 5, 79, 0, 0, 1387, 1388, 5, 80, 0, 0, 1388, 1389, 5, 84, 0, 0, 1389, 1390, 5, 73, 0, 0, 1390, 1391, 5, 79, 0, 0, 1391, 1392, 5, 78, 0, 0, 1392, 268, 1, 0, 0, 0, 1393, 1394, 5, 79, 0, 0, 1394, 1395, 5, 82, 0, 0, 1395, 270, 1, 0, 0, 0, 1396, 1397, 5, 79, 0, 0, 1397, 1398, 5, 82, 0, 0, 1398, 1399, 5, 68, 0, 0, 1399, 1400, 5, 69, 0, 0, 1400, 1401, 5, 82, 0, 0, 1401, 272, 1, 0, 0, 0, 1402, 1403, 5, 79, 0, 0, 1403, 1404, 5, 82, 0, 0, 1404, 1405, 5, 68, 0, 0, 1405, 1406, 5, 73, 0, 0, 1406, 1407, 5, 78, 0, 0, 1407, 1408, 5, 65, 0, 0, 1408, 1409, 5, 76, 0, 0, 1409, 1410, 5, 73, 0, 0, 1410, 1411, 5, 84, 0, 0, 1411, 1412, 5, 89, 0, 0, 1412, 274, 1, 0, 0, 0, 1413, 1414, 5, 79, 0, 0, 1414, 1415, 5, 85, 0, 0, 1415, 1416, 5, 84, 0, 0, 1416, 1417, 5, 69, 0, 0, 1417, 1418, 5, 82, 0, 0, 1418, 276, 1, 0, 0, 0, 1419, 1420, 5, 79, 0, 0, 1420, 1421, 5, 85, 0, 0, 1421, 1422, 5, 84, 0, 0, 1422, 1423, 5, 80, 0, 0, 1423, 1424, 5, 85, 0, 0, 1424, 1425, 5, 84, 0, 0, 1425, 278, 1, 0, 0, 0, 1426, 1427, 5, 79, 0, 0, 1427, 1428, 5, 86, 0, 0, 1428, 1429, 5, 69, 0, 0, 1429, 1430, 5, 82, 0, 0, 1430, 280, 1, 0, 0, 0, 1431, 1432, 5, 80, 0, 0, 1432, 1433, 5, 65, 0, 0, 1433, 1434, 5, 82, 0, 0, 1434, 1435, 5, 84, 0, 0, 1435, 1436, 5, 73, 0, 0, 1436, 1437, 5, 84, 0, 0, 1437, 1438, 5, 73, 0, 0, 1438, 1439, 5, 79, 0, 0, 1439, 1440, 5, 78, 0, 0, 1440, 282, 1, 0, 0, 0, 1441, 1442, 5, 80, 0, 0, 1442, 1443, 5, 65, 0, 0, 1443, 1444, 5, 82, 0, 0, 1444, 1445, 5, 84, 0, 0, 1445, 1446, 5, 73, 0, 0, 1446, 1447, 5, 84, 0, 0, 1447, 1448, 5, 73, 0, 0, 1448, 1449, 5, 79, 0, 0, 1449, 1450, 5, 78, 0, 0, 1450, 1451, 5, 83, 0, 0, 1451, 284, 1, 0, 0, 0, 1452, 1453, 5, 80, 0, 0, 1453, 1454, 5, 79, 0, 0, 1454, 1455, 5, 83, 0, 0, 1455, 1456, 5, 73, 0, 0, 1456, 1457, 5, 84, 0, 0, 1457, 1458, 5, 73, 0, 0, 1458, 1459, 5, 79, 0, 0, 1459, 1460, 5, 78, 0, 0, 1460, 286, 1, 0, 0, 0, 1461, 1462, 5, 80, 0, 0, 1462, 1463, 5, 82, 0, 0, 1463, 1464, 5, 69, 0, 0, 1464, 1465, 5, 67, 0, 0, 1465, 1466, 5, 69, 0, 0, 1466, 1467, 5, 68, 0, 0, 1467, 1468, 5, 73, 0, 0, 1468, 1469, 5, 78, 0, 0, 1469, 1470, 5, 71, 0, 0, 1470, 288, 1, 0, 0, 0, 1471, 1472, 5, 80, 0, 0, 1472, 1473, 5, 82, 0, 0, 1473, 1474, 5, 69, 0, 0, 1474, 1475, 5, 80, 0, 0, 1475, 1476, 5, 65, 0, 0, 1476, 1477, 5, 82, 0, 0, 1477, 1478, 5, 69, 0, 0, 1478, 290, 1, 0, 0, 0, 1479, 1480, 5, 80, 0, 0, 1480, 1481, 5, 82, 0, 0, 1481, 1482, 5, 73, 0, 0, 1482, 1483, 5, 86, 0, 0, 1483, 1484, 5, 73, 0, 0, 1484, 1485, 5, 76, 0, 0, 1485, 1486, 5, 69, 0, 0, 1486, 1487, 5, 71, 0, 0, 1487, 1488, 5, 69, 0, 0, 1488, 1489, 5, 83, 0, 0, 1489, 292, 1, 0, 0, 0, 1490, 1491, 5, 80, 0, 0, 1491, 1492, 5, 82, 0, 0, 1492, 1493, 5, 79, 0, 0, 1493, 1494, 5, 80, 0, 0, 1494, 1495, 5, 69, 0, 0, 1495, 1496, 5, 82, 0, 0, 1496, 1497, 5, 84, 0, 0, 1497, 1498, 5, 73, 0, 0, 1498, 1499, 5, 69, 0, 0, 1499, 1500, 5, 83, 0, 0, 1500, 294, 1, 0, 0, 0, 1501, 1502, 5, 82, 0, 0, 1502, 1503, 5, 65, 0, 0, 1503, 1504, 5, 78, 0, 0, 1504, 1505, 5, 71, 0, 0, 1505, 1506, 5, 69, 0, 0, 1506, 296, 1, 0, 0, 0, 1507, 1508, 5, 82, 0, 0, 1508, 1509, 5, 69, 0, 0, 1509, 1510, 5, 65, 0, 0, 1510, 1511, 5, 68, 0, 0, 1511, 298, 1, 0, 0, 0, 1512, 1513, 5, 82, 0, 0, 1513, 1514, 5, 69, 0, 0, 1514, 1515, 5, 67, 0, 0, 1515, 1516, 5, 85, 0, 0, 1516, 1517, 5, 82, 0, 0, 1517, 1518, 5, 83, 0, 0, 1518, 1519, 5, 73, 0, 0, 1519, 1520, 5, 86, 0, 0, 1520, 1521, 5, 69, 0, 0, 1521, 300, 1, 0, 0, 0, 1522, 1523, 5, 82, 0, 0, 1523, 1524, 5, 69, 0, 0, 1524, 1525, 5, 70, 0, 0, 1525, 1526, 5, 82, 0, 0, 1526, 1527, 5, 69, 0, 0, 1527, 1528, 5, 83, 0, 0, 1528, 1529, 5, 72, 0, 0, 1529, 302, 1, 0, 0, 0, 1530, 1531, 5, 82, 0, 0, 1531, 1532, 5, 69, 0, 0, 1532, 1533, 5, 78, 0, 0, 1533, 1534, 5, 65, 0, 0, 1534, 1535, 5, 77, 0, 0, 1535, 1536, 5, 69, 0, 0, 1536, 304, 1, 0, 0, 0, 1537, 1538, 5, 82, 0, 0, 1538, 1539, 5, 69, 0, 0, 1539, 1540, 5, 80, 0, 0, 1540, 1541, 5, 69, 0, 0, 1541, 1542, 5, 65, 0, 0, 1542, 1543, 5, 84, 0, 0, 1543, 1544, 5, 65, 0, 0, 1544, 1545, 5, 66, 0, 0, 1545, 1546, 5, 76, 0, 0, 1546, 1547, 5, 69, 0, 0, 1547, 306, 1, 0, 0, 0, 1548, 1549, 5, 82, 0, 0, 1549, 1550, 5, 69, 0, 0, 1550, 1551, 5, 80, 0, 0, 1551, 1552, 5, 76, 0, 0, 1552, 1553, 5, 65, 0, 0, 1553, 1554, 5, 67, 0, 0, 1554, 1555, 5, 69, 0, 0, 1555, 308, 1, 0, 0, 0, 1556, 1557, 5, 82, 0, 0, 1557, 1558, 5, 69, 0, 0, 1558, 1559, 5, 83, 0, 0, 1559, 1560, 5, 69, 0, 0, 1560, 1561, 5, 84, 0, 0, 1561, 310, 1, 0, 0, 0, 1562, 1563, 5, 82, 0, 0, 1563, 1564, 5, 69, 0, 0, 1564, 1565, 5, 83, 0, 0, 1565, 1566, 5, 80, 0, 0, 1566, 1567, 5, 69, 0, 0, 1567, 1568, 5, 67, 0, 0, 1568, 1569, 5, 84, 0, 0, 1569, 312, 1, 0, 0, 0, 1570, 1571, 5, 82, 0, 0, 1571, 1572, 5, 69, 0, 0, 1572, 1573, 5, 83, 0, 0, 1573, 1574, 5, 84, 0, 0, 1574, 1575, 5, 82, 0, 0, 1575, 1576, 5, 73, 0, 0, 1576, 1577, 5, 67, 0, 0, 1577, 1578, 5, 84, 0, 0, 1578, 314, 1, 0, 0, 0, 1579, 1580, 5, 82, 0, 0, 1580, 1581, 5, 69, 0, 0, 1581, 1582, 5, 84, 0, 0, 1582, 1583, 5, 85, 0, 0, 1583, 1584, 5, 82, 0, 0, 1584, 1585, 5, 78, 0, 0, 1585, 316, 1, 0, 0, 0, 1586, 1587, 5, 82, 0, 0, 1587, 1588, 5, 69, 0, 0, 1588, 1589, 5, 84, 0, 0, 1589, 1590, 5, 85, 0, 0, 1590, 1591, 5, 82, 0, 0, 1591, 1592, 5, 78, 0, 0, 1592, 1593, 5, 83, 0, 0, 1593, 318, 1, 0, 0, 0, 1594, 1595, 5, 82, 0, 0, 1595, 1596, 5, 69, 0, 0, 1596, 1597, 5, 86, 0, 0, 1597, 1598, 5, 79, 0, 0, 1598, 1599, 5, 75, 0, 0, 1599, 1600, 5, 69, 0, 0, 1600, 320, 1, 0, 0, 0, 1601, 1602, 5, 82, 0, 0, 1602, 1603, 5, 73, 0, 0, 1603, 1604, 5, 71, 0, 0, 1604, 1605, 5, 72, 0, 0, 1605, 1606, 5, 84, 0, 0, 1606, 322, 1, 0, 0, 0, 1607, 1608, 5, 82, 0, 0, 1608, 1609, 5, 79, 0, 0, 1609, 1610, 5, 76, 0, 0, 1610, 1611, 5, 69, 0, 0, 1611, 324, 1, 0, 0, 0, 1612, 1613, 5, 82, 0, 0, 1613, 1614, 5, 79, 0, 0, 1614, 1615, 5, 76, 0, 0, 1615, 1616, 5, 69, 0, 0, 1616, 1617, 5, 83, 0, 0, 1617, 326, 1, 0, 0, 0, 1618, 1619, 5, 82, 0, 0, 1619, 1620, 5, 79, 0, 0, 1620, 1621, 5, 76, 0, 0, 1621, 1622, 5, 76, 0, 0, 1622, 1623, 5, 66, 0, 0, 1623, 1624, 5, 65, 0, 0, 1624, 1625, 5, 67, 0, 0, 1625, 1626, 5, 75, 0, 0, 1626, 328, 1, 0, 0, 0, 1627, 1628, 5, 82, 0, 0, 1628, 1629, 5, 79, 0, 0, 1629, 1630, 5, 76, 0, 0, 1630, 1631, 5, 76, 0, 0, 1631, 1632, 5, 85, 0, 0, 1632, 1633, 5, 80, 0, 0, 1633, 330, 1, 0, 0, 0, 1634, 1635, 5, 82, 0, 0, 1635, 1636, 5, 79, 0, 0, 1636, 1637, 5, 87, 0, 0, 1637, 332, 1, 0, 0, 0, 1638, 1639, 5, 82, 0, 0, 1639, 1640, 5, 79, 0, 0, 1640, 1641, 5, 87, 0, 0, 1641, 1642, 5, 83, 0, 0, 1642, 334, 1, 0, 0, 0, 1643, 1644, 5, 83, 0, 0, 1644, 1645, 5, 67, 0, 0, 1645, 1646, 5, 72, 0, 0, 1646, 1647, 5, 69, 0, 0, 1647, 1648, 5, 77, 0, 0, 1648, 1649, 5, 65, 0, 0, 1649, 336, 1, 0, 0, 0, 1650, 1651, 5, 83, 0, 0, 1651, 1652, 5, 67, 0, 0, 1652, 1653, 5, 72, 0, 0, 1653, 1654, 5, 69, 0, 0, 1654, 1655, 5, 77, 0, 0, 1655, 1656, 5, 65, 0, 0, 1656, 1657, 5, 83, 0, 0, 1657, 338, 1, 0, 0, 0, 1658, 1659, 5, 83, 0, 0, 1659, 1660, 5, 69, 0, 0, 1660, 1661, 5, 67, 0, 0, 1661, 1662, 5, 79, 0, 0, 1662, 1663, 5, 78, 0, 0, 1663, 1664, 5, 68, 0, 0, 1664, 340, 1, 0, 0, 0, 1665, 1666, 5, 83, 0, 0, 1666, 1667, 5, 69, 0, 0, 1667, 1668, 5, 67, 0, 0, 1668, 1669, 5, 85, 0, 0, 1669, 1670, 5, 82, 0, 0, 1670, 1671, 5, 73, 0, 0, 1671, 1672, 5, 84, 0, 0, 1672, 1673, 5, 89, 0, 0, 1673, 342, 1, 0, 0, 0, 1674, 1675, 5, 83, 0, 0, 1675, 1676, 5, 69, 0, 0, 1676, 1677, 5, 76, 0, 0, 1677, 1678, 5, 69, 0, 0, 1678, 1679, 5, 67, 0, 0, 1679, 1680, 5, 84, 0, 0, 1680, 344, 1, 0, 0, 0, 1681, 1682, 5, 83, 0, 0, 1682, 1683, 5, 69, 0, 0, 1683, 1684, 5, 82, 0, 0, 1684, 1685, 5, 73, 0, 0, 1685, 1686, 5, 65, 0, 0, 1686, 1687, 5, 76, 0, 0, 1687, 1688, 5, 73, 0, 0, 1688, 1689, 5, 90, 0, 0, 1689, 1690, 5, 65, 0, 0, 1690, 1691, 5, 66, 0, 0, 1691, 1692, 5, 76, 0, 0, 1692, 1693, 5, 69, 0, 0, 1693, 346, 1, 0, 0, 0, 1694, 1695, 5, 83, 0, 0, 1695, 1696, 5, 69, 0, 0, 1696, 1697, 5, 83, 0, 0, 1697, 1698, 5, 83, 0, 0, 1698, 1699, 5, 73, 0, 0, 1699, 1700, 5, 79, 0, 0, 1700, 1701, 5, 78, 0, 0, 1701, 348, 1, 0, 0, 0, 1702, 1703, 5, 83, 0, 0, 1703, 1704, 5, 69, 0, 0, 1704, 1705, 5, 84, 0, 0, 1705, 350, 1, 0, 0, 0, 1706, 1707, 5, 83, 0, 0, 1707, 1708, 5, 69, 0, 0, 1708, 1709, 5, 84, 0, 0, 1709, 1710, 5, 83, 0, 0, 1710, 352, 1, 0, 0, 0, 1711, 1712, 5, 83, 0, 0, 1712, 1713, 5, 72, 0, 0, 1713, 1714, 5, 79, 0, 0, 1714, 1715, 5, 87, 0, 0, 1715, 354, 1, 0, 0, 0, 1716, 1717, 5, 83, 0, 0, 1717, 1718, 5, 79, 0, 0, 1718, 1719, 5, 77, 0, 0, 1719, 1720, 5, 69, 0, 0, 1720, 356, 1, 0, 0, 0, 1721, 1722, 5, 83, 0, 0, 1722, 1723, 5, 81, 0, 0, 1723, 1724, 5, 76, 0, 0, 1724, 358, 1, 0, 0, 0, 1725, 1726, 5, 83, 0, 0, 1726, 1727, 5, 84, 0, 0, 1727, 1728, 5, 65, 0, 0, 1728, 1729, 5, 82, 0, 0, 1729, 1730, 5, 84, 0, 0, 1730, 360, 1, 0, 0, 0, 1731, 1732, 5, 83, 0, 0, 1732, 1733, 5, 84, 0, 0, 1733, 1734, 5, 65, 0, 0, 1734, 1735, 5, 84, 0, 0, 1735, 1736, 5, 83, 0, 0, 1736, 362, 1, 0, 0, 0, 1737, 1738, 5, 83, 0, 0, 1738, 1739, 5, 85, 0, 0, 1739, 1740, 5, 66, 0, 0, 1740, 1741, 5, 83, 0, 0, 1741, 1742, 5, 84, 0, 0, 1742, 1743, 5, 82, 0, 0, 1743, 1744, 5, 73, 0, 0, 1744, 1745, 5, 78, 0, 0, 1745, 1746, 5, 71, 0, 0, 1746, 364, 1, 0, 0, 0, 1747, 1748, 5, 83, 0, 0, 1748, 1749, 5, 89, 0, 0, 1749, 1750, 5, 83, 0, 0, 1750, 1751, 5, 84, 0, 0, 1751, 1752, 5, 69, 0, 0, 1752, 1753, 5, 77, 0, 0, 1753, 366, 1, 0, 0, 0, 1754, 1755, 5, 83, 0, 0, 1755, 1756, 5, 89, 0, 0, 1756, 1757, 5, 83, 0, 0, 1757, 1758, 5, 84, 0, 0, 1758, 1759, 5, 69, 0, 0, 1759, 1760, 5, 77, 0, 0, 1760, 1761, 5, 95, 0, 0, 1761, 1762, 5, 84, 0, 0, 1762, 1763, 5, 73, 0, 0, 1763, 1764, 5, 77, 0, 0, 1764, 1765, 5, 69, 0, 0, 1765, 368, 1, 0, 0, 0, 1766, 1767, 5, 83, 0, 0, 1767, 1768, 5, 89, 0, 0, 1768, 1769, 5, 83, 0, 0, 1769, 1770, 5, 84, 0, 0, 1770, 1771, 5, 69, 0, 0, 1771, 1772, 5, 77, 0, 0, 1772, 1773, 5, 95, 0, 0, 1773, 1774, 5, 86, 0, 0, 1774, 1775, 5, 69, 0, 0, 1775, 1776, 5, 82, 0, 0, 1776, 1777, 5, 83, 0, 0, 1777, 1778, 5, 73, 0, 0, 1778, 1779, 5, 79, 0, 0, 1779, 1780, 5, 78, 0, 0, 1780, 370, 1, 0, 0, 0, 1781, 1782, 5, 84, 0, 0, 1782, 1783, 5, 65, 0, 0, 1783, 1784, 5, 66, 0, 0, 1784, 1785, 5, 76, 0, 0, 1785, 1786, 5, 69, 0, 0, 1786, 372, 1, 0, 0, 0, 1787, 1788, 5, 84, 0, 0, 1788, 1789, 5, 65, 0, 0, 1789, 1790, 5, 66, 0, 0, 1790, 1791, 5, 76, 0, 0, 1791, 1792, 5, 69, 0, 0, 1792, 1793, 5, 83, 0, 0, 1793, 374, 1, 0, 0, 0, 1794, 1795, 5, 84, 0, 0, 1795, 1796, 5, 65, 0, 0, 1796, 1797, 5, 66, 0, 0, 1797, 1798, 5, 76, 0, 0, 1798, 1799, 5, 69, 0, 0, 1799, 1800, 5, 83, 0, 0, 1800, 1801, 5, 65, 0, 0, 1801, 1802, 5, 77, 0, 0, 1802, 1803, 5, 80, 0, 0, 1803, 1804, 5, 76, 0, 0, 1804, 1805, 5, 69, 0, 0, 1805, 376, 1, 0, 0, 0, 1806, 1807, 5, 84, 0, 0, 1807, 1808, 5, 69, 0, 0, 1808, 1809, 5, 77, 0, 0, 1809, 1810, 5, 80, 0, 0, 1810, 1811, 5, 79, 0, 0, 1811, 1812, 5, 82, 0, 0, 1812, 1813, 5, 65, 0, 0, 1813, 1814, 5, 82, 0, 0, 1814, 1815, 5, 89, 0, 0, 1815, 378, 1, 0, 0, 0, 1816, 1817, 5, 84, 0, 0, 1817, 1818, 5, 69, 0, 0, 1818, 1819, 5, 88, 0, 0, 1819, 1820, 5, 84, 0, 0, 1820, 380, 1, 0, 0, 0, 1821, 1822, 5, 84, 0, 0, 1822, 1823, 5, 72, 0, 0, 1823, 1824, 5, 69, 0, 0, 1824, 1825, 5, 78, 0, 0, 1825, 382, 1, 0, 0, 0, 1826, 1827, 5, 84, 0, 0, 1827, 1828, 5, 73, 0, 0, 1828, 1829, 5, 77, 0, 0, 1829, 1830, 5, 69, 0, 0, 1830, 384, 1, 0, 0, 0, 1831, 1832, 5, 84, 0, 0, 1832, 1833, 5, 73, 0, 0, 1833, 1834, 5, 77, 0, 0, 1834, 1835, 5, 69, 0, 0, 1835, 1836, 5, 83, 0, 0, 1836, 1837, 5, 84, 0, 0, 1837, 1838, 5, 65, 0, 0, 1838, 1839, 5, 77, 0, 0, 1839, 1840, 5, 80, 0, 0, 1840, 386, 1, 0, 0, 0, 1841, 1842, 5, 84, 0, 0, 1842, 1843, 5, 79, 0, 0, 1843, 388, 1, 0, 0, 0, 1844, 1845, 5, 84, 0, 0, 1845, 1846, 5, 82, 0, 0, 1846, 1847, 5, 65, 0, 0, 1847, 1848, 5, 78, 0, 0, 1848, 1849, 5, 83, 0, 0, 1849, 1850, 5, 65, 0, 0, 1850, 1851, 5, 67, 0, 0, 1851, 1852, 5, 84, 0, 0, 1852, 1853, 5, 73, 0, 0, 1853, 1854, 5, 79, 0, 0, 1854, 1855, 5, 78, 0, 0, 1855, 390, 1, 0, 0, 0, 1856, 1857, 5, 84, 0, 0, 1857, 1858, 5, 82, 0, 0, 1858, 1859, 5, 85, 0, 0, 1859, 1860, 5, 69, 0, 0, 1860, 392, 1, 0, 0, 0, 1861, 1862, 5, 84, 0, 0, 1862, 1863, 5, 82, 0, 0, 1863, 1864, 5, 85, 0, 0, 1864, 1865, 5, 78, 0, 0, 1865, 1866, 5, 67, 0, 0, 1866, 1867, 5, 65, 0, 0, 1867, 1868, 5, 84, 0, 0, 1868, 1869, 5, 69, 0, 0, 1869, 394, 1, 0, 0, 0, 1870, 1871, 5, 84, 0, 0, 1871, 1872, 5, 82, 0, 0, 1872, 1873, 5, 89, 0, 0, 1873, 1874, 5, 95, 0, 0, 1874, 1875, 5, 67, 0, 0, 1875, 1876, 5, 65, 0, 0, 1876, 1877, 5, 83, 0, 0, 1877, 1878, 5, 84, 0, 0, 1878, 396, 1, 0, 0, 0, 1879, 1880, 5, 84, 0, 0, 1880, 1881, 5, 89, 0, 0, 1881, 1882, 5, 80, 0, 0, 1882, 1883, 5, 69, 0, 0, 1883, 398, 1, 0, 0, 0, 1884, 1885, 5, 85, 0, 0, 1885, 1886, 5, 69, 0, 0, 1886, 1887, 5, 83, 0, 0, 1887, 1888, 5, 67, 0, 0, 1888, 1889, 5, 65, 0, 0, 1889, 1890, 5, 80, 0, 0, 1890, 1891, 5, 69, 0, 0, 1891, 400, 1, 0, 0, 0, 1892, 1893, 5, 85, 0, 0, 1893, 1894, 5, 78, 0, 0, 1894, 1895, 5, 66, 0, 0, 1895, 1896, 5, 79, 0, 0, 1896, 1897, 5, 85, 0, 0, 1897, 1898, 5, 78, 0, 0, 1898, 1899, 5, 68, 0, 0, 1899, 1900, 5, 69, 0, 0, 1900, 1901, 5, 68, 0, 0, 1901, 402, 1, 0, 0, 0, 1902, 1903, 5, 85, 0, 0, 1903, 1904, 5, 78, 0, 0, 1904, 1905, 5, 67, 0, 0, 1905, 1906, 5, 79, 0, 0, 1906, 1907, 5, 77, 0, 0, 1907, 1908, 5, 77, 0, 0, 1908, 1909, 5, 73, 0, 0, 1909, 1910, 5, 84, 0, 0, 1910, 1911, 5, 84, 0, 0, 1911, 1912, 5, 69, 0, 0, 1912, 1913, 5, 68, 0, 0, 1913, 404, 1, 0, 0, 0, 1914, 1915, 5, 85, 0, 0, 1915, 1916, 5, 78, 0, 0, 1916, 1917, 5, 73, 0, 0, 1917, 1918, 5, 79, 0, 0, 1918, 1919, 5, 78, 0, 0, 1919, 406, 1, 0, 0, 0, 1920, 1921, 5, 85, 0, 0, 1921, 1922, 5, 78, 0, 0, 1922, 1923, 5, 78, 0, 0, 1923, 1924, 5, 69, 0, 0, 1924, 1925, 5, 83, 0, 0, 1925, 1926, 5, 84, 0, 0, 1926, 408, 1, 0, 0, 0, 1927, 1928, 5, 85, 0, 0, 1928, 1929, 5, 80, 0, 0, 1929, 1930, 5, 68, 0, 0, 1930, 1931, 5, 65, 0, 0, 1931, 1932, 5, 84, 0, 0, 1932, 1933, 5, 69, 0, 0, 1933, 410, 1, 0, 0, 0, 1934, 1935, 5, 85, 0, 0, 1935, 1936, 5, 83, 0, 0, 1936, 1937, 5, 69, 0, 0, 1937, 412, 1, 0, 0, 0, 1938, 1939, 5, 85, 0, 0, 1939, 1940, 5, 83, 0, 0, 1940, 1941, 5, 69, 0, 0, 1941, 1942, 5, 82, 0, 0, 1942, 414, 1, 0, 0, 0, 1943, 1944, 5, 85, 0, 0, 1944, 1945, 5, 83, 0, 0, 1945, 1946, 5, 73, 0, 0, 1946, 1947, 5, 78, 0, 0, 1947, 1948, 5, 71, 0, 0, 1948, 416, 1, 0, 0, 0, 1949, 1950, 5, 86, 0, 0, 1950, 1951, 5, 65, 0, 0, 1951, 1952, 5, 76, 0, 0, 1952, 1953, 5, 73, 0, 0, 1953, 1954, 5, 68, 0, 0, 1954, 1955, 5, 65, 0, 0, 1955, 1956, 5, 84, 0, 0, 1956, 1957, 5, 69, 0, 0, 1957, 418, 1, 0, 0, 0, 1958, 1959, 5, 86, 0, 0, 1959, 1960, 5, 65, 0, 0, 1960, 1961, 5, 76, 0, 0, 1961, 1962, 5, 85, 0, 0, 1962, 1963, 5, 69, 0, 0, 1963, 1964, 5, 83, 0, 0, 1964, 420, 1, 0, 0, 0, 1965, 1966, 5, 86, 0, 0, 1966, 1967, 5, 69, 0, 0, 1967, 1968, 5, 82, 0, 0, 1968, 1969, 5, 66, 0, 0, 1969, 1970, 5, 79, 0, 0, 1970, 1971, 5, 83, 0, 0, 1971, 1972, 5, 69, 0, 0, 1972, 422, 1, 0, 0, 0, 1973, 1974, 5, 86, 0, 0, 1974, 1975, 5, 69, 0, 0, 1975, 1976, 5, 82, 0, 0, 1976, 1977, 5, 83, 0, 0, 1977, 1978, 5, 73, 0, 0, 1978, 1979, 5, 79, 0, 0, 1979, 1980, 5, 78, 0, 0, 1980, 424, 1, 0, 0, 0, 1981, 1982, 5, 86, 0, 0, 1982, 1983, 5, 73, 0, 0, 1983, 1984, 5, 69, 0, 0, 1984, 1985, 5, 87, 0, 0, 1985, 426, 1, 0, 0, 0, 1986, 1987, 5, 87, 0, 0, 1987, 1988, 5, 72, 0, 0, 1988, 1989, 5, 69, 0, 0, 1989, 1990, 5, 78, 0, 0, 1990, 428, 1, 0, 0, 0, 1991, 1992, 5, 87, 0, 0, 1992, 1993, 5, 72, 0, 0, 1993, 1994, 5, 69, 0, 0, 1994, 1995, 5, 82, 0, 0, 1995, 1996, 5, 69, 0, 0, 1996, 430, 1, 0, 0, 0, 1997, 1998, 5, 87, 0, 0, 1998, 1999, 5, 73, 0, 0, 1999, 2000, 5, 84, 0, 0, 2000, 2001, 5, 72, 0, 0, 2001, 432, 1, 0, 0, 0, 2002, 2003, 5, 87, 0, 0, 2003, 2004, 5, 79, 0, 0, 2004, 2005, 5, 82, 0, 0, 2005, 2006, 5, 75, 0, 0, 2006, 434, 1, 0, 0, 0, 2007, 2008, 5, 87, 0, 0, 2008, 2009, 5, 82, 0, 0, 2009, 2010, 5, 73, 0, 0, 2010, 2011, 5, 84, 0, 0, 2011, 2012, 5, 69, 0, 0, 2012, 436, 1, 0, 0, 0, 2013, 2014, 5, 89, 0, 0, 2014, 2015, 5, 69, 0, 0, 2015, 2016, 5, 65, 0, 0, 2016, 2017, 5, 82, 0, 0, 2017, 438, 1, 0, 0, 0, 2018, 2019, 5, 90, 0, 0, 2019, 2020, 5, 79, 0, 0, 2020, 2021, 5, 78, 0, 0, 2021, 2022, 5, 69, 0, 0, 2022, 440, 1, 0, 0, 0, 2023, 2024, 5, 61, 0, 0, 2024, 442, 1, 0, 0, 0, 2025, 2026, 5, 60, 0, 0, 2026, 2030, 5, 62, 0, 0, 2027, 2028, 5, 33, 0, 0, 2028, 2030, 5, 61, 0, 0, 2029, 2025, 1, 0, 0, 0, 2029, 2027, 1, 0, 0, 0, 2030, 444, 1, 0, 0, 0, 2031, 2032, 5, 60, 0, 0, 2032, 446, 1, 0, 0, 0, 2033, 2034, 5, 60, 0, 0, 2034, 2035, 5, 61, 0, 0, 2035, 448, 1, 0, 0, 0, 2036, 2037, 5, 62, 0, 0, 2037, 450, 1, 0, 0, 0, 2038, 2039, 5, 62, 0, 0, 2039, 2040, 5, 61, 0, 0, 2040, 452, 1, 0, 0, 0, 2041, 2042, 5, 43, 0, 0, 2042, 454, 1, 0, 0, 0, 2043, 2044, 5, 45, 0, 0, 2044, 456, 1, 0, 0, 0, 2045, 2046, 5, 42, 0, 0, 2046, 458, 1, 0, 0, 0, 2047, 2048, 5, 47, 0, 0, 2048, 460, 1, 0, 0, 0, 2049, 2050, 5, 37, 0, 0, 2050, 462, 1, 0, 0, 0, 2051, 2052, 5, 124, 0, 0, 2052, 2053, 5, 124, 0, 0, 2053, 464, 1, 0, 0, 0, 2054, 2060, 5, 39, 0, 0, 2055, 2059, 8, 0, 0, 0, 2056, 2057, 5, 39, 0, 0, 2057, 2059, 5, 39, 0, 0, 2058, 2055, 1, 0, 0, 0, 2058, 2056, 1, 0, 0, 0, 2059, 2062, 1, 0, 0, 0, 2060, 2058, 1, 0, 0, 0, 2060, 2061, 1, 0, 0, 0, 2061, 2063, 1, 0, 0, 0, 2062, 2060, 1, 0, 0, 0, 2063, 2064, 5, 39, 0, 0, 2064, 466, 1, 0, 0, 0, 2065, 2066, 5, 85, 0, 0, 2066, 2067, 5, 38, 0, 0, 2067, 2068, 5, 39, 0, 0, 2068, 2074, 1, 0, 0, 0, 2069, 2073, 8, 0, 0, 0, 2070, 2071, 5, 39, 0, 0, 2071, 2073, 5, 39, 0, 0, 2072, 2069, 1, 0, 0, 0, 2072, 2070, 1, 0, 0, 0, 2073, 2076, 1, 0, 0, 0, 2074, 2072, 1, 0, 0, 0, 2074, 2075, 1, 0, 0, 0, 2075, 2077, 1, 0, 0, 0, 2076, 2074, 1, 0, 0, 0, 2077, 2078, 5, 39, 0, 0, 2078, 468, 1, 0, 0, 0, 2079, 2080, 5, 88, 0, 0, 2080, 2081, 5, 39, 0, 0, 2081, 2085, 1, 0, 0, 0, 2082, 2084, 8, 0, 0, 0, 2083, 2082, 1, 0, 0, 0, 2084, 2087, 1, 0, 0, 0, 2085, 2083, 1, 0, 0, 0, 2085, 2086, 1, 0, 0, 0, 2086, 2088, 1, 0, 0, 0, 2087, 2085, 1, 0, 0, 0, 2088, 2089, 5, 39, 0, 0, 2089, 470, 1, 0, 0, 0, 2090, 2092, 3, 493, 246, 0, 2091, 2090, 1, 0, 0, 0, 2092, 2093, 1, 0, 0, 0, 2093, 2091, 1, 0, 0, 0, 2093, 2094, 1, 0, 0, 0, 2094, 472, 1, 0, 0, 0, 2095, 2097, 3, 493, 246, 0, 2096, 2095, 1, 0, 0, 0, 2097, 2098, 1, 0, 0, 0, 2098, 2096, 1, 0, 0, 0, 2098, 2099, 1, 0, 0, 0, 2099, 2100, 1, 0, 0, 0, 2100, 2104, 5, 46, 0, 0, 2101, 2103, 3, 493, 246, 0, 2102, 2101, 1, 0, 0, 0, 2103, 2106, 1, 0, 0, 0, 2104, 2102, 1, 0, 0, 0, 2104, 2105, 1, 0, 0, 0, 2105, 2114, 1, 0, 0, 0, 2106, 2104, 1, 0, 0, 0, 2107, 2109, 5, 46, 0, 0, 2108, 2110, 3, 493, 246, 0, 2109, 2108, 1, 0, 0, 0, 2110, 2111, 1, 0, 0, 0, 2111, 2109, 1, 0, 0, 0, 2111, 2112, 1, 0, 0, 0, 2112, 2114, 1, 0, 0, 0, 2113, 2096, 1, 0, 0, 0, 2113, 2107, 1, 0, 0, 0, 2114, 474, 1, 0, 0, 0, 2115, 2117, 3, 493, 246, 0, 2116, 2115, 1, 0, 0, 0, 2117, 2118, 1, 0, 0, 0, 2118, 2116, 1, 0, 0, 0, 2118, 2119, 1, 0, 0, 0, 2119, 2127, 1, 0, 0, 0, 2120, 2124, 5, 46, 0, 0, 2121, 2123, 3, 493, 246, 0, 2122, 2121, 1, 0, 0, 0, 2123, 2126, 1, 0, 0, 0, 2124, 2122, 1, 0, 0, 0, 2124, 2125, 1, 0, 0, 0, 2125, 2128, 1, 0, 0, 0, 2126, 2124, 1, 0, 0, 0, 2127, 2120, 1, 0, 0, 0, 2127, 2128, 1, 0, 0, 0, 2128, 2129, 1, 0, 0, 0, 2129, 2130, 3, 491, 245, 0, 2130, 2140, 1, 0, 0, 0, 2131, 2133, 5, 46, 0, 0, 2132, 2134, 3, 493, 246, 0, 2133, 2132, 1, 0, 0, 0, 2134, 2135, 1, 0, 0, 0, 2135, 2133, 1, 0, 0, 0, 2135, 2136, 1, 0, 0, 0, 2136, 2137, 1, 0, 0, 0, 2137, 2138, 3, 491, 245, 0, 2138, 2140, 1, 0, 0, 0, 2139, 2116, 1, 0, 0, 0, 2139, 2131, 1, 0, 0, 0, 2140, 476, 1, 0, 0, 0, 2141, 2144, 3, 495, 247, 0, 2142, 2144, 5, 95, 0, 0, 2143, 2141, 1, 0, 0, 0, 2143, 2142, 1, 0, 0, 0, 2144, 2150, 1, 0, 0, 0, 2145, 2149, 3, 495, 247, 0, 2146, 2149, 3, 493, 246, 0, 2147, 2149, 7, 1, 0, 0, 2148, 2145, 1, 0, 0, 0, 2148, 2146, 1, 0, 0, 0, 2148, 2147, 1, 0, 0, 0, 2149, 2152, 1, 0, 0, 0, 2150, 2148, 1, 0, 0, 0, 2150, 2151, 1, 0, 0, 0, 2151, 478, 1, 0, 0, 0, 2152, 2150, 1, 0, 0, 0, 2153, 2157, 3, 493, 246, 0, 2154, 2158, 3, 495, 247, 0, 2155, 2158, 3, 493, 246, 0, 2156, 2158, 7, 1, 0, 0, 2157, 2154, 1, 0, 0, 0, 2157, 2155, 1, 0, 0, 0, 2157, 2156, 1, 0, 0, 0, 2158, 2159, 1, 0, 0, 0, 2159, 2157, 1, 0, 0, 0, 2159, 2160, 1, 0, 0, 0, 2160, 480, 1, 0, 0, 0, 2161, 2167, 5, 34, 0, 0, 2162, 2166, 8, 2, 0, 0, 2163, 2164, 5, 34, 0, 0, 2164, 2166, 5, 34, 0, 0, 2165, 2162, 1, 0, 0, 0, 2165, 2163, 1, 0, 0, 0, 2166, 2169, 1, 0, 0, 0, 2167, 2165, 1, 0, 0, 0, 2167, 2168, 1, 0, 0, 0, 2168, 2170, 1, 0, 0, 0, 2169, 2167, 1, 0, 0, 0, 2170, 2171, 5, 34, 0, 0, 2171, 482, 1, 0, 0, 0, 2172, 2178, 5, 96, 0, 0, 2173, 2177, 8, 3, 0, 0, 2174, 2175, 5, 96, 0, 0, 2175, 2177, 5, 96, 0, 0, 2176, 2173, 1, 0, 0, 0, 2176, 2174, 1, 0, 0, 0, 2177, 2180, 1, 0, 0, 0, 2178, 2176, 1, 0, 0, 0, 2178, 2179, 1, 0, 0, 0, 2179, 2181, 1, 0, 0, 0, 2180, 2178, 1, 0, 0, 0, 2181, 2182, 5, 96, 0, 0, 2182, 484, 1, 0, 0, 0, 2183, 2184, 5, 84, 0, 0, 2184, 2185, 5, 73, 0, 0, 2185, 2186, 5, 77, 0, 0, 2186, 2187, 5, 69, 0, 0, 2187, 2188, 1, 0, 0, 0, 2188, 2189, 3, 501, 250, 0, 2189, 2190, 5, 87, 0, 0, 2190, 2191, 5, 73, 0, 0, 2191, 2192, 5, 84, 0, 0, 2192, 2193, 5, 72, 0, 0, 2193, 2194, 1, 0, 0, 0, 2194, 2195, 3, 501, 250, 0, 2195, 2196, 5, 84, 0, 0, 2196, 2197, 5, 73, 0, 0, 2197, 2198, 5, 77, 0, 0, 2198, 2199, 5, 69, 0, 0, 2199, 2200, 1, 0, 0, 0, 2200, 2201, 3, 501, 250, 0, 2201, 2202, 5, 90, 0, 0, 2202, 2203, 5, 79, 0, 0, 2203, 2204, 5, 78, 0, 0, 2204, 2205, 5, 69, 0, 0, 2205, 486, 1, 0, 0, 0, 2206, 2207, 5, 84, 0, 0, 2207, 2208, 5, 73, 0, 0, 2208, 2209, 5, 77, 0, 0, 2209, 2210, 5, 69, 0, 0, 2210, 2211, 5, 83, 0, 0, 2211, 2212, 5, 84, 0, 0, 2212, 2213, 5, 65, 0, 0, 2213, 2214, 5, 77, 0, 0, 2214, 2215, 5, 80, 0, 0, 2215, 2216, 1, 0, 0, 0, 2216, 2217, 3, 501, 250, 0, 2217, 2218, 5, 87, 0, 0, 2218, 2219, 5, 73, 0, 0, 2219, 2220, 5, 84, 0, 0, 2220, 2221, 5, 72, 0, 0, 2221, 2222, 1, 0, 0, 0, 2222, 2223, 3, 501, 250, 0, 2223, 2224, 5, 84, 0, 0, 2224, 2225, 5, 73, 0, 0, 2225, 2226, 5, 77, 0, 0, 2226, 2227, 5, 69, 0, 0, 2227, 2228, 1, 0, 0, 0, 2228, 2229, 3, 501, 250, 0, 2229, 2230, 5, 90, 0, 0, 2230, 2231, 5, 79, 0, 0, 2231, 2232, 5, 78, 0, 0, 2232, 2233, 5, 69, 0, 0, 2233, 488, 1, 0, 0, 0, 2234, 2235, 5, 68, 0, 0, 2235, 2236, 5, 79, 0, 0, 2236, 2237, 5, 85, 0, 0, 2237, 2238, 5, 66, 0, 0, 2238, 2239, 5, 76, 0, 0, 2239, 2240, 5, 69, 0, 0, 2240, 2241, 1, 0, 0, 0, 2241, 2242, 3, 501, 250, 0, 2242, 2243, 5, 80, 0, 0, 2243, 2244, 5, 82, 0, 0, 2244, 2245, 5, 69, 0, 0, 2245, 2246, 5, 67, 0, 0, 2246, 2247, 5, 73, 0, 0, 2247, 2248, 5, 83, 0, 0, 2248, 2249, 5, 73, 0, 0, 2249, 2250, 5, 79, 0, 0, 2250, 2251, 5, 78, 0, 0, 2251, 490, 1, 0, 0, 0, 2252, 2254, 5, 69, 0, 0, 2253, 2255, 7, 4, 0, 0, 2254, 2253, 1, 0, 0, 0, 2254, 2255, 1, 0, 0, 0, 2255, 2257, 1, 0, 0, 0, 2256, 2258, 3, 493, 246, 0, 2257, 2256, 1, 0, 0, 0, 2258, 2259, 1, 0, 0, 0, 2259, 2257, 1, 0, 0, 0, 2259, 2260, 1, 0, 0, 0, 2260, 492, 1, 0, 0, 0, 2261, 2262, 7, 5, 0, 0, 2262, 494, 1, 0, 0, 0, 2263, 2264, 7, 6, 0, 0, 2264, 496, 1, 0, 0, 0, 2265, 2266, 5, 45, 0, 0, 2266, 2267, 5, 45, 0, 0, 2267, 2271, 1, 0, 0, 0, 2268, 2270, 8, 7, 0, 0, 2269, 2268, 1, 0, 0, 0, 2270, 2273, 1, 0, 0, 0, 2271, 2269, 1, 0, 0, 0, 2271, 2272, 1, 0, 0, 0, 2272, 2275, 1, 0, 0, 0, 2273, 2271, 1, 0, 0, 0, 2274, 2276, 5, 13, 0, 0, 2275, 2274, 1, 0, 0, 0, 2275, 2276, 1, 0, 0, 0, 2276, 2278, 1, 0, 0, 0, 2277, 2279, 5, 10, 0, 0, 2278, 2277, 1, 0, 0, 0, 2278, 2279, 1, 0, 0, 0, 2279, 2280, 1, 0, 0, 0, 2280, 2281, 6, 248, 0, 0, 2281, 498, 1, 0, 0, 0, 2282, 2283, 5, 47, 0, 0, 2283, 2284, 5, 42, 0, 0, 2284, 2288, 1, 0, 0, 0, 2285, 2287, 9, 0, 0, 0, 2286, 2285, 1, 0, 0, 0, 2287, 2290, 1, 0, 0, 0, 2288, 2289, 1, 0, 0, 0, 2288, 2286, 1, 0, 0, 0, 2289, 2291, 1, 0, 0, 0, 2290, 2288, 1, 0, 0, 0, 2291, 2292, 5, 42, 0, 0, 2292, 2293, 5, 47, 0, 0, 2293, 2294, 1, 0, 0, 0, 2294, 2295, 6, 249, 0, 0, 2295, 500, 1, 0, 0, 0, 2296, 2298, 7, 8, 0, 0, 2297, 2296, 1, 0, 0, 0, 2298, 2299, 1, 0, 0, 0, 2299, 2297, 1, 0, 0, 0, 2299, 2300, 1, 0, 0, 0, 2300, 2301, 1, 0, 0, 0, 2301, 2302, 6, 250, 0, 0, 2302, 502, 1, 0, 0, 0, 2303, 2304, 9, 0, 0, 0, 2304, 504, 1, 0, 0, 0, 33, 0, 2029, 2058, 2060, 2072, 2074, 2085, 2093, 2098, 2104, 2111, 2113, 2118, 2124, 2127, 2135, 2139, 2143, 2148, 2150, 2157, 2159, 2165, 2167, 2176, 2178, 2254, 2259, 2271, 2275, 2278, 2288, 2299, 1, 0, 1, 0] \ No newline at end of file +[4, 0, 264, 2446, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 2, 58, 7, 58, 2, 59, 7, 59, 2, 60, 7, 60, 2, 61, 7, 61, 2, 62, 7, 62, 2, 63, 7, 63, 2, 64, 7, 64, 2, 65, 7, 65, 2, 66, 7, 66, 2, 67, 7, 67, 2, 68, 7, 68, 2, 69, 7, 69, 2, 70, 7, 70, 2, 71, 7, 71, 2, 72, 7, 72, 2, 73, 7, 73, 2, 74, 7, 74, 2, 75, 7, 75, 2, 76, 7, 76, 2, 77, 7, 77, 2, 78, 7, 78, 2, 79, 7, 79, 2, 80, 7, 80, 2, 81, 7, 81, 2, 82, 7, 82, 2, 83, 7, 83, 2, 84, 7, 84, 2, 85, 7, 85, 2, 86, 7, 86, 2, 87, 7, 87, 2, 88, 7, 88, 2, 89, 7, 89, 2, 90, 7, 90, 2, 91, 7, 91, 2, 92, 7, 92, 2, 93, 7, 93, 2, 94, 7, 94, 2, 95, 7, 95, 2, 96, 7, 96, 2, 97, 7, 97, 2, 98, 7, 98, 2, 99, 7, 99, 2, 100, 7, 100, 2, 101, 7, 101, 2, 102, 7, 102, 2, 103, 7, 103, 2, 104, 7, 104, 2, 105, 7, 105, 2, 106, 7, 106, 2, 107, 7, 107, 2, 108, 7, 108, 2, 109, 7, 109, 2, 110, 7, 110, 2, 111, 7, 111, 2, 112, 7, 112, 2, 113, 7, 113, 2, 114, 7, 114, 2, 115, 7, 115, 2, 116, 7, 116, 2, 117, 7, 117, 2, 118, 7, 118, 2, 119, 7, 119, 2, 120, 7, 120, 2, 121, 7, 121, 2, 122, 7, 122, 2, 123, 7, 123, 2, 124, 7, 124, 2, 125, 7, 125, 2, 126, 7, 126, 2, 127, 7, 127, 2, 128, 7, 128, 2, 129, 7, 129, 2, 130, 7, 130, 2, 131, 7, 131, 2, 132, 7, 132, 2, 133, 7, 133, 2, 134, 7, 134, 2, 135, 7, 135, 2, 136, 7, 136, 2, 137, 7, 137, 2, 138, 7, 138, 2, 139, 7, 139, 2, 140, 7, 140, 2, 141, 7, 141, 2, 142, 7, 142, 2, 143, 7, 143, 2, 144, 7, 144, 2, 145, 7, 145, 2, 146, 7, 146, 2, 147, 7, 147, 2, 148, 7, 148, 2, 149, 7, 149, 2, 150, 7, 150, 2, 151, 7, 151, 2, 152, 7, 152, 2, 153, 7, 153, 2, 154, 7, 154, 2, 155, 7, 155, 2, 156, 7, 156, 2, 157, 7, 157, 2, 158, 7, 158, 2, 159, 7, 159, 2, 160, 7, 160, 2, 161, 7, 161, 2, 162, 7, 162, 2, 163, 7, 163, 2, 164, 7, 164, 2, 165, 7, 165, 2, 166, 7, 166, 2, 167, 7, 167, 2, 168, 7, 168, 2, 169, 7, 169, 2, 170, 7, 170, 2, 171, 7, 171, 2, 172, 7, 172, 2, 173, 7, 173, 2, 174, 7, 174, 2, 175, 7, 175, 2, 176, 7, 176, 2, 177, 7, 177, 2, 178, 7, 178, 2, 179, 7, 179, 2, 180, 7, 180, 2, 181, 7, 181, 2, 182, 7, 182, 2, 183, 7, 183, 2, 184, 7, 184, 2, 185, 7, 185, 2, 186, 7, 186, 2, 187, 7, 187, 2, 188, 7, 188, 2, 189, 7, 189, 2, 190, 7, 190, 2, 191, 7, 191, 2, 192, 7, 192, 2, 193, 7, 193, 2, 194, 7, 194, 2, 195, 7, 195, 2, 196, 7, 196, 2, 197, 7, 197, 2, 198, 7, 198, 2, 199, 7, 199, 2, 200, 7, 200, 2, 201, 7, 201, 2, 202, 7, 202, 2, 203, 7, 203, 2, 204, 7, 204, 2, 205, 7, 205, 2, 206, 7, 206, 2, 207, 7, 207, 2, 208, 7, 208, 2, 209, 7, 209, 2, 210, 7, 210, 2, 211, 7, 211, 2, 212, 7, 212, 2, 213, 7, 213, 2, 214, 7, 214, 2, 215, 7, 215, 2, 216, 7, 216, 2, 217, 7, 217, 2, 218, 7, 218, 2, 219, 7, 219, 2, 220, 7, 220, 2, 221, 7, 221, 2, 222, 7, 222, 2, 223, 7, 223, 2, 224, 7, 224, 2, 225, 7, 225, 2, 226, 7, 226, 2, 227, 7, 227, 2, 228, 7, 228, 2, 229, 7, 229, 2, 230, 7, 230, 2, 231, 7, 231, 2, 232, 7, 232, 2, 233, 7, 233, 2, 234, 7, 234, 2, 235, 7, 235, 2, 236, 7, 236, 2, 237, 7, 237, 2, 238, 7, 238, 2, 239, 7, 239, 2, 240, 7, 240, 2, 241, 7, 241, 2, 242, 7, 242, 2, 243, 7, 243, 2, 244, 7, 244, 2, 245, 7, 245, 2, 246, 7, 246, 2, 247, 7, 247, 2, 248, 7, 248, 2, 249, 7, 249, 2, 250, 7, 250, 2, 251, 7, 251, 2, 252, 7, 252, 2, 253, 7, 253, 2, 254, 7, 254, 2, 255, 7, 255, 2, 256, 7, 256, 2, 257, 7, 257, 2, 258, 7, 258, 2, 259, 7, 259, 2, 260, 7, 260, 2, 261, 7, 261, 2, 262, 7, 262, 2, 263, 7, 263, 2, 264, 7, 264, 2, 265, 7, 265, 2, 266, 7, 266, 1, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 3, 1, 3, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 48, 1, 48, 1, 48, 1, 48, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 63, 1, 63, 1, 63, 1, 63, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 78, 1, 78, 1, 78, 1, 78, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 82, 1, 82, 1, 82, 1, 82, 1, 82, 1, 82, 1, 82, 1, 82, 1, 82, 1, 83, 1, 83, 1, 83, 1, 83, 1, 83, 1, 83, 1, 83, 1, 83, 1, 83, 1, 83, 1, 84, 1, 84, 1, 84, 1, 84, 1, 84, 1, 84, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 86, 1, 86, 1, 86, 1, 86, 1, 86, 1, 86, 1, 86, 1, 87, 1, 87, 1, 87, 1, 87, 1, 87, 1, 87, 1, 87, 1, 87, 1, 87, 1, 88, 1, 88, 1, 88, 1, 88, 1, 88, 1, 88, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 90, 1, 90, 1, 90, 1, 90, 1, 90, 1, 90, 1, 90, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 92, 1, 92, 1, 92, 1, 92, 1, 92, 1, 93, 1, 93, 1, 93, 1, 94, 1, 94, 1, 94, 1, 94, 1, 94, 1, 94, 1, 94, 1, 95, 1, 95, 1, 95, 1, 96, 1, 96, 1, 96, 1, 96, 1, 96, 1, 96, 1, 96, 1, 96, 1, 96, 1, 96, 1, 97, 1, 97, 1, 97, 1, 97, 1, 97, 1, 97, 1, 98, 1, 98, 1, 98, 1, 98, 1, 98, 1, 98, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 101, 1, 101, 1, 101, 1, 101, 1, 101, 1, 101, 1, 101, 1, 101, 1, 101, 1, 102, 1, 102, 1, 102, 1, 102, 1, 102, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 104, 1, 104, 1, 104, 1, 105, 1, 105, 1, 105, 1, 106, 1, 106, 1, 106, 1, 106, 1, 106, 1, 106, 1, 106, 1, 106, 1, 106, 1, 106, 1, 107, 1, 107, 1, 107, 1, 107, 1, 107, 1, 108, 1, 108, 1, 108, 1, 108, 1, 108, 1, 109, 1, 109, 1, 109, 1, 109, 1, 109, 1, 110, 1, 110, 1, 110, 1, 110, 1, 111, 1, 111, 1, 111, 1, 111, 1, 111, 1, 111, 1, 111, 1, 111, 1, 111, 1, 112, 1, 112, 1, 112, 1, 112, 1, 112, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 114, 1, 114, 1, 114, 1, 114, 1, 114, 1, 115, 1, 115, 1, 115, 1, 115, 1, 115, 1, 115, 1, 116, 1, 116, 1, 116, 1, 116, 1, 116, 1, 117, 1, 117, 1, 117, 1, 117, 1, 117, 1, 117, 1, 118, 1, 118, 1, 118, 1, 118, 1, 118, 1, 118, 1, 118, 1, 118, 1, 118, 1, 118, 1, 119, 1, 119, 1, 119, 1, 119, 1, 119, 1, 119, 1, 119, 1, 119, 1, 119, 1, 119, 1, 119, 1, 119, 1, 119, 1, 119, 1, 119, 1, 120, 1, 120, 1, 120, 1, 120, 1, 120, 1, 120, 1, 120, 1, 120, 1, 121, 1, 121, 1, 121, 1, 121, 1, 122, 1, 122, 1, 122, 1, 122, 1, 122, 1, 122, 1, 122, 1, 122, 1, 123, 1, 123, 1, 123, 1, 123, 1, 123, 1, 123, 1, 123, 1, 123, 1, 123, 1, 123, 1, 123, 1, 123, 1, 123, 1, 124, 1, 124, 1, 124, 1, 124, 1, 124, 1, 124, 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, 125, 1, 126, 1, 126, 1, 126, 1, 126, 1, 126, 1, 126, 1, 127, 1, 127, 1, 127, 1, 127, 1, 127, 1, 128, 1, 128, 1, 128, 1, 128, 1, 128, 1, 128, 1, 128, 1, 128, 1, 129, 1, 129, 1, 129, 1, 129, 1, 130, 1, 130, 1, 130, 1, 130, 1, 131, 1, 131, 1, 131, 1, 131, 1, 131, 1, 132, 1, 132, 1, 132, 1, 132, 1, 132, 1, 133, 1, 133, 1, 133, 1, 134, 1, 134, 1, 134, 1, 134, 1, 134, 1, 135, 1, 135, 1, 135, 1, 135, 1, 135, 1, 135, 1, 135, 1, 135, 1, 135, 1, 135, 1, 136, 1, 136, 1, 136, 1, 136, 1, 137, 1, 137, 1, 137, 1, 137, 1, 137, 1, 138, 1, 138, 1, 138, 1, 138, 1, 138, 1, 138, 1, 138, 1, 139, 1, 139, 1, 139, 1, 139, 1, 139, 1, 139, 1, 140, 1, 140, 1, 140, 1, 141, 1, 141, 1, 141, 1, 141, 1, 141, 1, 141, 1, 141, 1, 142, 1, 142, 1, 142, 1, 143, 1, 143, 1, 143, 1, 143, 1, 143, 1, 144, 1, 144, 1, 144, 1, 144, 1, 144, 1, 144, 1, 144, 1, 145, 1, 145, 1, 145, 1, 146, 1, 146, 1, 146, 1, 146, 1, 146, 1, 146, 1, 147, 1, 147, 1, 147, 1, 147, 1, 147, 1, 147, 1, 147, 1, 147, 1, 147, 1, 147, 1, 147, 1, 148, 1, 148, 1, 148, 1, 148, 1, 148, 1, 148, 1, 149, 1, 149, 1, 149, 1, 149, 1, 149, 1, 149, 1, 149, 1, 150, 1, 150, 1, 150, 1, 150, 1, 150, 1, 151, 1, 151, 1, 151, 1, 151, 1, 151, 1, 151, 1, 151, 1, 151, 1, 151, 1, 151, 1, 152, 1, 152, 1, 152, 1, 152, 1, 152, 1, 152, 1, 152, 1, 152, 1, 152, 1, 152, 1, 152, 1, 153, 1, 153, 1, 153, 1, 153, 1, 153, 1, 153, 1, 153, 1, 153, 1, 153, 1, 154, 1, 154, 1, 154, 1, 154, 1, 154, 1, 154, 1, 154, 1, 154, 1, 154, 1, 154, 1, 155, 1, 155, 1, 155, 1, 155, 1, 155, 1, 155, 1, 155, 1, 155, 1, 156, 1, 156, 1, 156, 1, 156, 1, 156, 1, 156, 1, 156, 1, 156, 1, 157, 1, 157, 1, 157, 1, 157, 1, 157, 1, 157, 1, 157, 1, 157, 1, 157, 1, 157, 1, 157, 1, 158, 1, 158, 1, 158, 1, 158, 1, 158, 1, 158, 1, 158, 1, 158, 1, 158, 1, 158, 1, 158, 1, 159, 1, 159, 1, 159, 1, 159, 1, 159, 1, 159, 1, 160, 1, 160, 1, 160, 1, 160, 1, 160, 1, 160, 1, 161, 1, 161, 1, 161, 1, 161, 1, 161, 1, 162, 1, 162, 1, 162, 1, 162, 1, 162, 1, 162, 1, 162, 1, 162, 1, 162, 1, 162, 1, 163, 1, 163, 1, 163, 1, 163, 1, 163, 1, 163, 1, 163, 1, 163, 1, 164, 1, 164, 1, 164, 1, 164, 1, 164, 1, 165, 1, 165, 1, 165, 1, 165, 1, 165, 1, 165, 1, 165, 1, 166, 1, 166, 1, 166, 1, 166, 1, 166, 1, 166, 1, 166, 1, 166, 1, 166, 1, 166, 1, 166, 1, 167, 1, 167, 1, 167, 1, 167, 1, 167, 1, 167, 1, 167, 1, 167, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 169, 1, 169, 1, 169, 1, 169, 1, 169, 1, 169, 1, 169, 1, 169, 1, 170, 1, 170, 1, 170, 1, 170, 1, 170, 1, 170, 1, 170, 1, 170, 1, 170, 1, 171, 1, 171, 1, 171, 1, 171, 1, 171, 1, 171, 1, 171, 1, 172, 1, 172, 1, 172, 1, 172, 1, 172, 1, 172, 1, 172, 1, 172, 1, 173, 1, 173, 1, 173, 1, 173, 1, 173, 1, 173, 1, 173, 1, 174, 1, 174, 1, 174, 1, 174, 1, 174, 1, 174, 1, 175, 1, 175, 1, 175, 1, 175, 1, 175, 1, 176, 1, 176, 1, 176, 1, 176, 1, 176, 1, 176, 1, 177, 1, 177, 1, 177, 1, 177, 1, 177, 1, 177, 1, 177, 1, 177, 1, 177, 1, 178, 1, 178, 1, 178, 1, 178, 1, 178, 1, 178, 1, 178, 1, 179, 1, 179, 1, 179, 1, 179, 1, 180, 1, 180, 1, 180, 1, 180, 1, 180, 1, 181, 1, 181, 1, 181, 1, 181, 1, 181, 1, 181, 1, 181, 1, 182, 1, 182, 1, 182, 1, 182, 1, 182, 1, 182, 1, 182, 1, 182, 1, 183, 1, 183, 1, 183, 1, 183, 1, 183, 1, 183, 1, 183, 1, 184, 1, 184, 1, 184, 1, 184, 1, 184, 1, 184, 1, 184, 1, 184, 1, 184, 1, 185, 1, 185, 1, 185, 1, 185, 1, 185, 1, 185, 1, 185, 1, 186, 1, 186, 1, 186, 1, 186, 1, 186, 1, 186, 1, 186, 1, 186, 1, 186, 1, 186, 1, 186, 1, 186, 1, 186, 1, 187, 1, 187, 1, 187, 1, 187, 1, 187, 1, 187, 1, 187, 1, 187, 1, 188, 1, 188, 1, 188, 1, 188, 1, 189, 1, 189, 1, 189, 1, 189, 1, 189, 1, 190, 1, 190, 1, 190, 1, 190, 1, 190, 1, 191, 1, 191, 1, 191, 1, 191, 1, 191, 1, 192, 1, 192, 1, 192, 1, 192, 1, 193, 1, 193, 1, 193, 1, 193, 1, 193, 1, 193, 1, 194, 1, 194, 1, 194, 1, 194, 1, 194, 1, 194, 1, 195, 1, 195, 1, 195, 1, 195, 1, 195, 1, 195, 1, 195, 1, 195, 1, 195, 1, 195, 1, 196, 1, 196, 1, 196, 1, 196, 1, 196, 1, 196, 1, 196, 1, 197, 1, 197, 1, 197, 1, 197, 1, 197, 1, 197, 1, 197, 1, 197, 1, 197, 1, 197, 1, 197, 1, 197, 1, 198, 1, 198, 1, 198, 1, 198, 1, 198, 1, 198, 1, 198, 1, 198, 1, 198, 1, 198, 1, 198, 1, 198, 1, 198, 1, 198, 1, 198, 1, 199, 1, 199, 1, 199, 1, 199, 1, 199, 1, 199, 1, 200, 1, 200, 1, 200, 1, 200, 1, 200, 1, 200, 1, 200, 1, 201, 1, 201, 1, 201, 1, 201, 1, 201, 1, 201, 1, 201, 1, 201, 1, 201, 1, 201, 1, 201, 1, 201, 1, 202, 1, 202, 1, 202, 1, 202, 1, 202, 1, 202, 1, 202, 1, 202, 1, 202, 1, 202, 1, 203, 1, 203, 1, 203, 1, 203, 1, 203, 1, 204, 1, 204, 1, 204, 1, 204, 1, 204, 1, 205, 1, 205, 1, 205, 1, 205, 1, 205, 1, 206, 1, 206, 1, 206, 1, 206, 1, 206, 1, 206, 1, 206, 1, 206, 1, 206, 1, 206, 1, 207, 1, 207, 1, 207, 1, 208, 1, 208, 1, 208, 1, 208, 1, 208, 1, 208, 1, 208, 1, 208, 1, 208, 1, 208, 1, 208, 1, 208, 1, 209, 1, 209, 1, 209, 1, 209, 1, 209, 1, 210, 1, 210, 1, 210, 1, 210, 1, 210, 1, 210, 1, 210, 1, 210, 1, 210, 1, 211, 1, 211, 1, 211, 1, 211, 1, 211, 1, 211, 1, 211, 1, 211, 1, 211, 1, 212, 1, 212, 1, 212, 1, 212, 1, 212, 1, 213, 1, 213, 1, 213, 1, 213, 1, 213, 1, 213, 1, 213, 1, 213, 1, 214, 1, 214, 1, 214, 1, 214, 1, 214, 1, 214, 1, 214, 1, 214, 1, 214, 1, 214, 1, 215, 1, 215, 1, 215, 1, 215, 1, 215, 1, 215, 1, 215, 1, 215, 1, 215, 1, 215, 1, 215, 1, 215, 1, 216, 1, 216, 1, 216, 1, 216, 1, 216, 1, 216, 1, 217, 1, 217, 1, 217, 1, 217, 1, 217, 1, 217, 1, 217, 1, 218, 1, 218, 1, 218, 1, 218, 1, 218, 1, 218, 1, 218, 1, 219, 1, 219, 1, 219, 1, 219, 1, 219, 1, 219, 1, 219, 1, 220, 1, 220, 1, 220, 1, 220, 1, 221, 1, 221, 1, 221, 1, 221, 1, 221, 1, 222, 1, 222, 1, 222, 1, 222, 1, 222, 1, 222, 1, 223, 1, 223, 1, 223, 1, 223, 1, 223, 1, 223, 1, 223, 1, 223, 1, 223, 1, 224, 1, 224, 1, 224, 1, 224, 1, 224, 1, 224, 1, 224, 1, 225, 1, 225, 1, 225, 1, 225, 1, 225, 1, 225, 1, 225, 1, 225, 1, 226, 1, 226, 1, 226, 1, 226, 1, 226, 1, 226, 1, 226, 1, 226, 1, 227, 1, 227, 1, 227, 1, 227, 1, 227, 1, 228, 1, 228, 1, 228, 1, 228, 1, 228, 1, 229, 1, 229, 1, 229, 1, 229, 1, 229, 1, 229, 1, 230, 1, 230, 1, 230, 1, 230, 1, 230, 1, 231, 1, 231, 1, 231, 1, 231, 1, 231, 1, 232, 1, 232, 1, 232, 1, 232, 1, 232, 1, 232, 1, 233, 1, 233, 1, 233, 1, 233, 1, 233, 1, 234, 1, 234, 1, 234, 1, 234, 1, 234, 1, 235, 1, 235, 1, 236, 1, 236, 1, 236, 1, 236, 3, 236, 2171, 8, 236, 1, 237, 1, 237, 1, 238, 1, 238, 1, 238, 1, 239, 1, 239, 1, 240, 1, 240, 1, 240, 1, 241, 1, 241, 1, 242, 1, 242, 1, 243, 1, 243, 1, 244, 1, 244, 1, 245, 1, 245, 1, 246, 1, 246, 1, 246, 1, 247, 1, 247, 1, 247, 1, 247, 5, 247, 2200, 8, 247, 10, 247, 12, 247, 2203, 9, 247, 1, 247, 1, 247, 1, 248, 1, 248, 1, 248, 1, 248, 1, 248, 1, 248, 1, 248, 5, 248, 2214, 8, 248, 10, 248, 12, 248, 2217, 9, 248, 1, 248, 1, 248, 1, 249, 1, 249, 1, 249, 1, 249, 5, 249, 2225, 8, 249, 10, 249, 12, 249, 2228, 9, 249, 1, 249, 1, 249, 1, 250, 4, 250, 2233, 8, 250, 11, 250, 12, 250, 2234, 1, 251, 4, 251, 2238, 8, 251, 11, 251, 12, 251, 2239, 1, 251, 1, 251, 5, 251, 2244, 8, 251, 10, 251, 12, 251, 2247, 9, 251, 1, 251, 1, 251, 4, 251, 2251, 8, 251, 11, 251, 12, 251, 2252, 3, 251, 2255, 8, 251, 1, 252, 4, 252, 2258, 8, 252, 11, 252, 12, 252, 2259, 1, 252, 1, 252, 5, 252, 2264, 8, 252, 10, 252, 12, 252, 2267, 9, 252, 3, 252, 2269, 8, 252, 1, 252, 1, 252, 1, 252, 1, 252, 4, 252, 2275, 8, 252, 11, 252, 12, 252, 2276, 1, 252, 1, 252, 3, 252, 2281, 8, 252, 1, 253, 1, 253, 3, 253, 2285, 8, 253, 1, 253, 1, 253, 1, 253, 5, 253, 2290, 8, 253, 10, 253, 12, 253, 2293, 9, 253, 1, 254, 1, 254, 1, 254, 1, 254, 4, 254, 2299, 8, 254, 11, 254, 12, 254, 2300, 1, 255, 1, 255, 1, 255, 1, 255, 5, 255, 2307, 8, 255, 10, 255, 12, 255, 2310, 9, 255, 1, 255, 1, 255, 1, 256, 1, 256, 1, 256, 1, 256, 5, 256, 2318, 8, 256, 10, 256, 12, 256, 2321, 9, 256, 1, 256, 1, 256, 1, 257, 1, 257, 1, 257, 1, 257, 1, 257, 1, 257, 1, 257, 1, 257, 1, 257, 1, 257, 1, 257, 1, 257, 1, 257, 1, 257, 1, 257, 1, 257, 1, 257, 1, 257, 1, 257, 1, 257, 1, 257, 1, 257, 1, 257, 1, 258, 1, 258, 1, 258, 1, 258, 1, 258, 1, 258, 1, 258, 1, 258, 1, 258, 1, 258, 1, 258, 1, 258, 1, 258, 1, 258, 1, 258, 1, 258, 1, 258, 1, 258, 1, 258, 1, 258, 1, 258, 1, 258, 1, 258, 1, 258, 1, 258, 1, 258, 1, 258, 1, 258, 1, 259, 1, 259, 1, 259, 1, 259, 1, 259, 1, 259, 1, 259, 1, 259, 1, 259, 1, 259, 1, 259, 1, 259, 1, 259, 1, 259, 1, 259, 1, 259, 1, 259, 1, 259, 1, 260, 1, 260, 3, 260, 2396, 8, 260, 1, 260, 4, 260, 2399, 8, 260, 11, 260, 12, 260, 2400, 1, 261, 1, 261, 1, 262, 1, 262, 1, 263, 1, 263, 1, 263, 1, 263, 5, 263, 2411, 8, 263, 10, 263, 12, 263, 2414, 9, 263, 1, 263, 3, 263, 2417, 8, 263, 1, 263, 3, 263, 2420, 8, 263, 1, 263, 1, 263, 1, 264, 1, 264, 1, 264, 1, 264, 5, 264, 2428, 8, 264, 10, 264, 12, 264, 2431, 9, 264, 1, 264, 1, 264, 1, 264, 1, 264, 1, 264, 1, 265, 4, 265, 2439, 8, 265, 11, 265, 12, 265, 2440, 1, 265, 1, 265, 1, 266, 1, 266, 1, 2429, 0, 267, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, 32, 65, 33, 67, 34, 69, 35, 71, 36, 73, 37, 75, 38, 77, 39, 79, 40, 81, 41, 83, 42, 85, 43, 87, 44, 89, 45, 91, 46, 93, 47, 95, 48, 97, 49, 99, 50, 101, 51, 103, 52, 105, 53, 107, 54, 109, 55, 111, 56, 113, 57, 115, 58, 117, 59, 119, 60, 121, 61, 123, 62, 125, 63, 127, 64, 129, 65, 131, 66, 133, 67, 135, 68, 137, 69, 139, 70, 141, 71, 143, 72, 145, 73, 147, 74, 149, 75, 151, 76, 153, 77, 155, 78, 157, 79, 159, 80, 161, 81, 163, 82, 165, 83, 167, 84, 169, 85, 171, 86, 173, 87, 175, 88, 177, 89, 179, 90, 181, 91, 183, 92, 185, 93, 187, 94, 189, 95, 191, 96, 193, 97, 195, 98, 197, 99, 199, 100, 201, 101, 203, 102, 205, 103, 207, 104, 209, 105, 211, 106, 213, 107, 215, 108, 217, 109, 219, 110, 221, 111, 223, 112, 225, 113, 227, 114, 229, 115, 231, 116, 233, 117, 235, 118, 237, 119, 239, 120, 241, 121, 243, 122, 245, 123, 247, 124, 249, 125, 251, 126, 253, 127, 255, 128, 257, 129, 259, 130, 261, 131, 263, 132, 265, 133, 267, 134, 269, 135, 271, 136, 273, 137, 275, 138, 277, 139, 279, 140, 281, 141, 283, 142, 285, 143, 287, 144, 289, 145, 291, 146, 293, 147, 295, 148, 297, 149, 299, 150, 301, 151, 303, 152, 305, 153, 307, 154, 309, 155, 311, 156, 313, 157, 315, 158, 317, 159, 319, 160, 321, 161, 323, 162, 325, 163, 327, 164, 329, 165, 331, 166, 333, 167, 335, 168, 337, 169, 339, 170, 341, 171, 343, 172, 345, 173, 347, 174, 349, 175, 351, 176, 353, 177, 355, 178, 357, 179, 359, 180, 361, 181, 363, 182, 365, 183, 367, 184, 369, 185, 371, 186, 373, 187, 375, 188, 377, 189, 379, 190, 381, 191, 383, 192, 385, 193, 387, 194, 389, 195, 391, 196, 393, 197, 395, 198, 397, 199, 399, 200, 401, 201, 403, 202, 405, 203, 407, 204, 409, 205, 411, 206, 413, 207, 415, 208, 417, 209, 419, 210, 421, 211, 423, 212, 425, 213, 427, 214, 429, 215, 431, 216, 433, 217, 435, 218, 437, 219, 439, 220, 441, 221, 443, 222, 445, 223, 447, 224, 449, 225, 451, 226, 453, 227, 455, 228, 457, 229, 459, 230, 461, 231, 463, 232, 465, 233, 467, 234, 469, 235, 471, 236, 473, 237, 475, 238, 477, 239, 479, 240, 481, 241, 483, 242, 485, 243, 487, 244, 489, 245, 491, 246, 493, 247, 495, 248, 497, 249, 499, 250, 501, 251, 503, 252, 505, 253, 507, 254, 509, 255, 511, 256, 513, 257, 515, 258, 517, 259, 519, 260, 521, 0, 523, 0, 525, 0, 527, 261, 529, 262, 531, 263, 533, 264, 1, 0, 9, 1, 0, 39, 39, 3, 0, 58, 58, 64, 64, 95, 95, 1, 0, 34, 34, 1, 0, 96, 96, 2, 0, 43, 43, 45, 45, 1, 0, 48, 57, 1, 0, 65, 90, 2, 0, 10, 10, 13, 13, 3, 0, 9, 10, 13, 13, 32, 32, 2476, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, 0, 91, 1, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 95, 1, 0, 0, 0, 0, 97, 1, 0, 0, 0, 0, 99, 1, 0, 0, 0, 0, 101, 1, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0, 105, 1, 0, 0, 0, 0, 107, 1, 0, 0, 0, 0, 109, 1, 0, 0, 0, 0, 111, 1, 0, 0, 0, 0, 113, 1, 0, 0, 0, 0, 115, 1, 0, 0, 0, 0, 117, 1, 0, 0, 0, 0, 119, 1, 0, 0, 0, 0, 121, 1, 0, 0, 0, 0, 123, 1, 0, 0, 0, 0, 125, 1, 0, 0, 0, 0, 127, 1, 0, 0, 0, 0, 129, 1, 0, 0, 0, 0, 131, 1, 0, 0, 0, 0, 133, 1, 0, 0, 0, 0, 135, 1, 0, 0, 0, 0, 137, 1, 0, 0, 0, 0, 139, 1, 0, 0, 0, 0, 141, 1, 0, 0, 0, 0, 143, 1, 0, 0, 0, 0, 145, 1, 0, 0, 0, 0, 147, 1, 0, 0, 0, 0, 149, 1, 0, 0, 0, 0, 151, 1, 0, 0, 0, 0, 153, 1, 0, 0, 0, 0, 155, 1, 0, 0, 0, 0, 157, 1, 0, 0, 0, 0, 159, 1, 0, 0, 0, 0, 161, 1, 0, 0, 0, 0, 163, 1, 0, 0, 0, 0, 165, 1, 0, 0, 0, 0, 167, 1, 0, 0, 0, 0, 169, 1, 0, 0, 0, 0, 171, 1, 0, 0, 0, 0, 173, 1, 0, 0, 0, 0, 175, 1, 0, 0, 0, 0, 177, 1, 0, 0, 0, 0, 179, 1, 0, 0, 0, 0, 181, 1, 0, 0, 0, 0, 183, 1, 0, 0, 0, 0, 185, 1, 0, 0, 0, 0, 187, 1, 0, 0, 0, 0, 189, 1, 0, 0, 0, 0, 191, 1, 0, 0, 0, 0, 193, 1, 0, 0, 0, 0, 195, 1, 0, 0, 0, 0, 197, 1, 0, 0, 0, 0, 199, 1, 0, 0, 0, 0, 201, 1, 0, 0, 0, 0, 203, 1, 0, 0, 0, 0, 205, 1, 0, 0, 0, 0, 207, 1, 0, 0, 0, 0, 209, 1, 0, 0, 0, 0, 211, 1, 0, 0, 0, 0, 213, 1, 0, 0, 0, 0, 215, 1, 0, 0, 0, 0, 217, 1, 0, 0, 0, 0, 219, 1, 0, 0, 0, 0, 221, 1, 0, 0, 0, 0, 223, 1, 0, 0, 0, 0, 225, 1, 0, 0, 0, 0, 227, 1, 0, 0, 0, 0, 229, 1, 0, 0, 0, 0, 231, 1, 0, 0, 0, 0, 233, 1, 0, 0, 0, 0, 235, 1, 0, 0, 0, 0, 237, 1, 0, 0, 0, 0, 239, 1, 0, 0, 0, 0, 241, 1, 0, 0, 0, 0, 243, 1, 0, 0, 0, 0, 245, 1, 0, 0, 0, 0, 247, 1, 0, 0, 0, 0, 249, 1, 0, 0, 0, 0, 251, 1, 0, 0, 0, 0, 253, 1, 0, 0, 0, 0, 255, 1, 0, 0, 0, 0, 257, 1, 0, 0, 0, 0, 259, 1, 0, 0, 0, 0, 261, 1, 0, 0, 0, 0, 263, 1, 0, 0, 0, 0, 265, 1, 0, 0, 0, 0, 267, 1, 0, 0, 0, 0, 269, 1, 0, 0, 0, 0, 271, 1, 0, 0, 0, 0, 273, 1, 0, 0, 0, 0, 275, 1, 0, 0, 0, 0, 277, 1, 0, 0, 0, 0, 279, 1, 0, 0, 0, 0, 281, 1, 0, 0, 0, 0, 283, 1, 0, 0, 0, 0, 285, 1, 0, 0, 0, 0, 287, 1, 0, 0, 0, 0, 289, 1, 0, 0, 0, 0, 291, 1, 0, 0, 0, 0, 293, 1, 0, 0, 0, 0, 295, 1, 0, 0, 0, 0, 297, 1, 0, 0, 0, 0, 299, 1, 0, 0, 0, 0, 301, 1, 0, 0, 0, 0, 303, 1, 0, 0, 0, 0, 305, 1, 0, 0, 0, 0, 307, 1, 0, 0, 0, 0, 309, 1, 0, 0, 0, 0, 311, 1, 0, 0, 0, 0, 313, 1, 0, 0, 0, 0, 315, 1, 0, 0, 0, 0, 317, 1, 0, 0, 0, 0, 319, 1, 0, 0, 0, 0, 321, 1, 0, 0, 0, 0, 323, 1, 0, 0, 0, 0, 325, 1, 0, 0, 0, 0, 327, 1, 0, 0, 0, 0, 329, 1, 0, 0, 0, 0, 331, 1, 0, 0, 0, 0, 333, 1, 0, 0, 0, 0, 335, 1, 0, 0, 0, 0, 337, 1, 0, 0, 0, 0, 339, 1, 0, 0, 0, 0, 341, 1, 0, 0, 0, 0, 343, 1, 0, 0, 0, 0, 345, 1, 0, 0, 0, 0, 347, 1, 0, 0, 0, 0, 349, 1, 0, 0, 0, 0, 351, 1, 0, 0, 0, 0, 353, 1, 0, 0, 0, 0, 355, 1, 0, 0, 0, 0, 357, 1, 0, 0, 0, 0, 359, 1, 0, 0, 0, 0, 361, 1, 0, 0, 0, 0, 363, 1, 0, 0, 0, 0, 365, 1, 0, 0, 0, 0, 367, 1, 0, 0, 0, 0, 369, 1, 0, 0, 0, 0, 371, 1, 0, 0, 0, 0, 373, 1, 0, 0, 0, 0, 375, 1, 0, 0, 0, 0, 377, 1, 0, 0, 0, 0, 379, 1, 0, 0, 0, 0, 381, 1, 0, 0, 0, 0, 383, 1, 0, 0, 0, 0, 385, 1, 0, 0, 0, 0, 387, 1, 0, 0, 0, 0, 389, 1, 0, 0, 0, 0, 391, 1, 0, 0, 0, 0, 393, 1, 0, 0, 0, 0, 395, 1, 0, 0, 0, 0, 397, 1, 0, 0, 0, 0, 399, 1, 0, 0, 0, 0, 401, 1, 0, 0, 0, 0, 403, 1, 0, 0, 0, 0, 405, 1, 0, 0, 0, 0, 407, 1, 0, 0, 0, 0, 409, 1, 0, 0, 0, 0, 411, 1, 0, 0, 0, 0, 413, 1, 0, 0, 0, 0, 415, 1, 0, 0, 0, 0, 417, 1, 0, 0, 0, 0, 419, 1, 0, 0, 0, 0, 421, 1, 0, 0, 0, 0, 423, 1, 0, 0, 0, 0, 425, 1, 0, 0, 0, 0, 427, 1, 0, 0, 0, 0, 429, 1, 0, 0, 0, 0, 431, 1, 0, 0, 0, 0, 433, 1, 0, 0, 0, 0, 435, 1, 0, 0, 0, 0, 437, 1, 0, 0, 0, 0, 439, 1, 0, 0, 0, 0, 441, 1, 0, 0, 0, 0, 443, 1, 0, 0, 0, 0, 445, 1, 0, 0, 0, 0, 447, 1, 0, 0, 0, 0, 449, 1, 0, 0, 0, 0, 451, 1, 0, 0, 0, 0, 453, 1, 0, 0, 0, 0, 455, 1, 0, 0, 0, 0, 457, 1, 0, 0, 0, 0, 459, 1, 0, 0, 0, 0, 461, 1, 0, 0, 0, 0, 463, 1, 0, 0, 0, 0, 465, 1, 0, 0, 0, 0, 467, 1, 0, 0, 0, 0, 469, 1, 0, 0, 0, 0, 471, 1, 0, 0, 0, 0, 473, 1, 0, 0, 0, 0, 475, 1, 0, 0, 0, 0, 477, 1, 0, 0, 0, 0, 479, 1, 0, 0, 0, 0, 481, 1, 0, 0, 0, 0, 483, 1, 0, 0, 0, 0, 485, 1, 0, 0, 0, 0, 487, 1, 0, 0, 0, 0, 489, 1, 0, 0, 0, 0, 491, 1, 0, 0, 0, 0, 493, 1, 0, 0, 0, 0, 495, 1, 0, 0, 0, 0, 497, 1, 0, 0, 0, 0, 499, 1, 0, 0, 0, 0, 501, 1, 0, 0, 0, 0, 503, 1, 0, 0, 0, 0, 505, 1, 0, 0, 0, 0, 507, 1, 0, 0, 0, 0, 509, 1, 0, 0, 0, 0, 511, 1, 0, 0, 0, 0, 513, 1, 0, 0, 0, 0, 515, 1, 0, 0, 0, 0, 517, 1, 0, 0, 0, 0, 519, 1, 0, 0, 0, 0, 527, 1, 0, 0, 0, 0, 529, 1, 0, 0, 0, 0, 531, 1, 0, 0, 0, 0, 533, 1, 0, 0, 0, 1, 535, 1, 0, 0, 0, 3, 537, 1, 0, 0, 0, 5, 539, 1, 0, 0, 0, 7, 541, 1, 0, 0, 0, 9, 543, 1, 0, 0, 0, 11, 545, 1, 0, 0, 0, 13, 548, 1, 0, 0, 0, 15, 550, 1, 0, 0, 0, 17, 552, 1, 0, 0, 0, 19, 555, 1, 0, 0, 0, 21, 559, 1, 0, 0, 0, 23, 565, 1, 0, 0, 0, 25, 569, 1, 0, 0, 0, 27, 575, 1, 0, 0, 0, 29, 583, 1, 0, 0, 0, 31, 587, 1, 0, 0, 0, 33, 591, 1, 0, 0, 0, 35, 597, 1, 0, 0, 0, 37, 600, 1, 0, 0, 0, 39, 604, 1, 0, 0, 0, 41, 607, 1, 0, 0, 0, 43, 614, 1, 0, 0, 0, 45, 624, 1, 0, 0, 0, 47, 632, 1, 0, 0, 0, 49, 635, 1, 0, 0, 0, 51, 640, 1, 0, 0, 0, 53, 647, 1, 0, 0, 0, 55, 655, 1, 0, 0, 0, 57, 660, 1, 0, 0, 0, 59, 665, 1, 0, 0, 0, 61, 674, 1, 0, 0, 0, 63, 681, 1, 0, 0, 0, 65, 689, 1, 0, 0, 0, 67, 697, 1, 0, 0, 0, 69, 704, 1, 0, 0, 0, 71, 714, 1, 0, 0, 0, 73, 725, 1, 0, 0, 0, 75, 732, 1, 0, 0, 0, 77, 744, 1, 0, 0, 0, 79, 750, 1, 0, 0, 0, 81, 755, 1, 0, 0, 0, 83, 763, 1, 0, 0, 0, 85, 776, 1, 0, 0, 0, 87, 789, 1, 0, 0, 0, 89, 802, 1, 0, 0, 0, 91, 820, 1, 0, 0, 0, 93, 833, 1, 0, 0, 0, 95, 838, 1, 0, 0, 0, 97, 843, 1, 0, 0, 0, 99, 847, 1, 0, 0, 0, 101, 858, 1, 0, 0, 0, 103, 866, 1, 0, 0, 0, 105, 873, 1, 0, 0, 0, 107, 878, 1, 0, 0, 0, 109, 887, 1, 0, 0, 0, 111, 898, 1, 0, 0, 0, 113, 912, 1, 0, 0, 0, 115, 921, 1, 0, 0, 0, 117, 930, 1, 0, 0, 0, 119, 942, 1, 0, 0, 0, 121, 947, 1, 0, 0, 0, 123, 952, 1, 0, 0, 0, 125, 958, 1, 0, 0, 0, 127, 966, 1, 0, 0, 0, 129, 970, 1, 0, 0, 0, 131, 979, 1, 0, 0, 0, 133, 986, 1, 0, 0, 0, 135, 993, 1, 0, 0, 0, 137, 1003, 1, 0, 0, 0, 139, 1011, 1, 0, 0, 0, 141, 1018, 1, 0, 0, 0, 143, 1026, 1, 0, 0, 0, 145, 1034, 1, 0, 0, 0, 147, 1043, 1, 0, 0, 0, 149, 1049, 1, 0, 0, 0, 151, 1055, 1, 0, 0, 0, 153, 1062, 1, 0, 0, 0, 155, 1068, 1, 0, 0, 0, 157, 1078, 1, 0, 0, 0, 159, 1082, 1, 0, 0, 0, 161, 1089, 1, 0, 0, 0, 163, 1094, 1, 0, 0, 0, 165, 1099, 1, 0, 0, 0, 167, 1108, 1, 0, 0, 0, 169, 1118, 1, 0, 0, 0, 171, 1124, 1, 0, 0, 0, 173, 1132, 1, 0, 0, 0, 175, 1139, 1, 0, 0, 0, 177, 1148, 1, 0, 0, 0, 179, 1154, 1, 0, 0, 0, 181, 1163, 1, 0, 0, 0, 183, 1170, 1, 0, 0, 0, 185, 1177, 1, 0, 0, 0, 187, 1182, 1, 0, 0, 0, 189, 1185, 1, 0, 0, 0, 191, 1192, 1, 0, 0, 0, 193, 1195, 1, 0, 0, 0, 195, 1205, 1, 0, 0, 0, 197, 1211, 1, 0, 0, 0, 199, 1217, 1, 0, 0, 0, 201, 1224, 1, 0, 0, 0, 203, 1234, 1, 0, 0, 0, 205, 1243, 1, 0, 0, 0, 207, 1248, 1, 0, 0, 0, 209, 1256, 1, 0, 0, 0, 211, 1259, 1, 0, 0, 0, 213, 1262, 1, 0, 0, 0, 215, 1272, 1, 0, 0, 0, 217, 1277, 1, 0, 0, 0, 219, 1282, 1, 0, 0, 0, 221, 1287, 1, 0, 0, 0, 223, 1291, 1, 0, 0, 0, 225, 1300, 1, 0, 0, 0, 227, 1305, 1, 0, 0, 0, 229, 1313, 1, 0, 0, 0, 231, 1318, 1, 0, 0, 0, 233, 1324, 1, 0, 0, 0, 235, 1329, 1, 0, 0, 0, 237, 1335, 1, 0, 0, 0, 239, 1345, 1, 0, 0, 0, 241, 1360, 1, 0, 0, 0, 243, 1368, 1, 0, 0, 0, 245, 1372, 1, 0, 0, 0, 247, 1380, 1, 0, 0, 0, 249, 1393, 1, 0, 0, 0, 251, 1399, 1, 0, 0, 0, 253, 1406, 1, 0, 0, 0, 255, 1412, 1, 0, 0, 0, 257, 1417, 1, 0, 0, 0, 259, 1425, 1, 0, 0, 0, 261, 1429, 1, 0, 0, 0, 263, 1433, 1, 0, 0, 0, 265, 1438, 1, 0, 0, 0, 267, 1443, 1, 0, 0, 0, 269, 1446, 1, 0, 0, 0, 271, 1451, 1, 0, 0, 0, 273, 1461, 1, 0, 0, 0, 275, 1465, 1, 0, 0, 0, 277, 1470, 1, 0, 0, 0, 279, 1477, 1, 0, 0, 0, 281, 1483, 1, 0, 0, 0, 283, 1486, 1, 0, 0, 0, 285, 1493, 1, 0, 0, 0, 287, 1496, 1, 0, 0, 0, 289, 1501, 1, 0, 0, 0, 291, 1508, 1, 0, 0, 0, 293, 1511, 1, 0, 0, 0, 295, 1517, 1, 0, 0, 0, 297, 1528, 1, 0, 0, 0, 299, 1534, 1, 0, 0, 0, 301, 1541, 1, 0, 0, 0, 303, 1546, 1, 0, 0, 0, 305, 1556, 1, 0, 0, 0, 307, 1567, 1, 0, 0, 0, 309, 1576, 1, 0, 0, 0, 311, 1586, 1, 0, 0, 0, 313, 1594, 1, 0, 0, 0, 315, 1602, 1, 0, 0, 0, 317, 1613, 1, 0, 0, 0, 319, 1624, 1, 0, 0, 0, 321, 1630, 1, 0, 0, 0, 323, 1636, 1, 0, 0, 0, 325, 1641, 1, 0, 0, 0, 327, 1651, 1, 0, 0, 0, 329, 1659, 1, 0, 0, 0, 331, 1664, 1, 0, 0, 0, 333, 1671, 1, 0, 0, 0, 335, 1682, 1, 0, 0, 0, 337, 1690, 1, 0, 0, 0, 339, 1696, 1, 0, 0, 0, 341, 1704, 1, 0, 0, 0, 343, 1713, 1, 0, 0, 0, 345, 1720, 1, 0, 0, 0, 347, 1728, 1, 0, 0, 0, 349, 1735, 1, 0, 0, 0, 351, 1741, 1, 0, 0, 0, 353, 1746, 1, 0, 0, 0, 355, 1752, 1, 0, 0, 0, 357, 1761, 1, 0, 0, 0, 359, 1768, 1, 0, 0, 0, 361, 1772, 1, 0, 0, 0, 363, 1777, 1, 0, 0, 0, 365, 1784, 1, 0, 0, 0, 367, 1792, 1, 0, 0, 0, 369, 1799, 1, 0, 0, 0, 371, 1808, 1, 0, 0, 0, 373, 1815, 1, 0, 0, 0, 375, 1828, 1, 0, 0, 0, 377, 1836, 1, 0, 0, 0, 379, 1840, 1, 0, 0, 0, 381, 1845, 1, 0, 0, 0, 383, 1850, 1, 0, 0, 0, 385, 1855, 1, 0, 0, 0, 387, 1859, 1, 0, 0, 0, 389, 1865, 1, 0, 0, 0, 391, 1871, 1, 0, 0, 0, 393, 1881, 1, 0, 0, 0, 395, 1888, 1, 0, 0, 0, 397, 1900, 1, 0, 0, 0, 399, 1915, 1, 0, 0, 0, 401, 1921, 1, 0, 0, 0, 403, 1928, 1, 0, 0, 0, 405, 1940, 1, 0, 0, 0, 407, 1950, 1, 0, 0, 0, 409, 1955, 1, 0, 0, 0, 411, 1960, 1, 0, 0, 0, 413, 1965, 1, 0, 0, 0, 415, 1975, 1, 0, 0, 0, 417, 1978, 1, 0, 0, 0, 419, 1990, 1, 0, 0, 0, 421, 1995, 1, 0, 0, 0, 423, 2004, 1, 0, 0, 0, 425, 2013, 1, 0, 0, 0, 427, 2018, 1, 0, 0, 0, 429, 2026, 1, 0, 0, 0, 431, 2036, 1, 0, 0, 0, 433, 2048, 1, 0, 0, 0, 435, 2054, 1, 0, 0, 0, 437, 2061, 1, 0, 0, 0, 439, 2068, 1, 0, 0, 0, 441, 2075, 1, 0, 0, 0, 443, 2079, 1, 0, 0, 0, 445, 2084, 1, 0, 0, 0, 447, 2090, 1, 0, 0, 0, 449, 2099, 1, 0, 0, 0, 451, 2106, 1, 0, 0, 0, 453, 2114, 1, 0, 0, 0, 455, 2122, 1, 0, 0, 0, 457, 2127, 1, 0, 0, 0, 459, 2132, 1, 0, 0, 0, 461, 2138, 1, 0, 0, 0, 463, 2143, 1, 0, 0, 0, 465, 2148, 1, 0, 0, 0, 467, 2154, 1, 0, 0, 0, 469, 2159, 1, 0, 0, 0, 471, 2164, 1, 0, 0, 0, 473, 2170, 1, 0, 0, 0, 475, 2172, 1, 0, 0, 0, 477, 2174, 1, 0, 0, 0, 479, 2177, 1, 0, 0, 0, 481, 2179, 1, 0, 0, 0, 483, 2182, 1, 0, 0, 0, 485, 2184, 1, 0, 0, 0, 487, 2186, 1, 0, 0, 0, 489, 2188, 1, 0, 0, 0, 491, 2190, 1, 0, 0, 0, 493, 2192, 1, 0, 0, 0, 495, 2195, 1, 0, 0, 0, 497, 2206, 1, 0, 0, 0, 499, 2220, 1, 0, 0, 0, 501, 2232, 1, 0, 0, 0, 503, 2254, 1, 0, 0, 0, 505, 2280, 1, 0, 0, 0, 507, 2284, 1, 0, 0, 0, 509, 2294, 1, 0, 0, 0, 511, 2302, 1, 0, 0, 0, 513, 2313, 1, 0, 0, 0, 515, 2324, 1, 0, 0, 0, 517, 2347, 1, 0, 0, 0, 519, 2375, 1, 0, 0, 0, 521, 2393, 1, 0, 0, 0, 523, 2402, 1, 0, 0, 0, 525, 2404, 1, 0, 0, 0, 527, 2406, 1, 0, 0, 0, 529, 2423, 1, 0, 0, 0, 531, 2438, 1, 0, 0, 0, 533, 2444, 1, 0, 0, 0, 535, 536, 5, 46, 0, 0, 536, 2, 1, 0, 0, 0, 537, 538, 5, 40, 0, 0, 538, 4, 1, 0, 0, 0, 539, 540, 5, 41, 0, 0, 540, 6, 1, 0, 0, 0, 541, 542, 5, 44, 0, 0, 542, 8, 1, 0, 0, 0, 543, 544, 5, 63, 0, 0, 544, 10, 1, 0, 0, 0, 545, 546, 5, 45, 0, 0, 546, 547, 5, 62, 0, 0, 547, 12, 1, 0, 0, 0, 548, 549, 5, 91, 0, 0, 549, 14, 1, 0, 0, 0, 550, 551, 5, 93, 0, 0, 551, 16, 1, 0, 0, 0, 552, 553, 5, 61, 0, 0, 553, 554, 5, 62, 0, 0, 554, 18, 1, 0, 0, 0, 555, 556, 5, 65, 0, 0, 556, 557, 5, 68, 0, 0, 557, 558, 5, 68, 0, 0, 558, 20, 1, 0, 0, 0, 559, 560, 5, 65, 0, 0, 560, 561, 5, 68, 0, 0, 561, 562, 5, 77, 0, 0, 562, 563, 5, 73, 0, 0, 563, 564, 5, 78, 0, 0, 564, 22, 1, 0, 0, 0, 565, 566, 5, 65, 0, 0, 566, 567, 5, 76, 0, 0, 567, 568, 5, 76, 0, 0, 568, 24, 1, 0, 0, 0, 569, 570, 5, 65, 0, 0, 570, 571, 5, 76, 0, 0, 571, 572, 5, 84, 0, 0, 572, 573, 5, 69, 0, 0, 573, 574, 5, 82, 0, 0, 574, 26, 1, 0, 0, 0, 575, 576, 5, 65, 0, 0, 576, 577, 5, 78, 0, 0, 577, 578, 5, 65, 0, 0, 578, 579, 5, 76, 0, 0, 579, 580, 5, 89, 0, 0, 580, 581, 5, 90, 0, 0, 581, 582, 5, 69, 0, 0, 582, 28, 1, 0, 0, 0, 583, 584, 5, 65, 0, 0, 584, 585, 5, 78, 0, 0, 585, 586, 5, 68, 0, 0, 586, 30, 1, 0, 0, 0, 587, 588, 5, 65, 0, 0, 588, 589, 5, 78, 0, 0, 589, 590, 5, 89, 0, 0, 590, 32, 1, 0, 0, 0, 591, 592, 5, 65, 0, 0, 592, 593, 5, 82, 0, 0, 593, 594, 5, 82, 0, 0, 594, 595, 5, 65, 0, 0, 595, 596, 5, 89, 0, 0, 596, 34, 1, 0, 0, 0, 597, 598, 5, 65, 0, 0, 598, 599, 5, 83, 0, 0, 599, 36, 1, 0, 0, 0, 600, 601, 5, 65, 0, 0, 601, 602, 5, 83, 0, 0, 602, 603, 5, 67, 0, 0, 603, 38, 1, 0, 0, 0, 604, 605, 5, 65, 0, 0, 605, 606, 5, 84, 0, 0, 606, 40, 1, 0, 0, 0, 607, 608, 5, 66, 0, 0, 608, 609, 5, 69, 0, 0, 609, 610, 5, 70, 0, 0, 610, 611, 5, 79, 0, 0, 611, 612, 5, 82, 0, 0, 612, 613, 5, 69, 0, 0, 613, 42, 1, 0, 0, 0, 614, 615, 5, 66, 0, 0, 615, 616, 5, 69, 0, 0, 616, 617, 5, 82, 0, 0, 617, 618, 5, 78, 0, 0, 618, 619, 5, 79, 0, 0, 619, 620, 5, 85, 0, 0, 620, 621, 5, 76, 0, 0, 621, 622, 5, 76, 0, 0, 622, 623, 5, 73, 0, 0, 623, 44, 1, 0, 0, 0, 624, 625, 5, 66, 0, 0, 625, 626, 5, 69, 0, 0, 626, 627, 5, 84, 0, 0, 627, 628, 5, 87, 0, 0, 628, 629, 5, 69, 0, 0, 629, 630, 5, 69, 0, 0, 630, 631, 5, 78, 0, 0, 631, 46, 1, 0, 0, 0, 632, 633, 5, 66, 0, 0, 633, 634, 5, 89, 0, 0, 634, 48, 1, 0, 0, 0, 635, 636, 5, 67, 0, 0, 636, 637, 5, 65, 0, 0, 637, 638, 5, 76, 0, 0, 638, 639, 5, 76, 0, 0, 639, 50, 1, 0, 0, 0, 640, 641, 5, 67, 0, 0, 641, 642, 5, 65, 0, 0, 642, 643, 5, 76, 0, 0, 643, 644, 5, 76, 0, 0, 644, 645, 5, 69, 0, 0, 645, 646, 5, 68, 0, 0, 646, 52, 1, 0, 0, 0, 647, 648, 5, 67, 0, 0, 648, 649, 5, 65, 0, 0, 649, 650, 5, 83, 0, 0, 650, 651, 5, 67, 0, 0, 651, 652, 5, 65, 0, 0, 652, 653, 5, 68, 0, 0, 653, 654, 5, 69, 0, 0, 654, 54, 1, 0, 0, 0, 655, 656, 5, 67, 0, 0, 656, 657, 5, 65, 0, 0, 657, 658, 5, 83, 0, 0, 658, 659, 5, 69, 0, 0, 659, 56, 1, 0, 0, 0, 660, 661, 5, 67, 0, 0, 661, 662, 5, 65, 0, 0, 662, 663, 5, 83, 0, 0, 663, 664, 5, 84, 0, 0, 664, 58, 1, 0, 0, 0, 665, 666, 5, 67, 0, 0, 666, 667, 5, 65, 0, 0, 667, 668, 5, 84, 0, 0, 668, 669, 5, 65, 0, 0, 669, 670, 5, 76, 0, 0, 670, 671, 5, 79, 0, 0, 671, 672, 5, 71, 0, 0, 672, 673, 5, 83, 0, 0, 673, 60, 1, 0, 0, 0, 674, 675, 5, 67, 0, 0, 675, 676, 5, 79, 0, 0, 676, 677, 5, 76, 0, 0, 677, 678, 5, 85, 0, 0, 678, 679, 5, 77, 0, 0, 679, 680, 5, 78, 0, 0, 680, 62, 1, 0, 0, 0, 681, 682, 5, 67, 0, 0, 682, 683, 5, 79, 0, 0, 683, 684, 5, 76, 0, 0, 684, 685, 5, 85, 0, 0, 685, 686, 5, 77, 0, 0, 686, 687, 5, 78, 0, 0, 687, 688, 5, 83, 0, 0, 688, 64, 1, 0, 0, 0, 689, 690, 5, 67, 0, 0, 690, 691, 5, 79, 0, 0, 691, 692, 5, 77, 0, 0, 692, 693, 5, 77, 0, 0, 693, 694, 5, 69, 0, 0, 694, 695, 5, 78, 0, 0, 695, 696, 5, 84, 0, 0, 696, 66, 1, 0, 0, 0, 697, 698, 5, 67, 0, 0, 698, 699, 5, 79, 0, 0, 699, 700, 5, 77, 0, 0, 700, 701, 5, 77, 0, 0, 701, 702, 5, 73, 0, 0, 702, 703, 5, 84, 0, 0, 703, 68, 1, 0, 0, 0, 704, 705, 5, 67, 0, 0, 705, 706, 5, 79, 0, 0, 706, 707, 5, 77, 0, 0, 707, 708, 5, 77, 0, 0, 708, 709, 5, 73, 0, 0, 709, 710, 5, 84, 0, 0, 710, 711, 5, 84, 0, 0, 711, 712, 5, 69, 0, 0, 712, 713, 5, 68, 0, 0, 713, 70, 1, 0, 0, 0, 714, 715, 5, 67, 0, 0, 715, 716, 5, 79, 0, 0, 716, 717, 5, 78, 0, 0, 717, 718, 5, 83, 0, 0, 718, 719, 5, 84, 0, 0, 719, 720, 5, 82, 0, 0, 720, 721, 5, 65, 0, 0, 721, 722, 5, 73, 0, 0, 722, 723, 5, 78, 0, 0, 723, 724, 5, 84, 0, 0, 724, 72, 1, 0, 0, 0, 725, 726, 5, 67, 0, 0, 726, 727, 5, 82, 0, 0, 727, 728, 5, 69, 0, 0, 728, 729, 5, 65, 0, 0, 729, 730, 5, 84, 0, 0, 730, 731, 5, 69, 0, 0, 731, 74, 1, 0, 0, 0, 732, 733, 5, 67, 0, 0, 733, 734, 5, 79, 0, 0, 734, 735, 5, 80, 0, 0, 735, 736, 5, 65, 0, 0, 736, 737, 5, 82, 0, 0, 737, 738, 5, 84, 0, 0, 738, 739, 5, 73, 0, 0, 739, 740, 5, 84, 0, 0, 740, 741, 5, 73, 0, 0, 741, 742, 5, 79, 0, 0, 742, 743, 5, 78, 0, 0, 743, 76, 1, 0, 0, 0, 744, 745, 5, 67, 0, 0, 745, 746, 5, 82, 0, 0, 746, 747, 5, 79, 0, 0, 747, 748, 5, 83, 0, 0, 748, 749, 5, 83, 0, 0, 749, 78, 1, 0, 0, 0, 750, 751, 5, 67, 0, 0, 751, 752, 5, 85, 0, 0, 752, 753, 5, 66, 0, 0, 753, 754, 5, 69, 0, 0, 754, 80, 1, 0, 0, 0, 755, 756, 5, 67, 0, 0, 756, 757, 5, 85, 0, 0, 757, 758, 5, 82, 0, 0, 758, 759, 5, 82, 0, 0, 759, 760, 5, 69, 0, 0, 760, 761, 5, 78, 0, 0, 761, 762, 5, 84, 0, 0, 762, 82, 1, 0, 0, 0, 763, 764, 5, 67, 0, 0, 764, 765, 5, 85, 0, 0, 765, 766, 5, 82, 0, 0, 766, 767, 5, 82, 0, 0, 767, 768, 5, 69, 0, 0, 768, 769, 5, 78, 0, 0, 769, 770, 5, 84, 0, 0, 770, 771, 5, 95, 0, 0, 771, 772, 5, 68, 0, 0, 772, 773, 5, 65, 0, 0, 773, 774, 5, 84, 0, 0, 774, 775, 5, 69, 0, 0, 775, 84, 1, 0, 0, 0, 776, 777, 5, 67, 0, 0, 777, 778, 5, 85, 0, 0, 778, 779, 5, 82, 0, 0, 779, 780, 5, 82, 0, 0, 780, 781, 5, 69, 0, 0, 781, 782, 5, 78, 0, 0, 782, 783, 5, 84, 0, 0, 783, 784, 5, 95, 0, 0, 784, 785, 5, 82, 0, 0, 785, 786, 5, 79, 0, 0, 786, 787, 5, 76, 0, 0, 787, 788, 5, 69, 0, 0, 788, 86, 1, 0, 0, 0, 789, 790, 5, 67, 0, 0, 790, 791, 5, 85, 0, 0, 791, 792, 5, 82, 0, 0, 792, 793, 5, 82, 0, 0, 793, 794, 5, 69, 0, 0, 794, 795, 5, 78, 0, 0, 795, 796, 5, 84, 0, 0, 796, 797, 5, 95, 0, 0, 797, 798, 5, 84, 0, 0, 798, 799, 5, 73, 0, 0, 799, 800, 5, 77, 0, 0, 800, 801, 5, 69, 0, 0, 801, 88, 1, 0, 0, 0, 802, 803, 5, 67, 0, 0, 803, 804, 5, 85, 0, 0, 804, 805, 5, 82, 0, 0, 805, 806, 5, 82, 0, 0, 806, 807, 5, 69, 0, 0, 807, 808, 5, 78, 0, 0, 808, 809, 5, 84, 0, 0, 809, 810, 5, 95, 0, 0, 810, 811, 5, 84, 0, 0, 811, 812, 5, 73, 0, 0, 812, 813, 5, 77, 0, 0, 813, 814, 5, 69, 0, 0, 814, 815, 5, 83, 0, 0, 815, 816, 5, 84, 0, 0, 816, 817, 5, 65, 0, 0, 817, 818, 5, 77, 0, 0, 818, 819, 5, 80, 0, 0, 819, 90, 1, 0, 0, 0, 820, 821, 5, 67, 0, 0, 821, 822, 5, 85, 0, 0, 822, 823, 5, 82, 0, 0, 823, 824, 5, 82, 0, 0, 824, 825, 5, 69, 0, 0, 825, 826, 5, 78, 0, 0, 826, 827, 5, 84, 0, 0, 827, 828, 5, 95, 0, 0, 828, 829, 5, 85, 0, 0, 829, 830, 5, 83, 0, 0, 830, 831, 5, 69, 0, 0, 831, 832, 5, 82, 0, 0, 832, 92, 1, 0, 0, 0, 833, 834, 5, 68, 0, 0, 834, 835, 5, 65, 0, 0, 835, 836, 5, 84, 0, 0, 836, 837, 5, 65, 0, 0, 837, 94, 1, 0, 0, 0, 838, 839, 5, 68, 0, 0, 839, 840, 5, 65, 0, 0, 840, 841, 5, 84, 0, 0, 841, 842, 5, 69, 0, 0, 842, 96, 1, 0, 0, 0, 843, 844, 5, 68, 0, 0, 844, 845, 5, 65, 0, 0, 845, 846, 5, 89, 0, 0, 846, 98, 1, 0, 0, 0, 847, 848, 5, 68, 0, 0, 848, 849, 5, 69, 0, 0, 849, 850, 5, 65, 0, 0, 850, 851, 5, 76, 0, 0, 851, 852, 5, 76, 0, 0, 852, 853, 5, 79, 0, 0, 853, 854, 5, 67, 0, 0, 854, 855, 5, 65, 0, 0, 855, 856, 5, 84, 0, 0, 856, 857, 5, 69, 0, 0, 857, 100, 1, 0, 0, 0, 858, 859, 5, 68, 0, 0, 859, 860, 5, 69, 0, 0, 860, 861, 5, 70, 0, 0, 861, 862, 5, 73, 0, 0, 862, 863, 5, 78, 0, 0, 863, 864, 5, 69, 0, 0, 864, 865, 5, 82, 0, 0, 865, 102, 1, 0, 0, 0, 866, 867, 5, 68, 0, 0, 867, 868, 5, 69, 0, 0, 868, 869, 5, 76, 0, 0, 869, 870, 5, 69, 0, 0, 870, 871, 5, 84, 0, 0, 871, 872, 5, 69, 0, 0, 872, 104, 1, 0, 0, 0, 873, 874, 5, 68, 0, 0, 874, 875, 5, 69, 0, 0, 875, 876, 5, 83, 0, 0, 876, 877, 5, 67, 0, 0, 877, 106, 1, 0, 0, 0, 878, 879, 5, 68, 0, 0, 879, 880, 5, 69, 0, 0, 880, 881, 5, 83, 0, 0, 881, 882, 5, 67, 0, 0, 882, 883, 5, 82, 0, 0, 883, 884, 5, 73, 0, 0, 884, 885, 5, 66, 0, 0, 885, 886, 5, 69, 0, 0, 886, 108, 1, 0, 0, 0, 887, 888, 5, 68, 0, 0, 888, 889, 5, 69, 0, 0, 889, 890, 5, 83, 0, 0, 890, 891, 5, 67, 0, 0, 891, 892, 5, 82, 0, 0, 892, 893, 5, 73, 0, 0, 893, 894, 5, 80, 0, 0, 894, 895, 5, 84, 0, 0, 895, 896, 5, 79, 0, 0, 896, 897, 5, 82, 0, 0, 897, 110, 1, 0, 0, 0, 898, 899, 5, 68, 0, 0, 899, 900, 5, 69, 0, 0, 900, 901, 5, 84, 0, 0, 901, 902, 5, 69, 0, 0, 902, 903, 5, 82, 0, 0, 903, 904, 5, 77, 0, 0, 904, 905, 5, 73, 0, 0, 905, 906, 5, 78, 0, 0, 906, 907, 5, 73, 0, 0, 907, 908, 5, 83, 0, 0, 908, 909, 5, 84, 0, 0, 909, 910, 5, 73, 0, 0, 910, 911, 5, 67, 0, 0, 911, 112, 1, 0, 0, 0, 912, 913, 5, 68, 0, 0, 913, 914, 5, 73, 0, 0, 914, 915, 5, 83, 0, 0, 915, 916, 5, 65, 0, 0, 916, 917, 5, 66, 0, 0, 917, 918, 5, 76, 0, 0, 918, 919, 5, 69, 0, 0, 919, 920, 5, 68, 0, 0, 920, 114, 1, 0, 0, 0, 921, 922, 5, 68, 0, 0, 922, 923, 5, 73, 0, 0, 923, 924, 5, 83, 0, 0, 924, 925, 5, 84, 0, 0, 925, 926, 5, 73, 0, 0, 926, 927, 5, 78, 0, 0, 927, 928, 5, 67, 0, 0, 928, 929, 5, 84, 0, 0, 929, 116, 1, 0, 0, 0, 930, 931, 5, 68, 0, 0, 931, 932, 5, 73, 0, 0, 932, 933, 5, 83, 0, 0, 933, 934, 5, 84, 0, 0, 934, 935, 5, 82, 0, 0, 935, 936, 5, 73, 0, 0, 936, 937, 5, 66, 0, 0, 937, 938, 5, 85, 0, 0, 938, 939, 5, 84, 0, 0, 939, 940, 5, 69, 0, 0, 940, 941, 5, 68, 0, 0, 941, 118, 1, 0, 0, 0, 942, 943, 5, 68, 0, 0, 943, 944, 5, 82, 0, 0, 944, 945, 5, 79, 0, 0, 945, 946, 5, 80, 0, 0, 946, 120, 1, 0, 0, 0, 947, 948, 5, 69, 0, 0, 948, 949, 5, 76, 0, 0, 949, 950, 5, 83, 0, 0, 950, 951, 5, 69, 0, 0, 951, 122, 1, 0, 0, 0, 952, 953, 5, 69, 0, 0, 953, 954, 5, 77, 0, 0, 954, 955, 5, 80, 0, 0, 955, 956, 5, 84, 0, 0, 956, 957, 5, 89, 0, 0, 957, 124, 1, 0, 0, 0, 958, 959, 5, 69, 0, 0, 959, 960, 5, 78, 0, 0, 960, 961, 5, 65, 0, 0, 961, 962, 5, 66, 0, 0, 962, 963, 5, 76, 0, 0, 963, 964, 5, 69, 0, 0, 964, 965, 5, 68, 0, 0, 965, 126, 1, 0, 0, 0, 966, 967, 5, 69, 0, 0, 967, 968, 5, 78, 0, 0, 968, 969, 5, 68, 0, 0, 969, 128, 1, 0, 0, 0, 970, 971, 5, 69, 0, 0, 971, 972, 5, 78, 0, 0, 972, 973, 5, 70, 0, 0, 973, 974, 5, 79, 0, 0, 974, 975, 5, 82, 0, 0, 975, 976, 5, 67, 0, 0, 976, 977, 5, 69, 0, 0, 977, 978, 5, 68, 0, 0, 978, 130, 1, 0, 0, 0, 979, 980, 5, 69, 0, 0, 980, 981, 5, 83, 0, 0, 981, 982, 5, 67, 0, 0, 982, 983, 5, 65, 0, 0, 983, 984, 5, 80, 0, 0, 984, 985, 5, 69, 0, 0, 985, 132, 1, 0, 0, 0, 986, 987, 5, 69, 0, 0, 987, 988, 5, 88, 0, 0, 988, 989, 5, 67, 0, 0, 989, 990, 5, 69, 0, 0, 990, 991, 5, 80, 0, 0, 991, 992, 5, 84, 0, 0, 992, 134, 1, 0, 0, 0, 993, 994, 5, 69, 0, 0, 994, 995, 5, 88, 0, 0, 995, 996, 5, 67, 0, 0, 996, 997, 5, 76, 0, 0, 997, 998, 5, 85, 0, 0, 998, 999, 5, 68, 0, 0, 999, 1000, 5, 73, 0, 0, 1000, 1001, 5, 78, 0, 0, 1001, 1002, 5, 71, 0, 0, 1002, 136, 1, 0, 0, 0, 1003, 1004, 5, 69, 0, 0, 1004, 1005, 5, 88, 0, 0, 1005, 1006, 5, 69, 0, 0, 1006, 1007, 5, 67, 0, 0, 1007, 1008, 5, 85, 0, 0, 1008, 1009, 5, 84, 0, 0, 1009, 1010, 5, 69, 0, 0, 1010, 138, 1, 0, 0, 0, 1011, 1012, 5, 69, 0, 0, 1012, 1013, 5, 88, 0, 0, 1013, 1014, 5, 73, 0, 0, 1014, 1015, 5, 83, 0, 0, 1015, 1016, 5, 84, 0, 0, 1016, 1017, 5, 83, 0, 0, 1017, 140, 1, 0, 0, 0, 1018, 1019, 5, 69, 0, 0, 1019, 1020, 5, 88, 0, 0, 1020, 1021, 5, 80, 0, 0, 1021, 1022, 5, 76, 0, 0, 1022, 1023, 5, 65, 0, 0, 1023, 1024, 5, 73, 0, 0, 1024, 1025, 5, 78, 0, 0, 1025, 142, 1, 0, 0, 0, 1026, 1027, 5, 69, 0, 0, 1027, 1028, 5, 88, 0, 0, 1028, 1029, 5, 84, 0, 0, 1029, 1030, 5, 82, 0, 0, 1030, 1031, 5, 65, 0, 0, 1031, 1032, 5, 67, 0, 0, 1032, 1033, 5, 84, 0, 0, 1033, 144, 1, 0, 0, 0, 1034, 1035, 5, 69, 0, 0, 1035, 1036, 5, 88, 0, 0, 1036, 1037, 5, 84, 0, 0, 1037, 1038, 5, 69, 0, 0, 1038, 1039, 5, 82, 0, 0, 1039, 1040, 5, 78, 0, 0, 1040, 1041, 5, 65, 0, 0, 1041, 1042, 5, 76, 0, 0, 1042, 146, 1, 0, 0, 0, 1043, 1044, 5, 70, 0, 0, 1044, 1045, 5, 65, 0, 0, 1045, 1046, 5, 76, 0, 0, 1046, 1047, 5, 83, 0, 0, 1047, 1048, 5, 69, 0, 0, 1048, 148, 1, 0, 0, 0, 1049, 1050, 5, 70, 0, 0, 1050, 1051, 5, 69, 0, 0, 1051, 1052, 5, 84, 0, 0, 1052, 1053, 5, 67, 0, 0, 1053, 1054, 5, 72, 0, 0, 1054, 150, 1, 0, 0, 0, 1055, 1056, 5, 70, 0, 0, 1056, 1057, 5, 73, 0, 0, 1057, 1058, 5, 76, 0, 0, 1058, 1059, 5, 84, 0, 0, 1059, 1060, 5, 69, 0, 0, 1060, 1061, 5, 82, 0, 0, 1061, 152, 1, 0, 0, 0, 1062, 1063, 5, 70, 0, 0, 1063, 1064, 5, 73, 0, 0, 1064, 1065, 5, 82, 0, 0, 1065, 1066, 5, 83, 0, 0, 1066, 1067, 5, 84, 0, 0, 1067, 154, 1, 0, 0, 0, 1068, 1069, 5, 70, 0, 0, 1069, 1070, 5, 79, 0, 0, 1070, 1071, 5, 76, 0, 0, 1071, 1072, 5, 76, 0, 0, 1072, 1073, 5, 79, 0, 0, 1073, 1074, 5, 87, 0, 0, 1074, 1075, 5, 73, 0, 0, 1075, 1076, 5, 78, 0, 0, 1076, 1077, 5, 71, 0, 0, 1077, 156, 1, 0, 0, 0, 1078, 1079, 5, 70, 0, 0, 1079, 1080, 5, 79, 0, 0, 1080, 1081, 5, 82, 0, 0, 1081, 158, 1, 0, 0, 0, 1082, 1083, 5, 70, 0, 0, 1083, 1084, 5, 79, 0, 0, 1084, 1085, 5, 82, 0, 0, 1085, 1086, 5, 77, 0, 0, 1086, 1087, 5, 65, 0, 0, 1087, 1088, 5, 84, 0, 0, 1088, 160, 1, 0, 0, 0, 1089, 1090, 5, 70, 0, 0, 1090, 1091, 5, 82, 0, 0, 1091, 1092, 5, 79, 0, 0, 1092, 1093, 5, 77, 0, 0, 1093, 162, 1, 0, 0, 0, 1094, 1095, 5, 70, 0, 0, 1095, 1096, 5, 85, 0, 0, 1096, 1097, 5, 76, 0, 0, 1097, 1098, 5, 76, 0, 0, 1098, 164, 1, 0, 0, 0, 1099, 1100, 5, 70, 0, 0, 1100, 1101, 5, 85, 0, 0, 1101, 1102, 5, 78, 0, 0, 1102, 1103, 5, 67, 0, 0, 1103, 1104, 5, 84, 0, 0, 1104, 1105, 5, 73, 0, 0, 1105, 1106, 5, 79, 0, 0, 1106, 1107, 5, 78, 0, 0, 1107, 166, 1, 0, 0, 0, 1108, 1109, 5, 70, 0, 0, 1109, 1110, 5, 85, 0, 0, 1110, 1111, 5, 78, 0, 0, 1111, 1112, 5, 67, 0, 0, 1112, 1113, 5, 84, 0, 0, 1113, 1114, 5, 73, 0, 0, 1114, 1115, 5, 79, 0, 0, 1115, 1116, 5, 78, 0, 0, 1116, 1117, 5, 83, 0, 0, 1117, 168, 1, 0, 0, 0, 1118, 1119, 5, 71, 0, 0, 1119, 1120, 5, 82, 0, 0, 1120, 1121, 5, 65, 0, 0, 1121, 1122, 5, 78, 0, 0, 1122, 1123, 5, 84, 0, 0, 1123, 170, 1, 0, 0, 0, 1124, 1125, 5, 71, 0, 0, 1125, 1126, 5, 82, 0, 0, 1126, 1127, 5, 65, 0, 0, 1127, 1128, 5, 78, 0, 0, 1128, 1129, 5, 84, 0, 0, 1129, 1130, 5, 69, 0, 0, 1130, 1131, 5, 68, 0, 0, 1131, 172, 1, 0, 0, 0, 1132, 1133, 5, 71, 0, 0, 1133, 1134, 5, 82, 0, 0, 1134, 1135, 5, 65, 0, 0, 1135, 1136, 5, 78, 0, 0, 1136, 1137, 5, 84, 0, 0, 1137, 1138, 5, 83, 0, 0, 1138, 174, 1, 0, 0, 0, 1139, 1140, 5, 71, 0, 0, 1140, 1141, 5, 82, 0, 0, 1141, 1142, 5, 65, 0, 0, 1142, 1143, 5, 80, 0, 0, 1143, 1144, 5, 72, 0, 0, 1144, 1145, 5, 86, 0, 0, 1145, 1146, 5, 73, 0, 0, 1146, 1147, 5, 90, 0, 0, 1147, 176, 1, 0, 0, 0, 1148, 1149, 5, 71, 0, 0, 1149, 1150, 5, 82, 0, 0, 1150, 1151, 5, 79, 0, 0, 1151, 1152, 5, 85, 0, 0, 1152, 1153, 5, 80, 0, 0, 1153, 178, 1, 0, 0, 0, 1154, 1155, 5, 71, 0, 0, 1155, 1156, 5, 82, 0, 0, 1156, 1157, 5, 79, 0, 0, 1157, 1158, 5, 85, 0, 0, 1158, 1159, 5, 80, 0, 0, 1159, 1160, 5, 73, 0, 0, 1160, 1161, 5, 78, 0, 0, 1161, 1162, 5, 71, 0, 0, 1162, 180, 1, 0, 0, 0, 1163, 1164, 5, 71, 0, 0, 1164, 1165, 5, 82, 0, 0, 1165, 1166, 5, 79, 0, 0, 1166, 1167, 5, 85, 0, 0, 1167, 1168, 5, 80, 0, 0, 1168, 1169, 5, 83, 0, 0, 1169, 182, 1, 0, 0, 0, 1170, 1171, 5, 72, 0, 0, 1171, 1172, 5, 65, 0, 0, 1172, 1173, 5, 86, 0, 0, 1173, 1174, 5, 73, 0, 0, 1174, 1175, 5, 78, 0, 0, 1175, 1176, 5, 71, 0, 0, 1176, 184, 1, 0, 0, 0, 1177, 1178, 5, 72, 0, 0, 1178, 1179, 5, 79, 0, 0, 1179, 1180, 5, 85, 0, 0, 1180, 1181, 5, 82, 0, 0, 1181, 186, 1, 0, 0, 0, 1182, 1183, 5, 73, 0, 0, 1183, 1184, 5, 70, 0, 0, 1184, 188, 1, 0, 0, 0, 1185, 1186, 5, 73, 0, 0, 1186, 1187, 5, 71, 0, 0, 1187, 1188, 5, 78, 0, 0, 1188, 1189, 5, 79, 0, 0, 1189, 1190, 5, 82, 0, 0, 1190, 1191, 5, 69, 0, 0, 1191, 190, 1, 0, 0, 0, 1192, 1193, 5, 73, 0, 0, 1193, 1194, 5, 78, 0, 0, 1194, 192, 1, 0, 0, 0, 1195, 1196, 5, 73, 0, 0, 1196, 1197, 5, 78, 0, 0, 1197, 1198, 5, 67, 0, 0, 1198, 1199, 5, 76, 0, 0, 1199, 1200, 5, 85, 0, 0, 1200, 1201, 5, 68, 0, 0, 1201, 1202, 5, 73, 0, 0, 1202, 1203, 5, 78, 0, 0, 1203, 1204, 5, 71, 0, 0, 1204, 194, 1, 0, 0, 0, 1205, 1206, 5, 73, 0, 0, 1206, 1207, 5, 78, 0, 0, 1207, 1208, 5, 78, 0, 0, 1208, 1209, 5, 69, 0, 0, 1209, 1210, 5, 82, 0, 0, 1210, 196, 1, 0, 0, 0, 1211, 1212, 5, 73, 0, 0, 1212, 1213, 5, 78, 0, 0, 1213, 1214, 5, 80, 0, 0, 1214, 1215, 5, 85, 0, 0, 1215, 1216, 5, 84, 0, 0, 1216, 198, 1, 0, 0, 0, 1217, 1218, 5, 73, 0, 0, 1218, 1219, 5, 78, 0, 0, 1219, 1220, 5, 83, 0, 0, 1220, 1221, 5, 69, 0, 0, 1221, 1222, 5, 82, 0, 0, 1222, 1223, 5, 84, 0, 0, 1223, 200, 1, 0, 0, 0, 1224, 1225, 5, 73, 0, 0, 1225, 1226, 5, 78, 0, 0, 1226, 1227, 5, 84, 0, 0, 1227, 1228, 5, 69, 0, 0, 1228, 1229, 5, 82, 0, 0, 1229, 1230, 5, 83, 0, 0, 1230, 1231, 5, 69, 0, 0, 1231, 1232, 5, 67, 0, 0, 1232, 1233, 5, 84, 0, 0, 1233, 202, 1, 0, 0, 0, 1234, 1235, 5, 73, 0, 0, 1235, 1236, 5, 78, 0, 0, 1236, 1237, 5, 84, 0, 0, 1237, 1238, 5, 69, 0, 0, 1238, 1239, 5, 82, 0, 0, 1239, 1240, 5, 86, 0, 0, 1240, 1241, 5, 65, 0, 0, 1241, 1242, 5, 76, 0, 0, 1242, 204, 1, 0, 0, 0, 1243, 1244, 5, 73, 0, 0, 1244, 1245, 5, 78, 0, 0, 1245, 1246, 5, 84, 0, 0, 1246, 1247, 5, 79, 0, 0, 1247, 206, 1, 0, 0, 0, 1248, 1249, 5, 73, 0, 0, 1249, 1250, 5, 78, 0, 0, 1250, 1251, 5, 86, 0, 0, 1251, 1252, 5, 79, 0, 0, 1252, 1253, 5, 75, 0, 0, 1253, 1254, 5, 69, 0, 0, 1254, 1255, 5, 82, 0, 0, 1255, 208, 1, 0, 0, 0, 1256, 1257, 5, 73, 0, 0, 1257, 1258, 5, 79, 0, 0, 1258, 210, 1, 0, 0, 0, 1259, 1260, 5, 73, 0, 0, 1260, 1261, 5, 83, 0, 0, 1261, 212, 1, 0, 0, 0, 1262, 1263, 5, 73, 0, 0, 1263, 1264, 5, 83, 0, 0, 1264, 1265, 5, 79, 0, 0, 1265, 1266, 5, 76, 0, 0, 1266, 1267, 5, 65, 0, 0, 1267, 1268, 5, 84, 0, 0, 1268, 1269, 5, 73, 0, 0, 1269, 1270, 5, 79, 0, 0, 1270, 1271, 5, 78, 0, 0, 1271, 214, 1, 0, 0, 0, 1272, 1273, 5, 74, 0, 0, 1273, 1274, 5, 83, 0, 0, 1274, 1275, 5, 79, 0, 0, 1275, 1276, 5, 78, 0, 0, 1276, 216, 1, 0, 0, 0, 1277, 1278, 5, 74, 0, 0, 1278, 1279, 5, 79, 0, 0, 1279, 1280, 5, 73, 0, 0, 1280, 1281, 5, 78, 0, 0, 1281, 218, 1, 0, 0, 0, 1282, 1283, 5, 75, 0, 0, 1283, 1284, 5, 69, 0, 0, 1284, 1285, 5, 69, 0, 0, 1285, 1286, 5, 80, 0, 0, 1286, 220, 1, 0, 0, 0, 1287, 1288, 5, 75, 0, 0, 1288, 1289, 5, 69, 0, 0, 1289, 1290, 5, 89, 0, 0, 1290, 222, 1, 0, 0, 0, 1291, 1292, 5, 76, 0, 0, 1292, 1293, 5, 65, 0, 0, 1293, 1294, 5, 78, 0, 0, 1294, 1295, 5, 71, 0, 0, 1295, 1296, 5, 85, 0, 0, 1296, 1297, 5, 65, 0, 0, 1297, 1298, 5, 71, 0, 0, 1298, 1299, 5, 69, 0, 0, 1299, 224, 1, 0, 0, 0, 1300, 1301, 5, 76, 0, 0, 1301, 1302, 5, 65, 0, 0, 1302, 1303, 5, 83, 0, 0, 1303, 1304, 5, 84, 0, 0, 1304, 226, 1, 0, 0, 0, 1305, 1306, 5, 76, 0, 0, 1306, 1307, 5, 65, 0, 0, 1307, 1308, 5, 84, 0, 0, 1308, 1309, 5, 69, 0, 0, 1309, 1310, 5, 82, 0, 0, 1310, 1311, 5, 65, 0, 0, 1311, 1312, 5, 76, 0, 0, 1312, 228, 1, 0, 0, 0, 1313, 1314, 5, 76, 0, 0, 1314, 1315, 5, 69, 0, 0, 1315, 1316, 5, 70, 0, 0, 1316, 1317, 5, 84, 0, 0, 1317, 230, 1, 0, 0, 0, 1318, 1319, 5, 76, 0, 0, 1319, 1320, 5, 69, 0, 0, 1320, 1321, 5, 86, 0, 0, 1321, 1322, 5, 69, 0, 0, 1322, 1323, 5, 76, 0, 0, 1323, 232, 1, 0, 0, 0, 1324, 1325, 5, 76, 0, 0, 1325, 1326, 5, 73, 0, 0, 1326, 1327, 5, 75, 0, 0, 1327, 1328, 5, 69, 0, 0, 1328, 234, 1, 0, 0, 0, 1329, 1330, 5, 76, 0, 0, 1330, 1331, 5, 73, 0, 0, 1331, 1332, 5, 77, 0, 0, 1332, 1333, 5, 73, 0, 0, 1333, 1334, 5, 84, 0, 0, 1334, 236, 1, 0, 0, 0, 1335, 1336, 5, 76, 0, 0, 1336, 1337, 5, 79, 0, 0, 1337, 1338, 5, 67, 0, 0, 1338, 1339, 5, 65, 0, 0, 1339, 1340, 5, 76, 0, 0, 1340, 1341, 5, 84, 0, 0, 1341, 1342, 5, 73, 0, 0, 1342, 1343, 5, 77, 0, 0, 1343, 1344, 5, 69, 0, 0, 1344, 238, 1, 0, 0, 0, 1345, 1346, 5, 76, 0, 0, 1346, 1347, 5, 79, 0, 0, 1347, 1348, 5, 67, 0, 0, 1348, 1349, 5, 65, 0, 0, 1349, 1350, 5, 76, 0, 0, 1350, 1351, 5, 84, 0, 0, 1351, 1352, 5, 73, 0, 0, 1352, 1353, 5, 77, 0, 0, 1353, 1354, 5, 69, 0, 0, 1354, 1355, 5, 83, 0, 0, 1355, 1356, 5, 84, 0, 0, 1356, 1357, 5, 65, 0, 0, 1357, 1358, 5, 77, 0, 0, 1358, 1359, 5, 80, 0, 0, 1359, 240, 1, 0, 0, 0, 1360, 1361, 5, 76, 0, 0, 1361, 1362, 5, 79, 0, 0, 1362, 1363, 5, 71, 0, 0, 1363, 1364, 5, 73, 0, 0, 1364, 1365, 5, 67, 0, 0, 1365, 1366, 5, 65, 0, 0, 1366, 1367, 5, 76, 0, 0, 1367, 242, 1, 0, 0, 0, 1368, 1369, 5, 77, 0, 0, 1369, 1370, 5, 65, 0, 0, 1370, 1371, 5, 80, 0, 0, 1371, 244, 1, 0, 0, 0, 1372, 1373, 5, 77, 0, 0, 1373, 1374, 5, 65, 0, 0, 1374, 1375, 5, 84, 0, 0, 1375, 1376, 5, 67, 0, 0, 1376, 1377, 5, 72, 0, 0, 1377, 1378, 5, 69, 0, 0, 1378, 1379, 5, 68, 0, 0, 1379, 246, 1, 0, 0, 0, 1380, 1381, 5, 77, 0, 0, 1381, 1382, 5, 65, 0, 0, 1382, 1383, 5, 84, 0, 0, 1383, 1384, 5, 69, 0, 0, 1384, 1385, 5, 82, 0, 0, 1385, 1386, 5, 73, 0, 0, 1386, 1387, 5, 65, 0, 0, 1387, 1388, 5, 76, 0, 0, 1388, 1389, 5, 73, 0, 0, 1389, 1390, 5, 90, 0, 0, 1390, 1391, 5, 69, 0, 0, 1391, 1392, 5, 68, 0, 0, 1392, 248, 1, 0, 0, 0, 1393, 1394, 5, 77, 0, 0, 1394, 1395, 5, 69, 0, 0, 1395, 1396, 5, 82, 0, 0, 1396, 1397, 5, 71, 0, 0, 1397, 1398, 5, 69, 0, 0, 1398, 250, 1, 0, 0, 0, 1399, 1400, 5, 77, 0, 0, 1400, 1401, 5, 73, 0, 0, 1401, 1402, 5, 78, 0, 0, 1402, 1403, 5, 85, 0, 0, 1403, 1404, 5, 84, 0, 0, 1404, 1405, 5, 69, 0, 0, 1405, 252, 1, 0, 0, 0, 1406, 1407, 5, 77, 0, 0, 1407, 1408, 5, 79, 0, 0, 1408, 1409, 5, 78, 0, 0, 1409, 1410, 5, 84, 0, 0, 1410, 1411, 5, 72, 0, 0, 1411, 254, 1, 0, 0, 0, 1412, 1413, 5, 78, 0, 0, 1413, 1414, 5, 65, 0, 0, 1414, 1415, 5, 77, 0, 0, 1415, 1416, 5, 69, 0, 0, 1416, 256, 1, 0, 0, 0, 1417, 1418, 5, 78, 0, 0, 1418, 1419, 5, 65, 0, 0, 1419, 1420, 5, 84, 0, 0, 1420, 1421, 5, 85, 0, 0, 1421, 1422, 5, 82, 0, 0, 1422, 1423, 5, 65, 0, 0, 1423, 1424, 5, 76, 0, 0, 1424, 258, 1, 0, 0, 0, 1425, 1426, 5, 78, 0, 0, 1426, 1427, 5, 70, 0, 0, 1427, 1428, 5, 67, 0, 0, 1428, 260, 1, 0, 0, 0, 1429, 1430, 5, 78, 0, 0, 1430, 1431, 5, 70, 0, 0, 1431, 1432, 5, 68, 0, 0, 1432, 262, 1, 0, 0, 0, 1433, 1434, 5, 78, 0, 0, 1434, 1435, 5, 70, 0, 0, 1435, 1436, 5, 75, 0, 0, 1436, 1437, 5, 67, 0, 0, 1437, 264, 1, 0, 0, 0, 1438, 1439, 5, 78, 0, 0, 1439, 1440, 5, 70, 0, 0, 1440, 1441, 5, 75, 0, 0, 1441, 1442, 5, 68, 0, 0, 1442, 266, 1, 0, 0, 0, 1443, 1444, 5, 78, 0, 0, 1444, 1445, 5, 79, 0, 0, 1445, 268, 1, 0, 0, 0, 1446, 1447, 5, 78, 0, 0, 1447, 1448, 5, 79, 0, 0, 1448, 1449, 5, 78, 0, 0, 1449, 1450, 5, 69, 0, 0, 1450, 270, 1, 0, 0, 0, 1451, 1452, 5, 78, 0, 0, 1452, 1453, 5, 79, 0, 0, 1453, 1454, 5, 82, 0, 0, 1454, 1455, 5, 77, 0, 0, 1455, 1456, 5, 65, 0, 0, 1456, 1457, 5, 76, 0, 0, 1457, 1458, 5, 73, 0, 0, 1458, 1459, 5, 90, 0, 0, 1459, 1460, 5, 69, 0, 0, 1460, 272, 1, 0, 0, 0, 1461, 1462, 5, 78, 0, 0, 1462, 1463, 5, 79, 0, 0, 1463, 1464, 5, 84, 0, 0, 1464, 274, 1, 0, 0, 0, 1465, 1466, 5, 78, 0, 0, 1466, 1467, 5, 85, 0, 0, 1467, 1468, 5, 76, 0, 0, 1468, 1469, 5, 76, 0, 0, 1469, 276, 1, 0, 0, 0, 1470, 1471, 5, 78, 0, 0, 1471, 1472, 5, 85, 0, 0, 1472, 1473, 5, 76, 0, 0, 1473, 1474, 5, 76, 0, 0, 1474, 1475, 5, 73, 0, 0, 1475, 1476, 5, 70, 0, 0, 1476, 278, 1, 0, 0, 0, 1477, 1478, 5, 78, 0, 0, 1478, 1479, 5, 85, 0, 0, 1479, 1480, 5, 76, 0, 0, 1480, 1481, 5, 76, 0, 0, 1481, 1482, 5, 83, 0, 0, 1482, 280, 1, 0, 0, 0, 1483, 1484, 5, 79, 0, 0, 1484, 1485, 5, 70, 0, 0, 1485, 282, 1, 0, 0, 0, 1486, 1487, 5, 79, 0, 0, 1487, 1488, 5, 70, 0, 0, 1488, 1489, 5, 70, 0, 0, 1489, 1490, 5, 83, 0, 0, 1490, 1491, 5, 69, 0, 0, 1491, 1492, 5, 84, 0, 0, 1492, 284, 1, 0, 0, 0, 1493, 1494, 5, 79, 0, 0, 1494, 1495, 5, 78, 0, 0, 1495, 286, 1, 0, 0, 0, 1496, 1497, 5, 79, 0, 0, 1497, 1498, 5, 78, 0, 0, 1498, 1499, 5, 76, 0, 0, 1499, 1500, 5, 89, 0, 0, 1500, 288, 1, 0, 0, 0, 1501, 1502, 5, 79, 0, 0, 1502, 1503, 5, 80, 0, 0, 1503, 1504, 5, 84, 0, 0, 1504, 1505, 5, 73, 0, 0, 1505, 1506, 5, 79, 0, 0, 1506, 1507, 5, 78, 0, 0, 1507, 290, 1, 0, 0, 0, 1508, 1509, 5, 79, 0, 0, 1509, 1510, 5, 82, 0, 0, 1510, 292, 1, 0, 0, 0, 1511, 1512, 5, 79, 0, 0, 1512, 1513, 5, 82, 0, 0, 1513, 1514, 5, 68, 0, 0, 1514, 1515, 5, 69, 0, 0, 1515, 1516, 5, 82, 0, 0, 1516, 294, 1, 0, 0, 0, 1517, 1518, 5, 79, 0, 0, 1518, 1519, 5, 82, 0, 0, 1519, 1520, 5, 68, 0, 0, 1520, 1521, 5, 73, 0, 0, 1521, 1522, 5, 78, 0, 0, 1522, 1523, 5, 65, 0, 0, 1523, 1524, 5, 76, 0, 0, 1524, 1525, 5, 73, 0, 0, 1525, 1526, 5, 84, 0, 0, 1526, 1527, 5, 89, 0, 0, 1527, 296, 1, 0, 0, 0, 1528, 1529, 5, 79, 0, 0, 1529, 1530, 5, 85, 0, 0, 1530, 1531, 5, 84, 0, 0, 1531, 1532, 5, 69, 0, 0, 1532, 1533, 5, 82, 0, 0, 1533, 298, 1, 0, 0, 0, 1534, 1535, 5, 79, 0, 0, 1535, 1536, 5, 85, 0, 0, 1536, 1537, 5, 84, 0, 0, 1537, 1538, 5, 80, 0, 0, 1538, 1539, 5, 85, 0, 0, 1539, 1540, 5, 84, 0, 0, 1540, 300, 1, 0, 0, 0, 1541, 1542, 5, 79, 0, 0, 1542, 1543, 5, 86, 0, 0, 1543, 1544, 5, 69, 0, 0, 1544, 1545, 5, 82, 0, 0, 1545, 302, 1, 0, 0, 0, 1546, 1547, 5, 80, 0, 0, 1547, 1548, 5, 65, 0, 0, 1548, 1549, 5, 82, 0, 0, 1549, 1550, 5, 84, 0, 0, 1550, 1551, 5, 73, 0, 0, 1551, 1552, 5, 84, 0, 0, 1552, 1553, 5, 73, 0, 0, 1553, 1554, 5, 79, 0, 0, 1554, 1555, 5, 78, 0, 0, 1555, 304, 1, 0, 0, 0, 1556, 1557, 5, 80, 0, 0, 1557, 1558, 5, 65, 0, 0, 1558, 1559, 5, 82, 0, 0, 1559, 1560, 5, 84, 0, 0, 1560, 1561, 5, 73, 0, 0, 1561, 1562, 5, 84, 0, 0, 1562, 1563, 5, 73, 0, 0, 1563, 1564, 5, 79, 0, 0, 1564, 1565, 5, 78, 0, 0, 1565, 1566, 5, 83, 0, 0, 1566, 306, 1, 0, 0, 0, 1567, 1568, 5, 80, 0, 0, 1568, 1569, 5, 79, 0, 0, 1569, 1570, 5, 83, 0, 0, 1570, 1571, 5, 73, 0, 0, 1571, 1572, 5, 84, 0, 0, 1572, 1573, 5, 73, 0, 0, 1573, 1574, 5, 79, 0, 0, 1574, 1575, 5, 78, 0, 0, 1575, 308, 1, 0, 0, 0, 1576, 1577, 5, 80, 0, 0, 1577, 1578, 5, 82, 0, 0, 1578, 1579, 5, 69, 0, 0, 1579, 1580, 5, 67, 0, 0, 1580, 1581, 5, 69, 0, 0, 1581, 1582, 5, 68, 0, 0, 1582, 1583, 5, 73, 0, 0, 1583, 1584, 5, 78, 0, 0, 1584, 1585, 5, 71, 0, 0, 1585, 310, 1, 0, 0, 0, 1586, 1587, 5, 80, 0, 0, 1587, 1588, 5, 82, 0, 0, 1588, 1589, 5, 69, 0, 0, 1589, 1590, 5, 80, 0, 0, 1590, 1591, 5, 65, 0, 0, 1591, 1592, 5, 82, 0, 0, 1592, 1593, 5, 69, 0, 0, 1593, 312, 1, 0, 0, 0, 1594, 1595, 5, 80, 0, 0, 1595, 1596, 5, 82, 0, 0, 1596, 1597, 5, 73, 0, 0, 1597, 1598, 5, 77, 0, 0, 1598, 1599, 5, 65, 0, 0, 1599, 1600, 5, 82, 0, 0, 1600, 1601, 5, 89, 0, 0, 1601, 314, 1, 0, 0, 0, 1602, 1603, 5, 80, 0, 0, 1603, 1604, 5, 82, 0, 0, 1604, 1605, 5, 73, 0, 0, 1605, 1606, 5, 86, 0, 0, 1606, 1607, 5, 73, 0, 0, 1607, 1608, 5, 76, 0, 0, 1608, 1609, 5, 69, 0, 0, 1609, 1610, 5, 71, 0, 0, 1610, 1611, 5, 69, 0, 0, 1611, 1612, 5, 83, 0, 0, 1612, 316, 1, 0, 0, 0, 1613, 1614, 5, 80, 0, 0, 1614, 1615, 5, 82, 0, 0, 1615, 1616, 5, 79, 0, 0, 1616, 1617, 5, 80, 0, 0, 1617, 1618, 5, 69, 0, 0, 1618, 1619, 5, 82, 0, 0, 1619, 1620, 5, 84, 0, 0, 1620, 1621, 5, 73, 0, 0, 1621, 1622, 5, 69, 0, 0, 1622, 1623, 5, 83, 0, 0, 1623, 318, 1, 0, 0, 0, 1624, 1625, 5, 80, 0, 0, 1625, 1626, 5, 82, 0, 0, 1626, 1627, 5, 85, 0, 0, 1627, 1628, 5, 78, 0, 0, 1628, 1629, 5, 69, 0, 0, 1629, 320, 1, 0, 0, 0, 1630, 1631, 5, 82, 0, 0, 1631, 1632, 5, 65, 0, 0, 1632, 1633, 5, 78, 0, 0, 1633, 1634, 5, 71, 0, 0, 1634, 1635, 5, 69, 0, 0, 1635, 322, 1, 0, 0, 0, 1636, 1637, 5, 82, 0, 0, 1637, 1638, 5, 69, 0, 0, 1638, 1639, 5, 65, 0, 0, 1639, 1640, 5, 68, 0, 0, 1640, 324, 1, 0, 0, 0, 1641, 1642, 5, 82, 0, 0, 1642, 1643, 5, 69, 0, 0, 1643, 1644, 5, 67, 0, 0, 1644, 1645, 5, 85, 0, 0, 1645, 1646, 5, 82, 0, 0, 1646, 1647, 5, 83, 0, 0, 1647, 1648, 5, 73, 0, 0, 1648, 1649, 5, 86, 0, 0, 1649, 1650, 5, 69, 0, 0, 1650, 326, 1, 0, 0, 0, 1651, 1652, 5, 82, 0, 0, 1652, 1653, 5, 69, 0, 0, 1653, 1654, 5, 70, 0, 0, 1654, 1655, 5, 82, 0, 0, 1655, 1656, 5, 69, 0, 0, 1656, 1657, 5, 83, 0, 0, 1657, 1658, 5, 72, 0, 0, 1658, 328, 1, 0, 0, 0, 1659, 1660, 5, 82, 0, 0, 1660, 1661, 5, 69, 0, 0, 1661, 1662, 5, 76, 0, 0, 1662, 1663, 5, 89, 0, 0, 1663, 330, 1, 0, 0, 0, 1664, 1665, 5, 82, 0, 0, 1665, 1666, 5, 69, 0, 0, 1666, 1667, 5, 78, 0, 0, 1667, 1668, 5, 65, 0, 0, 1668, 1669, 5, 77, 0, 0, 1669, 1670, 5, 69, 0, 0, 1670, 332, 1, 0, 0, 0, 1671, 1672, 5, 82, 0, 0, 1672, 1673, 5, 69, 0, 0, 1673, 1674, 5, 80, 0, 0, 1674, 1675, 5, 69, 0, 0, 1675, 1676, 5, 65, 0, 0, 1676, 1677, 5, 84, 0, 0, 1677, 1678, 5, 65, 0, 0, 1678, 1679, 5, 66, 0, 0, 1679, 1680, 5, 76, 0, 0, 1680, 1681, 5, 69, 0, 0, 1681, 334, 1, 0, 0, 0, 1682, 1683, 5, 82, 0, 0, 1683, 1684, 5, 69, 0, 0, 1684, 1685, 5, 80, 0, 0, 1685, 1686, 5, 76, 0, 0, 1686, 1687, 5, 65, 0, 0, 1687, 1688, 5, 67, 0, 0, 1688, 1689, 5, 69, 0, 0, 1689, 336, 1, 0, 0, 0, 1690, 1691, 5, 82, 0, 0, 1691, 1692, 5, 69, 0, 0, 1692, 1693, 5, 83, 0, 0, 1693, 1694, 5, 69, 0, 0, 1694, 1695, 5, 84, 0, 0, 1695, 338, 1, 0, 0, 0, 1696, 1697, 5, 82, 0, 0, 1697, 1698, 5, 69, 0, 0, 1698, 1699, 5, 83, 0, 0, 1699, 1700, 5, 80, 0, 0, 1700, 1701, 5, 69, 0, 0, 1701, 1702, 5, 67, 0, 0, 1702, 1703, 5, 84, 0, 0, 1703, 340, 1, 0, 0, 0, 1704, 1705, 5, 82, 0, 0, 1705, 1706, 5, 69, 0, 0, 1706, 1707, 5, 83, 0, 0, 1707, 1708, 5, 84, 0, 0, 1708, 1709, 5, 82, 0, 0, 1709, 1710, 5, 73, 0, 0, 1710, 1711, 5, 67, 0, 0, 1711, 1712, 5, 84, 0, 0, 1712, 342, 1, 0, 0, 0, 1713, 1714, 5, 82, 0, 0, 1714, 1715, 5, 69, 0, 0, 1715, 1716, 5, 84, 0, 0, 1716, 1717, 5, 85, 0, 0, 1717, 1718, 5, 82, 0, 0, 1718, 1719, 5, 78, 0, 0, 1719, 344, 1, 0, 0, 0, 1720, 1721, 5, 82, 0, 0, 1721, 1722, 5, 69, 0, 0, 1722, 1723, 5, 84, 0, 0, 1723, 1724, 5, 85, 0, 0, 1724, 1725, 5, 82, 0, 0, 1725, 1726, 5, 78, 0, 0, 1726, 1727, 5, 83, 0, 0, 1727, 346, 1, 0, 0, 0, 1728, 1729, 5, 82, 0, 0, 1729, 1730, 5, 69, 0, 0, 1730, 1731, 5, 86, 0, 0, 1731, 1732, 5, 79, 0, 0, 1732, 1733, 5, 75, 0, 0, 1733, 1734, 5, 69, 0, 0, 1734, 348, 1, 0, 0, 0, 1735, 1736, 5, 82, 0, 0, 1736, 1737, 5, 73, 0, 0, 1737, 1738, 5, 71, 0, 0, 1738, 1739, 5, 72, 0, 0, 1739, 1740, 5, 84, 0, 0, 1740, 350, 1, 0, 0, 0, 1741, 1742, 5, 82, 0, 0, 1742, 1743, 5, 79, 0, 0, 1743, 1744, 5, 76, 0, 0, 1744, 1745, 5, 69, 0, 0, 1745, 352, 1, 0, 0, 0, 1746, 1747, 5, 82, 0, 0, 1747, 1748, 5, 79, 0, 0, 1748, 1749, 5, 76, 0, 0, 1749, 1750, 5, 69, 0, 0, 1750, 1751, 5, 83, 0, 0, 1751, 354, 1, 0, 0, 0, 1752, 1753, 5, 82, 0, 0, 1753, 1754, 5, 79, 0, 0, 1754, 1755, 5, 76, 0, 0, 1755, 1756, 5, 76, 0, 0, 1756, 1757, 5, 66, 0, 0, 1757, 1758, 5, 65, 0, 0, 1758, 1759, 5, 67, 0, 0, 1759, 1760, 5, 75, 0, 0, 1760, 356, 1, 0, 0, 0, 1761, 1762, 5, 82, 0, 0, 1762, 1763, 5, 79, 0, 0, 1763, 1764, 5, 76, 0, 0, 1764, 1765, 5, 76, 0, 0, 1765, 1766, 5, 85, 0, 0, 1766, 1767, 5, 80, 0, 0, 1767, 358, 1, 0, 0, 0, 1768, 1769, 5, 82, 0, 0, 1769, 1770, 5, 79, 0, 0, 1770, 1771, 5, 87, 0, 0, 1771, 360, 1, 0, 0, 0, 1772, 1773, 5, 82, 0, 0, 1773, 1774, 5, 79, 0, 0, 1774, 1775, 5, 87, 0, 0, 1775, 1776, 5, 83, 0, 0, 1776, 362, 1, 0, 0, 0, 1777, 1778, 5, 83, 0, 0, 1778, 1779, 5, 67, 0, 0, 1779, 1780, 5, 72, 0, 0, 1780, 1781, 5, 69, 0, 0, 1781, 1782, 5, 77, 0, 0, 1782, 1783, 5, 65, 0, 0, 1783, 364, 1, 0, 0, 0, 1784, 1785, 5, 83, 0, 0, 1785, 1786, 5, 67, 0, 0, 1786, 1787, 5, 72, 0, 0, 1787, 1788, 5, 69, 0, 0, 1788, 1789, 5, 77, 0, 0, 1789, 1790, 5, 65, 0, 0, 1790, 1791, 5, 83, 0, 0, 1791, 366, 1, 0, 0, 0, 1792, 1793, 5, 83, 0, 0, 1793, 1794, 5, 69, 0, 0, 1794, 1795, 5, 67, 0, 0, 1795, 1796, 5, 79, 0, 0, 1796, 1797, 5, 78, 0, 0, 1797, 1798, 5, 68, 0, 0, 1798, 368, 1, 0, 0, 0, 1799, 1800, 5, 83, 0, 0, 1800, 1801, 5, 69, 0, 0, 1801, 1802, 5, 67, 0, 0, 1802, 1803, 5, 85, 0, 0, 1803, 1804, 5, 82, 0, 0, 1804, 1805, 5, 73, 0, 0, 1805, 1806, 5, 84, 0, 0, 1806, 1807, 5, 89, 0, 0, 1807, 370, 1, 0, 0, 0, 1808, 1809, 5, 83, 0, 0, 1809, 1810, 5, 69, 0, 0, 1810, 1811, 5, 76, 0, 0, 1811, 1812, 5, 69, 0, 0, 1812, 1813, 5, 67, 0, 0, 1813, 1814, 5, 84, 0, 0, 1814, 372, 1, 0, 0, 0, 1815, 1816, 5, 83, 0, 0, 1816, 1817, 5, 69, 0, 0, 1817, 1818, 5, 82, 0, 0, 1818, 1819, 5, 73, 0, 0, 1819, 1820, 5, 65, 0, 0, 1820, 1821, 5, 76, 0, 0, 1821, 1822, 5, 73, 0, 0, 1822, 1823, 5, 90, 0, 0, 1823, 1824, 5, 65, 0, 0, 1824, 1825, 5, 66, 0, 0, 1825, 1826, 5, 76, 0, 0, 1826, 1827, 5, 69, 0, 0, 1827, 374, 1, 0, 0, 0, 1828, 1829, 5, 83, 0, 0, 1829, 1830, 5, 69, 0, 0, 1830, 1831, 5, 83, 0, 0, 1831, 1832, 5, 83, 0, 0, 1832, 1833, 5, 73, 0, 0, 1833, 1834, 5, 79, 0, 0, 1834, 1835, 5, 78, 0, 0, 1835, 376, 1, 0, 0, 0, 1836, 1837, 5, 83, 0, 0, 1837, 1838, 5, 69, 0, 0, 1838, 1839, 5, 84, 0, 0, 1839, 378, 1, 0, 0, 0, 1840, 1841, 5, 83, 0, 0, 1841, 1842, 5, 69, 0, 0, 1842, 1843, 5, 84, 0, 0, 1843, 1844, 5, 83, 0, 0, 1844, 380, 1, 0, 0, 0, 1845, 1846, 5, 83, 0, 0, 1846, 1847, 5, 72, 0, 0, 1847, 1848, 5, 79, 0, 0, 1848, 1849, 5, 87, 0, 0, 1849, 382, 1, 0, 0, 0, 1850, 1851, 5, 83, 0, 0, 1851, 1852, 5, 79, 0, 0, 1852, 1853, 5, 77, 0, 0, 1853, 1854, 5, 69, 0, 0, 1854, 384, 1, 0, 0, 0, 1855, 1856, 5, 83, 0, 0, 1856, 1857, 5, 81, 0, 0, 1857, 1858, 5, 76, 0, 0, 1858, 386, 1, 0, 0, 0, 1859, 1860, 5, 83, 0, 0, 1860, 1861, 5, 84, 0, 0, 1861, 1862, 5, 65, 0, 0, 1862, 1863, 5, 82, 0, 0, 1863, 1864, 5, 84, 0, 0, 1864, 388, 1, 0, 0, 0, 1865, 1866, 5, 83, 0, 0, 1866, 1867, 5, 84, 0, 0, 1867, 1868, 5, 65, 0, 0, 1868, 1869, 5, 84, 0, 0, 1869, 1870, 5, 83, 0, 0, 1870, 390, 1, 0, 0, 0, 1871, 1872, 5, 83, 0, 0, 1872, 1873, 5, 85, 0, 0, 1873, 1874, 5, 66, 0, 0, 1874, 1875, 5, 83, 0, 0, 1875, 1876, 5, 84, 0, 0, 1876, 1877, 5, 82, 0, 0, 1877, 1878, 5, 73, 0, 0, 1878, 1879, 5, 78, 0, 0, 1879, 1880, 5, 71, 0, 0, 1880, 392, 1, 0, 0, 0, 1881, 1882, 5, 83, 0, 0, 1882, 1883, 5, 89, 0, 0, 1883, 1884, 5, 83, 0, 0, 1884, 1885, 5, 84, 0, 0, 1885, 1886, 5, 69, 0, 0, 1886, 1887, 5, 77, 0, 0, 1887, 394, 1, 0, 0, 0, 1888, 1889, 5, 83, 0, 0, 1889, 1890, 5, 89, 0, 0, 1890, 1891, 5, 83, 0, 0, 1891, 1892, 5, 84, 0, 0, 1892, 1893, 5, 69, 0, 0, 1893, 1894, 5, 77, 0, 0, 1894, 1895, 5, 95, 0, 0, 1895, 1896, 5, 84, 0, 0, 1896, 1897, 5, 73, 0, 0, 1897, 1898, 5, 77, 0, 0, 1898, 1899, 5, 69, 0, 0, 1899, 396, 1, 0, 0, 0, 1900, 1901, 5, 83, 0, 0, 1901, 1902, 5, 89, 0, 0, 1902, 1903, 5, 83, 0, 0, 1903, 1904, 5, 84, 0, 0, 1904, 1905, 5, 69, 0, 0, 1905, 1906, 5, 77, 0, 0, 1906, 1907, 5, 95, 0, 0, 1907, 1908, 5, 86, 0, 0, 1908, 1909, 5, 69, 0, 0, 1909, 1910, 5, 82, 0, 0, 1910, 1911, 5, 83, 0, 0, 1911, 1912, 5, 73, 0, 0, 1912, 1913, 5, 79, 0, 0, 1913, 1914, 5, 78, 0, 0, 1914, 398, 1, 0, 0, 0, 1915, 1916, 5, 84, 0, 0, 1916, 1917, 5, 65, 0, 0, 1917, 1918, 5, 66, 0, 0, 1918, 1919, 5, 76, 0, 0, 1919, 1920, 5, 69, 0, 0, 1920, 400, 1, 0, 0, 0, 1921, 1922, 5, 84, 0, 0, 1922, 1923, 5, 65, 0, 0, 1923, 1924, 5, 66, 0, 0, 1924, 1925, 5, 76, 0, 0, 1925, 1926, 5, 69, 0, 0, 1926, 1927, 5, 83, 0, 0, 1927, 402, 1, 0, 0, 0, 1928, 1929, 5, 84, 0, 0, 1929, 1930, 5, 65, 0, 0, 1930, 1931, 5, 66, 0, 0, 1931, 1932, 5, 76, 0, 0, 1932, 1933, 5, 69, 0, 0, 1933, 1934, 5, 83, 0, 0, 1934, 1935, 5, 65, 0, 0, 1935, 1936, 5, 77, 0, 0, 1936, 1937, 5, 80, 0, 0, 1937, 1938, 5, 76, 0, 0, 1938, 1939, 5, 69, 0, 0, 1939, 404, 1, 0, 0, 0, 1940, 1941, 5, 84, 0, 0, 1941, 1942, 5, 69, 0, 0, 1942, 1943, 5, 77, 0, 0, 1943, 1944, 5, 80, 0, 0, 1944, 1945, 5, 79, 0, 0, 1945, 1946, 5, 82, 0, 0, 1946, 1947, 5, 65, 0, 0, 1947, 1948, 5, 82, 0, 0, 1948, 1949, 5, 89, 0, 0, 1949, 406, 1, 0, 0, 0, 1950, 1951, 5, 84, 0, 0, 1951, 1952, 5, 69, 0, 0, 1952, 1953, 5, 88, 0, 0, 1953, 1954, 5, 84, 0, 0, 1954, 408, 1, 0, 0, 0, 1955, 1956, 5, 84, 0, 0, 1956, 1957, 5, 72, 0, 0, 1957, 1958, 5, 69, 0, 0, 1958, 1959, 5, 78, 0, 0, 1959, 410, 1, 0, 0, 0, 1960, 1961, 5, 84, 0, 0, 1961, 1962, 5, 73, 0, 0, 1962, 1963, 5, 77, 0, 0, 1963, 1964, 5, 69, 0, 0, 1964, 412, 1, 0, 0, 0, 1965, 1966, 5, 84, 0, 0, 1966, 1967, 5, 73, 0, 0, 1967, 1968, 5, 77, 0, 0, 1968, 1969, 5, 69, 0, 0, 1969, 1970, 5, 83, 0, 0, 1970, 1971, 5, 84, 0, 0, 1971, 1972, 5, 65, 0, 0, 1972, 1973, 5, 77, 0, 0, 1973, 1974, 5, 80, 0, 0, 1974, 414, 1, 0, 0, 0, 1975, 1976, 5, 84, 0, 0, 1976, 1977, 5, 79, 0, 0, 1977, 416, 1, 0, 0, 0, 1978, 1979, 5, 84, 0, 0, 1979, 1980, 5, 82, 0, 0, 1980, 1981, 5, 65, 0, 0, 1981, 1982, 5, 78, 0, 0, 1982, 1983, 5, 83, 0, 0, 1983, 1984, 5, 65, 0, 0, 1984, 1985, 5, 67, 0, 0, 1985, 1986, 5, 84, 0, 0, 1986, 1987, 5, 73, 0, 0, 1987, 1988, 5, 79, 0, 0, 1988, 1989, 5, 78, 0, 0, 1989, 418, 1, 0, 0, 0, 1990, 1991, 5, 84, 0, 0, 1991, 1992, 5, 82, 0, 0, 1992, 1993, 5, 85, 0, 0, 1993, 1994, 5, 69, 0, 0, 1994, 420, 1, 0, 0, 0, 1995, 1996, 5, 84, 0, 0, 1996, 1997, 5, 82, 0, 0, 1997, 1998, 5, 85, 0, 0, 1998, 1999, 5, 78, 0, 0, 1999, 2000, 5, 67, 0, 0, 2000, 2001, 5, 65, 0, 0, 2001, 2002, 5, 84, 0, 0, 2002, 2003, 5, 69, 0, 0, 2003, 422, 1, 0, 0, 0, 2004, 2005, 5, 84, 0, 0, 2005, 2006, 5, 82, 0, 0, 2006, 2007, 5, 89, 0, 0, 2007, 2008, 5, 95, 0, 0, 2008, 2009, 5, 67, 0, 0, 2009, 2010, 5, 65, 0, 0, 2010, 2011, 5, 83, 0, 0, 2011, 2012, 5, 84, 0, 0, 2012, 424, 1, 0, 0, 0, 2013, 2014, 5, 84, 0, 0, 2014, 2015, 5, 89, 0, 0, 2015, 2016, 5, 80, 0, 0, 2016, 2017, 5, 69, 0, 0, 2017, 426, 1, 0, 0, 0, 2018, 2019, 5, 85, 0, 0, 2019, 2020, 5, 69, 0, 0, 2020, 2021, 5, 83, 0, 0, 2021, 2022, 5, 67, 0, 0, 2022, 2023, 5, 65, 0, 0, 2023, 2024, 5, 80, 0, 0, 2024, 2025, 5, 69, 0, 0, 2025, 428, 1, 0, 0, 0, 2026, 2027, 5, 85, 0, 0, 2027, 2028, 5, 78, 0, 0, 2028, 2029, 5, 66, 0, 0, 2029, 2030, 5, 79, 0, 0, 2030, 2031, 5, 85, 0, 0, 2031, 2032, 5, 78, 0, 0, 2032, 2033, 5, 68, 0, 0, 2033, 2034, 5, 69, 0, 0, 2034, 2035, 5, 68, 0, 0, 2035, 430, 1, 0, 0, 0, 2036, 2037, 5, 85, 0, 0, 2037, 2038, 5, 78, 0, 0, 2038, 2039, 5, 67, 0, 0, 2039, 2040, 5, 79, 0, 0, 2040, 2041, 5, 77, 0, 0, 2041, 2042, 5, 77, 0, 0, 2042, 2043, 5, 73, 0, 0, 2043, 2044, 5, 84, 0, 0, 2044, 2045, 5, 84, 0, 0, 2045, 2046, 5, 69, 0, 0, 2046, 2047, 5, 68, 0, 0, 2047, 432, 1, 0, 0, 0, 2048, 2049, 5, 85, 0, 0, 2049, 2050, 5, 78, 0, 0, 2050, 2051, 5, 73, 0, 0, 2051, 2052, 5, 79, 0, 0, 2052, 2053, 5, 78, 0, 0, 2053, 434, 1, 0, 0, 0, 2054, 2055, 5, 85, 0, 0, 2055, 2056, 5, 78, 0, 0, 2056, 2057, 5, 73, 0, 0, 2057, 2058, 5, 81, 0, 0, 2058, 2059, 5, 85, 0, 0, 2059, 2060, 5, 69, 0, 0, 2060, 436, 1, 0, 0, 0, 2061, 2062, 5, 85, 0, 0, 2062, 2063, 5, 78, 0, 0, 2063, 2064, 5, 78, 0, 0, 2064, 2065, 5, 69, 0, 0, 2065, 2066, 5, 83, 0, 0, 2066, 2067, 5, 84, 0, 0, 2067, 438, 1, 0, 0, 0, 2068, 2069, 5, 85, 0, 0, 2069, 2070, 5, 80, 0, 0, 2070, 2071, 5, 68, 0, 0, 2071, 2072, 5, 65, 0, 0, 2072, 2073, 5, 84, 0, 0, 2073, 2074, 5, 69, 0, 0, 2074, 440, 1, 0, 0, 0, 2075, 2076, 5, 85, 0, 0, 2076, 2077, 5, 83, 0, 0, 2077, 2078, 5, 69, 0, 0, 2078, 442, 1, 0, 0, 0, 2079, 2080, 5, 85, 0, 0, 2080, 2081, 5, 83, 0, 0, 2081, 2082, 5, 69, 0, 0, 2082, 2083, 5, 82, 0, 0, 2083, 444, 1, 0, 0, 0, 2084, 2085, 5, 85, 0, 0, 2085, 2086, 5, 83, 0, 0, 2086, 2087, 5, 73, 0, 0, 2087, 2088, 5, 78, 0, 0, 2088, 2089, 5, 71, 0, 0, 2089, 446, 1, 0, 0, 0, 2090, 2091, 5, 86, 0, 0, 2091, 2092, 5, 65, 0, 0, 2092, 2093, 5, 76, 0, 0, 2093, 2094, 5, 73, 0, 0, 2094, 2095, 5, 68, 0, 0, 2095, 2096, 5, 65, 0, 0, 2096, 2097, 5, 84, 0, 0, 2097, 2098, 5, 69, 0, 0, 2098, 448, 1, 0, 0, 0, 2099, 2100, 5, 86, 0, 0, 2100, 2101, 5, 65, 0, 0, 2101, 2102, 5, 76, 0, 0, 2102, 2103, 5, 85, 0, 0, 2103, 2104, 5, 69, 0, 0, 2104, 2105, 5, 83, 0, 0, 2105, 450, 1, 0, 0, 0, 2106, 2107, 5, 86, 0, 0, 2107, 2108, 5, 69, 0, 0, 2108, 2109, 5, 82, 0, 0, 2109, 2110, 5, 66, 0, 0, 2110, 2111, 5, 79, 0, 0, 2111, 2112, 5, 83, 0, 0, 2112, 2113, 5, 69, 0, 0, 2113, 452, 1, 0, 0, 0, 2114, 2115, 5, 86, 0, 0, 2115, 2116, 5, 69, 0, 0, 2116, 2117, 5, 82, 0, 0, 2117, 2118, 5, 83, 0, 0, 2118, 2119, 5, 73, 0, 0, 2119, 2120, 5, 79, 0, 0, 2120, 2121, 5, 78, 0, 0, 2121, 454, 1, 0, 0, 0, 2122, 2123, 5, 86, 0, 0, 2123, 2124, 5, 73, 0, 0, 2124, 2125, 5, 69, 0, 0, 2125, 2126, 5, 87, 0, 0, 2126, 456, 1, 0, 0, 0, 2127, 2128, 5, 87, 0, 0, 2128, 2129, 5, 72, 0, 0, 2129, 2130, 5, 69, 0, 0, 2130, 2131, 5, 78, 0, 0, 2131, 458, 1, 0, 0, 0, 2132, 2133, 5, 87, 0, 0, 2133, 2134, 5, 72, 0, 0, 2134, 2135, 5, 69, 0, 0, 2135, 2136, 5, 82, 0, 0, 2136, 2137, 5, 69, 0, 0, 2137, 460, 1, 0, 0, 0, 2138, 2139, 5, 87, 0, 0, 2139, 2140, 5, 73, 0, 0, 2140, 2141, 5, 84, 0, 0, 2141, 2142, 5, 72, 0, 0, 2142, 462, 1, 0, 0, 0, 2143, 2144, 5, 87, 0, 0, 2144, 2145, 5, 79, 0, 0, 2145, 2146, 5, 82, 0, 0, 2146, 2147, 5, 75, 0, 0, 2147, 464, 1, 0, 0, 0, 2148, 2149, 5, 87, 0, 0, 2149, 2150, 5, 82, 0, 0, 2150, 2151, 5, 73, 0, 0, 2151, 2152, 5, 84, 0, 0, 2152, 2153, 5, 69, 0, 0, 2153, 466, 1, 0, 0, 0, 2154, 2155, 5, 89, 0, 0, 2155, 2156, 5, 69, 0, 0, 2156, 2157, 5, 65, 0, 0, 2157, 2158, 5, 82, 0, 0, 2158, 468, 1, 0, 0, 0, 2159, 2160, 5, 90, 0, 0, 2160, 2161, 5, 79, 0, 0, 2161, 2162, 5, 78, 0, 0, 2162, 2163, 5, 69, 0, 0, 2163, 470, 1, 0, 0, 0, 2164, 2165, 5, 61, 0, 0, 2165, 472, 1, 0, 0, 0, 2166, 2167, 5, 60, 0, 0, 2167, 2171, 5, 62, 0, 0, 2168, 2169, 5, 33, 0, 0, 2169, 2171, 5, 61, 0, 0, 2170, 2166, 1, 0, 0, 0, 2170, 2168, 1, 0, 0, 0, 2171, 474, 1, 0, 0, 0, 2172, 2173, 5, 60, 0, 0, 2173, 476, 1, 0, 0, 0, 2174, 2175, 5, 60, 0, 0, 2175, 2176, 5, 61, 0, 0, 2176, 478, 1, 0, 0, 0, 2177, 2178, 5, 62, 0, 0, 2178, 480, 1, 0, 0, 0, 2179, 2180, 5, 62, 0, 0, 2180, 2181, 5, 61, 0, 0, 2181, 482, 1, 0, 0, 0, 2182, 2183, 5, 43, 0, 0, 2183, 484, 1, 0, 0, 0, 2184, 2185, 5, 45, 0, 0, 2185, 486, 1, 0, 0, 0, 2186, 2187, 5, 42, 0, 0, 2187, 488, 1, 0, 0, 0, 2188, 2189, 5, 47, 0, 0, 2189, 490, 1, 0, 0, 0, 2190, 2191, 5, 37, 0, 0, 2191, 492, 1, 0, 0, 0, 2192, 2193, 5, 124, 0, 0, 2193, 2194, 5, 124, 0, 0, 2194, 494, 1, 0, 0, 0, 2195, 2201, 5, 39, 0, 0, 2196, 2200, 8, 0, 0, 0, 2197, 2198, 5, 39, 0, 0, 2198, 2200, 5, 39, 0, 0, 2199, 2196, 1, 0, 0, 0, 2199, 2197, 1, 0, 0, 0, 2200, 2203, 1, 0, 0, 0, 2201, 2199, 1, 0, 0, 0, 2201, 2202, 1, 0, 0, 0, 2202, 2204, 1, 0, 0, 0, 2203, 2201, 1, 0, 0, 0, 2204, 2205, 5, 39, 0, 0, 2205, 496, 1, 0, 0, 0, 2206, 2207, 5, 85, 0, 0, 2207, 2208, 5, 38, 0, 0, 2208, 2209, 5, 39, 0, 0, 2209, 2215, 1, 0, 0, 0, 2210, 2214, 8, 0, 0, 0, 2211, 2212, 5, 39, 0, 0, 2212, 2214, 5, 39, 0, 0, 2213, 2210, 1, 0, 0, 0, 2213, 2211, 1, 0, 0, 0, 2214, 2217, 1, 0, 0, 0, 2215, 2213, 1, 0, 0, 0, 2215, 2216, 1, 0, 0, 0, 2216, 2218, 1, 0, 0, 0, 2217, 2215, 1, 0, 0, 0, 2218, 2219, 5, 39, 0, 0, 2219, 498, 1, 0, 0, 0, 2220, 2221, 5, 88, 0, 0, 2221, 2222, 5, 39, 0, 0, 2222, 2226, 1, 0, 0, 0, 2223, 2225, 8, 0, 0, 0, 2224, 2223, 1, 0, 0, 0, 2225, 2228, 1, 0, 0, 0, 2226, 2224, 1, 0, 0, 0, 2226, 2227, 1, 0, 0, 0, 2227, 2229, 1, 0, 0, 0, 2228, 2226, 1, 0, 0, 0, 2229, 2230, 5, 39, 0, 0, 2230, 500, 1, 0, 0, 0, 2231, 2233, 3, 523, 261, 0, 2232, 2231, 1, 0, 0, 0, 2233, 2234, 1, 0, 0, 0, 2234, 2232, 1, 0, 0, 0, 2234, 2235, 1, 0, 0, 0, 2235, 502, 1, 0, 0, 0, 2236, 2238, 3, 523, 261, 0, 2237, 2236, 1, 0, 0, 0, 2238, 2239, 1, 0, 0, 0, 2239, 2237, 1, 0, 0, 0, 2239, 2240, 1, 0, 0, 0, 2240, 2241, 1, 0, 0, 0, 2241, 2245, 5, 46, 0, 0, 2242, 2244, 3, 523, 261, 0, 2243, 2242, 1, 0, 0, 0, 2244, 2247, 1, 0, 0, 0, 2245, 2243, 1, 0, 0, 0, 2245, 2246, 1, 0, 0, 0, 2246, 2255, 1, 0, 0, 0, 2247, 2245, 1, 0, 0, 0, 2248, 2250, 5, 46, 0, 0, 2249, 2251, 3, 523, 261, 0, 2250, 2249, 1, 0, 0, 0, 2251, 2252, 1, 0, 0, 0, 2252, 2250, 1, 0, 0, 0, 2252, 2253, 1, 0, 0, 0, 2253, 2255, 1, 0, 0, 0, 2254, 2237, 1, 0, 0, 0, 2254, 2248, 1, 0, 0, 0, 2255, 504, 1, 0, 0, 0, 2256, 2258, 3, 523, 261, 0, 2257, 2256, 1, 0, 0, 0, 2258, 2259, 1, 0, 0, 0, 2259, 2257, 1, 0, 0, 0, 2259, 2260, 1, 0, 0, 0, 2260, 2268, 1, 0, 0, 0, 2261, 2265, 5, 46, 0, 0, 2262, 2264, 3, 523, 261, 0, 2263, 2262, 1, 0, 0, 0, 2264, 2267, 1, 0, 0, 0, 2265, 2263, 1, 0, 0, 0, 2265, 2266, 1, 0, 0, 0, 2266, 2269, 1, 0, 0, 0, 2267, 2265, 1, 0, 0, 0, 2268, 2261, 1, 0, 0, 0, 2268, 2269, 1, 0, 0, 0, 2269, 2270, 1, 0, 0, 0, 2270, 2271, 3, 521, 260, 0, 2271, 2281, 1, 0, 0, 0, 2272, 2274, 5, 46, 0, 0, 2273, 2275, 3, 523, 261, 0, 2274, 2273, 1, 0, 0, 0, 2275, 2276, 1, 0, 0, 0, 2276, 2274, 1, 0, 0, 0, 2276, 2277, 1, 0, 0, 0, 2277, 2278, 1, 0, 0, 0, 2278, 2279, 3, 521, 260, 0, 2279, 2281, 1, 0, 0, 0, 2280, 2257, 1, 0, 0, 0, 2280, 2272, 1, 0, 0, 0, 2281, 506, 1, 0, 0, 0, 2282, 2285, 3, 525, 262, 0, 2283, 2285, 5, 95, 0, 0, 2284, 2282, 1, 0, 0, 0, 2284, 2283, 1, 0, 0, 0, 2285, 2291, 1, 0, 0, 0, 2286, 2290, 3, 525, 262, 0, 2287, 2290, 3, 523, 261, 0, 2288, 2290, 7, 1, 0, 0, 2289, 2286, 1, 0, 0, 0, 2289, 2287, 1, 0, 0, 0, 2289, 2288, 1, 0, 0, 0, 2290, 2293, 1, 0, 0, 0, 2291, 2289, 1, 0, 0, 0, 2291, 2292, 1, 0, 0, 0, 2292, 508, 1, 0, 0, 0, 2293, 2291, 1, 0, 0, 0, 2294, 2298, 3, 523, 261, 0, 2295, 2299, 3, 525, 262, 0, 2296, 2299, 3, 523, 261, 0, 2297, 2299, 7, 1, 0, 0, 2298, 2295, 1, 0, 0, 0, 2298, 2296, 1, 0, 0, 0, 2298, 2297, 1, 0, 0, 0, 2299, 2300, 1, 0, 0, 0, 2300, 2298, 1, 0, 0, 0, 2300, 2301, 1, 0, 0, 0, 2301, 510, 1, 0, 0, 0, 2302, 2308, 5, 34, 0, 0, 2303, 2307, 8, 2, 0, 0, 2304, 2305, 5, 34, 0, 0, 2305, 2307, 5, 34, 0, 0, 2306, 2303, 1, 0, 0, 0, 2306, 2304, 1, 0, 0, 0, 2307, 2310, 1, 0, 0, 0, 2308, 2306, 1, 0, 0, 0, 2308, 2309, 1, 0, 0, 0, 2309, 2311, 1, 0, 0, 0, 2310, 2308, 1, 0, 0, 0, 2311, 2312, 5, 34, 0, 0, 2312, 512, 1, 0, 0, 0, 2313, 2319, 5, 96, 0, 0, 2314, 2318, 8, 3, 0, 0, 2315, 2316, 5, 96, 0, 0, 2316, 2318, 5, 96, 0, 0, 2317, 2314, 1, 0, 0, 0, 2317, 2315, 1, 0, 0, 0, 2318, 2321, 1, 0, 0, 0, 2319, 2317, 1, 0, 0, 0, 2319, 2320, 1, 0, 0, 0, 2320, 2322, 1, 0, 0, 0, 2321, 2319, 1, 0, 0, 0, 2322, 2323, 5, 96, 0, 0, 2323, 514, 1, 0, 0, 0, 2324, 2325, 5, 84, 0, 0, 2325, 2326, 5, 73, 0, 0, 2326, 2327, 5, 77, 0, 0, 2327, 2328, 5, 69, 0, 0, 2328, 2329, 1, 0, 0, 0, 2329, 2330, 3, 531, 265, 0, 2330, 2331, 5, 87, 0, 0, 2331, 2332, 5, 73, 0, 0, 2332, 2333, 5, 84, 0, 0, 2333, 2334, 5, 72, 0, 0, 2334, 2335, 1, 0, 0, 0, 2335, 2336, 3, 531, 265, 0, 2336, 2337, 5, 84, 0, 0, 2337, 2338, 5, 73, 0, 0, 2338, 2339, 5, 77, 0, 0, 2339, 2340, 5, 69, 0, 0, 2340, 2341, 1, 0, 0, 0, 2341, 2342, 3, 531, 265, 0, 2342, 2343, 5, 90, 0, 0, 2343, 2344, 5, 79, 0, 0, 2344, 2345, 5, 78, 0, 0, 2345, 2346, 5, 69, 0, 0, 2346, 516, 1, 0, 0, 0, 2347, 2348, 5, 84, 0, 0, 2348, 2349, 5, 73, 0, 0, 2349, 2350, 5, 77, 0, 0, 2350, 2351, 5, 69, 0, 0, 2351, 2352, 5, 83, 0, 0, 2352, 2353, 5, 84, 0, 0, 2353, 2354, 5, 65, 0, 0, 2354, 2355, 5, 77, 0, 0, 2355, 2356, 5, 80, 0, 0, 2356, 2357, 1, 0, 0, 0, 2357, 2358, 3, 531, 265, 0, 2358, 2359, 5, 87, 0, 0, 2359, 2360, 5, 73, 0, 0, 2360, 2361, 5, 84, 0, 0, 2361, 2362, 5, 72, 0, 0, 2362, 2363, 1, 0, 0, 0, 2363, 2364, 3, 531, 265, 0, 2364, 2365, 5, 84, 0, 0, 2365, 2366, 5, 73, 0, 0, 2366, 2367, 5, 77, 0, 0, 2367, 2368, 5, 69, 0, 0, 2368, 2369, 1, 0, 0, 0, 2369, 2370, 3, 531, 265, 0, 2370, 2371, 5, 90, 0, 0, 2371, 2372, 5, 79, 0, 0, 2372, 2373, 5, 78, 0, 0, 2373, 2374, 5, 69, 0, 0, 2374, 518, 1, 0, 0, 0, 2375, 2376, 5, 68, 0, 0, 2376, 2377, 5, 79, 0, 0, 2377, 2378, 5, 85, 0, 0, 2378, 2379, 5, 66, 0, 0, 2379, 2380, 5, 76, 0, 0, 2380, 2381, 5, 69, 0, 0, 2381, 2382, 1, 0, 0, 0, 2382, 2383, 3, 531, 265, 0, 2383, 2384, 5, 80, 0, 0, 2384, 2385, 5, 82, 0, 0, 2385, 2386, 5, 69, 0, 0, 2386, 2387, 5, 67, 0, 0, 2387, 2388, 5, 73, 0, 0, 2388, 2389, 5, 83, 0, 0, 2389, 2390, 5, 73, 0, 0, 2390, 2391, 5, 79, 0, 0, 2391, 2392, 5, 78, 0, 0, 2392, 520, 1, 0, 0, 0, 2393, 2395, 5, 69, 0, 0, 2394, 2396, 7, 4, 0, 0, 2395, 2394, 1, 0, 0, 0, 2395, 2396, 1, 0, 0, 0, 2396, 2398, 1, 0, 0, 0, 2397, 2399, 3, 523, 261, 0, 2398, 2397, 1, 0, 0, 0, 2399, 2400, 1, 0, 0, 0, 2400, 2398, 1, 0, 0, 0, 2400, 2401, 1, 0, 0, 0, 2401, 522, 1, 0, 0, 0, 2402, 2403, 7, 5, 0, 0, 2403, 524, 1, 0, 0, 0, 2404, 2405, 7, 6, 0, 0, 2405, 526, 1, 0, 0, 0, 2406, 2407, 5, 45, 0, 0, 2407, 2408, 5, 45, 0, 0, 2408, 2412, 1, 0, 0, 0, 2409, 2411, 8, 7, 0, 0, 2410, 2409, 1, 0, 0, 0, 2411, 2414, 1, 0, 0, 0, 2412, 2410, 1, 0, 0, 0, 2412, 2413, 1, 0, 0, 0, 2413, 2416, 1, 0, 0, 0, 2414, 2412, 1, 0, 0, 0, 2415, 2417, 5, 13, 0, 0, 2416, 2415, 1, 0, 0, 0, 2416, 2417, 1, 0, 0, 0, 2417, 2419, 1, 0, 0, 0, 2418, 2420, 5, 10, 0, 0, 2419, 2418, 1, 0, 0, 0, 2419, 2420, 1, 0, 0, 0, 2420, 2421, 1, 0, 0, 0, 2421, 2422, 6, 263, 0, 0, 2422, 528, 1, 0, 0, 0, 2423, 2424, 5, 47, 0, 0, 2424, 2425, 5, 42, 0, 0, 2425, 2429, 1, 0, 0, 0, 2426, 2428, 9, 0, 0, 0, 2427, 2426, 1, 0, 0, 0, 2428, 2431, 1, 0, 0, 0, 2429, 2430, 1, 0, 0, 0, 2429, 2427, 1, 0, 0, 0, 2430, 2432, 1, 0, 0, 0, 2431, 2429, 1, 0, 0, 0, 2432, 2433, 5, 42, 0, 0, 2433, 2434, 5, 47, 0, 0, 2434, 2435, 1, 0, 0, 0, 2435, 2436, 6, 264, 0, 0, 2436, 530, 1, 0, 0, 0, 2437, 2439, 7, 8, 0, 0, 2438, 2437, 1, 0, 0, 0, 2439, 2440, 1, 0, 0, 0, 2440, 2438, 1, 0, 0, 0, 2440, 2441, 1, 0, 0, 0, 2441, 2442, 1, 0, 0, 0, 2442, 2443, 6, 265, 0, 0, 2443, 532, 1, 0, 0, 0, 2444, 2445, 9, 0, 0, 0, 2445, 534, 1, 0, 0, 0, 33, 0, 2170, 2199, 2201, 2213, 2215, 2226, 2234, 2239, 2245, 2252, 2254, 2259, 2265, 2268, 2276, 2280, 2284, 2289, 2291, 2298, 2300, 2306, 2308, 2317, 2319, 2395, 2400, 2412, 2416, 2419, 2429, 2440, 1, 0, 1, 0] \ No newline at end of file diff --git a/presto-ui/src/sql-parser/SqlBaseLexer.js b/presto-ui/src/sql-parser/SqlBaseLexer.js index 7fa3bd7ab02e2..3aa34d9e8fe73 100644 --- a/presto-ui/src/sql-parser/SqlBaseLexer.js +++ b/presto-ui/src/sql-parser/SqlBaseLexer.js @@ -1,9 +1,9 @@ -// Generated from presto/presto-parser/src/main/antlr4/com/facebook/presto/sql/parser/SqlBase.g4 by ANTLR 4.13.1 +// Generated from presto/presto-parser/src/main/antlr4/com/facebook/presto/sql/parser/SqlBase.g4 by ANTLR 4.13.2 // jshint ignore: start import antlr4 from 'antlr4'; -const serializedATN = [4,0,249,2305,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3, +const serializedATN = [4,0,264,2446,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3, 2,4,7,4,2,5,7,5,2,6,7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12, 7,12,2,13,7,13,2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7, 19,2,20,7,20,2,21,7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26, @@ -42,734 +42,782 @@ const serializedATN = [4,0,249,2305,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3, 231,2,232,7,232,2,233,7,233,2,234,7,234,2,235,7,235,2,236,7,236,2,237,7, 237,2,238,7,238,2,239,7,239,2,240,7,240,2,241,7,241,2,242,7,242,2,243,7, 243,2,244,7,244,2,245,7,245,2,246,7,246,2,247,7,247,2,248,7,248,2,249,7, -249,2,250,7,250,2,251,7,251,1,0,1,0,1,1,1,1,1,2,1,2,1,3,1,3,1,4,1,4,1,5, -1,5,1,5,1,6,1,6,1,7,1,7,1,8,1,8,1,8,1,9,1,9,1,9,1,9,1,10,1,10,1,10,1,10, -1,10,1,10,1,11,1,11,1,11,1,11,1,12,1,12,1,12,1,12,1,12,1,12,1,13,1,13,1, -13,1,13,1,13,1,13,1,13,1,13,1,14,1,14,1,14,1,14,1,15,1,15,1,15,1,15,1,16, -1,16,1,16,1,16,1,16,1,16,1,17,1,17,1,17,1,18,1,18,1,18,1,18,1,19,1,19,1, -19,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,21,1,21,1,21,1,21, -1,21,1,21,1,21,1,21,1,22,1,22,1,22,1,23,1,23,1,23,1,23,1,23,1,24,1,24,1, -24,1,24,1,24,1,24,1,24,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,26,1,26, -1,26,1,26,1,26,1,27,1,27,1,27,1,27,1,27,1,28,1,28,1,28,1,28,1,28,1,28,1, -28,1,28,1,28,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,30,1,30,1,30,1,30,1,30, -1,30,1,30,1,30,1,31,1,31,1,31,1,31,1,31,1,31,1,31,1,31,1,32,1,32,1,32,1, -32,1,32,1,32,1,32,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,34, -1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,35,1,35,1,35,1,35,1, -35,1,35,1,35,1,36,1,36,1,36,1,36,1,36,1,36,1,37,1,37,1,37,1,37,1,37,1,38, -1,38,1,38,1,38,1,38,1,38,1,38,1,38,1,39,1,39,1,39,1,39,1,39,1,39,1,39,1, -39,1,39,1,39,1,39,1,39,1,39,1,40,1,40,1,40,1,40,1,40,1,40,1,40,1,40,1,40, +249,2,250,7,250,2,251,7,251,2,252,7,252,2,253,7,253,2,254,7,254,2,255,7, +255,2,256,7,256,2,257,7,257,2,258,7,258,2,259,7,259,2,260,7,260,2,261,7, +261,2,262,7,262,2,263,7,263,2,264,7,264,2,265,7,265,2,266,7,266,1,0,1,0, +1,1,1,1,1,2,1,2,1,3,1,3,1,4,1,4,1,5,1,5,1,5,1,6,1,6,1,7,1,7,1,8,1,8,1,8, +1,9,1,9,1,9,1,9,1,10,1,10,1,10,1,10,1,10,1,10,1,11,1,11,1,11,1,11,1,12,1, +12,1,12,1,12,1,12,1,12,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,14,1,14, +1,14,1,14,1,15,1,15,1,15,1,15,1,16,1,16,1,16,1,16,1,16,1,16,1,17,1,17,1, +17,1,18,1,18,1,18,1,18,1,19,1,19,1,19,1,20,1,20,1,20,1,20,1,20,1,20,1,20, +1,21,1,21,1,21,1,21,1,21,1,21,1,21,1,21,1,21,1,21,1,22,1,22,1,22,1,22,1, +22,1,22,1,22,1,22,1,23,1,23,1,23,1,24,1,24,1,24,1,24,1,24,1,25,1,25,1,25, +1,25,1,25,1,25,1,25,1,26,1,26,1,26,1,26,1,26,1,26,1,26,1,26,1,27,1,27,1, +27,1,27,1,27,1,28,1,28,1,28,1,28,1,28,1,29,1,29,1,29,1,29,1,29,1,29,1,29, +1,29,1,29,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,31,1,31,1,31,1,31,1,31,1, +31,1,31,1,31,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,33,1,33,1,33,1,33, +1,33,1,33,1,33,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,35,1, +35,1,35,1,35,1,35,1,35,1,35,1,35,1,35,1,35,1,35,1,36,1,36,1,36,1,36,1,36, +1,36,1,36,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1,37,1, +38,1,38,1,38,1,38,1,38,1,38,1,39,1,39,1,39,1,39,1,39,1,40,1,40,1,40,1,40, 1,40,1,40,1,40,1,40,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1, 41,1,41,1,41,1,42,1,42,1,42,1,42,1,42,1,42,1,42,1,42,1,42,1,42,1,42,1,42, -1,42,1,42,1,42,1,42,1,42,1,42,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1, -43,1,43,1,43,1,43,1,43,1,44,1,44,1,44,1,44,1,44,1,45,1,45,1,45,1,45,1,45, -1,46,1,46,1,46,1,46,1,47,1,47,1,47,1,47,1,47,1,47,1,47,1,47,1,47,1,47,1, -47,1,48,1,48,1,48,1,48,1,48,1,48,1,48,1,48,1,49,1,49,1,49,1,49,1,49,1,49, -1,49,1,50,1,50,1,50,1,50,1,50,1,51,1,51,1,51,1,51,1,51,1,51,1,51,1,51,1, -51,1,52,1,52,1,52,1,52,1,52,1,52,1,52,1,52,1,52,1,52,1,52,1,52,1,52,1,52, -1,53,1,53,1,53,1,53,1,53,1,53,1,53,1,53,1,53,1,54,1,54,1,54,1,54,1,54,1, -54,1,54,1,54,1,54,1,54,1,54,1,54,1,55,1,55,1,55,1,55,1,55,1,56,1,56,1,56, -1,56,1,56,1,57,1,57,1,57,1,57,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,59,1, -59,1,59,1,59,1,59,1,59,1,59,1,60,1,60,1,60,1,60,1,60,1,60,1,60,1,60,1,60, -1,60,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,62,1,62,1,62,1,62,1,62,1, -62,1,62,1,63,1,63,1,63,1,63,1,63,1,63,1,63,1,63,1,64,1,64,1,64,1,64,1,64, -1,64,1,64,1,64,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,66,1,66,1, -66,1,66,1,66,1,66,1,67,1,67,1,67,1,67,1,67,1,67,1,68,1,68,1,68,1,68,1,68, -1,68,1,68,1,69,1,69,1,69,1,69,1,69,1,69,1,70,1,70,1,70,1,70,1,70,1,70,1, -70,1,70,1,70,1,70,1,71,1,71,1,71,1,71,1,72,1,72,1,72,1,72,1,72,1,72,1,72, -1,73,1,73,1,73,1,73,1,73,1,74,1,74,1,74,1,74,1,74,1,75,1,75,1,75,1,75,1, -75,1,75,1,75,1,75,1,75,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76, -1,77,1,77,1,77,1,77,1,77,1,77,1,78,1,78,1,78,1,78,1,78,1,78,1,78,1,78,1, -79,1,79,1,79,1,79,1,79,1,79,1,79,1,80,1,80,1,80,1,80,1,80,1,80,1,80,1,80, -1,80,1,81,1,81,1,81,1,81,1,81,1,81,1,82,1,82,1,82,1,82,1,82,1,82,1,82,1, -82,1,82,1,83,1,83,1,83,1,83,1,83,1,83,1,83,1,84,1,84,1,84,1,84,1,84,1,84, -1,84,1,85,1,85,1,85,1,85,1,85,1,86,1,86,1,86,1,87,1,87,1,87,1,87,1,87,1, -87,1,87,1,88,1,88,1,88,1,89,1,89,1,89,1,89,1,89,1,89,1,89,1,89,1,89,1,89, -1,90,1,90,1,90,1,90,1,90,1,90,1,91,1,91,1,91,1,91,1,91,1,91,1,92,1,92,1, -92,1,92,1,92,1,92,1,92,1,93,1,93,1,93,1,93,1,93,1,93,1,93,1,93,1,93,1,93, -1,94,1,94,1,94,1,94,1,94,1,94,1,94,1,94,1,94,1,95,1,95,1,95,1,95,1,95,1, -96,1,96,1,96,1,96,1,96,1,96,1,96,1,96,1,97,1,97,1,97,1,98,1,98,1,98,1,99, -1,99,1,99,1,99,1,99,1,99,1,99,1,99,1,99,1,99,1,100,1,100,1,100,1,100,1,100, -1,101,1,101,1,101,1,101,1,101,1,102,1,102,1,102,1,102,1,102,1,102,1,102, -1,102,1,102,1,103,1,103,1,103,1,103,1,103,1,104,1,104,1,104,1,104,1,104, -1,104,1,104,1,104,1,105,1,105,1,105,1,105,1,105,1,106,1,106,1,106,1,106, -1,106,1,106,1,107,1,107,1,107,1,107,1,107,1,108,1,108,1,108,1,108,1,108, -1,108,1,109,1,109,1,109,1,109,1,109,1,109,1,109,1,109,1,109,1,109,1,110, -1,110,1,110,1,110,1,110,1,110,1,110,1,110,1,110,1,110,1,110,1,110,1,110, -1,110,1,110,1,111,1,111,1,111,1,111,1,111,1,111,1,111,1,111,1,112,1,112, -1,112,1,112,1,113,1,113,1,113,1,113,1,113,1,113,1,113,1,113,1,113,1,113, -1,113,1,113,1,113,1,114,1,114,1,114,1,114,1,114,1,114,1,114,1,115,1,115, -1,115,1,115,1,115,1,115,1,116,1,116,1,116,1,116,1,116,1,117,1,117,1,117, -1,117,1,117,1,117,1,117,1,117,1,118,1,118,1,118,1,118,1,119,1,119,1,119, -1,119,1,120,1,120,1,120,1,120,1,120,1,121,1,121,1,121,1,121,1,121,1,122, -1,122,1,122,1,123,1,123,1,123,1,123,1,123,1,124,1,124,1,124,1,124,1,124, -1,124,1,124,1,124,1,124,1,124,1,125,1,125,1,125,1,125,1,126,1,126,1,126, -1,126,1,126,1,127,1,127,1,127,1,127,1,127,1,127,1,127,1,128,1,128,1,128, -1,128,1,128,1,128,1,129,1,129,1,129,1,130,1,130,1,130,1,130,1,130,1,130, -1,130,1,131,1,131,1,131,1,132,1,132,1,132,1,132,1,132,1,133,1,133,1,133, -1,133,1,133,1,133,1,133,1,134,1,134,1,134,1,135,1,135,1,135,1,135,1,135, -1,135,1,136,1,136,1,136,1,136,1,136,1,136,1,136,1,136,1,136,1,136,1,136, -1,137,1,137,1,137,1,137,1,137,1,137,1,138,1,138,1,138,1,138,1,138,1,138, -1,138,1,139,1,139,1,139,1,139,1,139,1,140,1,140,1,140,1,140,1,140,1,140, -1,140,1,140,1,140,1,140,1,141,1,141,1,141,1,141,1,141,1,141,1,141,1,141, -1,141,1,141,1,141,1,142,1,142,1,142,1,142,1,142,1,142,1,142,1,142,1,142, -1,143,1,143,1,143,1,143,1,143,1,143,1,143,1,143,1,143,1,143,1,144,1,144, -1,144,1,144,1,144,1,144,1,144,1,144,1,145,1,145,1,145,1,145,1,145,1,145, -1,145,1,145,1,145,1,145,1,145,1,146,1,146,1,146,1,146,1,146,1,146,1,146, -1,146,1,146,1,146,1,146,1,147,1,147,1,147,1,147,1,147,1,147,1,148,1,148, -1,148,1,148,1,148,1,149,1,149,1,149,1,149,1,149,1,149,1,149,1,149,1,149, -1,149,1,150,1,150,1,150,1,150,1,150,1,150,1,150,1,150,1,151,1,151,1,151, -1,151,1,151,1,151,1,151,1,152,1,152,1,152,1,152,1,152,1,152,1,152,1,152, -1,152,1,152,1,152,1,153,1,153,1,153,1,153,1,153,1,153,1,153,1,153,1,154, -1,154,1,154,1,154,1,154,1,154,1,155,1,155,1,155,1,155,1,155,1,155,1,155, -1,155,1,156,1,156,1,156,1,156,1,156,1,156,1,156,1,156,1,156,1,157,1,157, -1,157,1,157,1,157,1,157,1,157,1,158,1,158,1,158,1,158,1,158,1,158,1,158, -1,158,1,159,1,159,1,159,1,159,1,159,1,159,1,159,1,160,1,160,1,160,1,160, -1,160,1,160,1,161,1,161,1,161,1,161,1,161,1,162,1,162,1,162,1,162,1,162, -1,162,1,163,1,163,1,163,1,163,1,163,1,163,1,163,1,163,1,163,1,164,1,164, -1,164,1,164,1,164,1,164,1,164,1,165,1,165,1,165,1,165,1,166,1,166,1,166, -1,166,1,166,1,167,1,167,1,167,1,167,1,167,1,167,1,167,1,168,1,168,1,168, -1,168,1,168,1,168,1,168,1,168,1,169,1,169,1,169,1,169,1,169,1,169,1,169, -1,170,1,170,1,170,1,170,1,170,1,170,1,170,1,170,1,170,1,171,1,171,1,171, -1,171,1,171,1,171,1,171,1,172,1,172,1,172,1,172,1,172,1,172,1,172,1,172, -1,172,1,172,1,172,1,172,1,172,1,173,1,173,1,173,1,173,1,173,1,173,1,173, -1,173,1,174,1,174,1,174,1,174,1,175,1,175,1,175,1,175,1,175,1,176,1,176, -1,176,1,176,1,176,1,177,1,177,1,177,1,177,1,177,1,178,1,178,1,178,1,178, -1,179,1,179,1,179,1,179,1,179,1,179,1,180,1,180,1,180,1,180,1,180,1,180, -1,181,1,181,1,181,1,181,1,181,1,181,1,181,1,181,1,181,1,181,1,182,1,182, -1,182,1,182,1,182,1,182,1,182,1,183,1,183,1,183,1,183,1,183,1,183,1,183, -1,183,1,183,1,183,1,183,1,183,1,184,1,184,1,184,1,184,1,184,1,184,1,184, -1,184,1,184,1,184,1,184,1,184,1,184,1,184,1,184,1,185,1,185,1,185,1,185, -1,185,1,185,1,186,1,186,1,186,1,186,1,186,1,186,1,186,1,187,1,187,1,187, -1,187,1,187,1,187,1,187,1,187,1,187,1,187,1,187,1,187,1,188,1,188,1,188, -1,188,1,188,1,188,1,188,1,188,1,188,1,188,1,189,1,189,1,189,1,189,1,189, -1,190,1,190,1,190,1,190,1,190,1,191,1,191,1,191,1,191,1,191,1,192,1,192, -1,192,1,192,1,192,1,192,1,192,1,192,1,192,1,192,1,193,1,193,1,193,1,194, -1,194,1,194,1,194,1,194,1,194,1,194,1,194,1,194,1,194,1,194,1,194,1,195, -1,195,1,195,1,195,1,195,1,196,1,196,1,196,1,196,1,196,1,196,1,196,1,196, -1,196,1,197,1,197,1,197,1,197,1,197,1,197,1,197,1,197,1,197,1,198,1,198, -1,198,1,198,1,198,1,199,1,199,1,199,1,199,1,199,1,199,1,199,1,199,1,200, -1,200,1,200,1,200,1,200,1,200,1,200,1,200,1,200,1,200,1,201,1,201,1,201, -1,201,1,201,1,201,1,201,1,201,1,201,1,201,1,201,1,201,1,202,1,202,1,202, -1,202,1,202,1,202,1,203,1,203,1,203,1,203,1,203,1,203,1,203,1,204,1,204, -1,204,1,204,1,204,1,204,1,204,1,205,1,205,1,205,1,205,1,206,1,206,1,206, -1,206,1,206,1,207,1,207,1,207,1,207,1,207,1,207,1,208,1,208,1,208,1,208, -1,208,1,208,1,208,1,208,1,208,1,209,1,209,1,209,1,209,1,209,1,209,1,209, -1,210,1,210,1,210,1,210,1,210,1,210,1,210,1,210,1,211,1,211,1,211,1,211, -1,211,1,211,1,211,1,211,1,212,1,212,1,212,1,212,1,212,1,213,1,213,1,213, -1,213,1,213,1,214,1,214,1,214,1,214,1,214,1,214,1,215,1,215,1,215,1,215, -1,215,1,216,1,216,1,216,1,216,1,216,1,217,1,217,1,217,1,217,1,217,1,217, -1,218,1,218,1,218,1,218,1,218,1,219,1,219,1,219,1,219,1,219,1,220,1,220, -1,221,1,221,1,221,1,221,3,221,2030,8,221,1,222,1,222,1,223,1,223,1,223,1, -224,1,224,1,225,1,225,1,225,1,226,1,226,1,227,1,227,1,228,1,228,1,229,1, -229,1,230,1,230,1,231,1,231,1,231,1,232,1,232,1,232,1,232,5,232,2059,8,232, -10,232,12,232,2062,9,232,1,232,1,232,1,233,1,233,1,233,1,233,1,233,1,233, -1,233,5,233,2073,8,233,10,233,12,233,2076,9,233,1,233,1,233,1,234,1,234, -1,234,1,234,5,234,2084,8,234,10,234,12,234,2087,9,234,1,234,1,234,1,235, -4,235,2092,8,235,11,235,12,235,2093,1,236,4,236,2097,8,236,11,236,12,236, -2098,1,236,1,236,5,236,2103,8,236,10,236,12,236,2106,9,236,1,236,1,236,4, -236,2110,8,236,11,236,12,236,2111,3,236,2114,8,236,1,237,4,237,2117,8,237, -11,237,12,237,2118,1,237,1,237,5,237,2123,8,237,10,237,12,237,2126,9,237, -3,237,2128,8,237,1,237,1,237,1,237,1,237,4,237,2134,8,237,11,237,12,237, -2135,1,237,1,237,3,237,2140,8,237,1,238,1,238,3,238,2144,8,238,1,238,1,238, -1,238,5,238,2149,8,238,10,238,12,238,2152,9,238,1,239,1,239,1,239,1,239, -4,239,2158,8,239,11,239,12,239,2159,1,240,1,240,1,240,1,240,5,240,2166,8, -240,10,240,12,240,2169,9,240,1,240,1,240,1,241,1,241,1,241,1,241,5,241,2177, -8,241,10,241,12,241,2180,9,241,1,241,1,241,1,242,1,242,1,242,1,242,1,242, -1,242,1,242,1,242,1,242,1,242,1,242,1,242,1,242,1,242,1,242,1,242,1,242, -1,242,1,242,1,242,1,242,1,242,1,242,1,243,1,243,1,243,1,243,1,243,1,243, -1,243,1,243,1,243,1,243,1,243,1,243,1,243,1,243,1,243,1,243,1,243,1,243, -1,243,1,243,1,243,1,243,1,243,1,243,1,243,1,243,1,243,1,243,1,244,1,244, -1,244,1,244,1,244,1,244,1,244,1,244,1,244,1,244,1,244,1,244,1,244,1,244, -1,244,1,244,1,244,1,244,1,245,1,245,3,245,2255,8,245,1,245,4,245,2258,8, -245,11,245,12,245,2259,1,246,1,246,1,247,1,247,1,248,1,248,1,248,1,248,5, -248,2270,8,248,10,248,12,248,2273,9,248,1,248,3,248,2276,8,248,1,248,3,248, -2279,8,248,1,248,1,248,1,249,1,249,1,249,1,249,5,249,2287,8,249,10,249,12, -249,2290,9,249,1,249,1,249,1,249,1,249,1,249,1,250,4,250,2298,8,250,11,250, -12,250,2299,1,250,1,250,1,251,1,251,1,2288,0,252,1,1,3,2,5,3,7,4,9,5,11, -6,13,7,15,8,17,9,19,10,21,11,23,12,25,13,27,14,29,15,31,16,33,17,35,18,37, -19,39,20,41,21,43,22,45,23,47,24,49,25,51,26,53,27,55,28,57,29,59,30,61, -31,63,32,65,33,67,34,69,35,71,36,73,37,75,38,77,39,79,40,81,41,83,42,85, -43,87,44,89,45,91,46,93,47,95,48,97,49,99,50,101,51,103,52,105,53,107,54, -109,55,111,56,113,57,115,58,117,59,119,60,121,61,123,62,125,63,127,64,129, -65,131,66,133,67,135,68,137,69,139,70,141,71,143,72,145,73,147,74,149,75, -151,76,153,77,155,78,157,79,159,80,161,81,163,82,165,83,167,84,169,85,171, -86,173,87,175,88,177,89,179,90,181,91,183,92,185,93,187,94,189,95,191,96, -193,97,195,98,197,99,199,100,201,101,203,102,205,103,207,104,209,105,211, -106,213,107,215,108,217,109,219,110,221,111,223,112,225,113,227,114,229, -115,231,116,233,117,235,118,237,119,239,120,241,121,243,122,245,123,247, -124,249,125,251,126,253,127,255,128,257,129,259,130,261,131,263,132,265, -133,267,134,269,135,271,136,273,137,275,138,277,139,279,140,281,141,283, -142,285,143,287,144,289,145,291,146,293,147,295,148,297,149,299,150,301, -151,303,152,305,153,307,154,309,155,311,156,313,157,315,158,317,159,319, -160,321,161,323,162,325,163,327,164,329,165,331,166,333,167,335,168,337, -169,339,170,341,171,343,172,345,173,347,174,349,175,351,176,353,177,355, -178,357,179,359,180,361,181,363,182,365,183,367,184,369,185,371,186,373, -187,375,188,377,189,379,190,381,191,383,192,385,193,387,194,389,195,391, -196,393,197,395,198,397,199,399,200,401,201,403,202,405,203,407,204,409, -205,411,206,413,207,415,208,417,209,419,210,421,211,423,212,425,213,427, -214,429,215,431,216,433,217,435,218,437,219,439,220,441,221,443,222,445, -223,447,224,449,225,451,226,453,227,455,228,457,229,459,230,461,231,463, -232,465,233,467,234,469,235,471,236,473,237,475,238,477,239,479,240,481, -241,483,242,485,243,487,244,489,245,491,0,493,0,495,0,497,246,499,247,501, -248,503,249,1,0,9,1,0,39,39,3,0,58,58,64,64,95,95,1,0,34,34,1,0,96,96,2, -0,43,43,45,45,1,0,48,57,1,0,65,90,2,0,10,10,13,13,3,0,9,10,13,13,32,32,2335, -0,1,1,0,0,0,0,3,1,0,0,0,0,5,1,0,0,0,0,7,1,0,0,0,0,9,1,0,0,0,0,11,1,0,0,0, -0,13,1,0,0,0,0,15,1,0,0,0,0,17,1,0,0,0,0,19,1,0,0,0,0,21,1,0,0,0,0,23,1, -0,0,0,0,25,1,0,0,0,0,27,1,0,0,0,0,29,1,0,0,0,0,31,1,0,0,0,0,33,1,0,0,0,0, -35,1,0,0,0,0,37,1,0,0,0,0,39,1,0,0,0,0,41,1,0,0,0,0,43,1,0,0,0,0,45,1,0, -0,0,0,47,1,0,0,0,0,49,1,0,0,0,0,51,1,0,0,0,0,53,1,0,0,0,0,55,1,0,0,0,0,57, -1,0,0,0,0,59,1,0,0,0,0,61,1,0,0,0,0,63,1,0,0,0,0,65,1,0,0,0,0,67,1,0,0,0, -0,69,1,0,0,0,0,71,1,0,0,0,0,73,1,0,0,0,0,75,1,0,0,0,0,77,1,0,0,0,0,79,1, -0,0,0,0,81,1,0,0,0,0,83,1,0,0,0,0,85,1,0,0,0,0,87,1,0,0,0,0,89,1,0,0,0,0, -91,1,0,0,0,0,93,1,0,0,0,0,95,1,0,0,0,0,97,1,0,0,0,0,99,1,0,0,0,0,101,1,0, -0,0,0,103,1,0,0,0,0,105,1,0,0,0,0,107,1,0,0,0,0,109,1,0,0,0,0,111,1,0,0, -0,0,113,1,0,0,0,0,115,1,0,0,0,0,117,1,0,0,0,0,119,1,0,0,0,0,121,1,0,0,0, -0,123,1,0,0,0,0,125,1,0,0,0,0,127,1,0,0,0,0,129,1,0,0,0,0,131,1,0,0,0,0, -133,1,0,0,0,0,135,1,0,0,0,0,137,1,0,0,0,0,139,1,0,0,0,0,141,1,0,0,0,0,143, -1,0,0,0,0,145,1,0,0,0,0,147,1,0,0,0,0,149,1,0,0,0,0,151,1,0,0,0,0,153,1, -0,0,0,0,155,1,0,0,0,0,157,1,0,0,0,0,159,1,0,0,0,0,161,1,0,0,0,0,163,1,0, -0,0,0,165,1,0,0,0,0,167,1,0,0,0,0,169,1,0,0,0,0,171,1,0,0,0,0,173,1,0,0, -0,0,175,1,0,0,0,0,177,1,0,0,0,0,179,1,0,0,0,0,181,1,0,0,0,0,183,1,0,0,0, -0,185,1,0,0,0,0,187,1,0,0,0,0,189,1,0,0,0,0,191,1,0,0,0,0,193,1,0,0,0,0, -195,1,0,0,0,0,197,1,0,0,0,0,199,1,0,0,0,0,201,1,0,0,0,0,203,1,0,0,0,0,205, -1,0,0,0,0,207,1,0,0,0,0,209,1,0,0,0,0,211,1,0,0,0,0,213,1,0,0,0,0,215,1, -0,0,0,0,217,1,0,0,0,0,219,1,0,0,0,0,221,1,0,0,0,0,223,1,0,0,0,0,225,1,0, -0,0,0,227,1,0,0,0,0,229,1,0,0,0,0,231,1,0,0,0,0,233,1,0,0,0,0,235,1,0,0, -0,0,237,1,0,0,0,0,239,1,0,0,0,0,241,1,0,0,0,0,243,1,0,0,0,0,245,1,0,0,0, -0,247,1,0,0,0,0,249,1,0,0,0,0,251,1,0,0,0,0,253,1,0,0,0,0,255,1,0,0,0,0, -257,1,0,0,0,0,259,1,0,0,0,0,261,1,0,0,0,0,263,1,0,0,0,0,265,1,0,0,0,0,267, -1,0,0,0,0,269,1,0,0,0,0,271,1,0,0,0,0,273,1,0,0,0,0,275,1,0,0,0,0,277,1, -0,0,0,0,279,1,0,0,0,0,281,1,0,0,0,0,283,1,0,0,0,0,285,1,0,0,0,0,287,1,0, -0,0,0,289,1,0,0,0,0,291,1,0,0,0,0,293,1,0,0,0,0,295,1,0,0,0,0,297,1,0,0, -0,0,299,1,0,0,0,0,301,1,0,0,0,0,303,1,0,0,0,0,305,1,0,0,0,0,307,1,0,0,0, -0,309,1,0,0,0,0,311,1,0,0,0,0,313,1,0,0,0,0,315,1,0,0,0,0,317,1,0,0,0,0, -319,1,0,0,0,0,321,1,0,0,0,0,323,1,0,0,0,0,325,1,0,0,0,0,327,1,0,0,0,0,329, -1,0,0,0,0,331,1,0,0,0,0,333,1,0,0,0,0,335,1,0,0,0,0,337,1,0,0,0,0,339,1, -0,0,0,0,341,1,0,0,0,0,343,1,0,0,0,0,345,1,0,0,0,0,347,1,0,0,0,0,349,1,0, -0,0,0,351,1,0,0,0,0,353,1,0,0,0,0,355,1,0,0,0,0,357,1,0,0,0,0,359,1,0,0, -0,0,361,1,0,0,0,0,363,1,0,0,0,0,365,1,0,0,0,0,367,1,0,0,0,0,369,1,0,0,0, -0,371,1,0,0,0,0,373,1,0,0,0,0,375,1,0,0,0,0,377,1,0,0,0,0,379,1,0,0,0,0, -381,1,0,0,0,0,383,1,0,0,0,0,385,1,0,0,0,0,387,1,0,0,0,0,389,1,0,0,0,0,391, -1,0,0,0,0,393,1,0,0,0,0,395,1,0,0,0,0,397,1,0,0,0,0,399,1,0,0,0,0,401,1, -0,0,0,0,403,1,0,0,0,0,405,1,0,0,0,0,407,1,0,0,0,0,409,1,0,0,0,0,411,1,0, -0,0,0,413,1,0,0,0,0,415,1,0,0,0,0,417,1,0,0,0,0,419,1,0,0,0,0,421,1,0,0, -0,0,423,1,0,0,0,0,425,1,0,0,0,0,427,1,0,0,0,0,429,1,0,0,0,0,431,1,0,0,0, -0,433,1,0,0,0,0,435,1,0,0,0,0,437,1,0,0,0,0,439,1,0,0,0,0,441,1,0,0,0,0, -443,1,0,0,0,0,445,1,0,0,0,0,447,1,0,0,0,0,449,1,0,0,0,0,451,1,0,0,0,0,453, -1,0,0,0,0,455,1,0,0,0,0,457,1,0,0,0,0,459,1,0,0,0,0,461,1,0,0,0,0,463,1, -0,0,0,0,465,1,0,0,0,0,467,1,0,0,0,0,469,1,0,0,0,0,471,1,0,0,0,0,473,1,0, -0,0,0,475,1,0,0,0,0,477,1,0,0,0,0,479,1,0,0,0,0,481,1,0,0,0,0,483,1,0,0, -0,0,485,1,0,0,0,0,487,1,0,0,0,0,489,1,0,0,0,0,497,1,0,0,0,0,499,1,0,0,0, -0,501,1,0,0,0,0,503,1,0,0,0,1,505,1,0,0,0,3,507,1,0,0,0,5,509,1,0,0,0,7, -511,1,0,0,0,9,513,1,0,0,0,11,515,1,0,0,0,13,518,1,0,0,0,15,520,1,0,0,0,17, -522,1,0,0,0,19,525,1,0,0,0,21,529,1,0,0,0,23,535,1,0,0,0,25,539,1,0,0,0, -27,545,1,0,0,0,29,553,1,0,0,0,31,557,1,0,0,0,33,561,1,0,0,0,35,567,1,0,0, -0,37,570,1,0,0,0,39,574,1,0,0,0,41,577,1,0,0,0,43,587,1,0,0,0,45,595,1,0, -0,0,47,598,1,0,0,0,49,603,1,0,0,0,51,610,1,0,0,0,53,618,1,0,0,0,55,623,1, -0,0,0,57,628,1,0,0,0,59,637,1,0,0,0,61,644,1,0,0,0,63,652,1,0,0,0,65,660, -1,0,0,0,67,667,1,0,0,0,69,677,1,0,0,0,71,688,1,0,0,0,73,695,1,0,0,0,75,701, -1,0,0,0,77,706,1,0,0,0,79,714,1,0,0,0,81,727,1,0,0,0,83,740,1,0,0,0,85,753, -1,0,0,0,87,771,1,0,0,0,89,784,1,0,0,0,91,789,1,0,0,0,93,794,1,0,0,0,95,798, -1,0,0,0,97,809,1,0,0,0,99,817,1,0,0,0,101,824,1,0,0,0,103,829,1,0,0,0,105, -838,1,0,0,0,107,852,1,0,0,0,109,861,1,0,0,0,111,873,1,0,0,0,113,878,1,0, -0,0,115,883,1,0,0,0,117,887,1,0,0,0,119,894,1,0,0,0,121,901,1,0,0,0,123, -911,1,0,0,0,125,919,1,0,0,0,127,926,1,0,0,0,129,934,1,0,0,0,131,942,1,0, -0,0,133,951,1,0,0,0,135,957,1,0,0,0,137,963,1,0,0,0,139,970,1,0,0,0,141, -976,1,0,0,0,143,986,1,0,0,0,145,990,1,0,0,0,147,997,1,0,0,0,149,1002,1,0, -0,0,151,1007,1,0,0,0,153,1016,1,0,0,0,155,1026,1,0,0,0,157,1032,1,0,0,0, -159,1040,1,0,0,0,161,1047,1,0,0,0,163,1056,1,0,0,0,165,1062,1,0,0,0,167, -1071,1,0,0,0,169,1078,1,0,0,0,171,1085,1,0,0,0,173,1090,1,0,0,0,175,1093, -1,0,0,0,177,1100,1,0,0,0,179,1103,1,0,0,0,181,1113,1,0,0,0,183,1119,1,0, -0,0,185,1125,1,0,0,0,187,1132,1,0,0,0,189,1142,1,0,0,0,191,1151,1,0,0,0, -193,1156,1,0,0,0,195,1164,1,0,0,0,197,1167,1,0,0,0,199,1170,1,0,0,0,201, -1180,1,0,0,0,203,1185,1,0,0,0,205,1190,1,0,0,0,207,1199,1,0,0,0,209,1204, -1,0,0,0,211,1212,1,0,0,0,213,1217,1,0,0,0,215,1223,1,0,0,0,217,1228,1,0, -0,0,219,1234,1,0,0,0,221,1244,1,0,0,0,223,1259,1,0,0,0,225,1267,1,0,0,0, -227,1271,1,0,0,0,229,1284,1,0,0,0,231,1291,1,0,0,0,233,1297,1,0,0,0,235, -1302,1,0,0,0,237,1310,1,0,0,0,239,1314,1,0,0,0,241,1318,1,0,0,0,243,1323, -1,0,0,0,245,1328,1,0,0,0,247,1331,1,0,0,0,249,1336,1,0,0,0,251,1346,1,0, -0,0,253,1350,1,0,0,0,255,1355,1,0,0,0,257,1362,1,0,0,0,259,1368,1,0,0,0, -261,1371,1,0,0,0,263,1378,1,0,0,0,265,1381,1,0,0,0,267,1386,1,0,0,0,269, -1393,1,0,0,0,271,1396,1,0,0,0,273,1402,1,0,0,0,275,1413,1,0,0,0,277,1419, -1,0,0,0,279,1426,1,0,0,0,281,1431,1,0,0,0,283,1441,1,0,0,0,285,1452,1,0, -0,0,287,1461,1,0,0,0,289,1471,1,0,0,0,291,1479,1,0,0,0,293,1490,1,0,0,0, -295,1501,1,0,0,0,297,1507,1,0,0,0,299,1512,1,0,0,0,301,1522,1,0,0,0,303, -1530,1,0,0,0,305,1537,1,0,0,0,307,1548,1,0,0,0,309,1556,1,0,0,0,311,1562, -1,0,0,0,313,1570,1,0,0,0,315,1579,1,0,0,0,317,1586,1,0,0,0,319,1594,1,0, -0,0,321,1601,1,0,0,0,323,1607,1,0,0,0,325,1612,1,0,0,0,327,1618,1,0,0,0, -329,1627,1,0,0,0,331,1634,1,0,0,0,333,1638,1,0,0,0,335,1643,1,0,0,0,337, -1650,1,0,0,0,339,1658,1,0,0,0,341,1665,1,0,0,0,343,1674,1,0,0,0,345,1681, -1,0,0,0,347,1694,1,0,0,0,349,1702,1,0,0,0,351,1706,1,0,0,0,353,1711,1,0, -0,0,355,1716,1,0,0,0,357,1721,1,0,0,0,359,1725,1,0,0,0,361,1731,1,0,0,0, -363,1737,1,0,0,0,365,1747,1,0,0,0,367,1754,1,0,0,0,369,1766,1,0,0,0,371, -1781,1,0,0,0,373,1787,1,0,0,0,375,1794,1,0,0,0,377,1806,1,0,0,0,379,1816, -1,0,0,0,381,1821,1,0,0,0,383,1826,1,0,0,0,385,1831,1,0,0,0,387,1841,1,0, -0,0,389,1844,1,0,0,0,391,1856,1,0,0,0,393,1861,1,0,0,0,395,1870,1,0,0,0, -397,1879,1,0,0,0,399,1884,1,0,0,0,401,1892,1,0,0,0,403,1902,1,0,0,0,405, -1914,1,0,0,0,407,1920,1,0,0,0,409,1927,1,0,0,0,411,1934,1,0,0,0,413,1938, -1,0,0,0,415,1943,1,0,0,0,417,1949,1,0,0,0,419,1958,1,0,0,0,421,1965,1,0, -0,0,423,1973,1,0,0,0,425,1981,1,0,0,0,427,1986,1,0,0,0,429,1991,1,0,0,0, -431,1997,1,0,0,0,433,2002,1,0,0,0,435,2007,1,0,0,0,437,2013,1,0,0,0,439, -2018,1,0,0,0,441,2023,1,0,0,0,443,2029,1,0,0,0,445,2031,1,0,0,0,447,2033, -1,0,0,0,449,2036,1,0,0,0,451,2038,1,0,0,0,453,2041,1,0,0,0,455,2043,1,0, -0,0,457,2045,1,0,0,0,459,2047,1,0,0,0,461,2049,1,0,0,0,463,2051,1,0,0,0, -465,2054,1,0,0,0,467,2065,1,0,0,0,469,2079,1,0,0,0,471,2091,1,0,0,0,473, -2113,1,0,0,0,475,2139,1,0,0,0,477,2143,1,0,0,0,479,2153,1,0,0,0,481,2161, -1,0,0,0,483,2172,1,0,0,0,485,2183,1,0,0,0,487,2206,1,0,0,0,489,2234,1,0, -0,0,491,2252,1,0,0,0,493,2261,1,0,0,0,495,2263,1,0,0,0,497,2265,1,0,0,0, -499,2282,1,0,0,0,501,2297,1,0,0,0,503,2303,1,0,0,0,505,506,5,46,0,0,506, -2,1,0,0,0,507,508,5,40,0,0,508,4,1,0,0,0,509,510,5,41,0,0,510,6,1,0,0,0, -511,512,5,44,0,0,512,8,1,0,0,0,513,514,5,63,0,0,514,10,1,0,0,0,515,516,5, -45,0,0,516,517,5,62,0,0,517,12,1,0,0,0,518,519,5,91,0,0,519,14,1,0,0,0,520, -521,5,93,0,0,521,16,1,0,0,0,522,523,5,61,0,0,523,524,5,62,0,0,524,18,1,0, -0,0,525,526,5,65,0,0,526,527,5,68,0,0,527,528,5,68,0,0,528,20,1,0,0,0,529, -530,5,65,0,0,530,531,5,68,0,0,531,532,5,77,0,0,532,533,5,73,0,0,533,534, -5,78,0,0,534,22,1,0,0,0,535,536,5,65,0,0,536,537,5,76,0,0,537,538,5,76,0, -0,538,24,1,0,0,0,539,540,5,65,0,0,540,541,5,76,0,0,541,542,5,84,0,0,542, -543,5,69,0,0,543,544,5,82,0,0,544,26,1,0,0,0,545,546,5,65,0,0,546,547,5, -78,0,0,547,548,5,65,0,0,548,549,5,76,0,0,549,550,5,89,0,0,550,551,5,90,0, -0,551,552,5,69,0,0,552,28,1,0,0,0,553,554,5,65,0,0,554,555,5,78,0,0,555, -556,5,68,0,0,556,30,1,0,0,0,557,558,5,65,0,0,558,559,5,78,0,0,559,560,5, -89,0,0,560,32,1,0,0,0,561,562,5,65,0,0,562,563,5,82,0,0,563,564,5,82,0,0, -564,565,5,65,0,0,565,566,5,89,0,0,566,34,1,0,0,0,567,568,5,65,0,0,568,569, -5,83,0,0,569,36,1,0,0,0,570,571,5,65,0,0,571,572,5,83,0,0,572,573,5,67,0, -0,573,38,1,0,0,0,574,575,5,65,0,0,575,576,5,84,0,0,576,40,1,0,0,0,577,578, -5,66,0,0,578,579,5,69,0,0,579,580,5,82,0,0,580,581,5,78,0,0,581,582,5,79, -0,0,582,583,5,85,0,0,583,584,5,76,0,0,584,585,5,76,0,0,585,586,5,73,0,0, -586,42,1,0,0,0,587,588,5,66,0,0,588,589,5,69,0,0,589,590,5,84,0,0,590,591, -5,87,0,0,591,592,5,69,0,0,592,593,5,69,0,0,593,594,5,78,0,0,594,44,1,0,0, -0,595,596,5,66,0,0,596,597,5,89,0,0,597,46,1,0,0,0,598,599,5,67,0,0,599, -600,5,65,0,0,600,601,5,76,0,0,601,602,5,76,0,0,602,48,1,0,0,0,603,604,5, -67,0,0,604,605,5,65,0,0,605,606,5,76,0,0,606,607,5,76,0,0,607,608,5,69,0, -0,608,609,5,68,0,0,609,50,1,0,0,0,610,611,5,67,0,0,611,612,5,65,0,0,612, -613,5,83,0,0,613,614,5,67,0,0,614,615,5,65,0,0,615,616,5,68,0,0,616,617, -5,69,0,0,617,52,1,0,0,0,618,619,5,67,0,0,619,620,5,65,0,0,620,621,5,83,0, -0,621,622,5,69,0,0,622,54,1,0,0,0,623,624,5,67,0,0,624,625,5,65,0,0,625, -626,5,83,0,0,626,627,5,84,0,0,627,56,1,0,0,0,628,629,5,67,0,0,629,630,5, -65,0,0,630,631,5,84,0,0,631,632,5,65,0,0,632,633,5,76,0,0,633,634,5,79,0, -0,634,635,5,71,0,0,635,636,5,83,0,0,636,58,1,0,0,0,637,638,5,67,0,0,638, -639,5,79,0,0,639,640,5,76,0,0,640,641,5,85,0,0,641,642,5,77,0,0,642,643, -5,78,0,0,643,60,1,0,0,0,644,645,5,67,0,0,645,646,5,79,0,0,646,647,5,76,0, -0,647,648,5,85,0,0,648,649,5,77,0,0,649,650,5,78,0,0,650,651,5,83,0,0,651, -62,1,0,0,0,652,653,5,67,0,0,653,654,5,79,0,0,654,655,5,77,0,0,655,656,5, -77,0,0,656,657,5,69,0,0,657,658,5,78,0,0,658,659,5,84,0,0,659,64,1,0,0,0, -660,661,5,67,0,0,661,662,5,79,0,0,662,663,5,77,0,0,663,664,5,77,0,0,664, -665,5,73,0,0,665,666,5,84,0,0,666,66,1,0,0,0,667,668,5,67,0,0,668,669,5, -79,0,0,669,670,5,77,0,0,670,671,5,77,0,0,671,672,5,73,0,0,672,673,5,84,0, -0,673,674,5,84,0,0,674,675,5,69,0,0,675,676,5,68,0,0,676,68,1,0,0,0,677, -678,5,67,0,0,678,679,5,79,0,0,679,680,5,78,0,0,680,681,5,83,0,0,681,682, -5,84,0,0,682,683,5,82,0,0,683,684,5,65,0,0,684,685,5,73,0,0,685,686,5,78, -0,0,686,687,5,84,0,0,687,70,1,0,0,0,688,689,5,67,0,0,689,690,5,82,0,0,690, -691,5,69,0,0,691,692,5,65,0,0,692,693,5,84,0,0,693,694,5,69,0,0,694,72,1, -0,0,0,695,696,5,67,0,0,696,697,5,82,0,0,697,698,5,79,0,0,698,699,5,83,0, -0,699,700,5,83,0,0,700,74,1,0,0,0,701,702,5,67,0,0,702,703,5,85,0,0,703, -704,5,66,0,0,704,705,5,69,0,0,705,76,1,0,0,0,706,707,5,67,0,0,707,708,5, -85,0,0,708,709,5,82,0,0,709,710,5,82,0,0,710,711,5,69,0,0,711,712,5,78,0, -0,712,713,5,84,0,0,713,78,1,0,0,0,714,715,5,67,0,0,715,716,5,85,0,0,716, -717,5,82,0,0,717,718,5,82,0,0,718,719,5,69,0,0,719,720,5,78,0,0,720,721, -5,84,0,0,721,722,5,95,0,0,722,723,5,68,0,0,723,724,5,65,0,0,724,725,5,84, -0,0,725,726,5,69,0,0,726,80,1,0,0,0,727,728,5,67,0,0,728,729,5,85,0,0,729, -730,5,82,0,0,730,731,5,82,0,0,731,732,5,69,0,0,732,733,5,78,0,0,733,734, -5,84,0,0,734,735,5,95,0,0,735,736,5,82,0,0,736,737,5,79,0,0,737,738,5,76, -0,0,738,739,5,69,0,0,739,82,1,0,0,0,740,741,5,67,0,0,741,742,5,85,0,0,742, -743,5,82,0,0,743,744,5,82,0,0,744,745,5,69,0,0,745,746,5,78,0,0,746,747, -5,84,0,0,747,748,5,95,0,0,748,749,5,84,0,0,749,750,5,73,0,0,750,751,5,77, -0,0,751,752,5,69,0,0,752,84,1,0,0,0,753,754,5,67,0,0,754,755,5,85,0,0,755, -756,5,82,0,0,756,757,5,82,0,0,757,758,5,69,0,0,758,759,5,78,0,0,759,760, -5,84,0,0,760,761,5,95,0,0,761,762,5,84,0,0,762,763,5,73,0,0,763,764,5,77, -0,0,764,765,5,69,0,0,765,766,5,83,0,0,766,767,5,84,0,0,767,768,5,65,0,0, -768,769,5,77,0,0,769,770,5,80,0,0,770,86,1,0,0,0,771,772,5,67,0,0,772,773, -5,85,0,0,773,774,5,82,0,0,774,775,5,82,0,0,775,776,5,69,0,0,776,777,5,78, -0,0,777,778,5,84,0,0,778,779,5,95,0,0,779,780,5,85,0,0,780,781,5,83,0,0, -781,782,5,69,0,0,782,783,5,82,0,0,783,88,1,0,0,0,784,785,5,68,0,0,785,786, -5,65,0,0,786,787,5,84,0,0,787,788,5,65,0,0,788,90,1,0,0,0,789,790,5,68,0, -0,790,791,5,65,0,0,791,792,5,84,0,0,792,793,5,69,0,0,793,92,1,0,0,0,794, -795,5,68,0,0,795,796,5,65,0,0,796,797,5,89,0,0,797,94,1,0,0,0,798,799,5, -68,0,0,799,800,5,69,0,0,800,801,5,65,0,0,801,802,5,76,0,0,802,803,5,76,0, -0,803,804,5,79,0,0,804,805,5,67,0,0,805,806,5,65,0,0,806,807,5,84,0,0,807, -808,5,69,0,0,808,96,1,0,0,0,809,810,5,68,0,0,810,811,5,69,0,0,811,812,5, -70,0,0,812,813,5,73,0,0,813,814,5,78,0,0,814,815,5,69,0,0,815,816,5,82,0, -0,816,98,1,0,0,0,817,818,5,68,0,0,818,819,5,69,0,0,819,820,5,76,0,0,820, -821,5,69,0,0,821,822,5,84,0,0,822,823,5,69,0,0,823,100,1,0,0,0,824,825,5, -68,0,0,825,826,5,69,0,0,826,827,5,83,0,0,827,828,5,67,0,0,828,102,1,0,0, -0,829,830,5,68,0,0,830,831,5,69,0,0,831,832,5,83,0,0,832,833,5,67,0,0,833, -834,5,82,0,0,834,835,5,73,0,0,835,836,5,66,0,0,836,837,5,69,0,0,837,104, -1,0,0,0,838,839,5,68,0,0,839,840,5,69,0,0,840,841,5,84,0,0,841,842,5,69, -0,0,842,843,5,82,0,0,843,844,5,77,0,0,844,845,5,73,0,0,845,846,5,78,0,0, -846,847,5,73,0,0,847,848,5,83,0,0,848,849,5,84,0,0,849,850,5,73,0,0,850, -851,5,67,0,0,851,106,1,0,0,0,852,853,5,68,0,0,853,854,5,73,0,0,854,855,5, -83,0,0,855,856,5,84,0,0,856,857,5,73,0,0,857,858,5,78,0,0,858,859,5,67,0, -0,859,860,5,84,0,0,860,108,1,0,0,0,861,862,5,68,0,0,862,863,5,73,0,0,863, -864,5,83,0,0,864,865,5,84,0,0,865,866,5,82,0,0,866,867,5,73,0,0,867,868, -5,66,0,0,868,869,5,85,0,0,869,870,5,84,0,0,870,871,5,69,0,0,871,872,5,68, -0,0,872,110,1,0,0,0,873,874,5,68,0,0,874,875,5,82,0,0,875,876,5,79,0,0,876, -877,5,80,0,0,877,112,1,0,0,0,878,879,5,69,0,0,879,880,5,76,0,0,880,881,5, -83,0,0,881,882,5,69,0,0,882,114,1,0,0,0,883,884,5,69,0,0,884,885,5,78,0, -0,885,886,5,68,0,0,886,116,1,0,0,0,887,888,5,69,0,0,888,889,5,83,0,0,889, -890,5,67,0,0,890,891,5,65,0,0,891,892,5,80,0,0,892,893,5,69,0,0,893,118, -1,0,0,0,894,895,5,69,0,0,895,896,5,88,0,0,896,897,5,67,0,0,897,898,5,69, -0,0,898,899,5,80,0,0,899,900,5,84,0,0,900,120,1,0,0,0,901,902,5,69,0,0,902, -903,5,88,0,0,903,904,5,67,0,0,904,905,5,76,0,0,905,906,5,85,0,0,906,907, -5,68,0,0,907,908,5,73,0,0,908,909,5,78,0,0,909,910,5,71,0,0,910,122,1,0, -0,0,911,912,5,69,0,0,912,913,5,88,0,0,913,914,5,69,0,0,914,915,5,67,0,0, -915,916,5,85,0,0,916,917,5,84,0,0,917,918,5,69,0,0,918,124,1,0,0,0,919,920, -5,69,0,0,920,921,5,88,0,0,921,922,5,73,0,0,922,923,5,83,0,0,923,924,5,84, -0,0,924,925,5,83,0,0,925,126,1,0,0,0,926,927,5,69,0,0,927,928,5,88,0,0,928, -929,5,80,0,0,929,930,5,76,0,0,930,931,5,65,0,0,931,932,5,73,0,0,932,933, -5,78,0,0,933,128,1,0,0,0,934,935,5,69,0,0,935,936,5,88,0,0,936,937,5,84, -0,0,937,938,5,82,0,0,938,939,5,65,0,0,939,940,5,67,0,0,940,941,5,84,0,0, -941,130,1,0,0,0,942,943,5,69,0,0,943,944,5,88,0,0,944,945,5,84,0,0,945,946, -5,69,0,0,946,947,5,82,0,0,947,948,5,78,0,0,948,949,5,65,0,0,949,950,5,76, -0,0,950,132,1,0,0,0,951,952,5,70,0,0,952,953,5,65,0,0,953,954,5,76,0,0,954, -955,5,83,0,0,955,956,5,69,0,0,956,134,1,0,0,0,957,958,5,70,0,0,958,959,5, -69,0,0,959,960,5,84,0,0,960,961,5,67,0,0,961,962,5,72,0,0,962,136,1,0,0, -0,963,964,5,70,0,0,964,965,5,73,0,0,965,966,5,76,0,0,966,967,5,84,0,0,967, -968,5,69,0,0,968,969,5,82,0,0,969,138,1,0,0,0,970,971,5,70,0,0,971,972,5, -73,0,0,972,973,5,82,0,0,973,974,5,83,0,0,974,975,5,84,0,0,975,140,1,0,0, -0,976,977,5,70,0,0,977,978,5,79,0,0,978,979,5,76,0,0,979,980,5,76,0,0,980, -981,5,79,0,0,981,982,5,87,0,0,982,983,5,73,0,0,983,984,5,78,0,0,984,985, -5,71,0,0,985,142,1,0,0,0,986,987,5,70,0,0,987,988,5,79,0,0,988,989,5,82, -0,0,989,144,1,0,0,0,990,991,5,70,0,0,991,992,5,79,0,0,992,993,5,82,0,0,993, -994,5,77,0,0,994,995,5,65,0,0,995,996,5,84,0,0,996,146,1,0,0,0,997,998,5, -70,0,0,998,999,5,82,0,0,999,1000,5,79,0,0,1000,1001,5,77,0,0,1001,148,1, -0,0,0,1002,1003,5,70,0,0,1003,1004,5,85,0,0,1004,1005,5,76,0,0,1005,1006, -5,76,0,0,1006,150,1,0,0,0,1007,1008,5,70,0,0,1008,1009,5,85,0,0,1009,1010, -5,78,0,0,1010,1011,5,67,0,0,1011,1012,5,84,0,0,1012,1013,5,73,0,0,1013,1014, -5,79,0,0,1014,1015,5,78,0,0,1015,152,1,0,0,0,1016,1017,5,70,0,0,1017,1018, -5,85,0,0,1018,1019,5,78,0,0,1019,1020,5,67,0,0,1020,1021,5,84,0,0,1021,1022, -5,73,0,0,1022,1023,5,79,0,0,1023,1024,5,78,0,0,1024,1025,5,83,0,0,1025,154, -1,0,0,0,1026,1027,5,71,0,0,1027,1028,5,82,0,0,1028,1029,5,65,0,0,1029,1030, -5,78,0,0,1030,1031,5,84,0,0,1031,156,1,0,0,0,1032,1033,5,71,0,0,1033,1034, -5,82,0,0,1034,1035,5,65,0,0,1035,1036,5,78,0,0,1036,1037,5,84,0,0,1037,1038, -5,69,0,0,1038,1039,5,68,0,0,1039,158,1,0,0,0,1040,1041,5,71,0,0,1041,1042, -5,82,0,0,1042,1043,5,65,0,0,1043,1044,5,78,0,0,1044,1045,5,84,0,0,1045,1046, -5,83,0,0,1046,160,1,0,0,0,1047,1048,5,71,0,0,1048,1049,5,82,0,0,1049,1050, -5,65,0,0,1050,1051,5,80,0,0,1051,1052,5,72,0,0,1052,1053,5,86,0,0,1053,1054, -5,73,0,0,1054,1055,5,90,0,0,1055,162,1,0,0,0,1056,1057,5,71,0,0,1057,1058, -5,82,0,0,1058,1059,5,79,0,0,1059,1060,5,85,0,0,1060,1061,5,80,0,0,1061,164, -1,0,0,0,1062,1063,5,71,0,0,1063,1064,5,82,0,0,1064,1065,5,79,0,0,1065,1066, -5,85,0,0,1066,1067,5,80,0,0,1067,1068,5,73,0,0,1068,1069,5,78,0,0,1069,1070, -5,71,0,0,1070,166,1,0,0,0,1071,1072,5,71,0,0,1072,1073,5,82,0,0,1073,1074, -5,79,0,0,1074,1075,5,85,0,0,1075,1076,5,80,0,0,1076,1077,5,83,0,0,1077,168, -1,0,0,0,1078,1079,5,72,0,0,1079,1080,5,65,0,0,1080,1081,5,86,0,0,1081,1082, -5,73,0,0,1082,1083,5,78,0,0,1083,1084,5,71,0,0,1084,170,1,0,0,0,1085,1086, -5,72,0,0,1086,1087,5,79,0,0,1087,1088,5,85,0,0,1088,1089,5,82,0,0,1089,172, -1,0,0,0,1090,1091,5,73,0,0,1091,1092,5,70,0,0,1092,174,1,0,0,0,1093,1094, -5,73,0,0,1094,1095,5,71,0,0,1095,1096,5,78,0,0,1096,1097,5,79,0,0,1097,1098, -5,82,0,0,1098,1099,5,69,0,0,1099,176,1,0,0,0,1100,1101,5,73,0,0,1101,1102, -5,78,0,0,1102,178,1,0,0,0,1103,1104,5,73,0,0,1104,1105,5,78,0,0,1105,1106, -5,67,0,0,1106,1107,5,76,0,0,1107,1108,5,85,0,0,1108,1109,5,68,0,0,1109,1110, -5,73,0,0,1110,1111,5,78,0,0,1111,1112,5,71,0,0,1112,180,1,0,0,0,1113,1114, -5,73,0,0,1114,1115,5,78,0,0,1115,1116,5,78,0,0,1116,1117,5,69,0,0,1117,1118, -5,82,0,0,1118,182,1,0,0,0,1119,1120,5,73,0,0,1120,1121,5,78,0,0,1121,1122, -5,80,0,0,1122,1123,5,85,0,0,1123,1124,5,84,0,0,1124,184,1,0,0,0,1125,1126, -5,73,0,0,1126,1127,5,78,0,0,1127,1128,5,83,0,0,1128,1129,5,69,0,0,1129,1130, -5,82,0,0,1130,1131,5,84,0,0,1131,186,1,0,0,0,1132,1133,5,73,0,0,1133,1134, -5,78,0,0,1134,1135,5,84,0,0,1135,1136,5,69,0,0,1136,1137,5,82,0,0,1137,1138, -5,83,0,0,1138,1139,5,69,0,0,1139,1140,5,67,0,0,1140,1141,5,84,0,0,1141,188, -1,0,0,0,1142,1143,5,73,0,0,1143,1144,5,78,0,0,1144,1145,5,84,0,0,1145,1146, -5,69,0,0,1146,1147,5,82,0,0,1147,1148,5,86,0,0,1148,1149,5,65,0,0,1149,1150, -5,76,0,0,1150,190,1,0,0,0,1151,1152,5,73,0,0,1152,1153,5,78,0,0,1153,1154, -5,84,0,0,1154,1155,5,79,0,0,1155,192,1,0,0,0,1156,1157,5,73,0,0,1157,1158, -5,78,0,0,1158,1159,5,86,0,0,1159,1160,5,79,0,0,1160,1161,5,75,0,0,1161,1162, -5,69,0,0,1162,1163,5,82,0,0,1163,194,1,0,0,0,1164,1165,5,73,0,0,1165,1166, -5,79,0,0,1166,196,1,0,0,0,1167,1168,5,73,0,0,1168,1169,5,83,0,0,1169,198, -1,0,0,0,1170,1171,5,73,0,0,1171,1172,5,83,0,0,1172,1173,5,79,0,0,1173,1174, -5,76,0,0,1174,1175,5,65,0,0,1175,1176,5,84,0,0,1176,1177,5,73,0,0,1177,1178, -5,79,0,0,1178,1179,5,78,0,0,1179,200,1,0,0,0,1180,1181,5,74,0,0,1181,1182, -5,83,0,0,1182,1183,5,79,0,0,1183,1184,5,78,0,0,1184,202,1,0,0,0,1185,1186, -5,74,0,0,1186,1187,5,79,0,0,1187,1188,5,73,0,0,1188,1189,5,78,0,0,1189,204, -1,0,0,0,1190,1191,5,76,0,0,1191,1192,5,65,0,0,1192,1193,5,78,0,0,1193,1194, -5,71,0,0,1194,1195,5,85,0,0,1195,1196,5,65,0,0,1196,1197,5,71,0,0,1197,1198, -5,69,0,0,1198,206,1,0,0,0,1199,1200,5,76,0,0,1200,1201,5,65,0,0,1201,1202, -5,83,0,0,1202,1203,5,84,0,0,1203,208,1,0,0,0,1204,1205,5,76,0,0,1205,1206, -5,65,0,0,1206,1207,5,84,0,0,1207,1208,5,69,0,0,1208,1209,5,82,0,0,1209,1210, -5,65,0,0,1210,1211,5,76,0,0,1211,210,1,0,0,0,1212,1213,5,76,0,0,1213,1214, -5,69,0,0,1214,1215,5,70,0,0,1215,1216,5,84,0,0,1216,212,1,0,0,0,1217,1218, -5,76,0,0,1218,1219,5,69,0,0,1219,1220,5,86,0,0,1220,1221,5,69,0,0,1221,1222, -5,76,0,0,1222,214,1,0,0,0,1223,1224,5,76,0,0,1224,1225,5,73,0,0,1225,1226, -5,75,0,0,1226,1227,5,69,0,0,1227,216,1,0,0,0,1228,1229,5,76,0,0,1229,1230, -5,73,0,0,1230,1231,5,77,0,0,1231,1232,5,73,0,0,1232,1233,5,84,0,0,1233,218, -1,0,0,0,1234,1235,5,76,0,0,1235,1236,5,79,0,0,1236,1237,5,67,0,0,1237,1238, -5,65,0,0,1238,1239,5,76,0,0,1239,1240,5,84,0,0,1240,1241,5,73,0,0,1241,1242, -5,77,0,0,1242,1243,5,69,0,0,1243,220,1,0,0,0,1244,1245,5,76,0,0,1245,1246, -5,79,0,0,1246,1247,5,67,0,0,1247,1248,5,65,0,0,1248,1249,5,76,0,0,1249,1250, -5,84,0,0,1250,1251,5,73,0,0,1251,1252,5,77,0,0,1252,1253,5,69,0,0,1253,1254, -5,83,0,0,1254,1255,5,84,0,0,1255,1256,5,65,0,0,1256,1257,5,77,0,0,1257,1258, -5,80,0,0,1258,222,1,0,0,0,1259,1260,5,76,0,0,1260,1261,5,79,0,0,1261,1262, -5,71,0,0,1262,1263,5,73,0,0,1263,1264,5,67,0,0,1264,1265,5,65,0,0,1265,1266, -5,76,0,0,1266,224,1,0,0,0,1267,1268,5,77,0,0,1268,1269,5,65,0,0,1269,1270, -5,80,0,0,1270,226,1,0,0,0,1271,1272,5,77,0,0,1272,1273,5,65,0,0,1273,1274, -5,84,0,0,1274,1275,5,69,0,0,1275,1276,5,82,0,0,1276,1277,5,73,0,0,1277,1278, -5,65,0,0,1278,1279,5,76,0,0,1279,1280,5,73,0,0,1280,1281,5,90,0,0,1281,1282, -5,69,0,0,1282,1283,5,68,0,0,1283,228,1,0,0,0,1284,1285,5,77,0,0,1285,1286, -5,73,0,0,1286,1287,5,78,0,0,1287,1288,5,85,0,0,1288,1289,5,84,0,0,1289,1290, -5,69,0,0,1290,230,1,0,0,0,1291,1292,5,77,0,0,1292,1293,5,79,0,0,1293,1294, -5,78,0,0,1294,1295,5,84,0,0,1295,1296,5,72,0,0,1296,232,1,0,0,0,1297,1298, -5,78,0,0,1298,1299,5,65,0,0,1299,1300,5,77,0,0,1300,1301,5,69,0,0,1301,234, -1,0,0,0,1302,1303,5,78,0,0,1303,1304,5,65,0,0,1304,1305,5,84,0,0,1305,1306, -5,85,0,0,1306,1307,5,82,0,0,1307,1308,5,65,0,0,1308,1309,5,76,0,0,1309,236, -1,0,0,0,1310,1311,5,78,0,0,1311,1312,5,70,0,0,1312,1313,5,67,0,0,1313,238, -1,0,0,0,1314,1315,5,78,0,0,1315,1316,5,70,0,0,1316,1317,5,68,0,0,1317,240, -1,0,0,0,1318,1319,5,78,0,0,1319,1320,5,70,0,0,1320,1321,5,75,0,0,1321,1322, -5,67,0,0,1322,242,1,0,0,0,1323,1324,5,78,0,0,1324,1325,5,70,0,0,1325,1326, -5,75,0,0,1326,1327,5,68,0,0,1327,244,1,0,0,0,1328,1329,5,78,0,0,1329,1330, -5,79,0,0,1330,246,1,0,0,0,1331,1332,5,78,0,0,1332,1333,5,79,0,0,1333,1334, -5,78,0,0,1334,1335,5,69,0,0,1335,248,1,0,0,0,1336,1337,5,78,0,0,1337,1338, -5,79,0,0,1338,1339,5,82,0,0,1339,1340,5,77,0,0,1340,1341,5,65,0,0,1341,1342, -5,76,0,0,1342,1343,5,73,0,0,1343,1344,5,90,0,0,1344,1345,5,69,0,0,1345,250, -1,0,0,0,1346,1347,5,78,0,0,1347,1348,5,79,0,0,1348,1349,5,84,0,0,1349,252, -1,0,0,0,1350,1351,5,78,0,0,1351,1352,5,85,0,0,1352,1353,5,76,0,0,1353,1354, -5,76,0,0,1354,254,1,0,0,0,1355,1356,5,78,0,0,1356,1357,5,85,0,0,1357,1358, -5,76,0,0,1358,1359,5,76,0,0,1359,1360,5,73,0,0,1360,1361,5,70,0,0,1361,256, -1,0,0,0,1362,1363,5,78,0,0,1363,1364,5,85,0,0,1364,1365,5,76,0,0,1365,1366, -5,76,0,0,1366,1367,5,83,0,0,1367,258,1,0,0,0,1368,1369,5,79,0,0,1369,1370, -5,70,0,0,1370,260,1,0,0,0,1371,1372,5,79,0,0,1372,1373,5,70,0,0,1373,1374, -5,70,0,0,1374,1375,5,83,0,0,1375,1376,5,69,0,0,1376,1377,5,84,0,0,1377,262, -1,0,0,0,1378,1379,5,79,0,0,1379,1380,5,78,0,0,1380,264,1,0,0,0,1381,1382, -5,79,0,0,1382,1383,5,78,0,0,1383,1384,5,76,0,0,1384,1385,5,89,0,0,1385,266, -1,0,0,0,1386,1387,5,79,0,0,1387,1388,5,80,0,0,1388,1389,5,84,0,0,1389,1390, -5,73,0,0,1390,1391,5,79,0,0,1391,1392,5,78,0,0,1392,268,1,0,0,0,1393,1394, -5,79,0,0,1394,1395,5,82,0,0,1395,270,1,0,0,0,1396,1397,5,79,0,0,1397,1398, -5,82,0,0,1398,1399,5,68,0,0,1399,1400,5,69,0,0,1400,1401,5,82,0,0,1401,272, -1,0,0,0,1402,1403,5,79,0,0,1403,1404,5,82,0,0,1404,1405,5,68,0,0,1405,1406, -5,73,0,0,1406,1407,5,78,0,0,1407,1408,5,65,0,0,1408,1409,5,76,0,0,1409,1410, -5,73,0,0,1410,1411,5,84,0,0,1411,1412,5,89,0,0,1412,274,1,0,0,0,1413,1414, -5,79,0,0,1414,1415,5,85,0,0,1415,1416,5,84,0,0,1416,1417,5,69,0,0,1417,1418, -5,82,0,0,1418,276,1,0,0,0,1419,1420,5,79,0,0,1420,1421,5,85,0,0,1421,1422, -5,84,0,0,1422,1423,5,80,0,0,1423,1424,5,85,0,0,1424,1425,5,84,0,0,1425,278, -1,0,0,0,1426,1427,5,79,0,0,1427,1428,5,86,0,0,1428,1429,5,69,0,0,1429,1430, -5,82,0,0,1430,280,1,0,0,0,1431,1432,5,80,0,0,1432,1433,5,65,0,0,1433,1434, -5,82,0,0,1434,1435,5,84,0,0,1435,1436,5,73,0,0,1436,1437,5,84,0,0,1437,1438, -5,73,0,0,1438,1439,5,79,0,0,1439,1440,5,78,0,0,1440,282,1,0,0,0,1441,1442, -5,80,0,0,1442,1443,5,65,0,0,1443,1444,5,82,0,0,1444,1445,5,84,0,0,1445,1446, -5,73,0,0,1446,1447,5,84,0,0,1447,1448,5,73,0,0,1448,1449,5,79,0,0,1449,1450, -5,78,0,0,1450,1451,5,83,0,0,1451,284,1,0,0,0,1452,1453,5,80,0,0,1453,1454, -5,79,0,0,1454,1455,5,83,0,0,1455,1456,5,73,0,0,1456,1457,5,84,0,0,1457,1458, -5,73,0,0,1458,1459,5,79,0,0,1459,1460,5,78,0,0,1460,286,1,0,0,0,1461,1462, -5,80,0,0,1462,1463,5,82,0,0,1463,1464,5,69,0,0,1464,1465,5,67,0,0,1465,1466, -5,69,0,0,1466,1467,5,68,0,0,1467,1468,5,73,0,0,1468,1469,5,78,0,0,1469,1470, -5,71,0,0,1470,288,1,0,0,0,1471,1472,5,80,0,0,1472,1473,5,82,0,0,1473,1474, -5,69,0,0,1474,1475,5,80,0,0,1475,1476,5,65,0,0,1476,1477,5,82,0,0,1477,1478, -5,69,0,0,1478,290,1,0,0,0,1479,1480,5,80,0,0,1480,1481,5,82,0,0,1481,1482, -5,73,0,0,1482,1483,5,86,0,0,1483,1484,5,73,0,0,1484,1485,5,76,0,0,1485,1486, -5,69,0,0,1486,1487,5,71,0,0,1487,1488,5,69,0,0,1488,1489,5,83,0,0,1489,292, -1,0,0,0,1490,1491,5,80,0,0,1491,1492,5,82,0,0,1492,1493,5,79,0,0,1493,1494, -5,80,0,0,1494,1495,5,69,0,0,1495,1496,5,82,0,0,1496,1497,5,84,0,0,1497,1498, -5,73,0,0,1498,1499,5,69,0,0,1499,1500,5,83,0,0,1500,294,1,0,0,0,1501,1502, -5,82,0,0,1502,1503,5,65,0,0,1503,1504,5,78,0,0,1504,1505,5,71,0,0,1505,1506, -5,69,0,0,1506,296,1,0,0,0,1507,1508,5,82,0,0,1508,1509,5,69,0,0,1509,1510, -5,65,0,0,1510,1511,5,68,0,0,1511,298,1,0,0,0,1512,1513,5,82,0,0,1513,1514, -5,69,0,0,1514,1515,5,67,0,0,1515,1516,5,85,0,0,1516,1517,5,82,0,0,1517,1518, -5,83,0,0,1518,1519,5,73,0,0,1519,1520,5,86,0,0,1520,1521,5,69,0,0,1521,300, -1,0,0,0,1522,1523,5,82,0,0,1523,1524,5,69,0,0,1524,1525,5,70,0,0,1525,1526, -5,82,0,0,1526,1527,5,69,0,0,1527,1528,5,83,0,0,1528,1529,5,72,0,0,1529,302, -1,0,0,0,1530,1531,5,82,0,0,1531,1532,5,69,0,0,1532,1533,5,78,0,0,1533,1534, -5,65,0,0,1534,1535,5,77,0,0,1535,1536,5,69,0,0,1536,304,1,0,0,0,1537,1538, -5,82,0,0,1538,1539,5,69,0,0,1539,1540,5,80,0,0,1540,1541,5,69,0,0,1541,1542, -5,65,0,0,1542,1543,5,84,0,0,1543,1544,5,65,0,0,1544,1545,5,66,0,0,1545,1546, -5,76,0,0,1546,1547,5,69,0,0,1547,306,1,0,0,0,1548,1549,5,82,0,0,1549,1550, -5,69,0,0,1550,1551,5,80,0,0,1551,1552,5,76,0,0,1552,1553,5,65,0,0,1553,1554, -5,67,0,0,1554,1555,5,69,0,0,1555,308,1,0,0,0,1556,1557,5,82,0,0,1557,1558, -5,69,0,0,1558,1559,5,83,0,0,1559,1560,5,69,0,0,1560,1561,5,84,0,0,1561,310, -1,0,0,0,1562,1563,5,82,0,0,1563,1564,5,69,0,0,1564,1565,5,83,0,0,1565,1566, -5,80,0,0,1566,1567,5,69,0,0,1567,1568,5,67,0,0,1568,1569,5,84,0,0,1569,312, -1,0,0,0,1570,1571,5,82,0,0,1571,1572,5,69,0,0,1572,1573,5,83,0,0,1573,1574, -5,84,0,0,1574,1575,5,82,0,0,1575,1576,5,73,0,0,1576,1577,5,67,0,0,1577,1578, -5,84,0,0,1578,314,1,0,0,0,1579,1580,5,82,0,0,1580,1581,5,69,0,0,1581,1582, -5,84,0,0,1582,1583,5,85,0,0,1583,1584,5,82,0,0,1584,1585,5,78,0,0,1585,316, -1,0,0,0,1586,1587,5,82,0,0,1587,1588,5,69,0,0,1588,1589,5,84,0,0,1589,1590, -5,85,0,0,1590,1591,5,82,0,0,1591,1592,5,78,0,0,1592,1593,5,83,0,0,1593,318, -1,0,0,0,1594,1595,5,82,0,0,1595,1596,5,69,0,0,1596,1597,5,86,0,0,1597,1598, -5,79,0,0,1598,1599,5,75,0,0,1599,1600,5,69,0,0,1600,320,1,0,0,0,1601,1602, -5,82,0,0,1602,1603,5,73,0,0,1603,1604,5,71,0,0,1604,1605,5,72,0,0,1605,1606, -5,84,0,0,1606,322,1,0,0,0,1607,1608,5,82,0,0,1608,1609,5,79,0,0,1609,1610, -5,76,0,0,1610,1611,5,69,0,0,1611,324,1,0,0,0,1612,1613,5,82,0,0,1613,1614, -5,79,0,0,1614,1615,5,76,0,0,1615,1616,5,69,0,0,1616,1617,5,83,0,0,1617,326, -1,0,0,0,1618,1619,5,82,0,0,1619,1620,5,79,0,0,1620,1621,5,76,0,0,1621,1622, -5,76,0,0,1622,1623,5,66,0,0,1623,1624,5,65,0,0,1624,1625,5,67,0,0,1625,1626, -5,75,0,0,1626,328,1,0,0,0,1627,1628,5,82,0,0,1628,1629,5,79,0,0,1629,1630, -5,76,0,0,1630,1631,5,76,0,0,1631,1632,5,85,0,0,1632,1633,5,80,0,0,1633,330, -1,0,0,0,1634,1635,5,82,0,0,1635,1636,5,79,0,0,1636,1637,5,87,0,0,1637,332, -1,0,0,0,1638,1639,5,82,0,0,1639,1640,5,79,0,0,1640,1641,5,87,0,0,1641,1642, -5,83,0,0,1642,334,1,0,0,0,1643,1644,5,83,0,0,1644,1645,5,67,0,0,1645,1646, -5,72,0,0,1646,1647,5,69,0,0,1647,1648,5,77,0,0,1648,1649,5,65,0,0,1649,336, -1,0,0,0,1650,1651,5,83,0,0,1651,1652,5,67,0,0,1652,1653,5,72,0,0,1653,1654, -5,69,0,0,1654,1655,5,77,0,0,1655,1656,5,65,0,0,1656,1657,5,83,0,0,1657,338, -1,0,0,0,1658,1659,5,83,0,0,1659,1660,5,69,0,0,1660,1661,5,67,0,0,1661,1662, -5,79,0,0,1662,1663,5,78,0,0,1663,1664,5,68,0,0,1664,340,1,0,0,0,1665,1666, -5,83,0,0,1666,1667,5,69,0,0,1667,1668,5,67,0,0,1668,1669,5,85,0,0,1669,1670, -5,82,0,0,1670,1671,5,73,0,0,1671,1672,5,84,0,0,1672,1673,5,89,0,0,1673,342, -1,0,0,0,1674,1675,5,83,0,0,1675,1676,5,69,0,0,1676,1677,5,76,0,0,1677,1678, -5,69,0,0,1678,1679,5,67,0,0,1679,1680,5,84,0,0,1680,344,1,0,0,0,1681,1682, -5,83,0,0,1682,1683,5,69,0,0,1683,1684,5,82,0,0,1684,1685,5,73,0,0,1685,1686, -5,65,0,0,1686,1687,5,76,0,0,1687,1688,5,73,0,0,1688,1689,5,90,0,0,1689,1690, -5,65,0,0,1690,1691,5,66,0,0,1691,1692,5,76,0,0,1692,1693,5,69,0,0,1693,346, -1,0,0,0,1694,1695,5,83,0,0,1695,1696,5,69,0,0,1696,1697,5,83,0,0,1697,1698, -5,83,0,0,1698,1699,5,73,0,0,1699,1700,5,79,0,0,1700,1701,5,78,0,0,1701,348, -1,0,0,0,1702,1703,5,83,0,0,1703,1704,5,69,0,0,1704,1705,5,84,0,0,1705,350, -1,0,0,0,1706,1707,5,83,0,0,1707,1708,5,69,0,0,1708,1709,5,84,0,0,1709,1710, -5,83,0,0,1710,352,1,0,0,0,1711,1712,5,83,0,0,1712,1713,5,72,0,0,1713,1714, -5,79,0,0,1714,1715,5,87,0,0,1715,354,1,0,0,0,1716,1717,5,83,0,0,1717,1718, -5,79,0,0,1718,1719,5,77,0,0,1719,1720,5,69,0,0,1720,356,1,0,0,0,1721,1722, -5,83,0,0,1722,1723,5,81,0,0,1723,1724,5,76,0,0,1724,358,1,0,0,0,1725,1726, -5,83,0,0,1726,1727,5,84,0,0,1727,1728,5,65,0,0,1728,1729,5,82,0,0,1729,1730, -5,84,0,0,1730,360,1,0,0,0,1731,1732,5,83,0,0,1732,1733,5,84,0,0,1733,1734, -5,65,0,0,1734,1735,5,84,0,0,1735,1736,5,83,0,0,1736,362,1,0,0,0,1737,1738, -5,83,0,0,1738,1739,5,85,0,0,1739,1740,5,66,0,0,1740,1741,5,83,0,0,1741,1742, -5,84,0,0,1742,1743,5,82,0,0,1743,1744,5,73,0,0,1744,1745,5,78,0,0,1745,1746, -5,71,0,0,1746,364,1,0,0,0,1747,1748,5,83,0,0,1748,1749,5,89,0,0,1749,1750, -5,83,0,0,1750,1751,5,84,0,0,1751,1752,5,69,0,0,1752,1753,5,77,0,0,1753,366, -1,0,0,0,1754,1755,5,83,0,0,1755,1756,5,89,0,0,1756,1757,5,83,0,0,1757,1758, -5,84,0,0,1758,1759,5,69,0,0,1759,1760,5,77,0,0,1760,1761,5,95,0,0,1761,1762, -5,84,0,0,1762,1763,5,73,0,0,1763,1764,5,77,0,0,1764,1765,5,69,0,0,1765,368, -1,0,0,0,1766,1767,5,83,0,0,1767,1768,5,89,0,0,1768,1769,5,83,0,0,1769,1770, -5,84,0,0,1770,1771,5,69,0,0,1771,1772,5,77,0,0,1772,1773,5,95,0,0,1773,1774, -5,86,0,0,1774,1775,5,69,0,0,1775,1776,5,82,0,0,1776,1777,5,83,0,0,1777,1778, -5,73,0,0,1778,1779,5,79,0,0,1779,1780,5,78,0,0,1780,370,1,0,0,0,1781,1782, -5,84,0,0,1782,1783,5,65,0,0,1783,1784,5,66,0,0,1784,1785,5,76,0,0,1785,1786, -5,69,0,0,1786,372,1,0,0,0,1787,1788,5,84,0,0,1788,1789,5,65,0,0,1789,1790, -5,66,0,0,1790,1791,5,76,0,0,1791,1792,5,69,0,0,1792,1793,5,83,0,0,1793,374, -1,0,0,0,1794,1795,5,84,0,0,1795,1796,5,65,0,0,1796,1797,5,66,0,0,1797,1798, -5,76,0,0,1798,1799,5,69,0,0,1799,1800,5,83,0,0,1800,1801,5,65,0,0,1801,1802, -5,77,0,0,1802,1803,5,80,0,0,1803,1804,5,76,0,0,1804,1805,5,69,0,0,1805,376, -1,0,0,0,1806,1807,5,84,0,0,1807,1808,5,69,0,0,1808,1809,5,77,0,0,1809,1810, -5,80,0,0,1810,1811,5,79,0,0,1811,1812,5,82,0,0,1812,1813,5,65,0,0,1813,1814, -5,82,0,0,1814,1815,5,89,0,0,1815,378,1,0,0,0,1816,1817,5,84,0,0,1817,1818, -5,69,0,0,1818,1819,5,88,0,0,1819,1820,5,84,0,0,1820,380,1,0,0,0,1821,1822, -5,84,0,0,1822,1823,5,72,0,0,1823,1824,5,69,0,0,1824,1825,5,78,0,0,1825,382, -1,0,0,0,1826,1827,5,84,0,0,1827,1828,5,73,0,0,1828,1829,5,77,0,0,1829,1830, -5,69,0,0,1830,384,1,0,0,0,1831,1832,5,84,0,0,1832,1833,5,73,0,0,1833,1834, -5,77,0,0,1834,1835,5,69,0,0,1835,1836,5,83,0,0,1836,1837,5,84,0,0,1837,1838, -5,65,0,0,1838,1839,5,77,0,0,1839,1840,5,80,0,0,1840,386,1,0,0,0,1841,1842, -5,84,0,0,1842,1843,5,79,0,0,1843,388,1,0,0,0,1844,1845,5,84,0,0,1845,1846, -5,82,0,0,1846,1847,5,65,0,0,1847,1848,5,78,0,0,1848,1849,5,83,0,0,1849,1850, -5,65,0,0,1850,1851,5,67,0,0,1851,1852,5,84,0,0,1852,1853,5,73,0,0,1853,1854, -5,79,0,0,1854,1855,5,78,0,0,1855,390,1,0,0,0,1856,1857,5,84,0,0,1857,1858, -5,82,0,0,1858,1859,5,85,0,0,1859,1860,5,69,0,0,1860,392,1,0,0,0,1861,1862, -5,84,0,0,1862,1863,5,82,0,0,1863,1864,5,85,0,0,1864,1865,5,78,0,0,1865,1866, -5,67,0,0,1866,1867,5,65,0,0,1867,1868,5,84,0,0,1868,1869,5,69,0,0,1869,394, -1,0,0,0,1870,1871,5,84,0,0,1871,1872,5,82,0,0,1872,1873,5,89,0,0,1873,1874, -5,95,0,0,1874,1875,5,67,0,0,1875,1876,5,65,0,0,1876,1877,5,83,0,0,1877,1878, -5,84,0,0,1878,396,1,0,0,0,1879,1880,5,84,0,0,1880,1881,5,89,0,0,1881,1882, -5,80,0,0,1882,1883,5,69,0,0,1883,398,1,0,0,0,1884,1885,5,85,0,0,1885,1886, -5,69,0,0,1886,1887,5,83,0,0,1887,1888,5,67,0,0,1888,1889,5,65,0,0,1889,1890, -5,80,0,0,1890,1891,5,69,0,0,1891,400,1,0,0,0,1892,1893,5,85,0,0,1893,1894, -5,78,0,0,1894,1895,5,66,0,0,1895,1896,5,79,0,0,1896,1897,5,85,0,0,1897,1898, -5,78,0,0,1898,1899,5,68,0,0,1899,1900,5,69,0,0,1900,1901,5,68,0,0,1901,402, -1,0,0,0,1902,1903,5,85,0,0,1903,1904,5,78,0,0,1904,1905,5,67,0,0,1905,1906, -5,79,0,0,1906,1907,5,77,0,0,1907,1908,5,77,0,0,1908,1909,5,73,0,0,1909,1910, -5,84,0,0,1910,1911,5,84,0,0,1911,1912,5,69,0,0,1912,1913,5,68,0,0,1913,404, -1,0,0,0,1914,1915,5,85,0,0,1915,1916,5,78,0,0,1916,1917,5,73,0,0,1917,1918, -5,79,0,0,1918,1919,5,78,0,0,1919,406,1,0,0,0,1920,1921,5,85,0,0,1921,1922, -5,78,0,0,1922,1923,5,78,0,0,1923,1924,5,69,0,0,1924,1925,5,83,0,0,1925,1926, -5,84,0,0,1926,408,1,0,0,0,1927,1928,5,85,0,0,1928,1929,5,80,0,0,1929,1930, -5,68,0,0,1930,1931,5,65,0,0,1931,1932,5,84,0,0,1932,1933,5,69,0,0,1933,410, -1,0,0,0,1934,1935,5,85,0,0,1935,1936,5,83,0,0,1936,1937,5,69,0,0,1937,412, -1,0,0,0,1938,1939,5,85,0,0,1939,1940,5,83,0,0,1940,1941,5,69,0,0,1941,1942, -5,82,0,0,1942,414,1,0,0,0,1943,1944,5,85,0,0,1944,1945,5,83,0,0,1945,1946, -5,73,0,0,1946,1947,5,78,0,0,1947,1948,5,71,0,0,1948,416,1,0,0,0,1949,1950, -5,86,0,0,1950,1951,5,65,0,0,1951,1952,5,76,0,0,1952,1953,5,73,0,0,1953,1954, -5,68,0,0,1954,1955,5,65,0,0,1955,1956,5,84,0,0,1956,1957,5,69,0,0,1957,418, -1,0,0,0,1958,1959,5,86,0,0,1959,1960,5,65,0,0,1960,1961,5,76,0,0,1961,1962, -5,85,0,0,1962,1963,5,69,0,0,1963,1964,5,83,0,0,1964,420,1,0,0,0,1965,1966, -5,86,0,0,1966,1967,5,69,0,0,1967,1968,5,82,0,0,1968,1969,5,66,0,0,1969,1970, -5,79,0,0,1970,1971,5,83,0,0,1971,1972,5,69,0,0,1972,422,1,0,0,0,1973,1974, -5,86,0,0,1974,1975,5,69,0,0,1975,1976,5,82,0,0,1976,1977,5,83,0,0,1977,1978, -5,73,0,0,1978,1979,5,79,0,0,1979,1980,5,78,0,0,1980,424,1,0,0,0,1981,1982, -5,86,0,0,1982,1983,5,73,0,0,1983,1984,5,69,0,0,1984,1985,5,87,0,0,1985,426, -1,0,0,0,1986,1987,5,87,0,0,1987,1988,5,72,0,0,1988,1989,5,69,0,0,1989,1990, -5,78,0,0,1990,428,1,0,0,0,1991,1992,5,87,0,0,1992,1993,5,72,0,0,1993,1994, -5,69,0,0,1994,1995,5,82,0,0,1995,1996,5,69,0,0,1996,430,1,0,0,0,1997,1998, -5,87,0,0,1998,1999,5,73,0,0,1999,2000,5,84,0,0,2000,2001,5,72,0,0,2001,432, -1,0,0,0,2002,2003,5,87,0,0,2003,2004,5,79,0,0,2004,2005,5,82,0,0,2005,2006, -5,75,0,0,2006,434,1,0,0,0,2007,2008,5,87,0,0,2008,2009,5,82,0,0,2009,2010, -5,73,0,0,2010,2011,5,84,0,0,2011,2012,5,69,0,0,2012,436,1,0,0,0,2013,2014, -5,89,0,0,2014,2015,5,69,0,0,2015,2016,5,65,0,0,2016,2017,5,82,0,0,2017,438, -1,0,0,0,2018,2019,5,90,0,0,2019,2020,5,79,0,0,2020,2021,5,78,0,0,2021,2022, -5,69,0,0,2022,440,1,0,0,0,2023,2024,5,61,0,0,2024,442,1,0,0,0,2025,2026, -5,60,0,0,2026,2030,5,62,0,0,2027,2028,5,33,0,0,2028,2030,5,61,0,0,2029,2025, -1,0,0,0,2029,2027,1,0,0,0,2030,444,1,0,0,0,2031,2032,5,60,0,0,2032,446,1, -0,0,0,2033,2034,5,60,0,0,2034,2035,5,61,0,0,2035,448,1,0,0,0,2036,2037,5, -62,0,0,2037,450,1,0,0,0,2038,2039,5,62,0,0,2039,2040,5,61,0,0,2040,452,1, -0,0,0,2041,2042,5,43,0,0,2042,454,1,0,0,0,2043,2044,5,45,0,0,2044,456,1, -0,0,0,2045,2046,5,42,0,0,2046,458,1,0,0,0,2047,2048,5,47,0,0,2048,460,1, -0,0,0,2049,2050,5,37,0,0,2050,462,1,0,0,0,2051,2052,5,124,0,0,2052,2053, -5,124,0,0,2053,464,1,0,0,0,2054,2060,5,39,0,0,2055,2059,8,0,0,0,2056,2057, -5,39,0,0,2057,2059,5,39,0,0,2058,2055,1,0,0,0,2058,2056,1,0,0,0,2059,2062, -1,0,0,0,2060,2058,1,0,0,0,2060,2061,1,0,0,0,2061,2063,1,0,0,0,2062,2060, -1,0,0,0,2063,2064,5,39,0,0,2064,466,1,0,0,0,2065,2066,5,85,0,0,2066,2067, -5,38,0,0,2067,2068,5,39,0,0,2068,2074,1,0,0,0,2069,2073,8,0,0,0,2070,2071, -5,39,0,0,2071,2073,5,39,0,0,2072,2069,1,0,0,0,2072,2070,1,0,0,0,2073,2076, -1,0,0,0,2074,2072,1,0,0,0,2074,2075,1,0,0,0,2075,2077,1,0,0,0,2076,2074, -1,0,0,0,2077,2078,5,39,0,0,2078,468,1,0,0,0,2079,2080,5,88,0,0,2080,2081, -5,39,0,0,2081,2085,1,0,0,0,2082,2084,8,0,0,0,2083,2082,1,0,0,0,2084,2087, -1,0,0,0,2085,2083,1,0,0,0,2085,2086,1,0,0,0,2086,2088,1,0,0,0,2087,2085, -1,0,0,0,2088,2089,5,39,0,0,2089,470,1,0,0,0,2090,2092,3,493,246,0,2091,2090, -1,0,0,0,2092,2093,1,0,0,0,2093,2091,1,0,0,0,2093,2094,1,0,0,0,2094,472,1, -0,0,0,2095,2097,3,493,246,0,2096,2095,1,0,0,0,2097,2098,1,0,0,0,2098,2096, -1,0,0,0,2098,2099,1,0,0,0,2099,2100,1,0,0,0,2100,2104,5,46,0,0,2101,2103, -3,493,246,0,2102,2101,1,0,0,0,2103,2106,1,0,0,0,2104,2102,1,0,0,0,2104,2105, -1,0,0,0,2105,2114,1,0,0,0,2106,2104,1,0,0,0,2107,2109,5,46,0,0,2108,2110, -3,493,246,0,2109,2108,1,0,0,0,2110,2111,1,0,0,0,2111,2109,1,0,0,0,2111,2112, -1,0,0,0,2112,2114,1,0,0,0,2113,2096,1,0,0,0,2113,2107,1,0,0,0,2114,474,1, -0,0,0,2115,2117,3,493,246,0,2116,2115,1,0,0,0,2117,2118,1,0,0,0,2118,2116, -1,0,0,0,2118,2119,1,0,0,0,2119,2127,1,0,0,0,2120,2124,5,46,0,0,2121,2123, -3,493,246,0,2122,2121,1,0,0,0,2123,2126,1,0,0,0,2124,2122,1,0,0,0,2124,2125, -1,0,0,0,2125,2128,1,0,0,0,2126,2124,1,0,0,0,2127,2120,1,0,0,0,2127,2128, -1,0,0,0,2128,2129,1,0,0,0,2129,2130,3,491,245,0,2130,2140,1,0,0,0,2131,2133, -5,46,0,0,2132,2134,3,493,246,0,2133,2132,1,0,0,0,2134,2135,1,0,0,0,2135, -2133,1,0,0,0,2135,2136,1,0,0,0,2136,2137,1,0,0,0,2137,2138,3,491,245,0,2138, -2140,1,0,0,0,2139,2116,1,0,0,0,2139,2131,1,0,0,0,2140,476,1,0,0,0,2141,2144, -3,495,247,0,2142,2144,5,95,0,0,2143,2141,1,0,0,0,2143,2142,1,0,0,0,2144, -2150,1,0,0,0,2145,2149,3,495,247,0,2146,2149,3,493,246,0,2147,2149,7,1,0, -0,2148,2145,1,0,0,0,2148,2146,1,0,0,0,2148,2147,1,0,0,0,2149,2152,1,0,0, -0,2150,2148,1,0,0,0,2150,2151,1,0,0,0,2151,478,1,0,0,0,2152,2150,1,0,0,0, -2153,2157,3,493,246,0,2154,2158,3,495,247,0,2155,2158,3,493,246,0,2156,2158, -7,1,0,0,2157,2154,1,0,0,0,2157,2155,1,0,0,0,2157,2156,1,0,0,0,2158,2159, -1,0,0,0,2159,2157,1,0,0,0,2159,2160,1,0,0,0,2160,480,1,0,0,0,2161,2167,5, -34,0,0,2162,2166,8,2,0,0,2163,2164,5,34,0,0,2164,2166,5,34,0,0,2165,2162, -1,0,0,0,2165,2163,1,0,0,0,2166,2169,1,0,0,0,2167,2165,1,0,0,0,2167,2168, -1,0,0,0,2168,2170,1,0,0,0,2169,2167,1,0,0,0,2170,2171,5,34,0,0,2171,482, -1,0,0,0,2172,2178,5,96,0,0,2173,2177,8,3,0,0,2174,2175,5,96,0,0,2175,2177, -5,96,0,0,2176,2173,1,0,0,0,2176,2174,1,0,0,0,2177,2180,1,0,0,0,2178,2176, -1,0,0,0,2178,2179,1,0,0,0,2179,2181,1,0,0,0,2180,2178,1,0,0,0,2181,2182, -5,96,0,0,2182,484,1,0,0,0,2183,2184,5,84,0,0,2184,2185,5,73,0,0,2185,2186, -5,77,0,0,2186,2187,5,69,0,0,2187,2188,1,0,0,0,2188,2189,3,501,250,0,2189, -2190,5,87,0,0,2190,2191,5,73,0,0,2191,2192,5,84,0,0,2192,2193,5,72,0,0,2193, -2194,1,0,0,0,2194,2195,3,501,250,0,2195,2196,5,84,0,0,2196,2197,5,73,0,0, -2197,2198,5,77,0,0,2198,2199,5,69,0,0,2199,2200,1,0,0,0,2200,2201,3,501, -250,0,2201,2202,5,90,0,0,2202,2203,5,79,0,0,2203,2204,5,78,0,0,2204,2205, -5,69,0,0,2205,486,1,0,0,0,2206,2207,5,84,0,0,2207,2208,5,73,0,0,2208,2209, -5,77,0,0,2209,2210,5,69,0,0,2210,2211,5,83,0,0,2211,2212,5,84,0,0,2212,2213, -5,65,0,0,2213,2214,5,77,0,0,2214,2215,5,80,0,0,2215,2216,1,0,0,0,2216,2217, -3,501,250,0,2217,2218,5,87,0,0,2218,2219,5,73,0,0,2219,2220,5,84,0,0,2220, -2221,5,72,0,0,2221,2222,1,0,0,0,2222,2223,3,501,250,0,2223,2224,5,84,0,0, -2224,2225,5,73,0,0,2225,2226,5,77,0,0,2226,2227,5,69,0,0,2227,2228,1,0,0, -0,2228,2229,3,501,250,0,2229,2230,5,90,0,0,2230,2231,5,79,0,0,2231,2232, -5,78,0,0,2232,2233,5,69,0,0,2233,488,1,0,0,0,2234,2235,5,68,0,0,2235,2236, -5,79,0,0,2236,2237,5,85,0,0,2237,2238,5,66,0,0,2238,2239,5,76,0,0,2239,2240, -5,69,0,0,2240,2241,1,0,0,0,2241,2242,3,501,250,0,2242,2243,5,80,0,0,2243, -2244,5,82,0,0,2244,2245,5,69,0,0,2245,2246,5,67,0,0,2246,2247,5,73,0,0,2247, -2248,5,83,0,0,2248,2249,5,73,0,0,2249,2250,5,79,0,0,2250,2251,5,78,0,0,2251, -490,1,0,0,0,2252,2254,5,69,0,0,2253,2255,7,4,0,0,2254,2253,1,0,0,0,2254, -2255,1,0,0,0,2255,2257,1,0,0,0,2256,2258,3,493,246,0,2257,2256,1,0,0,0,2258, -2259,1,0,0,0,2259,2257,1,0,0,0,2259,2260,1,0,0,0,2260,492,1,0,0,0,2261,2262, -7,5,0,0,2262,494,1,0,0,0,2263,2264,7,6,0,0,2264,496,1,0,0,0,2265,2266,5, -45,0,0,2266,2267,5,45,0,0,2267,2271,1,0,0,0,2268,2270,8,7,0,0,2269,2268, -1,0,0,0,2270,2273,1,0,0,0,2271,2269,1,0,0,0,2271,2272,1,0,0,0,2272,2275, -1,0,0,0,2273,2271,1,0,0,0,2274,2276,5,13,0,0,2275,2274,1,0,0,0,2275,2276, -1,0,0,0,2276,2278,1,0,0,0,2277,2279,5,10,0,0,2278,2277,1,0,0,0,2278,2279, -1,0,0,0,2279,2280,1,0,0,0,2280,2281,6,248,0,0,2281,498,1,0,0,0,2282,2283, -5,47,0,0,2283,2284,5,42,0,0,2284,2288,1,0,0,0,2285,2287,9,0,0,0,2286,2285, -1,0,0,0,2287,2290,1,0,0,0,2288,2289,1,0,0,0,2288,2286,1,0,0,0,2289,2291, -1,0,0,0,2290,2288,1,0,0,0,2291,2292,5,42,0,0,2292,2293,5,47,0,0,2293,2294, -1,0,0,0,2294,2295,6,249,0,0,2295,500,1,0,0,0,2296,2298,7,8,0,0,2297,2296, -1,0,0,0,2298,2299,1,0,0,0,2299,2297,1,0,0,0,2299,2300,1,0,0,0,2300,2301, -1,0,0,0,2301,2302,6,250,0,0,2302,502,1,0,0,0,2303,2304,9,0,0,0,2304,504, -1,0,0,0,33,0,2029,2058,2060,2072,2074,2085,2093,2098,2104,2111,2113,2118, -2124,2127,2135,2139,2143,2148,2150,2157,2159,2165,2167,2176,2178,2254,2259, -2271,2275,2278,2288,2299,1,0,1,0]; +1,42,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1, +44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44, +1,44,1,44,1,44,1,45,1,45,1,45,1,45,1,45,1,45,1,45,1,45,1,45,1,45,1,45,1, +45,1,45,1,46,1,46,1,46,1,46,1,46,1,47,1,47,1,47,1,47,1,47,1,48,1,48,1,48, +1,48,1,49,1,49,1,49,1,49,1,49,1,49,1,49,1,49,1,49,1,49,1,49,1,50,1,50,1, +50,1,50,1,50,1,50,1,50,1,50,1,51,1,51,1,51,1,51,1,51,1,51,1,51,1,52,1,52, +1,52,1,52,1,52,1,53,1,53,1,53,1,53,1,53,1,53,1,53,1,53,1,53,1,54,1,54,1, +54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,55,1,55,1,55,1,55,1,55,1,55, +1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,56,1,56,1,56,1,56,1,56,1,56,1, +56,1,56,1,56,1,57,1,57,1,57,1,57,1,57,1,57,1,57,1,57,1,57,1,58,1,58,1,58, +1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,59,1,59,1,59,1,59,1,59,1, +60,1,60,1,60,1,60,1,60,1,61,1,61,1,61,1,61,1,61,1,61,1,62,1,62,1,62,1,62, +1,62,1,62,1,62,1,62,1,63,1,63,1,63,1,63,1,64,1,64,1,64,1,64,1,64,1,64,1, +64,1,64,1,64,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,66,1,66,1,66,1,66,1,66, +1,66,1,66,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,68,1,68,1, +68,1,68,1,68,1,68,1,68,1,68,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,70,1,70, +1,70,1,70,1,70,1,70,1,70,1,70,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1, +72,1,72,1,72,1,72,1,72,1,72,1,72,1,72,1,72,1,73,1,73,1,73,1,73,1,73,1,73, +1,74,1,74,1,74,1,74,1,74,1,74,1,75,1,75,1,75,1,75,1,75,1,75,1,75,1,76,1, +76,1,76,1,76,1,76,1,76,1,77,1,77,1,77,1,77,1,77,1,77,1,77,1,77,1,77,1,77, +1,78,1,78,1,78,1,78,1,79,1,79,1,79,1,79,1,79,1,79,1,79,1,80,1,80,1,80,1, +80,1,80,1,81,1,81,1,81,1,81,1,81,1,82,1,82,1,82,1,82,1,82,1,82,1,82,1,82, +1,82,1,83,1,83,1,83,1,83,1,83,1,83,1,83,1,83,1,83,1,83,1,84,1,84,1,84,1, +84,1,84,1,84,1,85,1,85,1,85,1,85,1,85,1,85,1,85,1,85,1,86,1,86,1,86,1,86, +1,86,1,86,1,86,1,87,1,87,1,87,1,87,1,87,1,87,1,87,1,87,1,87,1,88,1,88,1, +88,1,88,1,88,1,88,1,89,1,89,1,89,1,89,1,89,1,89,1,89,1,89,1,89,1,90,1,90, +1,90,1,90,1,90,1,90,1,90,1,91,1,91,1,91,1,91,1,91,1,91,1,91,1,92,1,92,1, +92,1,92,1,92,1,93,1,93,1,93,1,94,1,94,1,94,1,94,1,94,1,94,1,94,1,95,1,95, +1,95,1,96,1,96,1,96,1,96,1,96,1,96,1,96,1,96,1,96,1,96,1,97,1,97,1,97,1, +97,1,97,1,97,1,98,1,98,1,98,1,98,1,98,1,98,1,99,1,99,1,99,1,99,1,99,1,99, +1,99,1,100,1,100,1,100,1,100,1,100,1,100,1,100,1,100,1,100,1,100,1,101,1, +101,1,101,1,101,1,101,1,101,1,101,1,101,1,101,1,102,1,102,1,102,1,102,1, +102,1,103,1,103,1,103,1,103,1,103,1,103,1,103,1,103,1,104,1,104,1,104,1, +105,1,105,1,105,1,106,1,106,1,106,1,106,1,106,1,106,1,106,1,106,1,106,1, +106,1,107,1,107,1,107,1,107,1,107,1,108,1,108,1,108,1,108,1,108,1,109,1, +109,1,109,1,109,1,109,1,110,1,110,1,110,1,110,1,111,1,111,1,111,1,111,1, +111,1,111,1,111,1,111,1,111,1,112,1,112,1,112,1,112,1,112,1,113,1,113,1, +113,1,113,1,113,1,113,1,113,1,113,1,114,1,114,1,114,1,114,1,114,1,115,1, +115,1,115,1,115,1,115,1,115,1,116,1,116,1,116,1,116,1,116,1,117,1,117,1, +117,1,117,1,117,1,117,1,118,1,118,1,118,1,118,1,118,1,118,1,118,1,118,1, +118,1,118,1,119,1,119,1,119,1,119,1,119,1,119,1,119,1,119,1,119,1,119,1, +119,1,119,1,119,1,119,1,119,1,120,1,120,1,120,1,120,1,120,1,120,1,120,1, +120,1,121,1,121,1,121,1,121,1,122,1,122,1,122,1,122,1,122,1,122,1,122,1, +122,1,123,1,123,1,123,1,123,1,123,1,123,1,123,1,123,1,123,1,123,1,123,1, +123,1,123,1,124,1,124,1,124,1,124,1,124,1,124,1,125,1,125,1,125,1,125,1, +125,1,125,1,125,1,126,1,126,1,126,1,126,1,126,1,126,1,127,1,127,1,127,1, +127,1,127,1,128,1,128,1,128,1,128,1,128,1,128,1,128,1,128,1,129,1,129,1, +129,1,129,1,130,1,130,1,130,1,130,1,131,1,131,1,131,1,131,1,131,1,132,1, +132,1,132,1,132,1,132,1,133,1,133,1,133,1,134,1,134,1,134,1,134,1,134,1, +135,1,135,1,135,1,135,1,135,1,135,1,135,1,135,1,135,1,135,1,136,1,136,1, +136,1,136,1,137,1,137,1,137,1,137,1,137,1,138,1,138,1,138,1,138,1,138,1, +138,1,138,1,139,1,139,1,139,1,139,1,139,1,139,1,140,1,140,1,140,1,141,1, +141,1,141,1,141,1,141,1,141,1,141,1,142,1,142,1,142,1,143,1,143,1,143,1, +143,1,143,1,144,1,144,1,144,1,144,1,144,1,144,1,144,1,145,1,145,1,145,1, +146,1,146,1,146,1,146,1,146,1,146,1,147,1,147,1,147,1,147,1,147,1,147,1, +147,1,147,1,147,1,147,1,147,1,148,1,148,1,148,1,148,1,148,1,148,1,149,1, +149,1,149,1,149,1,149,1,149,1,149,1,150,1,150,1,150,1,150,1,150,1,151,1, +151,1,151,1,151,1,151,1,151,1,151,1,151,1,151,1,151,1,152,1,152,1,152,1, +152,1,152,1,152,1,152,1,152,1,152,1,152,1,152,1,153,1,153,1,153,1,153,1, +153,1,153,1,153,1,153,1,153,1,154,1,154,1,154,1,154,1,154,1,154,1,154,1, +154,1,154,1,154,1,155,1,155,1,155,1,155,1,155,1,155,1,155,1,155,1,156,1, +156,1,156,1,156,1,156,1,156,1,156,1,156,1,157,1,157,1,157,1,157,1,157,1, +157,1,157,1,157,1,157,1,157,1,157,1,158,1,158,1,158,1,158,1,158,1,158,1, +158,1,158,1,158,1,158,1,158,1,159,1,159,1,159,1,159,1,159,1,159,1,160,1, +160,1,160,1,160,1,160,1,160,1,161,1,161,1,161,1,161,1,161,1,162,1,162,1, +162,1,162,1,162,1,162,1,162,1,162,1,162,1,162,1,163,1,163,1,163,1,163,1, +163,1,163,1,163,1,163,1,164,1,164,1,164,1,164,1,164,1,165,1,165,1,165,1, +165,1,165,1,165,1,165,1,166,1,166,1,166,1,166,1,166,1,166,1,166,1,166,1, +166,1,166,1,166,1,167,1,167,1,167,1,167,1,167,1,167,1,167,1,167,1,168,1, +168,1,168,1,168,1,168,1,168,1,169,1,169,1,169,1,169,1,169,1,169,1,169,1, +169,1,170,1,170,1,170,1,170,1,170,1,170,1,170,1,170,1,170,1,171,1,171,1, +171,1,171,1,171,1,171,1,171,1,172,1,172,1,172,1,172,1,172,1,172,1,172,1, +172,1,173,1,173,1,173,1,173,1,173,1,173,1,173,1,174,1,174,1,174,1,174,1, +174,1,174,1,175,1,175,1,175,1,175,1,175,1,176,1,176,1,176,1,176,1,176,1, +176,1,177,1,177,1,177,1,177,1,177,1,177,1,177,1,177,1,177,1,178,1,178,1, +178,1,178,1,178,1,178,1,178,1,179,1,179,1,179,1,179,1,180,1,180,1,180,1, +180,1,180,1,181,1,181,1,181,1,181,1,181,1,181,1,181,1,182,1,182,1,182,1, +182,1,182,1,182,1,182,1,182,1,183,1,183,1,183,1,183,1,183,1,183,1,183,1, +184,1,184,1,184,1,184,1,184,1,184,1,184,1,184,1,184,1,185,1,185,1,185,1, +185,1,185,1,185,1,185,1,186,1,186,1,186,1,186,1,186,1,186,1,186,1,186,1, +186,1,186,1,186,1,186,1,186,1,187,1,187,1,187,1,187,1,187,1,187,1,187,1, +187,1,188,1,188,1,188,1,188,1,189,1,189,1,189,1,189,1,189,1,190,1,190,1, +190,1,190,1,190,1,191,1,191,1,191,1,191,1,191,1,192,1,192,1,192,1,192,1, +193,1,193,1,193,1,193,1,193,1,193,1,194,1,194,1,194,1,194,1,194,1,194,1, +195,1,195,1,195,1,195,1,195,1,195,1,195,1,195,1,195,1,195,1,196,1,196,1, +196,1,196,1,196,1,196,1,196,1,197,1,197,1,197,1,197,1,197,1,197,1,197,1, +197,1,197,1,197,1,197,1,197,1,198,1,198,1,198,1,198,1,198,1,198,1,198,1, +198,1,198,1,198,1,198,1,198,1,198,1,198,1,198,1,199,1,199,1,199,1,199,1, +199,1,199,1,200,1,200,1,200,1,200,1,200,1,200,1,200,1,201,1,201,1,201,1, +201,1,201,1,201,1,201,1,201,1,201,1,201,1,201,1,201,1,202,1,202,1,202,1, +202,1,202,1,202,1,202,1,202,1,202,1,202,1,203,1,203,1,203,1,203,1,203,1, +204,1,204,1,204,1,204,1,204,1,205,1,205,1,205,1,205,1,205,1,206,1,206,1, +206,1,206,1,206,1,206,1,206,1,206,1,206,1,206,1,207,1,207,1,207,1,208,1, +208,1,208,1,208,1,208,1,208,1,208,1,208,1,208,1,208,1,208,1,208,1,209,1, +209,1,209,1,209,1,209,1,210,1,210,1,210,1,210,1,210,1,210,1,210,1,210,1, +210,1,211,1,211,1,211,1,211,1,211,1,211,1,211,1,211,1,211,1,212,1,212,1, +212,1,212,1,212,1,213,1,213,1,213,1,213,1,213,1,213,1,213,1,213,1,214,1, +214,1,214,1,214,1,214,1,214,1,214,1,214,1,214,1,214,1,215,1,215,1,215,1, +215,1,215,1,215,1,215,1,215,1,215,1,215,1,215,1,215,1,216,1,216,1,216,1, +216,1,216,1,216,1,217,1,217,1,217,1,217,1,217,1,217,1,217,1,218,1,218,1, +218,1,218,1,218,1,218,1,218,1,219,1,219,1,219,1,219,1,219,1,219,1,219,1, +220,1,220,1,220,1,220,1,221,1,221,1,221,1,221,1,221,1,222,1,222,1,222,1, +222,1,222,1,222,1,223,1,223,1,223,1,223,1,223,1,223,1,223,1,223,1,223,1, +224,1,224,1,224,1,224,1,224,1,224,1,224,1,225,1,225,1,225,1,225,1,225,1, +225,1,225,1,225,1,226,1,226,1,226,1,226,1,226,1,226,1,226,1,226,1,227,1, +227,1,227,1,227,1,227,1,228,1,228,1,228,1,228,1,228,1,229,1,229,1,229,1, +229,1,229,1,229,1,230,1,230,1,230,1,230,1,230,1,231,1,231,1,231,1,231,1, +231,1,232,1,232,1,232,1,232,1,232,1,232,1,233,1,233,1,233,1,233,1,233,1, +234,1,234,1,234,1,234,1,234,1,235,1,235,1,236,1,236,1,236,1,236,3,236,2171, +8,236,1,237,1,237,1,238,1,238,1,238,1,239,1,239,1,240,1,240,1,240,1,241, +1,241,1,242,1,242,1,243,1,243,1,244,1,244,1,245,1,245,1,246,1,246,1,246, +1,247,1,247,1,247,1,247,5,247,2200,8,247,10,247,12,247,2203,9,247,1,247, +1,247,1,248,1,248,1,248,1,248,1,248,1,248,1,248,5,248,2214,8,248,10,248, +12,248,2217,9,248,1,248,1,248,1,249,1,249,1,249,1,249,5,249,2225,8,249,10, +249,12,249,2228,9,249,1,249,1,249,1,250,4,250,2233,8,250,11,250,12,250,2234, +1,251,4,251,2238,8,251,11,251,12,251,2239,1,251,1,251,5,251,2244,8,251,10, +251,12,251,2247,9,251,1,251,1,251,4,251,2251,8,251,11,251,12,251,2252,3, +251,2255,8,251,1,252,4,252,2258,8,252,11,252,12,252,2259,1,252,1,252,5,252, +2264,8,252,10,252,12,252,2267,9,252,3,252,2269,8,252,1,252,1,252,1,252,1, +252,4,252,2275,8,252,11,252,12,252,2276,1,252,1,252,3,252,2281,8,252,1,253, +1,253,3,253,2285,8,253,1,253,1,253,1,253,5,253,2290,8,253,10,253,12,253, +2293,9,253,1,254,1,254,1,254,1,254,4,254,2299,8,254,11,254,12,254,2300,1, +255,1,255,1,255,1,255,5,255,2307,8,255,10,255,12,255,2310,9,255,1,255,1, +255,1,256,1,256,1,256,1,256,5,256,2318,8,256,10,256,12,256,2321,9,256,1, +256,1,256,1,257,1,257,1,257,1,257,1,257,1,257,1,257,1,257,1,257,1,257,1, +257,1,257,1,257,1,257,1,257,1,257,1,257,1,257,1,257,1,257,1,257,1,257,1, +257,1,258,1,258,1,258,1,258,1,258,1,258,1,258,1,258,1,258,1,258,1,258,1, +258,1,258,1,258,1,258,1,258,1,258,1,258,1,258,1,258,1,258,1,258,1,258,1, +258,1,258,1,258,1,258,1,258,1,259,1,259,1,259,1,259,1,259,1,259,1,259,1, +259,1,259,1,259,1,259,1,259,1,259,1,259,1,259,1,259,1,259,1,259,1,260,1, +260,3,260,2396,8,260,1,260,4,260,2399,8,260,11,260,12,260,2400,1,261,1,261, +1,262,1,262,1,263,1,263,1,263,1,263,5,263,2411,8,263,10,263,12,263,2414, +9,263,1,263,3,263,2417,8,263,1,263,3,263,2420,8,263,1,263,1,263,1,264,1, +264,1,264,1,264,5,264,2428,8,264,10,264,12,264,2431,9,264,1,264,1,264,1, +264,1,264,1,264,1,265,4,265,2439,8,265,11,265,12,265,2440,1,265,1,265,1, +266,1,266,1,2429,0,267,1,1,3,2,5,3,7,4,9,5,11,6,13,7,15,8,17,9,19,10,21, +11,23,12,25,13,27,14,29,15,31,16,33,17,35,18,37,19,39,20,41,21,43,22,45, +23,47,24,49,25,51,26,53,27,55,28,57,29,59,30,61,31,63,32,65,33,67,34,69, +35,71,36,73,37,75,38,77,39,79,40,81,41,83,42,85,43,87,44,89,45,91,46,93, +47,95,48,97,49,99,50,101,51,103,52,105,53,107,54,109,55,111,56,113,57,115, +58,117,59,119,60,121,61,123,62,125,63,127,64,129,65,131,66,133,67,135,68, +137,69,139,70,141,71,143,72,145,73,147,74,149,75,151,76,153,77,155,78,157, +79,159,80,161,81,163,82,165,83,167,84,169,85,171,86,173,87,175,88,177,89, +179,90,181,91,183,92,185,93,187,94,189,95,191,96,193,97,195,98,197,99,199, +100,201,101,203,102,205,103,207,104,209,105,211,106,213,107,215,108,217, +109,219,110,221,111,223,112,225,113,227,114,229,115,231,116,233,117,235, +118,237,119,239,120,241,121,243,122,245,123,247,124,249,125,251,126,253, +127,255,128,257,129,259,130,261,131,263,132,265,133,267,134,269,135,271, +136,273,137,275,138,277,139,279,140,281,141,283,142,285,143,287,144,289, +145,291,146,293,147,295,148,297,149,299,150,301,151,303,152,305,153,307, +154,309,155,311,156,313,157,315,158,317,159,319,160,321,161,323,162,325, +163,327,164,329,165,331,166,333,167,335,168,337,169,339,170,341,171,343, +172,345,173,347,174,349,175,351,176,353,177,355,178,357,179,359,180,361, +181,363,182,365,183,367,184,369,185,371,186,373,187,375,188,377,189,379, +190,381,191,383,192,385,193,387,194,389,195,391,196,393,197,395,198,397, +199,399,200,401,201,403,202,405,203,407,204,409,205,411,206,413,207,415, +208,417,209,419,210,421,211,423,212,425,213,427,214,429,215,431,216,433, +217,435,218,437,219,439,220,441,221,443,222,445,223,447,224,449,225,451, +226,453,227,455,228,457,229,459,230,461,231,463,232,465,233,467,234,469, +235,471,236,473,237,475,238,477,239,479,240,481,241,483,242,485,243,487, +244,489,245,491,246,493,247,495,248,497,249,499,250,501,251,503,252,505, +253,507,254,509,255,511,256,513,257,515,258,517,259,519,260,521,0,523,0, +525,0,527,261,529,262,531,263,533,264,1,0,9,1,0,39,39,3,0,58,58,64,64,95, +95,1,0,34,34,1,0,96,96,2,0,43,43,45,45,1,0,48,57,1,0,65,90,2,0,10,10,13, +13,3,0,9,10,13,13,32,32,2476,0,1,1,0,0,0,0,3,1,0,0,0,0,5,1,0,0,0,0,7,1,0, +0,0,0,9,1,0,0,0,0,11,1,0,0,0,0,13,1,0,0,0,0,15,1,0,0,0,0,17,1,0,0,0,0,19, +1,0,0,0,0,21,1,0,0,0,0,23,1,0,0,0,0,25,1,0,0,0,0,27,1,0,0,0,0,29,1,0,0,0, +0,31,1,0,0,0,0,33,1,0,0,0,0,35,1,0,0,0,0,37,1,0,0,0,0,39,1,0,0,0,0,41,1, +0,0,0,0,43,1,0,0,0,0,45,1,0,0,0,0,47,1,0,0,0,0,49,1,0,0,0,0,51,1,0,0,0,0, +53,1,0,0,0,0,55,1,0,0,0,0,57,1,0,0,0,0,59,1,0,0,0,0,61,1,0,0,0,0,63,1,0, +0,0,0,65,1,0,0,0,0,67,1,0,0,0,0,69,1,0,0,0,0,71,1,0,0,0,0,73,1,0,0,0,0,75, +1,0,0,0,0,77,1,0,0,0,0,79,1,0,0,0,0,81,1,0,0,0,0,83,1,0,0,0,0,85,1,0,0,0, +0,87,1,0,0,0,0,89,1,0,0,0,0,91,1,0,0,0,0,93,1,0,0,0,0,95,1,0,0,0,0,97,1, +0,0,0,0,99,1,0,0,0,0,101,1,0,0,0,0,103,1,0,0,0,0,105,1,0,0,0,0,107,1,0,0, +0,0,109,1,0,0,0,0,111,1,0,0,0,0,113,1,0,0,0,0,115,1,0,0,0,0,117,1,0,0,0, +0,119,1,0,0,0,0,121,1,0,0,0,0,123,1,0,0,0,0,125,1,0,0,0,0,127,1,0,0,0,0, +129,1,0,0,0,0,131,1,0,0,0,0,133,1,0,0,0,0,135,1,0,0,0,0,137,1,0,0,0,0,139, +1,0,0,0,0,141,1,0,0,0,0,143,1,0,0,0,0,145,1,0,0,0,0,147,1,0,0,0,0,149,1, +0,0,0,0,151,1,0,0,0,0,153,1,0,0,0,0,155,1,0,0,0,0,157,1,0,0,0,0,159,1,0, +0,0,0,161,1,0,0,0,0,163,1,0,0,0,0,165,1,0,0,0,0,167,1,0,0,0,0,169,1,0,0, +0,0,171,1,0,0,0,0,173,1,0,0,0,0,175,1,0,0,0,0,177,1,0,0,0,0,179,1,0,0,0, +0,181,1,0,0,0,0,183,1,0,0,0,0,185,1,0,0,0,0,187,1,0,0,0,0,189,1,0,0,0,0, +191,1,0,0,0,0,193,1,0,0,0,0,195,1,0,0,0,0,197,1,0,0,0,0,199,1,0,0,0,0,201, +1,0,0,0,0,203,1,0,0,0,0,205,1,0,0,0,0,207,1,0,0,0,0,209,1,0,0,0,0,211,1, +0,0,0,0,213,1,0,0,0,0,215,1,0,0,0,0,217,1,0,0,0,0,219,1,0,0,0,0,221,1,0, +0,0,0,223,1,0,0,0,0,225,1,0,0,0,0,227,1,0,0,0,0,229,1,0,0,0,0,231,1,0,0, +0,0,233,1,0,0,0,0,235,1,0,0,0,0,237,1,0,0,0,0,239,1,0,0,0,0,241,1,0,0,0, +0,243,1,0,0,0,0,245,1,0,0,0,0,247,1,0,0,0,0,249,1,0,0,0,0,251,1,0,0,0,0, +253,1,0,0,0,0,255,1,0,0,0,0,257,1,0,0,0,0,259,1,0,0,0,0,261,1,0,0,0,0,263, +1,0,0,0,0,265,1,0,0,0,0,267,1,0,0,0,0,269,1,0,0,0,0,271,1,0,0,0,0,273,1, +0,0,0,0,275,1,0,0,0,0,277,1,0,0,0,0,279,1,0,0,0,0,281,1,0,0,0,0,283,1,0, +0,0,0,285,1,0,0,0,0,287,1,0,0,0,0,289,1,0,0,0,0,291,1,0,0,0,0,293,1,0,0, +0,0,295,1,0,0,0,0,297,1,0,0,0,0,299,1,0,0,0,0,301,1,0,0,0,0,303,1,0,0,0, +0,305,1,0,0,0,0,307,1,0,0,0,0,309,1,0,0,0,0,311,1,0,0,0,0,313,1,0,0,0,0, +315,1,0,0,0,0,317,1,0,0,0,0,319,1,0,0,0,0,321,1,0,0,0,0,323,1,0,0,0,0,325, +1,0,0,0,0,327,1,0,0,0,0,329,1,0,0,0,0,331,1,0,0,0,0,333,1,0,0,0,0,335,1, +0,0,0,0,337,1,0,0,0,0,339,1,0,0,0,0,341,1,0,0,0,0,343,1,0,0,0,0,345,1,0, +0,0,0,347,1,0,0,0,0,349,1,0,0,0,0,351,1,0,0,0,0,353,1,0,0,0,0,355,1,0,0, +0,0,357,1,0,0,0,0,359,1,0,0,0,0,361,1,0,0,0,0,363,1,0,0,0,0,365,1,0,0,0, +0,367,1,0,0,0,0,369,1,0,0,0,0,371,1,0,0,0,0,373,1,0,0,0,0,375,1,0,0,0,0, +377,1,0,0,0,0,379,1,0,0,0,0,381,1,0,0,0,0,383,1,0,0,0,0,385,1,0,0,0,0,387, +1,0,0,0,0,389,1,0,0,0,0,391,1,0,0,0,0,393,1,0,0,0,0,395,1,0,0,0,0,397,1, +0,0,0,0,399,1,0,0,0,0,401,1,0,0,0,0,403,1,0,0,0,0,405,1,0,0,0,0,407,1,0, +0,0,0,409,1,0,0,0,0,411,1,0,0,0,0,413,1,0,0,0,0,415,1,0,0,0,0,417,1,0,0, +0,0,419,1,0,0,0,0,421,1,0,0,0,0,423,1,0,0,0,0,425,1,0,0,0,0,427,1,0,0,0, +0,429,1,0,0,0,0,431,1,0,0,0,0,433,1,0,0,0,0,435,1,0,0,0,0,437,1,0,0,0,0, +439,1,0,0,0,0,441,1,0,0,0,0,443,1,0,0,0,0,445,1,0,0,0,0,447,1,0,0,0,0,449, +1,0,0,0,0,451,1,0,0,0,0,453,1,0,0,0,0,455,1,0,0,0,0,457,1,0,0,0,0,459,1, +0,0,0,0,461,1,0,0,0,0,463,1,0,0,0,0,465,1,0,0,0,0,467,1,0,0,0,0,469,1,0, +0,0,0,471,1,0,0,0,0,473,1,0,0,0,0,475,1,0,0,0,0,477,1,0,0,0,0,479,1,0,0, +0,0,481,1,0,0,0,0,483,1,0,0,0,0,485,1,0,0,0,0,487,1,0,0,0,0,489,1,0,0,0, +0,491,1,0,0,0,0,493,1,0,0,0,0,495,1,0,0,0,0,497,1,0,0,0,0,499,1,0,0,0,0, +501,1,0,0,0,0,503,1,0,0,0,0,505,1,0,0,0,0,507,1,0,0,0,0,509,1,0,0,0,0,511, +1,0,0,0,0,513,1,0,0,0,0,515,1,0,0,0,0,517,1,0,0,0,0,519,1,0,0,0,0,527,1, +0,0,0,0,529,1,0,0,0,0,531,1,0,0,0,0,533,1,0,0,0,1,535,1,0,0,0,3,537,1,0, +0,0,5,539,1,0,0,0,7,541,1,0,0,0,9,543,1,0,0,0,11,545,1,0,0,0,13,548,1,0, +0,0,15,550,1,0,0,0,17,552,1,0,0,0,19,555,1,0,0,0,21,559,1,0,0,0,23,565,1, +0,0,0,25,569,1,0,0,0,27,575,1,0,0,0,29,583,1,0,0,0,31,587,1,0,0,0,33,591, +1,0,0,0,35,597,1,0,0,0,37,600,1,0,0,0,39,604,1,0,0,0,41,607,1,0,0,0,43,614, +1,0,0,0,45,624,1,0,0,0,47,632,1,0,0,0,49,635,1,0,0,0,51,640,1,0,0,0,53,647, +1,0,0,0,55,655,1,0,0,0,57,660,1,0,0,0,59,665,1,0,0,0,61,674,1,0,0,0,63,681, +1,0,0,0,65,689,1,0,0,0,67,697,1,0,0,0,69,704,1,0,0,0,71,714,1,0,0,0,73,725, +1,0,0,0,75,732,1,0,0,0,77,744,1,0,0,0,79,750,1,0,0,0,81,755,1,0,0,0,83,763, +1,0,0,0,85,776,1,0,0,0,87,789,1,0,0,0,89,802,1,0,0,0,91,820,1,0,0,0,93,833, +1,0,0,0,95,838,1,0,0,0,97,843,1,0,0,0,99,847,1,0,0,0,101,858,1,0,0,0,103, +866,1,0,0,0,105,873,1,0,0,0,107,878,1,0,0,0,109,887,1,0,0,0,111,898,1,0, +0,0,113,912,1,0,0,0,115,921,1,0,0,0,117,930,1,0,0,0,119,942,1,0,0,0,121, +947,1,0,0,0,123,952,1,0,0,0,125,958,1,0,0,0,127,966,1,0,0,0,129,970,1,0, +0,0,131,979,1,0,0,0,133,986,1,0,0,0,135,993,1,0,0,0,137,1003,1,0,0,0,139, +1011,1,0,0,0,141,1018,1,0,0,0,143,1026,1,0,0,0,145,1034,1,0,0,0,147,1043, +1,0,0,0,149,1049,1,0,0,0,151,1055,1,0,0,0,153,1062,1,0,0,0,155,1068,1,0, +0,0,157,1078,1,0,0,0,159,1082,1,0,0,0,161,1089,1,0,0,0,163,1094,1,0,0,0, +165,1099,1,0,0,0,167,1108,1,0,0,0,169,1118,1,0,0,0,171,1124,1,0,0,0,173, +1132,1,0,0,0,175,1139,1,0,0,0,177,1148,1,0,0,0,179,1154,1,0,0,0,181,1163, +1,0,0,0,183,1170,1,0,0,0,185,1177,1,0,0,0,187,1182,1,0,0,0,189,1185,1,0, +0,0,191,1192,1,0,0,0,193,1195,1,0,0,0,195,1205,1,0,0,0,197,1211,1,0,0,0, +199,1217,1,0,0,0,201,1224,1,0,0,0,203,1234,1,0,0,0,205,1243,1,0,0,0,207, +1248,1,0,0,0,209,1256,1,0,0,0,211,1259,1,0,0,0,213,1262,1,0,0,0,215,1272, +1,0,0,0,217,1277,1,0,0,0,219,1282,1,0,0,0,221,1287,1,0,0,0,223,1291,1,0, +0,0,225,1300,1,0,0,0,227,1305,1,0,0,0,229,1313,1,0,0,0,231,1318,1,0,0,0, +233,1324,1,0,0,0,235,1329,1,0,0,0,237,1335,1,0,0,0,239,1345,1,0,0,0,241, +1360,1,0,0,0,243,1368,1,0,0,0,245,1372,1,0,0,0,247,1380,1,0,0,0,249,1393, +1,0,0,0,251,1399,1,0,0,0,253,1406,1,0,0,0,255,1412,1,0,0,0,257,1417,1,0, +0,0,259,1425,1,0,0,0,261,1429,1,0,0,0,263,1433,1,0,0,0,265,1438,1,0,0,0, +267,1443,1,0,0,0,269,1446,1,0,0,0,271,1451,1,0,0,0,273,1461,1,0,0,0,275, +1465,1,0,0,0,277,1470,1,0,0,0,279,1477,1,0,0,0,281,1483,1,0,0,0,283,1486, +1,0,0,0,285,1493,1,0,0,0,287,1496,1,0,0,0,289,1501,1,0,0,0,291,1508,1,0, +0,0,293,1511,1,0,0,0,295,1517,1,0,0,0,297,1528,1,0,0,0,299,1534,1,0,0,0, +301,1541,1,0,0,0,303,1546,1,0,0,0,305,1556,1,0,0,0,307,1567,1,0,0,0,309, +1576,1,0,0,0,311,1586,1,0,0,0,313,1594,1,0,0,0,315,1602,1,0,0,0,317,1613, +1,0,0,0,319,1624,1,0,0,0,321,1630,1,0,0,0,323,1636,1,0,0,0,325,1641,1,0, +0,0,327,1651,1,0,0,0,329,1659,1,0,0,0,331,1664,1,0,0,0,333,1671,1,0,0,0, +335,1682,1,0,0,0,337,1690,1,0,0,0,339,1696,1,0,0,0,341,1704,1,0,0,0,343, +1713,1,0,0,0,345,1720,1,0,0,0,347,1728,1,0,0,0,349,1735,1,0,0,0,351,1741, +1,0,0,0,353,1746,1,0,0,0,355,1752,1,0,0,0,357,1761,1,0,0,0,359,1768,1,0, +0,0,361,1772,1,0,0,0,363,1777,1,0,0,0,365,1784,1,0,0,0,367,1792,1,0,0,0, +369,1799,1,0,0,0,371,1808,1,0,0,0,373,1815,1,0,0,0,375,1828,1,0,0,0,377, +1836,1,0,0,0,379,1840,1,0,0,0,381,1845,1,0,0,0,383,1850,1,0,0,0,385,1855, +1,0,0,0,387,1859,1,0,0,0,389,1865,1,0,0,0,391,1871,1,0,0,0,393,1881,1,0, +0,0,395,1888,1,0,0,0,397,1900,1,0,0,0,399,1915,1,0,0,0,401,1921,1,0,0,0, +403,1928,1,0,0,0,405,1940,1,0,0,0,407,1950,1,0,0,0,409,1955,1,0,0,0,411, +1960,1,0,0,0,413,1965,1,0,0,0,415,1975,1,0,0,0,417,1978,1,0,0,0,419,1990, +1,0,0,0,421,1995,1,0,0,0,423,2004,1,0,0,0,425,2013,1,0,0,0,427,2018,1,0, +0,0,429,2026,1,0,0,0,431,2036,1,0,0,0,433,2048,1,0,0,0,435,2054,1,0,0,0, +437,2061,1,0,0,0,439,2068,1,0,0,0,441,2075,1,0,0,0,443,2079,1,0,0,0,445, +2084,1,0,0,0,447,2090,1,0,0,0,449,2099,1,0,0,0,451,2106,1,0,0,0,453,2114, +1,0,0,0,455,2122,1,0,0,0,457,2127,1,0,0,0,459,2132,1,0,0,0,461,2138,1,0, +0,0,463,2143,1,0,0,0,465,2148,1,0,0,0,467,2154,1,0,0,0,469,2159,1,0,0,0, +471,2164,1,0,0,0,473,2170,1,0,0,0,475,2172,1,0,0,0,477,2174,1,0,0,0,479, +2177,1,0,0,0,481,2179,1,0,0,0,483,2182,1,0,0,0,485,2184,1,0,0,0,487,2186, +1,0,0,0,489,2188,1,0,0,0,491,2190,1,0,0,0,493,2192,1,0,0,0,495,2195,1,0, +0,0,497,2206,1,0,0,0,499,2220,1,0,0,0,501,2232,1,0,0,0,503,2254,1,0,0,0, +505,2280,1,0,0,0,507,2284,1,0,0,0,509,2294,1,0,0,0,511,2302,1,0,0,0,513, +2313,1,0,0,0,515,2324,1,0,0,0,517,2347,1,0,0,0,519,2375,1,0,0,0,521,2393, +1,0,0,0,523,2402,1,0,0,0,525,2404,1,0,0,0,527,2406,1,0,0,0,529,2423,1,0, +0,0,531,2438,1,0,0,0,533,2444,1,0,0,0,535,536,5,46,0,0,536,2,1,0,0,0,537, +538,5,40,0,0,538,4,1,0,0,0,539,540,5,41,0,0,540,6,1,0,0,0,541,542,5,44,0, +0,542,8,1,0,0,0,543,544,5,63,0,0,544,10,1,0,0,0,545,546,5,45,0,0,546,547, +5,62,0,0,547,12,1,0,0,0,548,549,5,91,0,0,549,14,1,0,0,0,550,551,5,93,0,0, +551,16,1,0,0,0,552,553,5,61,0,0,553,554,5,62,0,0,554,18,1,0,0,0,555,556, +5,65,0,0,556,557,5,68,0,0,557,558,5,68,0,0,558,20,1,0,0,0,559,560,5,65,0, +0,560,561,5,68,0,0,561,562,5,77,0,0,562,563,5,73,0,0,563,564,5,78,0,0,564, +22,1,0,0,0,565,566,5,65,0,0,566,567,5,76,0,0,567,568,5,76,0,0,568,24,1,0, +0,0,569,570,5,65,0,0,570,571,5,76,0,0,571,572,5,84,0,0,572,573,5,69,0,0, +573,574,5,82,0,0,574,26,1,0,0,0,575,576,5,65,0,0,576,577,5,78,0,0,577,578, +5,65,0,0,578,579,5,76,0,0,579,580,5,89,0,0,580,581,5,90,0,0,581,582,5,69, +0,0,582,28,1,0,0,0,583,584,5,65,0,0,584,585,5,78,0,0,585,586,5,68,0,0,586, +30,1,0,0,0,587,588,5,65,0,0,588,589,5,78,0,0,589,590,5,89,0,0,590,32,1,0, +0,0,591,592,5,65,0,0,592,593,5,82,0,0,593,594,5,82,0,0,594,595,5,65,0,0, +595,596,5,89,0,0,596,34,1,0,0,0,597,598,5,65,0,0,598,599,5,83,0,0,599,36, +1,0,0,0,600,601,5,65,0,0,601,602,5,83,0,0,602,603,5,67,0,0,603,38,1,0,0, +0,604,605,5,65,0,0,605,606,5,84,0,0,606,40,1,0,0,0,607,608,5,66,0,0,608, +609,5,69,0,0,609,610,5,70,0,0,610,611,5,79,0,0,611,612,5,82,0,0,612,613, +5,69,0,0,613,42,1,0,0,0,614,615,5,66,0,0,615,616,5,69,0,0,616,617,5,82,0, +0,617,618,5,78,0,0,618,619,5,79,0,0,619,620,5,85,0,0,620,621,5,76,0,0,621, +622,5,76,0,0,622,623,5,73,0,0,623,44,1,0,0,0,624,625,5,66,0,0,625,626,5, +69,0,0,626,627,5,84,0,0,627,628,5,87,0,0,628,629,5,69,0,0,629,630,5,69,0, +0,630,631,5,78,0,0,631,46,1,0,0,0,632,633,5,66,0,0,633,634,5,89,0,0,634, +48,1,0,0,0,635,636,5,67,0,0,636,637,5,65,0,0,637,638,5,76,0,0,638,639,5, +76,0,0,639,50,1,0,0,0,640,641,5,67,0,0,641,642,5,65,0,0,642,643,5,76,0,0, +643,644,5,76,0,0,644,645,5,69,0,0,645,646,5,68,0,0,646,52,1,0,0,0,647,648, +5,67,0,0,648,649,5,65,0,0,649,650,5,83,0,0,650,651,5,67,0,0,651,652,5,65, +0,0,652,653,5,68,0,0,653,654,5,69,0,0,654,54,1,0,0,0,655,656,5,67,0,0,656, +657,5,65,0,0,657,658,5,83,0,0,658,659,5,69,0,0,659,56,1,0,0,0,660,661,5, +67,0,0,661,662,5,65,0,0,662,663,5,83,0,0,663,664,5,84,0,0,664,58,1,0,0,0, +665,666,5,67,0,0,666,667,5,65,0,0,667,668,5,84,0,0,668,669,5,65,0,0,669, +670,5,76,0,0,670,671,5,79,0,0,671,672,5,71,0,0,672,673,5,83,0,0,673,60,1, +0,0,0,674,675,5,67,0,0,675,676,5,79,0,0,676,677,5,76,0,0,677,678,5,85,0, +0,678,679,5,77,0,0,679,680,5,78,0,0,680,62,1,0,0,0,681,682,5,67,0,0,682, +683,5,79,0,0,683,684,5,76,0,0,684,685,5,85,0,0,685,686,5,77,0,0,686,687, +5,78,0,0,687,688,5,83,0,0,688,64,1,0,0,0,689,690,5,67,0,0,690,691,5,79,0, +0,691,692,5,77,0,0,692,693,5,77,0,0,693,694,5,69,0,0,694,695,5,78,0,0,695, +696,5,84,0,0,696,66,1,0,0,0,697,698,5,67,0,0,698,699,5,79,0,0,699,700,5, +77,0,0,700,701,5,77,0,0,701,702,5,73,0,0,702,703,5,84,0,0,703,68,1,0,0,0, +704,705,5,67,0,0,705,706,5,79,0,0,706,707,5,77,0,0,707,708,5,77,0,0,708, +709,5,73,0,0,709,710,5,84,0,0,710,711,5,84,0,0,711,712,5,69,0,0,712,713, +5,68,0,0,713,70,1,0,0,0,714,715,5,67,0,0,715,716,5,79,0,0,716,717,5,78,0, +0,717,718,5,83,0,0,718,719,5,84,0,0,719,720,5,82,0,0,720,721,5,65,0,0,721, +722,5,73,0,0,722,723,5,78,0,0,723,724,5,84,0,0,724,72,1,0,0,0,725,726,5, +67,0,0,726,727,5,82,0,0,727,728,5,69,0,0,728,729,5,65,0,0,729,730,5,84,0, +0,730,731,5,69,0,0,731,74,1,0,0,0,732,733,5,67,0,0,733,734,5,79,0,0,734, +735,5,80,0,0,735,736,5,65,0,0,736,737,5,82,0,0,737,738,5,84,0,0,738,739, +5,73,0,0,739,740,5,84,0,0,740,741,5,73,0,0,741,742,5,79,0,0,742,743,5,78, +0,0,743,76,1,0,0,0,744,745,5,67,0,0,745,746,5,82,0,0,746,747,5,79,0,0,747, +748,5,83,0,0,748,749,5,83,0,0,749,78,1,0,0,0,750,751,5,67,0,0,751,752,5, +85,0,0,752,753,5,66,0,0,753,754,5,69,0,0,754,80,1,0,0,0,755,756,5,67,0,0, +756,757,5,85,0,0,757,758,5,82,0,0,758,759,5,82,0,0,759,760,5,69,0,0,760, +761,5,78,0,0,761,762,5,84,0,0,762,82,1,0,0,0,763,764,5,67,0,0,764,765,5, +85,0,0,765,766,5,82,0,0,766,767,5,82,0,0,767,768,5,69,0,0,768,769,5,78,0, +0,769,770,5,84,0,0,770,771,5,95,0,0,771,772,5,68,0,0,772,773,5,65,0,0,773, +774,5,84,0,0,774,775,5,69,0,0,775,84,1,0,0,0,776,777,5,67,0,0,777,778,5, +85,0,0,778,779,5,82,0,0,779,780,5,82,0,0,780,781,5,69,0,0,781,782,5,78,0, +0,782,783,5,84,0,0,783,784,5,95,0,0,784,785,5,82,0,0,785,786,5,79,0,0,786, +787,5,76,0,0,787,788,5,69,0,0,788,86,1,0,0,0,789,790,5,67,0,0,790,791,5, +85,0,0,791,792,5,82,0,0,792,793,5,82,0,0,793,794,5,69,0,0,794,795,5,78,0, +0,795,796,5,84,0,0,796,797,5,95,0,0,797,798,5,84,0,0,798,799,5,73,0,0,799, +800,5,77,0,0,800,801,5,69,0,0,801,88,1,0,0,0,802,803,5,67,0,0,803,804,5, +85,0,0,804,805,5,82,0,0,805,806,5,82,0,0,806,807,5,69,0,0,807,808,5,78,0, +0,808,809,5,84,0,0,809,810,5,95,0,0,810,811,5,84,0,0,811,812,5,73,0,0,812, +813,5,77,0,0,813,814,5,69,0,0,814,815,5,83,0,0,815,816,5,84,0,0,816,817, +5,65,0,0,817,818,5,77,0,0,818,819,5,80,0,0,819,90,1,0,0,0,820,821,5,67,0, +0,821,822,5,85,0,0,822,823,5,82,0,0,823,824,5,82,0,0,824,825,5,69,0,0,825, +826,5,78,0,0,826,827,5,84,0,0,827,828,5,95,0,0,828,829,5,85,0,0,829,830, +5,83,0,0,830,831,5,69,0,0,831,832,5,82,0,0,832,92,1,0,0,0,833,834,5,68,0, +0,834,835,5,65,0,0,835,836,5,84,0,0,836,837,5,65,0,0,837,94,1,0,0,0,838, +839,5,68,0,0,839,840,5,65,0,0,840,841,5,84,0,0,841,842,5,69,0,0,842,96,1, +0,0,0,843,844,5,68,0,0,844,845,5,65,0,0,845,846,5,89,0,0,846,98,1,0,0,0, +847,848,5,68,0,0,848,849,5,69,0,0,849,850,5,65,0,0,850,851,5,76,0,0,851, +852,5,76,0,0,852,853,5,79,0,0,853,854,5,67,0,0,854,855,5,65,0,0,855,856, +5,84,0,0,856,857,5,69,0,0,857,100,1,0,0,0,858,859,5,68,0,0,859,860,5,69, +0,0,860,861,5,70,0,0,861,862,5,73,0,0,862,863,5,78,0,0,863,864,5,69,0,0, +864,865,5,82,0,0,865,102,1,0,0,0,866,867,5,68,0,0,867,868,5,69,0,0,868,869, +5,76,0,0,869,870,5,69,0,0,870,871,5,84,0,0,871,872,5,69,0,0,872,104,1,0, +0,0,873,874,5,68,0,0,874,875,5,69,0,0,875,876,5,83,0,0,876,877,5,67,0,0, +877,106,1,0,0,0,878,879,5,68,0,0,879,880,5,69,0,0,880,881,5,83,0,0,881,882, +5,67,0,0,882,883,5,82,0,0,883,884,5,73,0,0,884,885,5,66,0,0,885,886,5,69, +0,0,886,108,1,0,0,0,887,888,5,68,0,0,888,889,5,69,0,0,889,890,5,83,0,0,890, +891,5,67,0,0,891,892,5,82,0,0,892,893,5,73,0,0,893,894,5,80,0,0,894,895, +5,84,0,0,895,896,5,79,0,0,896,897,5,82,0,0,897,110,1,0,0,0,898,899,5,68, +0,0,899,900,5,69,0,0,900,901,5,84,0,0,901,902,5,69,0,0,902,903,5,82,0,0, +903,904,5,77,0,0,904,905,5,73,0,0,905,906,5,78,0,0,906,907,5,73,0,0,907, +908,5,83,0,0,908,909,5,84,0,0,909,910,5,73,0,0,910,911,5,67,0,0,911,112, +1,0,0,0,912,913,5,68,0,0,913,914,5,73,0,0,914,915,5,83,0,0,915,916,5,65, +0,0,916,917,5,66,0,0,917,918,5,76,0,0,918,919,5,69,0,0,919,920,5,68,0,0, +920,114,1,0,0,0,921,922,5,68,0,0,922,923,5,73,0,0,923,924,5,83,0,0,924,925, +5,84,0,0,925,926,5,73,0,0,926,927,5,78,0,0,927,928,5,67,0,0,928,929,5,84, +0,0,929,116,1,0,0,0,930,931,5,68,0,0,931,932,5,73,0,0,932,933,5,83,0,0,933, +934,5,84,0,0,934,935,5,82,0,0,935,936,5,73,0,0,936,937,5,66,0,0,937,938, +5,85,0,0,938,939,5,84,0,0,939,940,5,69,0,0,940,941,5,68,0,0,941,118,1,0, +0,0,942,943,5,68,0,0,943,944,5,82,0,0,944,945,5,79,0,0,945,946,5,80,0,0, +946,120,1,0,0,0,947,948,5,69,0,0,948,949,5,76,0,0,949,950,5,83,0,0,950,951, +5,69,0,0,951,122,1,0,0,0,952,953,5,69,0,0,953,954,5,77,0,0,954,955,5,80, +0,0,955,956,5,84,0,0,956,957,5,89,0,0,957,124,1,0,0,0,958,959,5,69,0,0,959, +960,5,78,0,0,960,961,5,65,0,0,961,962,5,66,0,0,962,963,5,76,0,0,963,964, +5,69,0,0,964,965,5,68,0,0,965,126,1,0,0,0,966,967,5,69,0,0,967,968,5,78, +0,0,968,969,5,68,0,0,969,128,1,0,0,0,970,971,5,69,0,0,971,972,5,78,0,0,972, +973,5,70,0,0,973,974,5,79,0,0,974,975,5,82,0,0,975,976,5,67,0,0,976,977, +5,69,0,0,977,978,5,68,0,0,978,130,1,0,0,0,979,980,5,69,0,0,980,981,5,83, +0,0,981,982,5,67,0,0,982,983,5,65,0,0,983,984,5,80,0,0,984,985,5,69,0,0, +985,132,1,0,0,0,986,987,5,69,0,0,987,988,5,88,0,0,988,989,5,67,0,0,989,990, +5,69,0,0,990,991,5,80,0,0,991,992,5,84,0,0,992,134,1,0,0,0,993,994,5,69, +0,0,994,995,5,88,0,0,995,996,5,67,0,0,996,997,5,76,0,0,997,998,5,85,0,0, +998,999,5,68,0,0,999,1000,5,73,0,0,1000,1001,5,78,0,0,1001,1002,5,71,0,0, +1002,136,1,0,0,0,1003,1004,5,69,0,0,1004,1005,5,88,0,0,1005,1006,5,69,0, +0,1006,1007,5,67,0,0,1007,1008,5,85,0,0,1008,1009,5,84,0,0,1009,1010,5,69, +0,0,1010,138,1,0,0,0,1011,1012,5,69,0,0,1012,1013,5,88,0,0,1013,1014,5,73, +0,0,1014,1015,5,83,0,0,1015,1016,5,84,0,0,1016,1017,5,83,0,0,1017,140,1, +0,0,0,1018,1019,5,69,0,0,1019,1020,5,88,0,0,1020,1021,5,80,0,0,1021,1022, +5,76,0,0,1022,1023,5,65,0,0,1023,1024,5,73,0,0,1024,1025,5,78,0,0,1025,142, +1,0,0,0,1026,1027,5,69,0,0,1027,1028,5,88,0,0,1028,1029,5,84,0,0,1029,1030, +5,82,0,0,1030,1031,5,65,0,0,1031,1032,5,67,0,0,1032,1033,5,84,0,0,1033,144, +1,0,0,0,1034,1035,5,69,0,0,1035,1036,5,88,0,0,1036,1037,5,84,0,0,1037,1038, +5,69,0,0,1038,1039,5,82,0,0,1039,1040,5,78,0,0,1040,1041,5,65,0,0,1041,1042, +5,76,0,0,1042,146,1,0,0,0,1043,1044,5,70,0,0,1044,1045,5,65,0,0,1045,1046, +5,76,0,0,1046,1047,5,83,0,0,1047,1048,5,69,0,0,1048,148,1,0,0,0,1049,1050, +5,70,0,0,1050,1051,5,69,0,0,1051,1052,5,84,0,0,1052,1053,5,67,0,0,1053,1054, +5,72,0,0,1054,150,1,0,0,0,1055,1056,5,70,0,0,1056,1057,5,73,0,0,1057,1058, +5,76,0,0,1058,1059,5,84,0,0,1059,1060,5,69,0,0,1060,1061,5,82,0,0,1061,152, +1,0,0,0,1062,1063,5,70,0,0,1063,1064,5,73,0,0,1064,1065,5,82,0,0,1065,1066, +5,83,0,0,1066,1067,5,84,0,0,1067,154,1,0,0,0,1068,1069,5,70,0,0,1069,1070, +5,79,0,0,1070,1071,5,76,0,0,1071,1072,5,76,0,0,1072,1073,5,79,0,0,1073,1074, +5,87,0,0,1074,1075,5,73,0,0,1075,1076,5,78,0,0,1076,1077,5,71,0,0,1077,156, +1,0,0,0,1078,1079,5,70,0,0,1079,1080,5,79,0,0,1080,1081,5,82,0,0,1081,158, +1,0,0,0,1082,1083,5,70,0,0,1083,1084,5,79,0,0,1084,1085,5,82,0,0,1085,1086, +5,77,0,0,1086,1087,5,65,0,0,1087,1088,5,84,0,0,1088,160,1,0,0,0,1089,1090, +5,70,0,0,1090,1091,5,82,0,0,1091,1092,5,79,0,0,1092,1093,5,77,0,0,1093,162, +1,0,0,0,1094,1095,5,70,0,0,1095,1096,5,85,0,0,1096,1097,5,76,0,0,1097,1098, +5,76,0,0,1098,164,1,0,0,0,1099,1100,5,70,0,0,1100,1101,5,85,0,0,1101,1102, +5,78,0,0,1102,1103,5,67,0,0,1103,1104,5,84,0,0,1104,1105,5,73,0,0,1105,1106, +5,79,0,0,1106,1107,5,78,0,0,1107,166,1,0,0,0,1108,1109,5,70,0,0,1109,1110, +5,85,0,0,1110,1111,5,78,0,0,1111,1112,5,67,0,0,1112,1113,5,84,0,0,1113,1114, +5,73,0,0,1114,1115,5,79,0,0,1115,1116,5,78,0,0,1116,1117,5,83,0,0,1117,168, +1,0,0,0,1118,1119,5,71,0,0,1119,1120,5,82,0,0,1120,1121,5,65,0,0,1121,1122, +5,78,0,0,1122,1123,5,84,0,0,1123,170,1,0,0,0,1124,1125,5,71,0,0,1125,1126, +5,82,0,0,1126,1127,5,65,0,0,1127,1128,5,78,0,0,1128,1129,5,84,0,0,1129,1130, +5,69,0,0,1130,1131,5,68,0,0,1131,172,1,0,0,0,1132,1133,5,71,0,0,1133,1134, +5,82,0,0,1134,1135,5,65,0,0,1135,1136,5,78,0,0,1136,1137,5,84,0,0,1137,1138, +5,83,0,0,1138,174,1,0,0,0,1139,1140,5,71,0,0,1140,1141,5,82,0,0,1141,1142, +5,65,0,0,1142,1143,5,80,0,0,1143,1144,5,72,0,0,1144,1145,5,86,0,0,1145,1146, +5,73,0,0,1146,1147,5,90,0,0,1147,176,1,0,0,0,1148,1149,5,71,0,0,1149,1150, +5,82,0,0,1150,1151,5,79,0,0,1151,1152,5,85,0,0,1152,1153,5,80,0,0,1153,178, +1,0,0,0,1154,1155,5,71,0,0,1155,1156,5,82,0,0,1156,1157,5,79,0,0,1157,1158, +5,85,0,0,1158,1159,5,80,0,0,1159,1160,5,73,0,0,1160,1161,5,78,0,0,1161,1162, +5,71,0,0,1162,180,1,0,0,0,1163,1164,5,71,0,0,1164,1165,5,82,0,0,1165,1166, +5,79,0,0,1166,1167,5,85,0,0,1167,1168,5,80,0,0,1168,1169,5,83,0,0,1169,182, +1,0,0,0,1170,1171,5,72,0,0,1171,1172,5,65,0,0,1172,1173,5,86,0,0,1173,1174, +5,73,0,0,1174,1175,5,78,0,0,1175,1176,5,71,0,0,1176,184,1,0,0,0,1177,1178, +5,72,0,0,1178,1179,5,79,0,0,1179,1180,5,85,0,0,1180,1181,5,82,0,0,1181,186, +1,0,0,0,1182,1183,5,73,0,0,1183,1184,5,70,0,0,1184,188,1,0,0,0,1185,1186, +5,73,0,0,1186,1187,5,71,0,0,1187,1188,5,78,0,0,1188,1189,5,79,0,0,1189,1190, +5,82,0,0,1190,1191,5,69,0,0,1191,190,1,0,0,0,1192,1193,5,73,0,0,1193,1194, +5,78,0,0,1194,192,1,0,0,0,1195,1196,5,73,0,0,1196,1197,5,78,0,0,1197,1198, +5,67,0,0,1198,1199,5,76,0,0,1199,1200,5,85,0,0,1200,1201,5,68,0,0,1201,1202, +5,73,0,0,1202,1203,5,78,0,0,1203,1204,5,71,0,0,1204,194,1,0,0,0,1205,1206, +5,73,0,0,1206,1207,5,78,0,0,1207,1208,5,78,0,0,1208,1209,5,69,0,0,1209,1210, +5,82,0,0,1210,196,1,0,0,0,1211,1212,5,73,0,0,1212,1213,5,78,0,0,1213,1214, +5,80,0,0,1214,1215,5,85,0,0,1215,1216,5,84,0,0,1216,198,1,0,0,0,1217,1218, +5,73,0,0,1218,1219,5,78,0,0,1219,1220,5,83,0,0,1220,1221,5,69,0,0,1221,1222, +5,82,0,0,1222,1223,5,84,0,0,1223,200,1,0,0,0,1224,1225,5,73,0,0,1225,1226, +5,78,0,0,1226,1227,5,84,0,0,1227,1228,5,69,0,0,1228,1229,5,82,0,0,1229,1230, +5,83,0,0,1230,1231,5,69,0,0,1231,1232,5,67,0,0,1232,1233,5,84,0,0,1233,202, +1,0,0,0,1234,1235,5,73,0,0,1235,1236,5,78,0,0,1236,1237,5,84,0,0,1237,1238, +5,69,0,0,1238,1239,5,82,0,0,1239,1240,5,86,0,0,1240,1241,5,65,0,0,1241,1242, +5,76,0,0,1242,204,1,0,0,0,1243,1244,5,73,0,0,1244,1245,5,78,0,0,1245,1246, +5,84,0,0,1246,1247,5,79,0,0,1247,206,1,0,0,0,1248,1249,5,73,0,0,1249,1250, +5,78,0,0,1250,1251,5,86,0,0,1251,1252,5,79,0,0,1252,1253,5,75,0,0,1253,1254, +5,69,0,0,1254,1255,5,82,0,0,1255,208,1,0,0,0,1256,1257,5,73,0,0,1257,1258, +5,79,0,0,1258,210,1,0,0,0,1259,1260,5,73,0,0,1260,1261,5,83,0,0,1261,212, +1,0,0,0,1262,1263,5,73,0,0,1263,1264,5,83,0,0,1264,1265,5,79,0,0,1265,1266, +5,76,0,0,1266,1267,5,65,0,0,1267,1268,5,84,0,0,1268,1269,5,73,0,0,1269,1270, +5,79,0,0,1270,1271,5,78,0,0,1271,214,1,0,0,0,1272,1273,5,74,0,0,1273,1274, +5,83,0,0,1274,1275,5,79,0,0,1275,1276,5,78,0,0,1276,216,1,0,0,0,1277,1278, +5,74,0,0,1278,1279,5,79,0,0,1279,1280,5,73,0,0,1280,1281,5,78,0,0,1281,218, +1,0,0,0,1282,1283,5,75,0,0,1283,1284,5,69,0,0,1284,1285,5,69,0,0,1285,1286, +5,80,0,0,1286,220,1,0,0,0,1287,1288,5,75,0,0,1288,1289,5,69,0,0,1289,1290, +5,89,0,0,1290,222,1,0,0,0,1291,1292,5,76,0,0,1292,1293,5,65,0,0,1293,1294, +5,78,0,0,1294,1295,5,71,0,0,1295,1296,5,85,0,0,1296,1297,5,65,0,0,1297,1298, +5,71,0,0,1298,1299,5,69,0,0,1299,224,1,0,0,0,1300,1301,5,76,0,0,1301,1302, +5,65,0,0,1302,1303,5,83,0,0,1303,1304,5,84,0,0,1304,226,1,0,0,0,1305,1306, +5,76,0,0,1306,1307,5,65,0,0,1307,1308,5,84,0,0,1308,1309,5,69,0,0,1309,1310, +5,82,0,0,1310,1311,5,65,0,0,1311,1312,5,76,0,0,1312,228,1,0,0,0,1313,1314, +5,76,0,0,1314,1315,5,69,0,0,1315,1316,5,70,0,0,1316,1317,5,84,0,0,1317,230, +1,0,0,0,1318,1319,5,76,0,0,1319,1320,5,69,0,0,1320,1321,5,86,0,0,1321,1322, +5,69,0,0,1322,1323,5,76,0,0,1323,232,1,0,0,0,1324,1325,5,76,0,0,1325,1326, +5,73,0,0,1326,1327,5,75,0,0,1327,1328,5,69,0,0,1328,234,1,0,0,0,1329,1330, +5,76,0,0,1330,1331,5,73,0,0,1331,1332,5,77,0,0,1332,1333,5,73,0,0,1333,1334, +5,84,0,0,1334,236,1,0,0,0,1335,1336,5,76,0,0,1336,1337,5,79,0,0,1337,1338, +5,67,0,0,1338,1339,5,65,0,0,1339,1340,5,76,0,0,1340,1341,5,84,0,0,1341,1342, +5,73,0,0,1342,1343,5,77,0,0,1343,1344,5,69,0,0,1344,238,1,0,0,0,1345,1346, +5,76,0,0,1346,1347,5,79,0,0,1347,1348,5,67,0,0,1348,1349,5,65,0,0,1349,1350, +5,76,0,0,1350,1351,5,84,0,0,1351,1352,5,73,0,0,1352,1353,5,77,0,0,1353,1354, +5,69,0,0,1354,1355,5,83,0,0,1355,1356,5,84,0,0,1356,1357,5,65,0,0,1357,1358, +5,77,0,0,1358,1359,5,80,0,0,1359,240,1,0,0,0,1360,1361,5,76,0,0,1361,1362, +5,79,0,0,1362,1363,5,71,0,0,1363,1364,5,73,0,0,1364,1365,5,67,0,0,1365,1366, +5,65,0,0,1366,1367,5,76,0,0,1367,242,1,0,0,0,1368,1369,5,77,0,0,1369,1370, +5,65,0,0,1370,1371,5,80,0,0,1371,244,1,0,0,0,1372,1373,5,77,0,0,1373,1374, +5,65,0,0,1374,1375,5,84,0,0,1375,1376,5,67,0,0,1376,1377,5,72,0,0,1377,1378, +5,69,0,0,1378,1379,5,68,0,0,1379,246,1,0,0,0,1380,1381,5,77,0,0,1381,1382, +5,65,0,0,1382,1383,5,84,0,0,1383,1384,5,69,0,0,1384,1385,5,82,0,0,1385,1386, +5,73,0,0,1386,1387,5,65,0,0,1387,1388,5,76,0,0,1388,1389,5,73,0,0,1389,1390, +5,90,0,0,1390,1391,5,69,0,0,1391,1392,5,68,0,0,1392,248,1,0,0,0,1393,1394, +5,77,0,0,1394,1395,5,69,0,0,1395,1396,5,82,0,0,1396,1397,5,71,0,0,1397,1398, +5,69,0,0,1398,250,1,0,0,0,1399,1400,5,77,0,0,1400,1401,5,73,0,0,1401,1402, +5,78,0,0,1402,1403,5,85,0,0,1403,1404,5,84,0,0,1404,1405,5,69,0,0,1405,252, +1,0,0,0,1406,1407,5,77,0,0,1407,1408,5,79,0,0,1408,1409,5,78,0,0,1409,1410, +5,84,0,0,1410,1411,5,72,0,0,1411,254,1,0,0,0,1412,1413,5,78,0,0,1413,1414, +5,65,0,0,1414,1415,5,77,0,0,1415,1416,5,69,0,0,1416,256,1,0,0,0,1417,1418, +5,78,0,0,1418,1419,5,65,0,0,1419,1420,5,84,0,0,1420,1421,5,85,0,0,1421,1422, +5,82,0,0,1422,1423,5,65,0,0,1423,1424,5,76,0,0,1424,258,1,0,0,0,1425,1426, +5,78,0,0,1426,1427,5,70,0,0,1427,1428,5,67,0,0,1428,260,1,0,0,0,1429,1430, +5,78,0,0,1430,1431,5,70,0,0,1431,1432,5,68,0,0,1432,262,1,0,0,0,1433,1434, +5,78,0,0,1434,1435,5,70,0,0,1435,1436,5,75,0,0,1436,1437,5,67,0,0,1437,264, +1,0,0,0,1438,1439,5,78,0,0,1439,1440,5,70,0,0,1440,1441,5,75,0,0,1441,1442, +5,68,0,0,1442,266,1,0,0,0,1443,1444,5,78,0,0,1444,1445,5,79,0,0,1445,268, +1,0,0,0,1446,1447,5,78,0,0,1447,1448,5,79,0,0,1448,1449,5,78,0,0,1449,1450, +5,69,0,0,1450,270,1,0,0,0,1451,1452,5,78,0,0,1452,1453,5,79,0,0,1453,1454, +5,82,0,0,1454,1455,5,77,0,0,1455,1456,5,65,0,0,1456,1457,5,76,0,0,1457,1458, +5,73,0,0,1458,1459,5,90,0,0,1459,1460,5,69,0,0,1460,272,1,0,0,0,1461,1462, +5,78,0,0,1462,1463,5,79,0,0,1463,1464,5,84,0,0,1464,274,1,0,0,0,1465,1466, +5,78,0,0,1466,1467,5,85,0,0,1467,1468,5,76,0,0,1468,1469,5,76,0,0,1469,276, +1,0,0,0,1470,1471,5,78,0,0,1471,1472,5,85,0,0,1472,1473,5,76,0,0,1473,1474, +5,76,0,0,1474,1475,5,73,0,0,1475,1476,5,70,0,0,1476,278,1,0,0,0,1477,1478, +5,78,0,0,1478,1479,5,85,0,0,1479,1480,5,76,0,0,1480,1481,5,76,0,0,1481,1482, +5,83,0,0,1482,280,1,0,0,0,1483,1484,5,79,0,0,1484,1485,5,70,0,0,1485,282, +1,0,0,0,1486,1487,5,79,0,0,1487,1488,5,70,0,0,1488,1489,5,70,0,0,1489,1490, +5,83,0,0,1490,1491,5,69,0,0,1491,1492,5,84,0,0,1492,284,1,0,0,0,1493,1494, +5,79,0,0,1494,1495,5,78,0,0,1495,286,1,0,0,0,1496,1497,5,79,0,0,1497,1498, +5,78,0,0,1498,1499,5,76,0,0,1499,1500,5,89,0,0,1500,288,1,0,0,0,1501,1502, +5,79,0,0,1502,1503,5,80,0,0,1503,1504,5,84,0,0,1504,1505,5,73,0,0,1505,1506, +5,79,0,0,1506,1507,5,78,0,0,1507,290,1,0,0,0,1508,1509,5,79,0,0,1509,1510, +5,82,0,0,1510,292,1,0,0,0,1511,1512,5,79,0,0,1512,1513,5,82,0,0,1513,1514, +5,68,0,0,1514,1515,5,69,0,0,1515,1516,5,82,0,0,1516,294,1,0,0,0,1517,1518, +5,79,0,0,1518,1519,5,82,0,0,1519,1520,5,68,0,0,1520,1521,5,73,0,0,1521,1522, +5,78,0,0,1522,1523,5,65,0,0,1523,1524,5,76,0,0,1524,1525,5,73,0,0,1525,1526, +5,84,0,0,1526,1527,5,89,0,0,1527,296,1,0,0,0,1528,1529,5,79,0,0,1529,1530, +5,85,0,0,1530,1531,5,84,0,0,1531,1532,5,69,0,0,1532,1533,5,82,0,0,1533,298, +1,0,0,0,1534,1535,5,79,0,0,1535,1536,5,85,0,0,1536,1537,5,84,0,0,1537,1538, +5,80,0,0,1538,1539,5,85,0,0,1539,1540,5,84,0,0,1540,300,1,0,0,0,1541,1542, +5,79,0,0,1542,1543,5,86,0,0,1543,1544,5,69,0,0,1544,1545,5,82,0,0,1545,302, +1,0,0,0,1546,1547,5,80,0,0,1547,1548,5,65,0,0,1548,1549,5,82,0,0,1549,1550, +5,84,0,0,1550,1551,5,73,0,0,1551,1552,5,84,0,0,1552,1553,5,73,0,0,1553,1554, +5,79,0,0,1554,1555,5,78,0,0,1555,304,1,0,0,0,1556,1557,5,80,0,0,1557,1558, +5,65,0,0,1558,1559,5,82,0,0,1559,1560,5,84,0,0,1560,1561,5,73,0,0,1561,1562, +5,84,0,0,1562,1563,5,73,0,0,1563,1564,5,79,0,0,1564,1565,5,78,0,0,1565,1566, +5,83,0,0,1566,306,1,0,0,0,1567,1568,5,80,0,0,1568,1569,5,79,0,0,1569,1570, +5,83,0,0,1570,1571,5,73,0,0,1571,1572,5,84,0,0,1572,1573,5,73,0,0,1573,1574, +5,79,0,0,1574,1575,5,78,0,0,1575,308,1,0,0,0,1576,1577,5,80,0,0,1577,1578, +5,82,0,0,1578,1579,5,69,0,0,1579,1580,5,67,0,0,1580,1581,5,69,0,0,1581,1582, +5,68,0,0,1582,1583,5,73,0,0,1583,1584,5,78,0,0,1584,1585,5,71,0,0,1585,310, +1,0,0,0,1586,1587,5,80,0,0,1587,1588,5,82,0,0,1588,1589,5,69,0,0,1589,1590, +5,80,0,0,1590,1591,5,65,0,0,1591,1592,5,82,0,0,1592,1593,5,69,0,0,1593,312, +1,0,0,0,1594,1595,5,80,0,0,1595,1596,5,82,0,0,1596,1597,5,73,0,0,1597,1598, +5,77,0,0,1598,1599,5,65,0,0,1599,1600,5,82,0,0,1600,1601,5,89,0,0,1601,314, +1,0,0,0,1602,1603,5,80,0,0,1603,1604,5,82,0,0,1604,1605,5,73,0,0,1605,1606, +5,86,0,0,1606,1607,5,73,0,0,1607,1608,5,76,0,0,1608,1609,5,69,0,0,1609,1610, +5,71,0,0,1610,1611,5,69,0,0,1611,1612,5,83,0,0,1612,316,1,0,0,0,1613,1614, +5,80,0,0,1614,1615,5,82,0,0,1615,1616,5,79,0,0,1616,1617,5,80,0,0,1617,1618, +5,69,0,0,1618,1619,5,82,0,0,1619,1620,5,84,0,0,1620,1621,5,73,0,0,1621,1622, +5,69,0,0,1622,1623,5,83,0,0,1623,318,1,0,0,0,1624,1625,5,80,0,0,1625,1626, +5,82,0,0,1626,1627,5,85,0,0,1627,1628,5,78,0,0,1628,1629,5,69,0,0,1629,320, +1,0,0,0,1630,1631,5,82,0,0,1631,1632,5,65,0,0,1632,1633,5,78,0,0,1633,1634, +5,71,0,0,1634,1635,5,69,0,0,1635,322,1,0,0,0,1636,1637,5,82,0,0,1637,1638, +5,69,0,0,1638,1639,5,65,0,0,1639,1640,5,68,0,0,1640,324,1,0,0,0,1641,1642, +5,82,0,0,1642,1643,5,69,0,0,1643,1644,5,67,0,0,1644,1645,5,85,0,0,1645,1646, +5,82,0,0,1646,1647,5,83,0,0,1647,1648,5,73,0,0,1648,1649,5,86,0,0,1649,1650, +5,69,0,0,1650,326,1,0,0,0,1651,1652,5,82,0,0,1652,1653,5,69,0,0,1653,1654, +5,70,0,0,1654,1655,5,82,0,0,1655,1656,5,69,0,0,1656,1657,5,83,0,0,1657,1658, +5,72,0,0,1658,328,1,0,0,0,1659,1660,5,82,0,0,1660,1661,5,69,0,0,1661,1662, +5,76,0,0,1662,1663,5,89,0,0,1663,330,1,0,0,0,1664,1665,5,82,0,0,1665,1666, +5,69,0,0,1666,1667,5,78,0,0,1667,1668,5,65,0,0,1668,1669,5,77,0,0,1669,1670, +5,69,0,0,1670,332,1,0,0,0,1671,1672,5,82,0,0,1672,1673,5,69,0,0,1673,1674, +5,80,0,0,1674,1675,5,69,0,0,1675,1676,5,65,0,0,1676,1677,5,84,0,0,1677,1678, +5,65,0,0,1678,1679,5,66,0,0,1679,1680,5,76,0,0,1680,1681,5,69,0,0,1681,334, +1,0,0,0,1682,1683,5,82,0,0,1683,1684,5,69,0,0,1684,1685,5,80,0,0,1685,1686, +5,76,0,0,1686,1687,5,65,0,0,1687,1688,5,67,0,0,1688,1689,5,69,0,0,1689,336, +1,0,0,0,1690,1691,5,82,0,0,1691,1692,5,69,0,0,1692,1693,5,83,0,0,1693,1694, +5,69,0,0,1694,1695,5,84,0,0,1695,338,1,0,0,0,1696,1697,5,82,0,0,1697,1698, +5,69,0,0,1698,1699,5,83,0,0,1699,1700,5,80,0,0,1700,1701,5,69,0,0,1701,1702, +5,67,0,0,1702,1703,5,84,0,0,1703,340,1,0,0,0,1704,1705,5,82,0,0,1705,1706, +5,69,0,0,1706,1707,5,83,0,0,1707,1708,5,84,0,0,1708,1709,5,82,0,0,1709,1710, +5,73,0,0,1710,1711,5,67,0,0,1711,1712,5,84,0,0,1712,342,1,0,0,0,1713,1714, +5,82,0,0,1714,1715,5,69,0,0,1715,1716,5,84,0,0,1716,1717,5,85,0,0,1717,1718, +5,82,0,0,1718,1719,5,78,0,0,1719,344,1,0,0,0,1720,1721,5,82,0,0,1721,1722, +5,69,0,0,1722,1723,5,84,0,0,1723,1724,5,85,0,0,1724,1725,5,82,0,0,1725,1726, +5,78,0,0,1726,1727,5,83,0,0,1727,346,1,0,0,0,1728,1729,5,82,0,0,1729,1730, +5,69,0,0,1730,1731,5,86,0,0,1731,1732,5,79,0,0,1732,1733,5,75,0,0,1733,1734, +5,69,0,0,1734,348,1,0,0,0,1735,1736,5,82,0,0,1736,1737,5,73,0,0,1737,1738, +5,71,0,0,1738,1739,5,72,0,0,1739,1740,5,84,0,0,1740,350,1,0,0,0,1741,1742, +5,82,0,0,1742,1743,5,79,0,0,1743,1744,5,76,0,0,1744,1745,5,69,0,0,1745,352, +1,0,0,0,1746,1747,5,82,0,0,1747,1748,5,79,0,0,1748,1749,5,76,0,0,1749,1750, +5,69,0,0,1750,1751,5,83,0,0,1751,354,1,0,0,0,1752,1753,5,82,0,0,1753,1754, +5,79,0,0,1754,1755,5,76,0,0,1755,1756,5,76,0,0,1756,1757,5,66,0,0,1757,1758, +5,65,0,0,1758,1759,5,67,0,0,1759,1760,5,75,0,0,1760,356,1,0,0,0,1761,1762, +5,82,0,0,1762,1763,5,79,0,0,1763,1764,5,76,0,0,1764,1765,5,76,0,0,1765,1766, +5,85,0,0,1766,1767,5,80,0,0,1767,358,1,0,0,0,1768,1769,5,82,0,0,1769,1770, +5,79,0,0,1770,1771,5,87,0,0,1771,360,1,0,0,0,1772,1773,5,82,0,0,1773,1774, +5,79,0,0,1774,1775,5,87,0,0,1775,1776,5,83,0,0,1776,362,1,0,0,0,1777,1778, +5,83,0,0,1778,1779,5,67,0,0,1779,1780,5,72,0,0,1780,1781,5,69,0,0,1781,1782, +5,77,0,0,1782,1783,5,65,0,0,1783,364,1,0,0,0,1784,1785,5,83,0,0,1785,1786, +5,67,0,0,1786,1787,5,72,0,0,1787,1788,5,69,0,0,1788,1789,5,77,0,0,1789,1790, +5,65,0,0,1790,1791,5,83,0,0,1791,366,1,0,0,0,1792,1793,5,83,0,0,1793,1794, +5,69,0,0,1794,1795,5,67,0,0,1795,1796,5,79,0,0,1796,1797,5,78,0,0,1797,1798, +5,68,0,0,1798,368,1,0,0,0,1799,1800,5,83,0,0,1800,1801,5,69,0,0,1801,1802, +5,67,0,0,1802,1803,5,85,0,0,1803,1804,5,82,0,0,1804,1805,5,73,0,0,1805,1806, +5,84,0,0,1806,1807,5,89,0,0,1807,370,1,0,0,0,1808,1809,5,83,0,0,1809,1810, +5,69,0,0,1810,1811,5,76,0,0,1811,1812,5,69,0,0,1812,1813,5,67,0,0,1813,1814, +5,84,0,0,1814,372,1,0,0,0,1815,1816,5,83,0,0,1816,1817,5,69,0,0,1817,1818, +5,82,0,0,1818,1819,5,73,0,0,1819,1820,5,65,0,0,1820,1821,5,76,0,0,1821,1822, +5,73,0,0,1822,1823,5,90,0,0,1823,1824,5,65,0,0,1824,1825,5,66,0,0,1825,1826, +5,76,0,0,1826,1827,5,69,0,0,1827,374,1,0,0,0,1828,1829,5,83,0,0,1829,1830, +5,69,0,0,1830,1831,5,83,0,0,1831,1832,5,83,0,0,1832,1833,5,73,0,0,1833,1834, +5,79,0,0,1834,1835,5,78,0,0,1835,376,1,0,0,0,1836,1837,5,83,0,0,1837,1838, +5,69,0,0,1838,1839,5,84,0,0,1839,378,1,0,0,0,1840,1841,5,83,0,0,1841,1842, +5,69,0,0,1842,1843,5,84,0,0,1843,1844,5,83,0,0,1844,380,1,0,0,0,1845,1846, +5,83,0,0,1846,1847,5,72,0,0,1847,1848,5,79,0,0,1848,1849,5,87,0,0,1849,382, +1,0,0,0,1850,1851,5,83,0,0,1851,1852,5,79,0,0,1852,1853,5,77,0,0,1853,1854, +5,69,0,0,1854,384,1,0,0,0,1855,1856,5,83,0,0,1856,1857,5,81,0,0,1857,1858, +5,76,0,0,1858,386,1,0,0,0,1859,1860,5,83,0,0,1860,1861,5,84,0,0,1861,1862, +5,65,0,0,1862,1863,5,82,0,0,1863,1864,5,84,0,0,1864,388,1,0,0,0,1865,1866, +5,83,0,0,1866,1867,5,84,0,0,1867,1868,5,65,0,0,1868,1869,5,84,0,0,1869,1870, +5,83,0,0,1870,390,1,0,0,0,1871,1872,5,83,0,0,1872,1873,5,85,0,0,1873,1874, +5,66,0,0,1874,1875,5,83,0,0,1875,1876,5,84,0,0,1876,1877,5,82,0,0,1877,1878, +5,73,0,0,1878,1879,5,78,0,0,1879,1880,5,71,0,0,1880,392,1,0,0,0,1881,1882, +5,83,0,0,1882,1883,5,89,0,0,1883,1884,5,83,0,0,1884,1885,5,84,0,0,1885,1886, +5,69,0,0,1886,1887,5,77,0,0,1887,394,1,0,0,0,1888,1889,5,83,0,0,1889,1890, +5,89,0,0,1890,1891,5,83,0,0,1891,1892,5,84,0,0,1892,1893,5,69,0,0,1893,1894, +5,77,0,0,1894,1895,5,95,0,0,1895,1896,5,84,0,0,1896,1897,5,73,0,0,1897,1898, +5,77,0,0,1898,1899,5,69,0,0,1899,396,1,0,0,0,1900,1901,5,83,0,0,1901,1902, +5,89,0,0,1902,1903,5,83,0,0,1903,1904,5,84,0,0,1904,1905,5,69,0,0,1905,1906, +5,77,0,0,1906,1907,5,95,0,0,1907,1908,5,86,0,0,1908,1909,5,69,0,0,1909,1910, +5,82,0,0,1910,1911,5,83,0,0,1911,1912,5,73,0,0,1912,1913,5,79,0,0,1913,1914, +5,78,0,0,1914,398,1,0,0,0,1915,1916,5,84,0,0,1916,1917,5,65,0,0,1917,1918, +5,66,0,0,1918,1919,5,76,0,0,1919,1920,5,69,0,0,1920,400,1,0,0,0,1921,1922, +5,84,0,0,1922,1923,5,65,0,0,1923,1924,5,66,0,0,1924,1925,5,76,0,0,1925,1926, +5,69,0,0,1926,1927,5,83,0,0,1927,402,1,0,0,0,1928,1929,5,84,0,0,1929,1930, +5,65,0,0,1930,1931,5,66,0,0,1931,1932,5,76,0,0,1932,1933,5,69,0,0,1933,1934, +5,83,0,0,1934,1935,5,65,0,0,1935,1936,5,77,0,0,1936,1937,5,80,0,0,1937,1938, +5,76,0,0,1938,1939,5,69,0,0,1939,404,1,0,0,0,1940,1941,5,84,0,0,1941,1942, +5,69,0,0,1942,1943,5,77,0,0,1943,1944,5,80,0,0,1944,1945,5,79,0,0,1945,1946, +5,82,0,0,1946,1947,5,65,0,0,1947,1948,5,82,0,0,1948,1949,5,89,0,0,1949,406, +1,0,0,0,1950,1951,5,84,0,0,1951,1952,5,69,0,0,1952,1953,5,88,0,0,1953,1954, +5,84,0,0,1954,408,1,0,0,0,1955,1956,5,84,0,0,1956,1957,5,72,0,0,1957,1958, +5,69,0,0,1958,1959,5,78,0,0,1959,410,1,0,0,0,1960,1961,5,84,0,0,1961,1962, +5,73,0,0,1962,1963,5,77,0,0,1963,1964,5,69,0,0,1964,412,1,0,0,0,1965,1966, +5,84,0,0,1966,1967,5,73,0,0,1967,1968,5,77,0,0,1968,1969,5,69,0,0,1969,1970, +5,83,0,0,1970,1971,5,84,0,0,1971,1972,5,65,0,0,1972,1973,5,77,0,0,1973,1974, +5,80,0,0,1974,414,1,0,0,0,1975,1976,5,84,0,0,1976,1977,5,79,0,0,1977,416, +1,0,0,0,1978,1979,5,84,0,0,1979,1980,5,82,0,0,1980,1981,5,65,0,0,1981,1982, +5,78,0,0,1982,1983,5,83,0,0,1983,1984,5,65,0,0,1984,1985,5,67,0,0,1985,1986, +5,84,0,0,1986,1987,5,73,0,0,1987,1988,5,79,0,0,1988,1989,5,78,0,0,1989,418, +1,0,0,0,1990,1991,5,84,0,0,1991,1992,5,82,0,0,1992,1993,5,85,0,0,1993,1994, +5,69,0,0,1994,420,1,0,0,0,1995,1996,5,84,0,0,1996,1997,5,82,0,0,1997,1998, +5,85,0,0,1998,1999,5,78,0,0,1999,2000,5,67,0,0,2000,2001,5,65,0,0,2001,2002, +5,84,0,0,2002,2003,5,69,0,0,2003,422,1,0,0,0,2004,2005,5,84,0,0,2005,2006, +5,82,0,0,2006,2007,5,89,0,0,2007,2008,5,95,0,0,2008,2009,5,67,0,0,2009,2010, +5,65,0,0,2010,2011,5,83,0,0,2011,2012,5,84,0,0,2012,424,1,0,0,0,2013,2014, +5,84,0,0,2014,2015,5,89,0,0,2015,2016,5,80,0,0,2016,2017,5,69,0,0,2017,426, +1,0,0,0,2018,2019,5,85,0,0,2019,2020,5,69,0,0,2020,2021,5,83,0,0,2021,2022, +5,67,0,0,2022,2023,5,65,0,0,2023,2024,5,80,0,0,2024,2025,5,69,0,0,2025,428, +1,0,0,0,2026,2027,5,85,0,0,2027,2028,5,78,0,0,2028,2029,5,66,0,0,2029,2030, +5,79,0,0,2030,2031,5,85,0,0,2031,2032,5,78,0,0,2032,2033,5,68,0,0,2033,2034, +5,69,0,0,2034,2035,5,68,0,0,2035,430,1,0,0,0,2036,2037,5,85,0,0,2037,2038, +5,78,0,0,2038,2039,5,67,0,0,2039,2040,5,79,0,0,2040,2041,5,77,0,0,2041,2042, +5,77,0,0,2042,2043,5,73,0,0,2043,2044,5,84,0,0,2044,2045,5,84,0,0,2045,2046, +5,69,0,0,2046,2047,5,68,0,0,2047,432,1,0,0,0,2048,2049,5,85,0,0,2049,2050, +5,78,0,0,2050,2051,5,73,0,0,2051,2052,5,79,0,0,2052,2053,5,78,0,0,2053,434, +1,0,0,0,2054,2055,5,85,0,0,2055,2056,5,78,0,0,2056,2057,5,73,0,0,2057,2058, +5,81,0,0,2058,2059,5,85,0,0,2059,2060,5,69,0,0,2060,436,1,0,0,0,2061,2062, +5,85,0,0,2062,2063,5,78,0,0,2063,2064,5,78,0,0,2064,2065,5,69,0,0,2065,2066, +5,83,0,0,2066,2067,5,84,0,0,2067,438,1,0,0,0,2068,2069,5,85,0,0,2069,2070, +5,80,0,0,2070,2071,5,68,0,0,2071,2072,5,65,0,0,2072,2073,5,84,0,0,2073,2074, +5,69,0,0,2074,440,1,0,0,0,2075,2076,5,85,0,0,2076,2077,5,83,0,0,2077,2078, +5,69,0,0,2078,442,1,0,0,0,2079,2080,5,85,0,0,2080,2081,5,83,0,0,2081,2082, +5,69,0,0,2082,2083,5,82,0,0,2083,444,1,0,0,0,2084,2085,5,85,0,0,2085,2086, +5,83,0,0,2086,2087,5,73,0,0,2087,2088,5,78,0,0,2088,2089,5,71,0,0,2089,446, +1,0,0,0,2090,2091,5,86,0,0,2091,2092,5,65,0,0,2092,2093,5,76,0,0,2093,2094, +5,73,0,0,2094,2095,5,68,0,0,2095,2096,5,65,0,0,2096,2097,5,84,0,0,2097,2098, +5,69,0,0,2098,448,1,0,0,0,2099,2100,5,86,0,0,2100,2101,5,65,0,0,2101,2102, +5,76,0,0,2102,2103,5,85,0,0,2103,2104,5,69,0,0,2104,2105,5,83,0,0,2105,450, +1,0,0,0,2106,2107,5,86,0,0,2107,2108,5,69,0,0,2108,2109,5,82,0,0,2109,2110, +5,66,0,0,2110,2111,5,79,0,0,2111,2112,5,83,0,0,2112,2113,5,69,0,0,2113,452, +1,0,0,0,2114,2115,5,86,0,0,2115,2116,5,69,0,0,2116,2117,5,82,0,0,2117,2118, +5,83,0,0,2118,2119,5,73,0,0,2119,2120,5,79,0,0,2120,2121,5,78,0,0,2121,454, +1,0,0,0,2122,2123,5,86,0,0,2123,2124,5,73,0,0,2124,2125,5,69,0,0,2125,2126, +5,87,0,0,2126,456,1,0,0,0,2127,2128,5,87,0,0,2128,2129,5,72,0,0,2129,2130, +5,69,0,0,2130,2131,5,78,0,0,2131,458,1,0,0,0,2132,2133,5,87,0,0,2133,2134, +5,72,0,0,2134,2135,5,69,0,0,2135,2136,5,82,0,0,2136,2137,5,69,0,0,2137,460, +1,0,0,0,2138,2139,5,87,0,0,2139,2140,5,73,0,0,2140,2141,5,84,0,0,2141,2142, +5,72,0,0,2142,462,1,0,0,0,2143,2144,5,87,0,0,2144,2145,5,79,0,0,2145,2146, +5,82,0,0,2146,2147,5,75,0,0,2147,464,1,0,0,0,2148,2149,5,87,0,0,2149,2150, +5,82,0,0,2150,2151,5,73,0,0,2151,2152,5,84,0,0,2152,2153,5,69,0,0,2153,466, +1,0,0,0,2154,2155,5,89,0,0,2155,2156,5,69,0,0,2156,2157,5,65,0,0,2157,2158, +5,82,0,0,2158,468,1,0,0,0,2159,2160,5,90,0,0,2160,2161,5,79,0,0,2161,2162, +5,78,0,0,2162,2163,5,69,0,0,2163,470,1,0,0,0,2164,2165,5,61,0,0,2165,472, +1,0,0,0,2166,2167,5,60,0,0,2167,2171,5,62,0,0,2168,2169,5,33,0,0,2169,2171, +5,61,0,0,2170,2166,1,0,0,0,2170,2168,1,0,0,0,2171,474,1,0,0,0,2172,2173, +5,60,0,0,2173,476,1,0,0,0,2174,2175,5,60,0,0,2175,2176,5,61,0,0,2176,478, +1,0,0,0,2177,2178,5,62,0,0,2178,480,1,0,0,0,2179,2180,5,62,0,0,2180,2181, +5,61,0,0,2181,482,1,0,0,0,2182,2183,5,43,0,0,2183,484,1,0,0,0,2184,2185, +5,45,0,0,2185,486,1,0,0,0,2186,2187,5,42,0,0,2187,488,1,0,0,0,2188,2189, +5,47,0,0,2189,490,1,0,0,0,2190,2191,5,37,0,0,2191,492,1,0,0,0,2192,2193, +5,124,0,0,2193,2194,5,124,0,0,2194,494,1,0,0,0,2195,2201,5,39,0,0,2196,2200, +8,0,0,0,2197,2198,5,39,0,0,2198,2200,5,39,0,0,2199,2196,1,0,0,0,2199,2197, +1,0,0,0,2200,2203,1,0,0,0,2201,2199,1,0,0,0,2201,2202,1,0,0,0,2202,2204, +1,0,0,0,2203,2201,1,0,0,0,2204,2205,5,39,0,0,2205,496,1,0,0,0,2206,2207, +5,85,0,0,2207,2208,5,38,0,0,2208,2209,5,39,0,0,2209,2215,1,0,0,0,2210,2214, +8,0,0,0,2211,2212,5,39,0,0,2212,2214,5,39,0,0,2213,2210,1,0,0,0,2213,2211, +1,0,0,0,2214,2217,1,0,0,0,2215,2213,1,0,0,0,2215,2216,1,0,0,0,2216,2218, +1,0,0,0,2217,2215,1,0,0,0,2218,2219,5,39,0,0,2219,498,1,0,0,0,2220,2221, +5,88,0,0,2221,2222,5,39,0,0,2222,2226,1,0,0,0,2223,2225,8,0,0,0,2224,2223, +1,0,0,0,2225,2228,1,0,0,0,2226,2224,1,0,0,0,2226,2227,1,0,0,0,2227,2229, +1,0,0,0,2228,2226,1,0,0,0,2229,2230,5,39,0,0,2230,500,1,0,0,0,2231,2233, +3,523,261,0,2232,2231,1,0,0,0,2233,2234,1,0,0,0,2234,2232,1,0,0,0,2234,2235, +1,0,0,0,2235,502,1,0,0,0,2236,2238,3,523,261,0,2237,2236,1,0,0,0,2238,2239, +1,0,0,0,2239,2237,1,0,0,0,2239,2240,1,0,0,0,2240,2241,1,0,0,0,2241,2245, +5,46,0,0,2242,2244,3,523,261,0,2243,2242,1,0,0,0,2244,2247,1,0,0,0,2245, +2243,1,0,0,0,2245,2246,1,0,0,0,2246,2255,1,0,0,0,2247,2245,1,0,0,0,2248, +2250,5,46,0,0,2249,2251,3,523,261,0,2250,2249,1,0,0,0,2251,2252,1,0,0,0, +2252,2250,1,0,0,0,2252,2253,1,0,0,0,2253,2255,1,0,0,0,2254,2237,1,0,0,0, +2254,2248,1,0,0,0,2255,504,1,0,0,0,2256,2258,3,523,261,0,2257,2256,1,0,0, +0,2258,2259,1,0,0,0,2259,2257,1,0,0,0,2259,2260,1,0,0,0,2260,2268,1,0,0, +0,2261,2265,5,46,0,0,2262,2264,3,523,261,0,2263,2262,1,0,0,0,2264,2267,1, +0,0,0,2265,2263,1,0,0,0,2265,2266,1,0,0,0,2266,2269,1,0,0,0,2267,2265,1, +0,0,0,2268,2261,1,0,0,0,2268,2269,1,0,0,0,2269,2270,1,0,0,0,2270,2271,3, +521,260,0,2271,2281,1,0,0,0,2272,2274,5,46,0,0,2273,2275,3,523,261,0,2274, +2273,1,0,0,0,2275,2276,1,0,0,0,2276,2274,1,0,0,0,2276,2277,1,0,0,0,2277, +2278,1,0,0,0,2278,2279,3,521,260,0,2279,2281,1,0,0,0,2280,2257,1,0,0,0,2280, +2272,1,0,0,0,2281,506,1,0,0,0,2282,2285,3,525,262,0,2283,2285,5,95,0,0,2284, +2282,1,0,0,0,2284,2283,1,0,0,0,2285,2291,1,0,0,0,2286,2290,3,525,262,0,2287, +2290,3,523,261,0,2288,2290,7,1,0,0,2289,2286,1,0,0,0,2289,2287,1,0,0,0,2289, +2288,1,0,0,0,2290,2293,1,0,0,0,2291,2289,1,0,0,0,2291,2292,1,0,0,0,2292, +508,1,0,0,0,2293,2291,1,0,0,0,2294,2298,3,523,261,0,2295,2299,3,525,262, +0,2296,2299,3,523,261,0,2297,2299,7,1,0,0,2298,2295,1,0,0,0,2298,2296,1, +0,0,0,2298,2297,1,0,0,0,2299,2300,1,0,0,0,2300,2298,1,0,0,0,2300,2301,1, +0,0,0,2301,510,1,0,0,0,2302,2308,5,34,0,0,2303,2307,8,2,0,0,2304,2305,5, +34,0,0,2305,2307,5,34,0,0,2306,2303,1,0,0,0,2306,2304,1,0,0,0,2307,2310, +1,0,0,0,2308,2306,1,0,0,0,2308,2309,1,0,0,0,2309,2311,1,0,0,0,2310,2308, +1,0,0,0,2311,2312,5,34,0,0,2312,512,1,0,0,0,2313,2319,5,96,0,0,2314,2318, +8,3,0,0,2315,2316,5,96,0,0,2316,2318,5,96,0,0,2317,2314,1,0,0,0,2317,2315, +1,0,0,0,2318,2321,1,0,0,0,2319,2317,1,0,0,0,2319,2320,1,0,0,0,2320,2322, +1,0,0,0,2321,2319,1,0,0,0,2322,2323,5,96,0,0,2323,514,1,0,0,0,2324,2325, +5,84,0,0,2325,2326,5,73,0,0,2326,2327,5,77,0,0,2327,2328,5,69,0,0,2328,2329, +1,0,0,0,2329,2330,3,531,265,0,2330,2331,5,87,0,0,2331,2332,5,73,0,0,2332, +2333,5,84,0,0,2333,2334,5,72,0,0,2334,2335,1,0,0,0,2335,2336,3,531,265,0, +2336,2337,5,84,0,0,2337,2338,5,73,0,0,2338,2339,5,77,0,0,2339,2340,5,69, +0,0,2340,2341,1,0,0,0,2341,2342,3,531,265,0,2342,2343,5,90,0,0,2343,2344, +5,79,0,0,2344,2345,5,78,0,0,2345,2346,5,69,0,0,2346,516,1,0,0,0,2347,2348, +5,84,0,0,2348,2349,5,73,0,0,2349,2350,5,77,0,0,2350,2351,5,69,0,0,2351,2352, +5,83,0,0,2352,2353,5,84,0,0,2353,2354,5,65,0,0,2354,2355,5,77,0,0,2355,2356, +5,80,0,0,2356,2357,1,0,0,0,2357,2358,3,531,265,0,2358,2359,5,87,0,0,2359, +2360,5,73,0,0,2360,2361,5,84,0,0,2361,2362,5,72,0,0,2362,2363,1,0,0,0,2363, +2364,3,531,265,0,2364,2365,5,84,0,0,2365,2366,5,73,0,0,2366,2367,5,77,0, +0,2367,2368,5,69,0,0,2368,2369,1,0,0,0,2369,2370,3,531,265,0,2370,2371,5, +90,0,0,2371,2372,5,79,0,0,2372,2373,5,78,0,0,2373,2374,5,69,0,0,2374,518, +1,0,0,0,2375,2376,5,68,0,0,2376,2377,5,79,0,0,2377,2378,5,85,0,0,2378,2379, +5,66,0,0,2379,2380,5,76,0,0,2380,2381,5,69,0,0,2381,2382,1,0,0,0,2382,2383, +3,531,265,0,2383,2384,5,80,0,0,2384,2385,5,82,0,0,2385,2386,5,69,0,0,2386, +2387,5,67,0,0,2387,2388,5,73,0,0,2388,2389,5,83,0,0,2389,2390,5,73,0,0,2390, +2391,5,79,0,0,2391,2392,5,78,0,0,2392,520,1,0,0,0,2393,2395,5,69,0,0,2394, +2396,7,4,0,0,2395,2394,1,0,0,0,2395,2396,1,0,0,0,2396,2398,1,0,0,0,2397, +2399,3,523,261,0,2398,2397,1,0,0,0,2399,2400,1,0,0,0,2400,2398,1,0,0,0,2400, +2401,1,0,0,0,2401,522,1,0,0,0,2402,2403,7,5,0,0,2403,524,1,0,0,0,2404,2405, +7,6,0,0,2405,526,1,0,0,0,2406,2407,5,45,0,0,2407,2408,5,45,0,0,2408,2412, +1,0,0,0,2409,2411,8,7,0,0,2410,2409,1,0,0,0,2411,2414,1,0,0,0,2412,2410, +1,0,0,0,2412,2413,1,0,0,0,2413,2416,1,0,0,0,2414,2412,1,0,0,0,2415,2417, +5,13,0,0,2416,2415,1,0,0,0,2416,2417,1,0,0,0,2417,2419,1,0,0,0,2418,2420, +5,10,0,0,2419,2418,1,0,0,0,2419,2420,1,0,0,0,2420,2421,1,0,0,0,2421,2422, +6,263,0,0,2422,528,1,0,0,0,2423,2424,5,47,0,0,2424,2425,5,42,0,0,2425,2429, +1,0,0,0,2426,2428,9,0,0,0,2427,2426,1,0,0,0,2428,2431,1,0,0,0,2429,2430, +1,0,0,0,2429,2427,1,0,0,0,2430,2432,1,0,0,0,2431,2429,1,0,0,0,2432,2433, +5,42,0,0,2433,2434,5,47,0,0,2434,2435,1,0,0,0,2435,2436,6,264,0,0,2436,530, +1,0,0,0,2437,2439,7,8,0,0,2438,2437,1,0,0,0,2439,2440,1,0,0,0,2440,2438, +1,0,0,0,2440,2441,1,0,0,0,2441,2442,1,0,0,0,2442,2443,6,265,0,0,2443,532, +1,0,0,0,2444,2445,9,0,0,0,2445,534,1,0,0,0,33,0,2170,2199,2201,2213,2215, +2226,2234,2239,2245,2252,2254,2259,2265,2268,2276,2280,2284,2289,2291,2298, +2300,2306,2308,2317,2319,2395,2400,2412,2416,2419,2429,2440,1,0,1,0]; const atn = new antlr4.atn.ATNDeserializer().deserialize(serializedATN); @@ -784,16 +832,18 @@ export default class SqlBaseLexer extends antlr4.Lexer { static literalNames = [ null, "'.'", "'('", "')'", "','", "'?'", "'->'", "'['", "']'", "'=>'", "'ADD'", "'ADMIN'", "'ALL'", "'ALTER'", "'ANALYZE'", "'AND'", "'ANY'", "'ARRAY'", - "'AS'", "'ASC'", "'AT'", "'BERNOULLI'", "'BETWEEN'", - "'BY'", "'CALL'", "'CALLED'", "'CASCADE'", "'CASE'", - "'CAST'", "'CATALOGS'", "'COLUMN'", "'COLUMNS'", + "'AS'", "'ASC'", "'AT'", "'BEFORE'", "'BERNOULLI'", + "'BETWEEN'", "'BY'", "'CALL'", "'CALLED'", "'CASCADE'", + "'CASE'", "'CAST'", "'CATALOGS'", "'COLUMN'", "'COLUMNS'", "'COMMENT'", "'COMMIT'", "'COMMITTED'", "'CONSTRAINT'", - "'CREATE'", "'CROSS'", "'CUBE'", "'CURRENT'", "'CURRENT_DATE'", - "'CURRENT_ROLE'", "'CURRENT_TIME'", "'CURRENT_TIMESTAMP'", - "'CURRENT_USER'", "'DATA'", "'DATE'", "'DAY'", - "'DEALLOCATE'", "'DEFINER'", "'DELETE'", "'DESC'", - "'DESCRIBE'", "'DETERMINISTIC'", "'DISTINCT'", - "'DISTRIBUTED'", "'DROP'", "'ELSE'", "'END'", "'ESCAPE'", + "'CREATE'", "'COPARTITION'", "'CROSS'", "'CUBE'", + "'CURRENT'", "'CURRENT_DATE'", "'CURRENT_ROLE'", + "'CURRENT_TIME'", "'CURRENT_TIMESTAMP'", "'CURRENT_USER'", + "'DATA'", "'DATE'", "'DAY'", "'DEALLOCATE'", "'DEFINER'", + "'DELETE'", "'DESC'", "'DESCRIBE'", "'DESCRIPTOR'", + "'DETERMINISTIC'", "'DISABLED'", "'DISTINCT'", + "'DISTRIBUTED'", "'DROP'", "'ELSE'", "'EMPTY'", + "'ENABLED'", "'END'", "'ENFORCED'", "'ESCAPE'", "'EXCEPT'", "'EXCLUDING'", "'EXECUTE'", "'EXISTS'", "'EXPLAIN'", "'EXTRACT'", "'EXTERNAL'", "'FALSE'", "'FETCH'", "'FILTER'", "'FIRST'", "'FOLLOWING'", @@ -804,125 +854,133 @@ export default class SqlBaseLexer extends antlr4.Lexer { "'INCLUDING'", "'INNER'", "'INPUT'", "'INSERT'", "'INTERSECT'", "'INTERVAL'", "'INTO'", "'INVOKER'", "'IO'", "'IS'", "'ISOLATION'", "'JSON'", "'JOIN'", - "'LANGUAGE'", "'LAST'", "'LATERAL'", "'LEFT'", - "'LEVEL'", "'LIKE'", "'LIMIT'", "'LOCALTIME'", - "'LOCALTIMESTAMP'", "'LOGICAL'", "'MAP'", "'MATERIALIZED'", - "'MINUTE'", "'MONTH'", "'NAME'", "'NATURAL'", "'NFC'", - "'NFD'", "'NFKC'", "'NFKD'", "'NO'", "'NONE'", - "'NORMALIZE'", "'NOT'", "'NULL'", "'NULLIF'", "'NULLS'", - "'OF'", "'OFFSET'", "'ON'", "'ONLY'", "'OPTION'", - "'OR'", "'ORDER'", "'ORDINALITY'", "'OUTER'", "'OUTPUT'", - "'OVER'", "'PARTITION'", "'PARTITIONS'", "'POSITION'", - "'PRECEDING'", "'PREPARE'", "'PRIVILEGES'", "'PROPERTIES'", - "'RANGE'", "'READ'", "'RECURSIVE'", "'REFRESH'", - "'RENAME'", "'REPEATABLE'", "'REPLACE'", "'RESET'", - "'RESPECT'", "'RESTRICT'", "'RETURN'", "'RETURNS'", - "'REVOKE'", "'RIGHT'", "'ROLE'", "'ROLES'", "'ROLLBACK'", - "'ROLLUP'", "'ROW'", "'ROWS'", "'SCHEMA'", "'SCHEMAS'", - "'SECOND'", "'SECURITY'", "'SELECT'", "'SERIALIZABLE'", - "'SESSION'", "'SET'", "'SETS'", "'SHOW'", "'SOME'", - "'SQL'", "'START'", "'STATS'", "'SUBSTRING'", "'SYSTEM'", + "'KEEP'", "'KEY'", "'LANGUAGE'", "'LAST'", "'LATERAL'", + "'LEFT'", "'LEVEL'", "'LIKE'", "'LIMIT'", "'LOCALTIME'", + "'LOCALTIMESTAMP'", "'LOGICAL'", "'MAP'", "'MATCHED'", + "'MATERIALIZED'", "'MERGE'", "'MINUTE'", "'MONTH'", + "'NAME'", "'NATURAL'", "'NFC'", "'NFD'", "'NFKC'", + "'NFKD'", "'NO'", "'NONE'", "'NORMALIZE'", "'NOT'", + "'NULL'", "'NULLIF'", "'NULLS'", "'OF'", "'OFFSET'", + "'ON'", "'ONLY'", "'OPTION'", "'OR'", "'ORDER'", + "'ORDINALITY'", "'OUTER'", "'OUTPUT'", "'OVER'", + "'PARTITION'", "'PARTITIONS'", "'POSITION'", "'PRECEDING'", + "'PREPARE'", "'PRIMARY'", "'PRIVILEGES'", "'PROPERTIES'", + "'PRUNE'", "'RANGE'", "'READ'", "'RECURSIVE'", + "'REFRESH'", "'RELY'", "'RENAME'", "'REPEATABLE'", + "'REPLACE'", "'RESET'", "'RESPECT'", "'RESTRICT'", + "'RETURN'", "'RETURNS'", "'REVOKE'", "'RIGHT'", + "'ROLE'", "'ROLES'", "'ROLLBACK'", "'ROLLUP'", + "'ROW'", "'ROWS'", "'SCHEMA'", "'SCHEMAS'", "'SECOND'", + "'SECURITY'", "'SELECT'", "'SERIALIZABLE'", "'SESSION'", + "'SET'", "'SETS'", "'SHOW'", "'SOME'", "'SQL'", + "'START'", "'STATS'", "'SUBSTRING'", "'SYSTEM'", "'SYSTEM_TIME'", "'SYSTEM_VERSION'", "'TABLE'", "'TABLES'", "'TABLESAMPLE'", "'TEMPORARY'", "'TEXT'", "'THEN'", "'TIME'", "'TIMESTAMP'", "'TO'", "'TRANSACTION'", "'TRUE'", "'TRUNCATE'", "'TRY_CAST'", "'TYPE'", "'UESCAPE'", "'UNBOUNDED'", "'UNCOMMITTED'", "'UNION'", - "'UNNEST'", "'UPDATE'", "'USE'", "'USER'", "'USING'", - "'VALIDATE'", "'VALUES'", "'VERBOSE'", "'VERSION'", - "'VIEW'", "'WHEN'", "'WHERE'", "'WITH'", "'WORK'", - "'WRITE'", "'YEAR'", "'ZONE'", "'='", null, "'<'", - "'<='", "'>'", "'>='", "'+'", "'-'", "'*'", "'/'", - "'%'", "'||'" ]; + "'UNIQUE'", "'UNNEST'", "'UPDATE'", "'USE'", "'USER'", + "'USING'", "'VALIDATE'", "'VALUES'", "'VERBOSE'", + "'VERSION'", "'VIEW'", "'WHEN'", "'WHERE'", "'WITH'", + "'WORK'", "'WRITE'", "'YEAR'", "'ZONE'", "'='", + null, "'<'", "'<='", "'>'", "'>='", "'+'", "'-'", + "'*'", "'/'", "'%'", "'||'" ]; static symbolicNames = [ null, null, null, null, null, null, null, null, null, null, "ADD", "ADMIN", "ALL", "ALTER", "ANALYZE", - "AND", "ANY", "ARRAY", "AS", "ASC", "AT", "BERNOULLI", - "BETWEEN", "BY", "CALL", "CALLED", "CASCADE", - "CASE", "CAST", "CATALOGS", "COLUMN", "COLUMNS", - "COMMENT", "COMMIT", "COMMITTED", "CONSTRAINT", - "CREATE", "CROSS", "CUBE", "CURRENT", "CURRENT_DATE", - "CURRENT_ROLE", "CURRENT_TIME", "CURRENT_TIMESTAMP", - "CURRENT_USER", "DATA", "DATE", "DAY", "DEALLOCATE", - "DEFINER", "DELETE", "DESC", "DESCRIBE", "DETERMINISTIC", - "DISTINCT", "DISTRIBUTED", "DROP", "ELSE", "END", - "ESCAPE", "EXCEPT", "EXCLUDING", "EXECUTE", "EXISTS", - "EXPLAIN", "EXTRACT", "EXTERNAL", "FALSE", "FETCH", - "FILTER", "FIRST", "FOLLOWING", "FOR", "FORMAT", - "FROM", "FULL", "FUNCTION", "FUNCTIONS", "GRANT", - "GRANTED", "GRANTS", "GRAPHVIZ", "GROUP", "GROUPING", - "GROUPS", "HAVING", "HOUR", "IF", "IGNORE", "IN", - "INCLUDING", "INNER", "INPUT", "INSERT", "INTERSECT", - "INTERVAL", "INTO", "INVOKER", "IO", "IS", "ISOLATION", - "JSON", "JOIN", "LANGUAGE", "LAST", "LATERAL", + "AND", "ANY", "ARRAY", "AS", "ASC", "AT", "BEFORE", + "BERNOULLI", "BETWEEN", "BY", "CALL", "CALLED", + "CASCADE", "CASE", "CAST", "CATALOGS", "COLUMN", + "COLUMNS", "COMMENT", "COMMIT", "COMMITTED", "CONSTRAINT", + "CREATE", "COPARTITION", "CROSS", "CUBE", "CURRENT", + "CURRENT_DATE", "CURRENT_ROLE", "CURRENT_TIME", + "CURRENT_TIMESTAMP", "CURRENT_USER", "DATA", "DATE", + "DAY", "DEALLOCATE", "DEFINER", "DELETE", "DESC", + "DESCRIBE", "DESCRIPTOR", "DETERMINISTIC", "DISABLED", + "DISTINCT", "DISTRIBUTED", "DROP", "ELSE", "EMPTY", + "ENABLED", "END", "ENFORCED", "ESCAPE", "EXCEPT", + "EXCLUDING", "EXECUTE", "EXISTS", "EXPLAIN", "EXTRACT", + "EXTERNAL", "FALSE", "FETCH", "FILTER", "FIRST", + "FOLLOWING", "FOR", "FORMAT", "FROM", "FULL", + "FUNCTION", "FUNCTIONS", "GRANT", "GRANTED", "GRANTS", + "GRAPHVIZ", "GROUP", "GROUPING", "GROUPS", "HAVING", + "HOUR", "IF", "IGNORE", "IN", "INCLUDING", "INNER", + "INPUT", "INSERT", "INTERSECT", "INTERVAL", "INTO", + "INVOKER", "IO", "IS", "ISOLATION", "JSON", "JOIN", + "KEEP", "KEY", "LANGUAGE", "LAST", "LATERAL", "LEFT", "LEVEL", "LIKE", "LIMIT", "LOCALTIME", - "LOCALTIMESTAMP", "LOGICAL", "MAP", "MATERIALIZED", - "MINUTE", "MONTH", "NAME", "NATURAL", "NFC", "NFD", - "NFKC", "NFKD", "NO", "NONE", "NORMALIZE", "NOT", - "NULL", "NULLIF", "NULLS", "OF", "OFFSET", "ON", - "ONLY", "OPTION", "OR", "ORDER", "ORDINALITY", - "OUTER", "OUTPUT", "OVER", "PARTITION", "PARTITIONS", - "POSITION", "PRECEDING", "PREPARE", "PRIVILEGES", - "PROPERTIES", "RANGE", "READ", "RECURSIVE", "REFRESH", - "RENAME", "REPEATABLE", "REPLACE", "RESET", "RESPECT", - "RESTRICT", "RETURN", "RETURNS", "REVOKE", "RIGHT", - "ROLE", "ROLES", "ROLLBACK", "ROLLUP", "ROW", - "ROWS", "SCHEMA", "SCHEMAS", "SECOND", "SECURITY", - "SELECT", "SERIALIZABLE", "SESSION", "SET", "SETS", - "SHOW", "SOME", "SQL", "START", "STATS", "SUBSTRING", - "SYSTEM", "SYSTEM_TIME", "SYSTEM_VERSION", "TABLE", - "TABLES", "TABLESAMPLE", "TEMPORARY", "TEXT", - "THEN", "TIME", "TIMESTAMP", "TO", "TRANSACTION", - "TRUE", "TRUNCATE", "TRY_CAST", "TYPE", "UESCAPE", - "UNBOUNDED", "UNCOMMITTED", "UNION", "UNNEST", - "UPDATE", "USE", "USER", "USING", "VALIDATE", - "VALUES", "VERBOSE", "VERSION", "VIEW", "WHEN", - "WHERE", "WITH", "WORK", "WRITE", "YEAR", "ZONE", - "EQ", "NEQ", "LT", "LTE", "GT", "GTE", "PLUS", - "MINUS", "ASTERISK", "SLASH", "PERCENT", "CONCAT", - "STRING", "UNICODE_STRING", "BINARY_LITERAL", - "INTEGER_VALUE", "DECIMAL_VALUE", "DOUBLE_VALUE", - "IDENTIFIER", "DIGIT_IDENTIFIER", "QUOTED_IDENTIFIER", - "BACKQUOTED_IDENTIFIER", "TIME_WITH_TIME_ZONE", - "TIMESTAMP_WITH_TIME_ZONE", "DOUBLE_PRECISION", - "SIMPLE_COMMENT", "BRACKETED_COMMENT", "WS", "UNRECOGNIZED" ]; + "LOCALTIMESTAMP", "LOGICAL", "MAP", "MATCHED", + "MATERIALIZED", "MERGE", "MINUTE", "MONTH", "NAME", + "NATURAL", "NFC", "NFD", "NFKC", "NFKD", "NO", + "NONE", "NORMALIZE", "NOT", "NULL", "NULLIF", + "NULLS", "OF", "OFFSET", "ON", "ONLY", "OPTION", + "OR", "ORDER", "ORDINALITY", "OUTER", "OUTPUT", + "OVER", "PARTITION", "PARTITIONS", "POSITION", + "PRECEDING", "PREPARE", "PRIMARY", "PRIVILEGES", + "PROPERTIES", "PRUNE", "RANGE", "READ", "RECURSIVE", + "REFRESH", "RELY", "RENAME", "REPEATABLE", "REPLACE", + "RESET", "RESPECT", "RESTRICT", "RETURN", "RETURNS", + "REVOKE", "RIGHT", "ROLE", "ROLES", "ROLLBACK", + "ROLLUP", "ROW", "ROWS", "SCHEMA", "SCHEMAS", + "SECOND", "SECURITY", "SELECT", "SERIALIZABLE", + "SESSION", "SET", "SETS", "SHOW", "SOME", "SQL", + "START", "STATS", "SUBSTRING", "SYSTEM", "SYSTEM_TIME", + "SYSTEM_VERSION", "TABLE", "TABLES", "TABLESAMPLE", + "TEMPORARY", "TEXT", "THEN", "TIME", "TIMESTAMP", + "TO", "TRANSACTION", "TRUE", "TRUNCATE", "TRY_CAST", + "TYPE", "UESCAPE", "UNBOUNDED", "UNCOMMITTED", + "UNION", "UNIQUE", "UNNEST", "UPDATE", "USE", + "USER", "USING", "VALIDATE", "VALUES", "VERBOSE", + "VERSION", "VIEW", "WHEN", "WHERE", "WITH", "WORK", + "WRITE", "YEAR", "ZONE", "EQ", "NEQ", "LT", "LTE", + "GT", "GTE", "PLUS", "MINUS", "ASTERISK", "SLASH", + "PERCENT", "CONCAT", "STRING", "UNICODE_STRING", + "BINARY_LITERAL", "INTEGER_VALUE", "DECIMAL_VALUE", + "DOUBLE_VALUE", "IDENTIFIER", "DIGIT_IDENTIFIER", + "QUOTED_IDENTIFIER", "BACKQUOTED_IDENTIFIER", + "TIME_WITH_TIME_ZONE", "TIMESTAMP_WITH_TIME_ZONE", + "DOUBLE_PRECISION", "SIMPLE_COMMENT", "BRACKETED_COMMENT", + "WS", "UNRECOGNIZED" ]; static ruleNames = [ "T__0", "T__1", "T__2", "T__3", "T__4", "T__5", "T__6", "T__7", "T__8", "ADD", "ADMIN", "ALL", "ALTER", "ANALYZE", - "AND", "ANY", "ARRAY", "AS", "ASC", "AT", "BERNOULLI", - "BETWEEN", "BY", "CALL", "CALLED", "CASCADE", "CASE", - "CAST", "CATALOGS", "COLUMN", "COLUMNS", "COMMENT", - "COMMIT", "COMMITTED", "CONSTRAINT", "CREATE", "CROSS", - "CUBE", "CURRENT", "CURRENT_DATE", "CURRENT_ROLE", + "AND", "ANY", "ARRAY", "AS", "ASC", "AT", "BEFORE", + "BERNOULLI", "BETWEEN", "BY", "CALL", "CALLED", "CASCADE", + "CASE", "CAST", "CATALOGS", "COLUMN", "COLUMNS", "COMMENT", + "COMMIT", "COMMITTED", "CONSTRAINT", "CREATE", "COPARTITION", + "CROSS", "CUBE", "CURRENT", "CURRENT_DATE", "CURRENT_ROLE", "CURRENT_TIME", "CURRENT_TIMESTAMP", "CURRENT_USER", "DATA", "DATE", "DAY", "DEALLOCATE", "DEFINER", "DELETE", - "DESC", "DESCRIBE", "DETERMINISTIC", "DISTINCT", "DISTRIBUTED", - "DROP", "ELSE", "END", "ESCAPE", "EXCEPT", "EXCLUDING", - "EXECUTE", "EXISTS", "EXPLAIN", "EXTRACT", "EXTERNAL", - "FALSE", "FETCH", "FILTER", "FIRST", "FOLLOWING", + "DESC", "DESCRIBE", "DESCRIPTOR", "DETERMINISTIC", + "DISABLED", "DISTINCT", "DISTRIBUTED", "DROP", "ELSE", + "EMPTY", "ENABLED", "END", "ENFORCED", "ESCAPE", "EXCEPT", + "EXCLUDING", "EXECUTE", "EXISTS", "EXPLAIN", "EXTRACT", + "EXTERNAL", "FALSE", "FETCH", "FILTER", "FIRST", "FOLLOWING", "FOR", "FORMAT", "FROM", "FULL", "FUNCTION", "FUNCTIONS", "GRANT", "GRANTED", "GRANTS", "GRAPHVIZ", "GROUP", "GROUPING", "GROUPS", "HAVING", "HOUR", "IF", "IGNORE", "IN", "INCLUDING", "INNER", "INPUT", "INSERT", "INTERSECT", "INTERVAL", "INTO", "INVOKER", "IO", "IS", "ISOLATION", - "JSON", "JOIN", "LANGUAGE", "LAST", "LATERAL", "LEFT", - "LEVEL", "LIKE", "LIMIT", "LOCALTIME", "LOCALTIMESTAMP", - "LOGICAL", "MAP", "MATERIALIZED", "MINUTE", "MONTH", - "NAME", "NATURAL", "NFC", "NFD", "NFKC", "NFKD", "NO", - "NONE", "NORMALIZE", "NOT", "NULL", "NULLIF", "NULLS", - "OF", "OFFSET", "ON", "ONLY", "OPTION", "OR", "ORDER", - "ORDINALITY", "OUTER", "OUTPUT", "OVER", "PARTITION", - "PARTITIONS", "POSITION", "PRECEDING", "PREPARE", - "PRIVILEGES", "PROPERTIES", "RANGE", "READ", "RECURSIVE", - "REFRESH", "RENAME", "REPEATABLE", "REPLACE", "RESET", - "RESPECT", "RESTRICT", "RETURN", "RETURNS", "REVOKE", - "RIGHT", "ROLE", "ROLES", "ROLLBACK", "ROLLUP", "ROW", - "ROWS", "SCHEMA", "SCHEMAS", "SECOND", "SECURITY", + "JSON", "JOIN", "KEEP", "KEY", "LANGUAGE", "LAST", + "LATERAL", "LEFT", "LEVEL", "LIKE", "LIMIT", "LOCALTIME", + "LOCALTIMESTAMP", "LOGICAL", "MAP", "MATCHED", "MATERIALIZED", + "MERGE", "MINUTE", "MONTH", "NAME", "NATURAL", "NFC", + "NFD", "NFKC", "NFKD", "NO", "NONE", "NORMALIZE", + "NOT", "NULL", "NULLIF", "NULLS", "OF", "OFFSET", + "ON", "ONLY", "OPTION", "OR", "ORDER", "ORDINALITY", + "OUTER", "OUTPUT", "OVER", "PARTITION", "PARTITIONS", + "POSITION", "PRECEDING", "PREPARE", "PRIMARY", "PRIVILEGES", + "PROPERTIES", "PRUNE", "RANGE", "READ", "RECURSIVE", + "REFRESH", "RELY", "RENAME", "REPEATABLE", "REPLACE", + "RESET", "RESPECT", "RESTRICT", "RETURN", "RETURNS", + "REVOKE", "RIGHT", "ROLE", "ROLES", "ROLLBACK", "ROLLUP", + "ROW", "ROWS", "SCHEMA", "SCHEMAS", "SECOND", "SECURITY", "SELECT", "SERIALIZABLE", "SESSION", "SET", "SETS", "SHOW", "SOME", "SQL", "START", "STATS", "SUBSTRING", "SYSTEM", "SYSTEM_TIME", "SYSTEM_VERSION", "TABLE", "TABLES", "TABLESAMPLE", "TEMPORARY", "TEXT", "THEN", "TIME", "TIMESTAMP", "TO", "TRANSACTION", "TRUE", "TRUNCATE", "TRY_CAST", "TYPE", "UESCAPE", "UNBOUNDED", - "UNCOMMITTED", "UNION", "UNNEST", "UPDATE", "USE", - "USER", "USING", "VALIDATE", "VALUES", "VERBOSE", + "UNCOMMITTED", "UNION", "UNIQUE", "UNNEST", "UPDATE", + "USE", "USER", "USING", "VALIDATE", "VALUES", "VERBOSE", "VERSION", "VIEW", "WHEN", "WHERE", "WITH", "WORK", "WRITE", "YEAR", "ZONE", "EQ", "NEQ", "LT", "LTE", "GT", "GTE", "PLUS", "MINUS", "ASTERISK", "SLASH", @@ -960,235 +1018,250 @@ SqlBaseLexer.ARRAY = 17; SqlBaseLexer.AS = 18; SqlBaseLexer.ASC = 19; SqlBaseLexer.AT = 20; -SqlBaseLexer.BERNOULLI = 21; -SqlBaseLexer.BETWEEN = 22; -SqlBaseLexer.BY = 23; -SqlBaseLexer.CALL = 24; -SqlBaseLexer.CALLED = 25; -SqlBaseLexer.CASCADE = 26; -SqlBaseLexer.CASE = 27; -SqlBaseLexer.CAST = 28; -SqlBaseLexer.CATALOGS = 29; -SqlBaseLexer.COLUMN = 30; -SqlBaseLexer.COLUMNS = 31; -SqlBaseLexer.COMMENT = 32; -SqlBaseLexer.COMMIT = 33; -SqlBaseLexer.COMMITTED = 34; -SqlBaseLexer.CONSTRAINT = 35; -SqlBaseLexer.CREATE = 36; -SqlBaseLexer.CROSS = 37; -SqlBaseLexer.CUBE = 38; -SqlBaseLexer.CURRENT = 39; -SqlBaseLexer.CURRENT_DATE = 40; -SqlBaseLexer.CURRENT_ROLE = 41; -SqlBaseLexer.CURRENT_TIME = 42; -SqlBaseLexer.CURRENT_TIMESTAMP = 43; -SqlBaseLexer.CURRENT_USER = 44; -SqlBaseLexer.DATA = 45; -SqlBaseLexer.DATE = 46; -SqlBaseLexer.DAY = 47; -SqlBaseLexer.DEALLOCATE = 48; -SqlBaseLexer.DEFINER = 49; -SqlBaseLexer.DELETE = 50; -SqlBaseLexer.DESC = 51; -SqlBaseLexer.DESCRIBE = 52; -SqlBaseLexer.DETERMINISTIC = 53; -SqlBaseLexer.DISTINCT = 54; -SqlBaseLexer.DISTRIBUTED = 55; -SqlBaseLexer.DROP = 56; -SqlBaseLexer.ELSE = 57; -SqlBaseLexer.END = 58; -SqlBaseLexer.ESCAPE = 59; -SqlBaseLexer.EXCEPT = 60; -SqlBaseLexer.EXCLUDING = 61; -SqlBaseLexer.EXECUTE = 62; -SqlBaseLexer.EXISTS = 63; -SqlBaseLexer.EXPLAIN = 64; -SqlBaseLexer.EXTRACT = 65; -SqlBaseLexer.EXTERNAL = 66; -SqlBaseLexer.FALSE = 67; -SqlBaseLexer.FETCH = 68; -SqlBaseLexer.FILTER = 69; -SqlBaseLexer.FIRST = 70; -SqlBaseLexer.FOLLOWING = 71; -SqlBaseLexer.FOR = 72; -SqlBaseLexer.FORMAT = 73; -SqlBaseLexer.FROM = 74; -SqlBaseLexer.FULL = 75; -SqlBaseLexer.FUNCTION = 76; -SqlBaseLexer.FUNCTIONS = 77; -SqlBaseLexer.GRANT = 78; -SqlBaseLexer.GRANTED = 79; -SqlBaseLexer.GRANTS = 80; -SqlBaseLexer.GRAPHVIZ = 81; -SqlBaseLexer.GROUP = 82; -SqlBaseLexer.GROUPING = 83; -SqlBaseLexer.GROUPS = 84; -SqlBaseLexer.HAVING = 85; -SqlBaseLexer.HOUR = 86; -SqlBaseLexer.IF = 87; -SqlBaseLexer.IGNORE = 88; -SqlBaseLexer.IN = 89; -SqlBaseLexer.INCLUDING = 90; -SqlBaseLexer.INNER = 91; -SqlBaseLexer.INPUT = 92; -SqlBaseLexer.INSERT = 93; -SqlBaseLexer.INTERSECT = 94; -SqlBaseLexer.INTERVAL = 95; -SqlBaseLexer.INTO = 96; -SqlBaseLexer.INVOKER = 97; -SqlBaseLexer.IO = 98; -SqlBaseLexer.IS = 99; -SqlBaseLexer.ISOLATION = 100; -SqlBaseLexer.JSON = 101; -SqlBaseLexer.JOIN = 102; -SqlBaseLexer.LANGUAGE = 103; -SqlBaseLexer.LAST = 104; -SqlBaseLexer.LATERAL = 105; -SqlBaseLexer.LEFT = 106; -SqlBaseLexer.LEVEL = 107; -SqlBaseLexer.LIKE = 108; -SqlBaseLexer.LIMIT = 109; -SqlBaseLexer.LOCALTIME = 110; -SqlBaseLexer.LOCALTIMESTAMP = 111; -SqlBaseLexer.LOGICAL = 112; -SqlBaseLexer.MAP = 113; -SqlBaseLexer.MATERIALIZED = 114; -SqlBaseLexer.MINUTE = 115; -SqlBaseLexer.MONTH = 116; -SqlBaseLexer.NAME = 117; -SqlBaseLexer.NATURAL = 118; -SqlBaseLexer.NFC = 119; -SqlBaseLexer.NFD = 120; -SqlBaseLexer.NFKC = 121; -SqlBaseLexer.NFKD = 122; -SqlBaseLexer.NO = 123; -SqlBaseLexer.NONE = 124; -SqlBaseLexer.NORMALIZE = 125; -SqlBaseLexer.NOT = 126; -SqlBaseLexer.NULL = 127; -SqlBaseLexer.NULLIF = 128; -SqlBaseLexer.NULLS = 129; -SqlBaseLexer.OF = 130; -SqlBaseLexer.OFFSET = 131; -SqlBaseLexer.ON = 132; -SqlBaseLexer.ONLY = 133; -SqlBaseLexer.OPTION = 134; -SqlBaseLexer.OR = 135; -SqlBaseLexer.ORDER = 136; -SqlBaseLexer.ORDINALITY = 137; -SqlBaseLexer.OUTER = 138; -SqlBaseLexer.OUTPUT = 139; -SqlBaseLexer.OVER = 140; -SqlBaseLexer.PARTITION = 141; -SqlBaseLexer.PARTITIONS = 142; -SqlBaseLexer.POSITION = 143; -SqlBaseLexer.PRECEDING = 144; -SqlBaseLexer.PREPARE = 145; -SqlBaseLexer.PRIVILEGES = 146; -SqlBaseLexer.PROPERTIES = 147; -SqlBaseLexer.RANGE = 148; -SqlBaseLexer.READ = 149; -SqlBaseLexer.RECURSIVE = 150; -SqlBaseLexer.REFRESH = 151; -SqlBaseLexer.RENAME = 152; -SqlBaseLexer.REPEATABLE = 153; -SqlBaseLexer.REPLACE = 154; -SqlBaseLexer.RESET = 155; -SqlBaseLexer.RESPECT = 156; -SqlBaseLexer.RESTRICT = 157; -SqlBaseLexer.RETURN = 158; -SqlBaseLexer.RETURNS = 159; -SqlBaseLexer.REVOKE = 160; -SqlBaseLexer.RIGHT = 161; -SqlBaseLexer.ROLE = 162; -SqlBaseLexer.ROLES = 163; -SqlBaseLexer.ROLLBACK = 164; -SqlBaseLexer.ROLLUP = 165; -SqlBaseLexer.ROW = 166; -SqlBaseLexer.ROWS = 167; -SqlBaseLexer.SCHEMA = 168; -SqlBaseLexer.SCHEMAS = 169; -SqlBaseLexer.SECOND = 170; -SqlBaseLexer.SECURITY = 171; -SqlBaseLexer.SELECT = 172; -SqlBaseLexer.SERIALIZABLE = 173; -SqlBaseLexer.SESSION = 174; -SqlBaseLexer.SET = 175; -SqlBaseLexer.SETS = 176; -SqlBaseLexer.SHOW = 177; -SqlBaseLexer.SOME = 178; -SqlBaseLexer.SQL = 179; -SqlBaseLexer.START = 180; -SqlBaseLexer.STATS = 181; -SqlBaseLexer.SUBSTRING = 182; -SqlBaseLexer.SYSTEM = 183; -SqlBaseLexer.SYSTEM_TIME = 184; -SqlBaseLexer.SYSTEM_VERSION = 185; -SqlBaseLexer.TABLE = 186; -SqlBaseLexer.TABLES = 187; -SqlBaseLexer.TABLESAMPLE = 188; -SqlBaseLexer.TEMPORARY = 189; -SqlBaseLexer.TEXT = 190; -SqlBaseLexer.THEN = 191; -SqlBaseLexer.TIME = 192; -SqlBaseLexer.TIMESTAMP = 193; -SqlBaseLexer.TO = 194; -SqlBaseLexer.TRANSACTION = 195; -SqlBaseLexer.TRUE = 196; -SqlBaseLexer.TRUNCATE = 197; -SqlBaseLexer.TRY_CAST = 198; -SqlBaseLexer.TYPE = 199; -SqlBaseLexer.UESCAPE = 200; -SqlBaseLexer.UNBOUNDED = 201; -SqlBaseLexer.UNCOMMITTED = 202; -SqlBaseLexer.UNION = 203; -SqlBaseLexer.UNNEST = 204; -SqlBaseLexer.UPDATE = 205; -SqlBaseLexer.USE = 206; -SqlBaseLexer.USER = 207; -SqlBaseLexer.USING = 208; -SqlBaseLexer.VALIDATE = 209; -SqlBaseLexer.VALUES = 210; -SqlBaseLexer.VERBOSE = 211; -SqlBaseLexer.VERSION = 212; -SqlBaseLexer.VIEW = 213; -SqlBaseLexer.WHEN = 214; -SqlBaseLexer.WHERE = 215; -SqlBaseLexer.WITH = 216; -SqlBaseLexer.WORK = 217; -SqlBaseLexer.WRITE = 218; -SqlBaseLexer.YEAR = 219; -SqlBaseLexer.ZONE = 220; -SqlBaseLexer.EQ = 221; -SqlBaseLexer.NEQ = 222; -SqlBaseLexer.LT = 223; -SqlBaseLexer.LTE = 224; -SqlBaseLexer.GT = 225; -SqlBaseLexer.GTE = 226; -SqlBaseLexer.PLUS = 227; -SqlBaseLexer.MINUS = 228; -SqlBaseLexer.ASTERISK = 229; -SqlBaseLexer.SLASH = 230; -SqlBaseLexer.PERCENT = 231; -SqlBaseLexer.CONCAT = 232; -SqlBaseLexer.STRING = 233; -SqlBaseLexer.UNICODE_STRING = 234; -SqlBaseLexer.BINARY_LITERAL = 235; -SqlBaseLexer.INTEGER_VALUE = 236; -SqlBaseLexer.DECIMAL_VALUE = 237; -SqlBaseLexer.DOUBLE_VALUE = 238; -SqlBaseLexer.IDENTIFIER = 239; -SqlBaseLexer.DIGIT_IDENTIFIER = 240; -SqlBaseLexer.QUOTED_IDENTIFIER = 241; -SqlBaseLexer.BACKQUOTED_IDENTIFIER = 242; -SqlBaseLexer.TIME_WITH_TIME_ZONE = 243; -SqlBaseLexer.TIMESTAMP_WITH_TIME_ZONE = 244; -SqlBaseLexer.DOUBLE_PRECISION = 245; -SqlBaseLexer.SIMPLE_COMMENT = 246; -SqlBaseLexer.BRACKETED_COMMENT = 247; -SqlBaseLexer.WS = 248; -SqlBaseLexer.UNRECOGNIZED = 249; +SqlBaseLexer.BEFORE = 21; +SqlBaseLexer.BERNOULLI = 22; +SqlBaseLexer.BETWEEN = 23; +SqlBaseLexer.BY = 24; +SqlBaseLexer.CALL = 25; +SqlBaseLexer.CALLED = 26; +SqlBaseLexer.CASCADE = 27; +SqlBaseLexer.CASE = 28; +SqlBaseLexer.CAST = 29; +SqlBaseLexer.CATALOGS = 30; +SqlBaseLexer.COLUMN = 31; +SqlBaseLexer.COLUMNS = 32; +SqlBaseLexer.COMMENT = 33; +SqlBaseLexer.COMMIT = 34; +SqlBaseLexer.COMMITTED = 35; +SqlBaseLexer.CONSTRAINT = 36; +SqlBaseLexer.CREATE = 37; +SqlBaseLexer.COPARTITION = 38; +SqlBaseLexer.CROSS = 39; +SqlBaseLexer.CUBE = 40; +SqlBaseLexer.CURRENT = 41; +SqlBaseLexer.CURRENT_DATE = 42; +SqlBaseLexer.CURRENT_ROLE = 43; +SqlBaseLexer.CURRENT_TIME = 44; +SqlBaseLexer.CURRENT_TIMESTAMP = 45; +SqlBaseLexer.CURRENT_USER = 46; +SqlBaseLexer.DATA = 47; +SqlBaseLexer.DATE = 48; +SqlBaseLexer.DAY = 49; +SqlBaseLexer.DEALLOCATE = 50; +SqlBaseLexer.DEFINER = 51; +SqlBaseLexer.DELETE = 52; +SqlBaseLexer.DESC = 53; +SqlBaseLexer.DESCRIBE = 54; +SqlBaseLexer.DESCRIPTOR = 55; +SqlBaseLexer.DETERMINISTIC = 56; +SqlBaseLexer.DISABLED = 57; +SqlBaseLexer.DISTINCT = 58; +SqlBaseLexer.DISTRIBUTED = 59; +SqlBaseLexer.DROP = 60; +SqlBaseLexer.ELSE = 61; +SqlBaseLexer.EMPTY = 62; +SqlBaseLexer.ENABLED = 63; +SqlBaseLexer.END = 64; +SqlBaseLexer.ENFORCED = 65; +SqlBaseLexer.ESCAPE = 66; +SqlBaseLexer.EXCEPT = 67; +SqlBaseLexer.EXCLUDING = 68; +SqlBaseLexer.EXECUTE = 69; +SqlBaseLexer.EXISTS = 70; +SqlBaseLexer.EXPLAIN = 71; +SqlBaseLexer.EXTRACT = 72; +SqlBaseLexer.EXTERNAL = 73; +SqlBaseLexer.FALSE = 74; +SqlBaseLexer.FETCH = 75; +SqlBaseLexer.FILTER = 76; +SqlBaseLexer.FIRST = 77; +SqlBaseLexer.FOLLOWING = 78; +SqlBaseLexer.FOR = 79; +SqlBaseLexer.FORMAT = 80; +SqlBaseLexer.FROM = 81; +SqlBaseLexer.FULL = 82; +SqlBaseLexer.FUNCTION = 83; +SqlBaseLexer.FUNCTIONS = 84; +SqlBaseLexer.GRANT = 85; +SqlBaseLexer.GRANTED = 86; +SqlBaseLexer.GRANTS = 87; +SqlBaseLexer.GRAPHVIZ = 88; +SqlBaseLexer.GROUP = 89; +SqlBaseLexer.GROUPING = 90; +SqlBaseLexer.GROUPS = 91; +SqlBaseLexer.HAVING = 92; +SqlBaseLexer.HOUR = 93; +SqlBaseLexer.IF = 94; +SqlBaseLexer.IGNORE = 95; +SqlBaseLexer.IN = 96; +SqlBaseLexer.INCLUDING = 97; +SqlBaseLexer.INNER = 98; +SqlBaseLexer.INPUT = 99; +SqlBaseLexer.INSERT = 100; +SqlBaseLexer.INTERSECT = 101; +SqlBaseLexer.INTERVAL = 102; +SqlBaseLexer.INTO = 103; +SqlBaseLexer.INVOKER = 104; +SqlBaseLexer.IO = 105; +SqlBaseLexer.IS = 106; +SqlBaseLexer.ISOLATION = 107; +SqlBaseLexer.JSON = 108; +SqlBaseLexer.JOIN = 109; +SqlBaseLexer.KEEP = 110; +SqlBaseLexer.KEY = 111; +SqlBaseLexer.LANGUAGE = 112; +SqlBaseLexer.LAST = 113; +SqlBaseLexer.LATERAL = 114; +SqlBaseLexer.LEFT = 115; +SqlBaseLexer.LEVEL = 116; +SqlBaseLexer.LIKE = 117; +SqlBaseLexer.LIMIT = 118; +SqlBaseLexer.LOCALTIME = 119; +SqlBaseLexer.LOCALTIMESTAMP = 120; +SqlBaseLexer.LOGICAL = 121; +SqlBaseLexer.MAP = 122; +SqlBaseLexer.MATCHED = 123; +SqlBaseLexer.MATERIALIZED = 124; +SqlBaseLexer.MERGE = 125; +SqlBaseLexer.MINUTE = 126; +SqlBaseLexer.MONTH = 127; +SqlBaseLexer.NAME = 128; +SqlBaseLexer.NATURAL = 129; +SqlBaseLexer.NFC = 130; +SqlBaseLexer.NFD = 131; +SqlBaseLexer.NFKC = 132; +SqlBaseLexer.NFKD = 133; +SqlBaseLexer.NO = 134; +SqlBaseLexer.NONE = 135; +SqlBaseLexer.NORMALIZE = 136; +SqlBaseLexer.NOT = 137; +SqlBaseLexer.NULL = 138; +SqlBaseLexer.NULLIF = 139; +SqlBaseLexer.NULLS = 140; +SqlBaseLexer.OF = 141; +SqlBaseLexer.OFFSET = 142; +SqlBaseLexer.ON = 143; +SqlBaseLexer.ONLY = 144; +SqlBaseLexer.OPTION = 145; +SqlBaseLexer.OR = 146; +SqlBaseLexer.ORDER = 147; +SqlBaseLexer.ORDINALITY = 148; +SqlBaseLexer.OUTER = 149; +SqlBaseLexer.OUTPUT = 150; +SqlBaseLexer.OVER = 151; +SqlBaseLexer.PARTITION = 152; +SqlBaseLexer.PARTITIONS = 153; +SqlBaseLexer.POSITION = 154; +SqlBaseLexer.PRECEDING = 155; +SqlBaseLexer.PREPARE = 156; +SqlBaseLexer.PRIMARY = 157; +SqlBaseLexer.PRIVILEGES = 158; +SqlBaseLexer.PROPERTIES = 159; +SqlBaseLexer.PRUNE = 160; +SqlBaseLexer.RANGE = 161; +SqlBaseLexer.READ = 162; +SqlBaseLexer.RECURSIVE = 163; +SqlBaseLexer.REFRESH = 164; +SqlBaseLexer.RELY = 165; +SqlBaseLexer.RENAME = 166; +SqlBaseLexer.REPEATABLE = 167; +SqlBaseLexer.REPLACE = 168; +SqlBaseLexer.RESET = 169; +SqlBaseLexer.RESPECT = 170; +SqlBaseLexer.RESTRICT = 171; +SqlBaseLexer.RETURN = 172; +SqlBaseLexer.RETURNS = 173; +SqlBaseLexer.REVOKE = 174; +SqlBaseLexer.RIGHT = 175; +SqlBaseLexer.ROLE = 176; +SqlBaseLexer.ROLES = 177; +SqlBaseLexer.ROLLBACK = 178; +SqlBaseLexer.ROLLUP = 179; +SqlBaseLexer.ROW = 180; +SqlBaseLexer.ROWS = 181; +SqlBaseLexer.SCHEMA = 182; +SqlBaseLexer.SCHEMAS = 183; +SqlBaseLexer.SECOND = 184; +SqlBaseLexer.SECURITY = 185; +SqlBaseLexer.SELECT = 186; +SqlBaseLexer.SERIALIZABLE = 187; +SqlBaseLexer.SESSION = 188; +SqlBaseLexer.SET = 189; +SqlBaseLexer.SETS = 190; +SqlBaseLexer.SHOW = 191; +SqlBaseLexer.SOME = 192; +SqlBaseLexer.SQL = 193; +SqlBaseLexer.START = 194; +SqlBaseLexer.STATS = 195; +SqlBaseLexer.SUBSTRING = 196; +SqlBaseLexer.SYSTEM = 197; +SqlBaseLexer.SYSTEM_TIME = 198; +SqlBaseLexer.SYSTEM_VERSION = 199; +SqlBaseLexer.TABLE = 200; +SqlBaseLexer.TABLES = 201; +SqlBaseLexer.TABLESAMPLE = 202; +SqlBaseLexer.TEMPORARY = 203; +SqlBaseLexer.TEXT = 204; +SqlBaseLexer.THEN = 205; +SqlBaseLexer.TIME = 206; +SqlBaseLexer.TIMESTAMP = 207; +SqlBaseLexer.TO = 208; +SqlBaseLexer.TRANSACTION = 209; +SqlBaseLexer.TRUE = 210; +SqlBaseLexer.TRUNCATE = 211; +SqlBaseLexer.TRY_CAST = 212; +SqlBaseLexer.TYPE = 213; +SqlBaseLexer.UESCAPE = 214; +SqlBaseLexer.UNBOUNDED = 215; +SqlBaseLexer.UNCOMMITTED = 216; +SqlBaseLexer.UNION = 217; +SqlBaseLexer.UNIQUE = 218; +SqlBaseLexer.UNNEST = 219; +SqlBaseLexer.UPDATE = 220; +SqlBaseLexer.USE = 221; +SqlBaseLexer.USER = 222; +SqlBaseLexer.USING = 223; +SqlBaseLexer.VALIDATE = 224; +SqlBaseLexer.VALUES = 225; +SqlBaseLexer.VERBOSE = 226; +SqlBaseLexer.VERSION = 227; +SqlBaseLexer.VIEW = 228; +SqlBaseLexer.WHEN = 229; +SqlBaseLexer.WHERE = 230; +SqlBaseLexer.WITH = 231; +SqlBaseLexer.WORK = 232; +SqlBaseLexer.WRITE = 233; +SqlBaseLexer.YEAR = 234; +SqlBaseLexer.ZONE = 235; +SqlBaseLexer.EQ = 236; +SqlBaseLexer.NEQ = 237; +SqlBaseLexer.LT = 238; +SqlBaseLexer.LTE = 239; +SqlBaseLexer.GT = 240; +SqlBaseLexer.GTE = 241; +SqlBaseLexer.PLUS = 242; +SqlBaseLexer.MINUS = 243; +SqlBaseLexer.ASTERISK = 244; +SqlBaseLexer.SLASH = 245; +SqlBaseLexer.PERCENT = 246; +SqlBaseLexer.CONCAT = 247; +SqlBaseLexer.STRING = 248; +SqlBaseLexer.UNICODE_STRING = 249; +SqlBaseLexer.BINARY_LITERAL = 250; +SqlBaseLexer.INTEGER_VALUE = 251; +SqlBaseLexer.DECIMAL_VALUE = 252; +SqlBaseLexer.DOUBLE_VALUE = 253; +SqlBaseLexer.IDENTIFIER = 254; +SqlBaseLexer.DIGIT_IDENTIFIER = 255; +SqlBaseLexer.QUOTED_IDENTIFIER = 256; +SqlBaseLexer.BACKQUOTED_IDENTIFIER = 257; +SqlBaseLexer.TIME_WITH_TIME_ZONE = 258; +SqlBaseLexer.TIMESTAMP_WITH_TIME_ZONE = 259; +SqlBaseLexer.DOUBLE_PRECISION = 260; +SqlBaseLexer.SIMPLE_COMMENT = 261; +SqlBaseLexer.BRACKETED_COMMENT = 262; +SqlBaseLexer.WS = 263; +SqlBaseLexer.UNRECOGNIZED = 264; diff --git a/presto-ui/src/sql-parser/SqlBaseLexer.tokens b/presto-ui/src/sql-parser/SqlBaseLexer.tokens index d50a4f3e5ba2a..1d60d48e2170c 100644 --- a/presto-ui/src/sql-parser/SqlBaseLexer.tokens +++ b/presto-ui/src/sql-parser/SqlBaseLexer.tokens @@ -18,235 +18,250 @@ ARRAY=17 AS=18 ASC=19 AT=20 -BERNOULLI=21 -BETWEEN=22 -BY=23 -CALL=24 -CALLED=25 -CASCADE=26 -CASE=27 -CAST=28 -CATALOGS=29 -COLUMN=30 -COLUMNS=31 -COMMENT=32 -COMMIT=33 -COMMITTED=34 -CONSTRAINT=35 -CREATE=36 -CROSS=37 -CUBE=38 -CURRENT=39 -CURRENT_DATE=40 -CURRENT_ROLE=41 -CURRENT_TIME=42 -CURRENT_TIMESTAMP=43 -CURRENT_USER=44 -DATA=45 -DATE=46 -DAY=47 -DEALLOCATE=48 -DEFINER=49 -DELETE=50 -DESC=51 -DESCRIBE=52 -DETERMINISTIC=53 -DISTINCT=54 -DISTRIBUTED=55 -DROP=56 -ELSE=57 -END=58 -ESCAPE=59 -EXCEPT=60 -EXCLUDING=61 -EXECUTE=62 -EXISTS=63 -EXPLAIN=64 -EXTRACT=65 -EXTERNAL=66 -FALSE=67 -FETCH=68 -FILTER=69 -FIRST=70 -FOLLOWING=71 -FOR=72 -FORMAT=73 -FROM=74 -FULL=75 -FUNCTION=76 -FUNCTIONS=77 -GRANT=78 -GRANTED=79 -GRANTS=80 -GRAPHVIZ=81 -GROUP=82 -GROUPING=83 -GROUPS=84 -HAVING=85 -HOUR=86 -IF=87 -IGNORE=88 -IN=89 -INCLUDING=90 -INNER=91 -INPUT=92 -INSERT=93 -INTERSECT=94 -INTERVAL=95 -INTO=96 -INVOKER=97 -IO=98 -IS=99 -ISOLATION=100 -JSON=101 -JOIN=102 -LANGUAGE=103 -LAST=104 -LATERAL=105 -LEFT=106 -LEVEL=107 -LIKE=108 -LIMIT=109 -LOCALTIME=110 -LOCALTIMESTAMP=111 -LOGICAL=112 -MAP=113 -MATERIALIZED=114 -MINUTE=115 -MONTH=116 -NAME=117 -NATURAL=118 -NFC=119 -NFD=120 -NFKC=121 -NFKD=122 -NO=123 -NONE=124 -NORMALIZE=125 -NOT=126 -NULL=127 -NULLIF=128 -NULLS=129 -OF=130 -OFFSET=131 -ON=132 -ONLY=133 -OPTION=134 -OR=135 -ORDER=136 -ORDINALITY=137 -OUTER=138 -OUTPUT=139 -OVER=140 -PARTITION=141 -PARTITIONS=142 -POSITION=143 -PRECEDING=144 -PREPARE=145 -PRIVILEGES=146 -PROPERTIES=147 -RANGE=148 -READ=149 -RECURSIVE=150 -REFRESH=151 -RENAME=152 -REPEATABLE=153 -REPLACE=154 -RESET=155 -RESPECT=156 -RESTRICT=157 -RETURN=158 -RETURNS=159 -REVOKE=160 -RIGHT=161 -ROLE=162 -ROLES=163 -ROLLBACK=164 -ROLLUP=165 -ROW=166 -ROWS=167 -SCHEMA=168 -SCHEMAS=169 -SECOND=170 -SECURITY=171 -SELECT=172 -SERIALIZABLE=173 -SESSION=174 -SET=175 -SETS=176 -SHOW=177 -SOME=178 -SQL=179 -START=180 -STATS=181 -SUBSTRING=182 -SYSTEM=183 -SYSTEM_TIME=184 -SYSTEM_VERSION=185 -TABLE=186 -TABLES=187 -TABLESAMPLE=188 -TEMPORARY=189 -TEXT=190 -THEN=191 -TIME=192 -TIMESTAMP=193 -TO=194 -TRANSACTION=195 -TRUE=196 -TRUNCATE=197 -TRY_CAST=198 -TYPE=199 -UESCAPE=200 -UNBOUNDED=201 -UNCOMMITTED=202 -UNION=203 -UNNEST=204 -UPDATE=205 -USE=206 -USER=207 -USING=208 -VALIDATE=209 -VALUES=210 -VERBOSE=211 -VERSION=212 -VIEW=213 -WHEN=214 -WHERE=215 -WITH=216 -WORK=217 -WRITE=218 -YEAR=219 -ZONE=220 -EQ=221 -NEQ=222 -LT=223 -LTE=224 -GT=225 -GTE=226 -PLUS=227 -MINUS=228 -ASTERISK=229 -SLASH=230 -PERCENT=231 -CONCAT=232 -STRING=233 -UNICODE_STRING=234 -BINARY_LITERAL=235 -INTEGER_VALUE=236 -DECIMAL_VALUE=237 -DOUBLE_VALUE=238 -IDENTIFIER=239 -DIGIT_IDENTIFIER=240 -QUOTED_IDENTIFIER=241 -BACKQUOTED_IDENTIFIER=242 -TIME_WITH_TIME_ZONE=243 -TIMESTAMP_WITH_TIME_ZONE=244 -DOUBLE_PRECISION=245 -SIMPLE_COMMENT=246 -BRACKETED_COMMENT=247 -WS=248 -UNRECOGNIZED=249 +BEFORE=21 +BERNOULLI=22 +BETWEEN=23 +BY=24 +CALL=25 +CALLED=26 +CASCADE=27 +CASE=28 +CAST=29 +CATALOGS=30 +COLUMN=31 +COLUMNS=32 +COMMENT=33 +COMMIT=34 +COMMITTED=35 +CONSTRAINT=36 +CREATE=37 +COPARTITION=38 +CROSS=39 +CUBE=40 +CURRENT=41 +CURRENT_DATE=42 +CURRENT_ROLE=43 +CURRENT_TIME=44 +CURRENT_TIMESTAMP=45 +CURRENT_USER=46 +DATA=47 +DATE=48 +DAY=49 +DEALLOCATE=50 +DEFINER=51 +DELETE=52 +DESC=53 +DESCRIBE=54 +DESCRIPTOR=55 +DETERMINISTIC=56 +DISABLED=57 +DISTINCT=58 +DISTRIBUTED=59 +DROP=60 +ELSE=61 +EMPTY=62 +ENABLED=63 +END=64 +ENFORCED=65 +ESCAPE=66 +EXCEPT=67 +EXCLUDING=68 +EXECUTE=69 +EXISTS=70 +EXPLAIN=71 +EXTRACT=72 +EXTERNAL=73 +FALSE=74 +FETCH=75 +FILTER=76 +FIRST=77 +FOLLOWING=78 +FOR=79 +FORMAT=80 +FROM=81 +FULL=82 +FUNCTION=83 +FUNCTIONS=84 +GRANT=85 +GRANTED=86 +GRANTS=87 +GRAPHVIZ=88 +GROUP=89 +GROUPING=90 +GROUPS=91 +HAVING=92 +HOUR=93 +IF=94 +IGNORE=95 +IN=96 +INCLUDING=97 +INNER=98 +INPUT=99 +INSERT=100 +INTERSECT=101 +INTERVAL=102 +INTO=103 +INVOKER=104 +IO=105 +IS=106 +ISOLATION=107 +JSON=108 +JOIN=109 +KEEP=110 +KEY=111 +LANGUAGE=112 +LAST=113 +LATERAL=114 +LEFT=115 +LEVEL=116 +LIKE=117 +LIMIT=118 +LOCALTIME=119 +LOCALTIMESTAMP=120 +LOGICAL=121 +MAP=122 +MATCHED=123 +MATERIALIZED=124 +MERGE=125 +MINUTE=126 +MONTH=127 +NAME=128 +NATURAL=129 +NFC=130 +NFD=131 +NFKC=132 +NFKD=133 +NO=134 +NONE=135 +NORMALIZE=136 +NOT=137 +NULL=138 +NULLIF=139 +NULLS=140 +OF=141 +OFFSET=142 +ON=143 +ONLY=144 +OPTION=145 +OR=146 +ORDER=147 +ORDINALITY=148 +OUTER=149 +OUTPUT=150 +OVER=151 +PARTITION=152 +PARTITIONS=153 +POSITION=154 +PRECEDING=155 +PREPARE=156 +PRIMARY=157 +PRIVILEGES=158 +PROPERTIES=159 +PRUNE=160 +RANGE=161 +READ=162 +RECURSIVE=163 +REFRESH=164 +RELY=165 +RENAME=166 +REPEATABLE=167 +REPLACE=168 +RESET=169 +RESPECT=170 +RESTRICT=171 +RETURN=172 +RETURNS=173 +REVOKE=174 +RIGHT=175 +ROLE=176 +ROLES=177 +ROLLBACK=178 +ROLLUP=179 +ROW=180 +ROWS=181 +SCHEMA=182 +SCHEMAS=183 +SECOND=184 +SECURITY=185 +SELECT=186 +SERIALIZABLE=187 +SESSION=188 +SET=189 +SETS=190 +SHOW=191 +SOME=192 +SQL=193 +START=194 +STATS=195 +SUBSTRING=196 +SYSTEM=197 +SYSTEM_TIME=198 +SYSTEM_VERSION=199 +TABLE=200 +TABLES=201 +TABLESAMPLE=202 +TEMPORARY=203 +TEXT=204 +THEN=205 +TIME=206 +TIMESTAMP=207 +TO=208 +TRANSACTION=209 +TRUE=210 +TRUNCATE=211 +TRY_CAST=212 +TYPE=213 +UESCAPE=214 +UNBOUNDED=215 +UNCOMMITTED=216 +UNION=217 +UNIQUE=218 +UNNEST=219 +UPDATE=220 +USE=221 +USER=222 +USING=223 +VALIDATE=224 +VALUES=225 +VERBOSE=226 +VERSION=227 +VIEW=228 +WHEN=229 +WHERE=230 +WITH=231 +WORK=232 +WRITE=233 +YEAR=234 +ZONE=235 +EQ=236 +NEQ=237 +LT=238 +LTE=239 +GT=240 +GTE=241 +PLUS=242 +MINUS=243 +ASTERISK=244 +SLASH=245 +PERCENT=246 +CONCAT=247 +STRING=248 +UNICODE_STRING=249 +BINARY_LITERAL=250 +INTEGER_VALUE=251 +DECIMAL_VALUE=252 +DOUBLE_VALUE=253 +IDENTIFIER=254 +DIGIT_IDENTIFIER=255 +QUOTED_IDENTIFIER=256 +BACKQUOTED_IDENTIFIER=257 +TIME_WITH_TIME_ZONE=258 +TIMESTAMP_WITH_TIME_ZONE=259 +DOUBLE_PRECISION=260 +SIMPLE_COMMENT=261 +BRACKETED_COMMENT=262 +WS=263 +UNRECOGNIZED=264 '.'=1 '('=2 ')'=3 @@ -267,214 +282,229 @@ UNRECOGNIZED=249 'AS'=18 'ASC'=19 'AT'=20 -'BERNOULLI'=21 -'BETWEEN'=22 -'BY'=23 -'CALL'=24 -'CALLED'=25 -'CASCADE'=26 -'CASE'=27 -'CAST'=28 -'CATALOGS'=29 -'COLUMN'=30 -'COLUMNS'=31 -'COMMENT'=32 -'COMMIT'=33 -'COMMITTED'=34 -'CONSTRAINT'=35 -'CREATE'=36 -'CROSS'=37 -'CUBE'=38 -'CURRENT'=39 -'CURRENT_DATE'=40 -'CURRENT_ROLE'=41 -'CURRENT_TIME'=42 -'CURRENT_TIMESTAMP'=43 -'CURRENT_USER'=44 -'DATA'=45 -'DATE'=46 -'DAY'=47 -'DEALLOCATE'=48 -'DEFINER'=49 -'DELETE'=50 -'DESC'=51 -'DESCRIBE'=52 -'DETERMINISTIC'=53 -'DISTINCT'=54 -'DISTRIBUTED'=55 -'DROP'=56 -'ELSE'=57 -'END'=58 -'ESCAPE'=59 -'EXCEPT'=60 -'EXCLUDING'=61 -'EXECUTE'=62 -'EXISTS'=63 -'EXPLAIN'=64 -'EXTRACT'=65 -'EXTERNAL'=66 -'FALSE'=67 -'FETCH'=68 -'FILTER'=69 -'FIRST'=70 -'FOLLOWING'=71 -'FOR'=72 -'FORMAT'=73 -'FROM'=74 -'FULL'=75 -'FUNCTION'=76 -'FUNCTIONS'=77 -'GRANT'=78 -'GRANTED'=79 -'GRANTS'=80 -'GRAPHVIZ'=81 -'GROUP'=82 -'GROUPING'=83 -'GROUPS'=84 -'HAVING'=85 -'HOUR'=86 -'IF'=87 -'IGNORE'=88 -'IN'=89 -'INCLUDING'=90 -'INNER'=91 -'INPUT'=92 -'INSERT'=93 -'INTERSECT'=94 -'INTERVAL'=95 -'INTO'=96 -'INVOKER'=97 -'IO'=98 -'IS'=99 -'ISOLATION'=100 -'JSON'=101 -'JOIN'=102 -'LANGUAGE'=103 -'LAST'=104 -'LATERAL'=105 -'LEFT'=106 -'LEVEL'=107 -'LIKE'=108 -'LIMIT'=109 -'LOCALTIME'=110 -'LOCALTIMESTAMP'=111 -'LOGICAL'=112 -'MAP'=113 -'MATERIALIZED'=114 -'MINUTE'=115 -'MONTH'=116 -'NAME'=117 -'NATURAL'=118 -'NFC'=119 -'NFD'=120 -'NFKC'=121 -'NFKD'=122 -'NO'=123 -'NONE'=124 -'NORMALIZE'=125 -'NOT'=126 -'NULL'=127 -'NULLIF'=128 -'NULLS'=129 -'OF'=130 -'OFFSET'=131 -'ON'=132 -'ONLY'=133 -'OPTION'=134 -'OR'=135 -'ORDER'=136 -'ORDINALITY'=137 -'OUTER'=138 -'OUTPUT'=139 -'OVER'=140 -'PARTITION'=141 -'PARTITIONS'=142 -'POSITION'=143 -'PRECEDING'=144 -'PREPARE'=145 -'PRIVILEGES'=146 -'PROPERTIES'=147 -'RANGE'=148 -'READ'=149 -'RECURSIVE'=150 -'REFRESH'=151 -'RENAME'=152 -'REPEATABLE'=153 -'REPLACE'=154 -'RESET'=155 -'RESPECT'=156 -'RESTRICT'=157 -'RETURN'=158 -'RETURNS'=159 -'REVOKE'=160 -'RIGHT'=161 -'ROLE'=162 -'ROLES'=163 -'ROLLBACK'=164 -'ROLLUP'=165 -'ROW'=166 -'ROWS'=167 -'SCHEMA'=168 -'SCHEMAS'=169 -'SECOND'=170 -'SECURITY'=171 -'SELECT'=172 -'SERIALIZABLE'=173 -'SESSION'=174 -'SET'=175 -'SETS'=176 -'SHOW'=177 -'SOME'=178 -'SQL'=179 -'START'=180 -'STATS'=181 -'SUBSTRING'=182 -'SYSTEM'=183 -'SYSTEM_TIME'=184 -'SYSTEM_VERSION'=185 -'TABLE'=186 -'TABLES'=187 -'TABLESAMPLE'=188 -'TEMPORARY'=189 -'TEXT'=190 -'THEN'=191 -'TIME'=192 -'TIMESTAMP'=193 -'TO'=194 -'TRANSACTION'=195 -'TRUE'=196 -'TRUNCATE'=197 -'TRY_CAST'=198 -'TYPE'=199 -'UESCAPE'=200 -'UNBOUNDED'=201 -'UNCOMMITTED'=202 -'UNION'=203 -'UNNEST'=204 -'UPDATE'=205 -'USE'=206 -'USER'=207 -'USING'=208 -'VALIDATE'=209 -'VALUES'=210 -'VERBOSE'=211 -'VERSION'=212 -'VIEW'=213 -'WHEN'=214 -'WHERE'=215 -'WITH'=216 -'WORK'=217 -'WRITE'=218 -'YEAR'=219 -'ZONE'=220 -'='=221 -'<'=223 -'<='=224 -'>'=225 -'>='=226 -'+'=227 -'-'=228 -'*'=229 -'/'=230 -'%'=231 -'||'=232 +'BEFORE'=21 +'BERNOULLI'=22 +'BETWEEN'=23 +'BY'=24 +'CALL'=25 +'CALLED'=26 +'CASCADE'=27 +'CASE'=28 +'CAST'=29 +'CATALOGS'=30 +'COLUMN'=31 +'COLUMNS'=32 +'COMMENT'=33 +'COMMIT'=34 +'COMMITTED'=35 +'CONSTRAINT'=36 +'CREATE'=37 +'COPARTITION'=38 +'CROSS'=39 +'CUBE'=40 +'CURRENT'=41 +'CURRENT_DATE'=42 +'CURRENT_ROLE'=43 +'CURRENT_TIME'=44 +'CURRENT_TIMESTAMP'=45 +'CURRENT_USER'=46 +'DATA'=47 +'DATE'=48 +'DAY'=49 +'DEALLOCATE'=50 +'DEFINER'=51 +'DELETE'=52 +'DESC'=53 +'DESCRIBE'=54 +'DESCRIPTOR'=55 +'DETERMINISTIC'=56 +'DISABLED'=57 +'DISTINCT'=58 +'DISTRIBUTED'=59 +'DROP'=60 +'ELSE'=61 +'EMPTY'=62 +'ENABLED'=63 +'END'=64 +'ENFORCED'=65 +'ESCAPE'=66 +'EXCEPT'=67 +'EXCLUDING'=68 +'EXECUTE'=69 +'EXISTS'=70 +'EXPLAIN'=71 +'EXTRACT'=72 +'EXTERNAL'=73 +'FALSE'=74 +'FETCH'=75 +'FILTER'=76 +'FIRST'=77 +'FOLLOWING'=78 +'FOR'=79 +'FORMAT'=80 +'FROM'=81 +'FULL'=82 +'FUNCTION'=83 +'FUNCTIONS'=84 +'GRANT'=85 +'GRANTED'=86 +'GRANTS'=87 +'GRAPHVIZ'=88 +'GROUP'=89 +'GROUPING'=90 +'GROUPS'=91 +'HAVING'=92 +'HOUR'=93 +'IF'=94 +'IGNORE'=95 +'IN'=96 +'INCLUDING'=97 +'INNER'=98 +'INPUT'=99 +'INSERT'=100 +'INTERSECT'=101 +'INTERVAL'=102 +'INTO'=103 +'INVOKER'=104 +'IO'=105 +'IS'=106 +'ISOLATION'=107 +'JSON'=108 +'JOIN'=109 +'KEEP'=110 +'KEY'=111 +'LANGUAGE'=112 +'LAST'=113 +'LATERAL'=114 +'LEFT'=115 +'LEVEL'=116 +'LIKE'=117 +'LIMIT'=118 +'LOCALTIME'=119 +'LOCALTIMESTAMP'=120 +'LOGICAL'=121 +'MAP'=122 +'MATCHED'=123 +'MATERIALIZED'=124 +'MERGE'=125 +'MINUTE'=126 +'MONTH'=127 +'NAME'=128 +'NATURAL'=129 +'NFC'=130 +'NFD'=131 +'NFKC'=132 +'NFKD'=133 +'NO'=134 +'NONE'=135 +'NORMALIZE'=136 +'NOT'=137 +'NULL'=138 +'NULLIF'=139 +'NULLS'=140 +'OF'=141 +'OFFSET'=142 +'ON'=143 +'ONLY'=144 +'OPTION'=145 +'OR'=146 +'ORDER'=147 +'ORDINALITY'=148 +'OUTER'=149 +'OUTPUT'=150 +'OVER'=151 +'PARTITION'=152 +'PARTITIONS'=153 +'POSITION'=154 +'PRECEDING'=155 +'PREPARE'=156 +'PRIMARY'=157 +'PRIVILEGES'=158 +'PROPERTIES'=159 +'PRUNE'=160 +'RANGE'=161 +'READ'=162 +'RECURSIVE'=163 +'REFRESH'=164 +'RELY'=165 +'RENAME'=166 +'REPEATABLE'=167 +'REPLACE'=168 +'RESET'=169 +'RESPECT'=170 +'RESTRICT'=171 +'RETURN'=172 +'RETURNS'=173 +'REVOKE'=174 +'RIGHT'=175 +'ROLE'=176 +'ROLES'=177 +'ROLLBACK'=178 +'ROLLUP'=179 +'ROW'=180 +'ROWS'=181 +'SCHEMA'=182 +'SCHEMAS'=183 +'SECOND'=184 +'SECURITY'=185 +'SELECT'=186 +'SERIALIZABLE'=187 +'SESSION'=188 +'SET'=189 +'SETS'=190 +'SHOW'=191 +'SOME'=192 +'SQL'=193 +'START'=194 +'STATS'=195 +'SUBSTRING'=196 +'SYSTEM'=197 +'SYSTEM_TIME'=198 +'SYSTEM_VERSION'=199 +'TABLE'=200 +'TABLES'=201 +'TABLESAMPLE'=202 +'TEMPORARY'=203 +'TEXT'=204 +'THEN'=205 +'TIME'=206 +'TIMESTAMP'=207 +'TO'=208 +'TRANSACTION'=209 +'TRUE'=210 +'TRUNCATE'=211 +'TRY_CAST'=212 +'TYPE'=213 +'UESCAPE'=214 +'UNBOUNDED'=215 +'UNCOMMITTED'=216 +'UNION'=217 +'UNIQUE'=218 +'UNNEST'=219 +'UPDATE'=220 +'USE'=221 +'USER'=222 +'USING'=223 +'VALIDATE'=224 +'VALUES'=225 +'VERBOSE'=226 +'VERSION'=227 +'VIEW'=228 +'WHEN'=229 +'WHERE'=230 +'WITH'=231 +'WORK'=232 +'WRITE'=233 +'YEAR'=234 +'ZONE'=235 +'='=236 +'<'=238 +'<='=239 +'>'=240 +'>='=241 +'+'=242 +'-'=243 +'*'=244 +'/'=245 +'%'=246 +'||'=247 diff --git a/presto-ui/src/sql-parser/SqlBaseListener.js b/presto-ui/src/sql-parser/SqlBaseListener.js index f6b7a8e24dbbb..38c7fe28f4b51 100644 --- a/presto-ui/src/sql-parser/SqlBaseListener.js +++ b/presto-ui/src/sql-parser/SqlBaseListener.js @@ -1,4 +1,4 @@ -// Generated from presto/presto-parser/src/main/antlr4/com/facebook/presto/sql/parser/SqlBase.g4 by ANTLR 4.13.1 +// Generated from presto/presto-parser/src/main/antlr4/com/facebook/presto/sql/parser/SqlBase.g4 by ANTLR 4.13.2 // jshint ignore: start import antlr4 from 'antlr4'; @@ -167,6 +167,51 @@ export default class SqlBaseListener extends antlr4.tree.ParseTreeListener { } + // Enter a parse tree produced by SqlBaseParser#addConstraint. + enterAddConstraint(ctx) { + } + + // Exit a parse tree produced by SqlBaseParser#addConstraint. + exitAddConstraint(ctx) { + } + + + // Enter a parse tree produced by SqlBaseParser#dropConstraint. + enterDropConstraint(ctx) { + } + + // Exit a parse tree produced by SqlBaseParser#dropConstraint. + exitDropConstraint(ctx) { + } + + + // Enter a parse tree produced by SqlBaseParser#alterColumnSetNotNull. + enterAlterColumnSetNotNull(ctx) { + } + + // Exit a parse tree produced by SqlBaseParser#alterColumnSetNotNull. + exitAlterColumnSetNotNull(ctx) { + } + + + // Enter a parse tree produced by SqlBaseParser#alterColumnDropNotNull. + enterAlterColumnDropNotNull(ctx) { + } + + // Exit a parse tree produced by SqlBaseParser#alterColumnDropNotNull. + exitAlterColumnDropNotNull(ctx) { + } + + + // Enter a parse tree produced by SqlBaseParser#setTableProperties. + enterSetTableProperties(ctx) { + } + + // Exit a parse tree produced by SqlBaseParser#setTableProperties. + exitSetTableProperties(ctx) { + } + + // Enter a parse tree produced by SqlBaseParser#analyze. enterAnalyze(ctx) { } @@ -194,6 +239,15 @@ export default class SqlBaseListener extends antlr4.tree.ParseTreeListener { } + // Enter a parse tree produced by SqlBaseParser#renameView. + enterRenameView(ctx) { + } + + // Exit a parse tree produced by SqlBaseParser#renameView. + exitRenameView(ctx) { + } + + // Enter a parse tree produced by SqlBaseParser#dropView. enterDropView(ctx) { } @@ -356,6 +410,15 @@ export default class SqlBaseListener extends antlr4.tree.ParseTreeListener { } + // Enter a parse tree produced by SqlBaseParser#showCreateSchema. + enterShowCreateSchema(ctx) { + } + + // Exit a parse tree produced by SqlBaseParser#showCreateSchema. + exitShowCreateSchema(ctx) { + } + + // Enter a parse tree produced by SqlBaseParser#showCreateView. enterShowCreateView(ctx) { } @@ -572,6 +635,15 @@ export default class SqlBaseListener extends antlr4.tree.ParseTreeListener { } + // Enter a parse tree produced by SqlBaseParser#mergeInto. + enterMergeInto(ctx) { + } + + // Exit a parse tree produced by SqlBaseParser#mergeInto. + exitMergeInto(ctx) { + } + + // Enter a parse tree produced by SqlBaseParser#query. enterQuery(ctx) { } @@ -1031,6 +1103,15 @@ export default class SqlBaseListener extends antlr4.tree.ParseTreeListener { } + // Enter a parse tree produced by SqlBaseParser#tableFunctionInvocation. + enterTableFunctionInvocation(ctx) { + } + + // Exit a parse tree produced by SqlBaseParser#tableFunctionInvocation. + exitTableFunctionInvocation(ctx) { + } + + // Enter a parse tree produced by SqlBaseParser#expression. enterExpression(ctx) { } @@ -1553,6 +1634,78 @@ export default class SqlBaseListener extends antlr4.tree.ParseTreeListener { } + // Enter a parse tree produced by SqlBaseParser#tableFunctionCall. + enterTableFunctionCall(ctx) { + } + + // Exit a parse tree produced by SqlBaseParser#tableFunctionCall. + exitTableFunctionCall(ctx) { + } + + + // Enter a parse tree produced by SqlBaseParser#tableFunctionArgument. + enterTableFunctionArgument(ctx) { + } + + // Exit a parse tree produced by SqlBaseParser#tableFunctionArgument. + exitTableFunctionArgument(ctx) { + } + + + // Enter a parse tree produced by SqlBaseParser#tableArgument. + enterTableArgument(ctx) { + } + + // Exit a parse tree produced by SqlBaseParser#tableArgument. + exitTableArgument(ctx) { + } + + + // Enter a parse tree produced by SqlBaseParser#tableArgumentTable. + enterTableArgumentTable(ctx) { + } + + // Exit a parse tree produced by SqlBaseParser#tableArgumentTable. + exitTableArgumentTable(ctx) { + } + + + // Enter a parse tree produced by SqlBaseParser#tableArgumentQuery. + enterTableArgumentQuery(ctx) { + } + + // Exit a parse tree produced by SqlBaseParser#tableArgumentQuery. + exitTableArgumentQuery(ctx) { + } + + + // Enter a parse tree produced by SqlBaseParser#descriptorArgument. + enterDescriptorArgument(ctx) { + } + + // Exit a parse tree produced by SqlBaseParser#descriptorArgument. + exitDescriptorArgument(ctx) { + } + + + // Enter a parse tree produced by SqlBaseParser#descriptorField. + enterDescriptorField(ctx) { + } + + // Exit a parse tree produced by SqlBaseParser#descriptorField. + exitDescriptorField(ctx) { + } + + + // Enter a parse tree produced by SqlBaseParser#copartitionTables. + enterCopartitionTables(ctx) { + } + + // Exit a parse tree produced by SqlBaseParser#copartitionTables. + exitCopartitionTables(ctx) { + } + + // Enter a parse tree produced by SqlBaseParser#typeParameter. enterTypeParameter(ctx) { } @@ -1589,6 +1742,24 @@ export default class SqlBaseListener extends antlr4.tree.ParseTreeListener { } + // Enter a parse tree produced by SqlBaseParser#mergeUpdate. + enterMergeUpdate(ctx) { + } + + // Exit a parse tree produced by SqlBaseParser#mergeUpdate. + exitMergeUpdate(ctx) { + } + + + // Enter a parse tree produced by SqlBaseParser#mergeInsert. + enterMergeInsert(ctx) { + } + + // Exit a parse tree produced by SqlBaseParser#mergeInsert. + exitMergeInsert(ctx) { + } + + // Enter a parse tree produced by SqlBaseParser#over. enterOver(ctx) { } @@ -1760,6 +1931,24 @@ export default class SqlBaseListener extends antlr4.tree.ParseTreeListener { } + // Enter a parse tree produced by SqlBaseParser#tableversionasof. + enterTableversionasof(ctx) { + } + + // Exit a parse tree produced by SqlBaseParser#tableversionasof. + exitTableversionasof(ctx) { + } + + + // Enter a parse tree produced by SqlBaseParser#tableversionbefore. + enterTableversionbefore(ctx) { + } + + // Exit a parse tree produced by SqlBaseParser#tableversionbefore. + exitTableversionbefore(ctx) { + } + + // Enter a parse tree produced by SqlBaseParser#currentUserGrantor. enterCurrentUserGrantor(ctx) { } @@ -1886,6 +2075,87 @@ export default class SqlBaseListener extends antlr4.tree.ParseTreeListener { } + // Enter a parse tree produced by SqlBaseParser#constraintSpecification. + enterConstraintSpecification(ctx) { + } + + // Exit a parse tree produced by SqlBaseParser#constraintSpecification. + exitConstraintSpecification(ctx) { + } + + + // Enter a parse tree produced by SqlBaseParser#namedConstraintSpecification. + enterNamedConstraintSpecification(ctx) { + } + + // Exit a parse tree produced by SqlBaseParser#namedConstraintSpecification. + exitNamedConstraintSpecification(ctx) { + } + + + // Enter a parse tree produced by SqlBaseParser#unnamedConstraintSpecification. + enterUnnamedConstraintSpecification(ctx) { + } + + // Exit a parse tree produced by SqlBaseParser#unnamedConstraintSpecification. + exitUnnamedConstraintSpecification(ctx) { + } + + + // Enter a parse tree produced by SqlBaseParser#constraintType. + enterConstraintType(ctx) { + } + + // Exit a parse tree produced by SqlBaseParser#constraintType. + exitConstraintType(ctx) { + } + + + // Enter a parse tree produced by SqlBaseParser#constraintQualifiers. + enterConstraintQualifiers(ctx) { + } + + // Exit a parse tree produced by SqlBaseParser#constraintQualifiers. + exitConstraintQualifiers(ctx) { + } + + + // Enter a parse tree produced by SqlBaseParser#constraintQualifier. + enterConstraintQualifier(ctx) { + } + + // Exit a parse tree produced by SqlBaseParser#constraintQualifier. + exitConstraintQualifier(ctx) { + } + + + // Enter a parse tree produced by SqlBaseParser#constraintRely. + enterConstraintRely(ctx) { + } + + // Exit a parse tree produced by SqlBaseParser#constraintRely. + exitConstraintRely(ctx) { + } + + + // Enter a parse tree produced by SqlBaseParser#constraintEnabled. + enterConstraintEnabled(ctx) { + } + + // Exit a parse tree produced by SqlBaseParser#constraintEnabled. + exitConstraintEnabled(ctx) { + } + + + // Enter a parse tree produced by SqlBaseParser#constraintEnforced. + enterConstraintEnforced(ctx) { + } + + // Exit a parse tree produced by SqlBaseParser#constraintEnforced. + exitConstraintEnforced(ctx) { + } + + // Enter a parse tree produced by SqlBaseParser#nonReserved. enterNonReserved(ctx) { } diff --git a/presto-ui/src/sql-parser/SqlBaseParser.js b/presto-ui/src/sql-parser/SqlBaseParser.js index 1e93e51764371..0b0f21ae49e4b 100644 --- a/presto-ui/src/sql-parser/SqlBaseParser.js +++ b/presto-ui/src/sql-parser/SqlBaseParser.js @@ -1,8 +1,8 @@ -// Generated from presto/presto-parser/src/main/antlr4/com/facebook/presto/sql/parser/SqlBase.g4 by ANTLR 4.13.1 +// Generated from presto/presto-parser/src/main/antlr4/com/facebook/presto/sql/parser/SqlBase.g4 by ANTLR 4.13.2 // jshint ignore: start import antlr4 from 'antlr4'; import SqlBaseListener from './SqlBaseListener.js'; -const serializedATN = [4,1,250,1919,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4, +const serializedATN = [4,1,265,2304,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4, 7,4,2,5,7,5,2,6,7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12, 2,13,7,13,2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2, 20,7,20,2,21,7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26,2,27, @@ -13,705 +13,851 @@ const serializedATN = [4,1,250,1919,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4, 7,56,2,57,7,57,2,58,7,58,2,59,7,59,2,60,7,60,2,61,7,61,2,62,7,62,2,63,7, 63,2,64,7,64,2,65,7,65,2,66,7,66,2,67,7,67,2,68,7,68,2,69,7,69,2,70,7,70, 2,71,7,71,2,72,7,72,2,73,7,73,2,74,7,74,2,75,7,75,2,76,7,76,2,77,7,77,2, -78,7,78,1,0,1,0,1,0,1,1,1,1,1,1,1,2,1,2,1,2,1,3,1,3,1,3,1,3,1,3,1,3,1,3, -1,3,1,3,1,3,1,3,1,3,1,3,3,3,181,8,3,1,3,1,3,1,3,3,3,186,8,3,1,3,1,3,1,3, -1,3,3,3,192,8,3,1,3,1,3,3,3,196,8,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3, -1,3,1,3,1,3,3,3,210,8,3,1,3,1,3,3,3,214,8,3,1,3,1,3,3,3,218,8,3,1,3,1,3, -3,3,222,8,3,1,3,1,3,1,3,1,3,1,3,1,3,3,3,230,8,3,1,3,1,3,3,3,234,8,3,1,3, -3,3,237,8,3,1,3,1,3,1,3,1,3,1,3,3,3,244,8,3,1,3,1,3,1,3,1,3,1,3,5,3,251, -8,3,10,3,12,3,254,9,3,1,3,1,3,1,3,3,3,259,8,3,1,3,1,3,3,3,263,8,3,1,3,1, -3,1,3,1,3,3,3,269,8,3,1,3,1,3,1,3,1,3,1,3,3,3,276,8,3,1,3,1,3,1,3,1,3,1, -3,1,3,1,3,3,3,285,8,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,3,3,294,8,3,1,3,1,3,1, -3,1,3,1,3,1,3,1,3,1,3,1,3,3,3,305,8,3,1,3,1,3,1,3,1,3,1,3,3,3,312,8,3,1, -3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,3,3,322,8,3,1,3,1,3,1,3,1,3,1,3,3,3,329,8, -3,1,3,1,3,1,3,1,3,1,3,1,3,3,3,337,8,3,1,3,1,3,1,3,1,3,1,3,1,3,3,3,345,8, -3,1,3,1,3,1,3,1,3,1,3,1,3,3,3,353,8,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,5, -3,363,8,3,10,3,12,3,366,9,3,1,3,1,3,1,3,3,3,371,8,3,1,3,1,3,1,3,3,3,376, -8,3,1,3,1,3,1,3,1,3,3,3,382,8,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,3,3,391,8,3, -1,3,1,3,1,3,1,3,1,3,1,3,1,3,3,3,400,8,3,1,3,1,3,1,3,3,3,405,8,3,1,3,1,3, -3,3,409,8,3,1,3,1,3,1,3,1,3,1,3,1,3,3,3,417,8,3,1,3,1,3,1,3,1,3,1,3,3,3, -424,8,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,3,3,437,8,3,1,3,3,3, -440,8,3,1,3,1,3,1,3,1,3,1,3,1,3,5,3,448,8,3,10,3,12,3,451,9,3,3,3,453,8, -3,1,3,1,3,1,3,1,3,1,3,3,3,460,8,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,3,3,469,8, -3,1,3,1,3,1,3,1,3,3,3,475,8,3,1,3,1,3,1,3,3,3,480,8,3,1,3,1,3,3,3,484,8, -3,1,3,1,3,1,3,1,3,1,3,1,3,5,3,492,8,3,10,3,12,3,495,9,3,3,3,497,8,3,1,3, -1,3,1,3,1,3,1,3,1,3,1,3,1,3,3,3,507,8,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3, -1,3,5,3,518,8,3,10,3,12,3,521,9,3,1,3,1,3,1,3,3,3,526,8,3,1,3,1,3,1,3,3, -3,531,8,3,1,3,1,3,1,3,1,3,3,3,537,8,3,1,3,1,3,1,3,1,3,1,3,5,3,544,8,3,10, -3,12,3,547,9,3,1,3,1,3,1,3,3,3,552,8,3,1,3,1,3,1,3,1,3,1,3,3,3,559,8,3,1, -3,1,3,1,3,1,3,5,3,565,8,3,10,3,12,3,568,9,3,1,3,1,3,3,3,572,8,3,1,3,1,3, -3,3,576,8,3,1,3,1,3,1,3,1,3,1,3,1,3,3,3,584,8,3,1,3,1,3,1,3,1,3,3,3,590, -8,3,1,3,1,3,1,3,5,3,595,8,3,10,3,12,3,598,9,3,1,3,1,3,3,3,602,8,3,1,3,1, -3,3,3,606,8,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,3,3,616,8,3,1,3,3,3,619,8, -3,1,3,1,3,3,3,623,8,3,1,3,3,3,626,8,3,1,3,1,3,1,3,1,3,5,3,632,8,3,10,3,12, -3,635,9,3,1,3,1,3,3,3,639,8,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1, -3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,3,3,660,8,3,1,3,1,3,1,3,1,3,3,3,666,8, -3,1,3,1,3,1,3,1,3,3,3,672,8,3,3,3,674,8,3,1,3,1,3,1,3,1,3,3,3,680,8,3,1, -3,1,3,1,3,1,3,3,3,686,8,3,3,3,688,8,3,1,3,1,3,1,3,1,3,1,3,1,3,3,3,696,8, -3,3,3,698,8,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1, -3,1,3,1,3,3,3,717,8,3,1,3,1,3,1,3,3,3,722,8,3,1,3,1,3,1,3,1,3,1,3,3,3,729, -8,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,3,3,741,8,3,3,3,743,8,3,1,3, -1,3,1,3,1,3,1,3,1,3,3,3,751,8,3,3,3,753,8,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3, -1,3,1,3,1,3,1,3,1,3,1,3,1,3,5,3,769,8,3,10,3,12,3,772,9,3,3,3,774,8,3,1, -3,1,3,3,3,778,8,3,1,3,1,3,3,3,782,8,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1, -3,1,3,1,3,1,3,1,3,1,3,5,3,798,8,3,10,3,12,3,801,9,3,3,3,803,8,3,1,3,1,3, -1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,5,3,817,8,3,10,3,12,3,820,9,3,1, -3,1,3,3,3,824,8,3,3,3,826,8,3,1,4,3,4,829,8,4,1,4,1,4,1,5,1,5,3,5,835,8, -5,1,5,1,5,1,5,5,5,840,8,5,10,5,12,5,843,9,5,1,6,1,6,3,6,847,8,6,1,7,1,7, -1,7,1,7,3,7,853,8,7,1,7,1,7,3,7,857,8,7,1,7,1,7,3,7,861,8,7,1,8,1,8,1,8, -1,8,3,8,867,8,8,1,9,1,9,1,9,1,9,5,9,873,8,9,10,9,12,9,876,9,9,1,9,1,9,1, -10,1,10,1,10,1,10,1,11,1,11,1,11,1,12,5,12,888,8,12,10,12,12,12,891,9,12, -1,13,1,13,1,13,1,13,3,13,897,8,13,1,14,5,14,900,8,14,10,14,12,14,903,9,14, -1,15,1,15,1,16,1,16,3,16,909,8,16,1,17,1,17,1,17,1,18,1,18,1,18,3,18,917, -8,18,1,19,1,19,3,19,921,8,19,1,20,1,20,1,20,3,20,926,8,20,1,21,1,21,1,21, -1,21,1,21,1,21,1,21,1,21,1,21,3,21,937,8,21,1,22,1,22,1,23,1,23,1,23,1,23, -1,23,1,23,5,23,947,8,23,10,23,12,23,950,9,23,3,23,952,8,23,1,23,1,23,1,23, -3,23,957,8,23,3,23,959,8,23,1,23,1,23,1,23,1,23,1,23,1,23,1,23,3,23,968, -8,23,3,23,970,8,23,1,24,1,24,1,24,1,24,1,24,1,24,3,24,978,8,24,1,24,1,24, -1,24,1,24,3,24,984,8,24,1,24,5,24,987,8,24,10,24,12,24,990,9,24,1,25,1,25, -1,25,1,25,1,25,1,25,1,25,5,25,999,8,25,10,25,12,25,1002,9,25,1,25,1,25,1, -25,1,25,3,25,1008,8,25,1,26,1,26,3,26,1012,8,26,1,26,1,26,3,26,1016,8,26, -1,27,1,27,3,27,1020,8,27,1,27,1,27,1,27,5,27,1025,8,27,10,27,12,27,1028, -9,27,1,27,1,27,1,27,1,27,5,27,1034,8,27,10,27,12,27,1037,9,27,3,27,1039, -8,27,1,27,1,27,3,27,1043,8,27,1,27,1,27,1,27,3,27,1048,8,27,1,27,1,27,3, -27,1052,8,27,1,28,3,28,1055,8,28,1,28,1,28,1,28,5,28,1060,8,28,10,28,12, -28,1063,9,28,1,29,1,29,1,29,1,29,1,29,1,29,5,29,1071,8,29,10,29,12,29,1074, -9,29,3,29,1076,8,29,1,29,1,29,1,29,1,29,1,29,1,29,5,29,1084,8,29,10,29,12, -29,1087,9,29,3,29,1089,8,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,5,29,1098, -8,29,10,29,12,29,1101,9,29,1,29,1,29,3,29,1105,8,29,1,30,1,30,1,30,1,30, -5,30,1111,8,30,10,30,12,30,1114,9,30,3,30,1116,8,30,1,30,1,30,3,30,1120, -8,30,1,31,1,31,3,31,1124,8,31,1,31,1,31,1,31,1,31,1,31,1,32,1,32,1,33,1, -33,3,33,1135,8,33,1,33,3,33,1138,8,33,1,33,1,33,1,33,1,33,1,33,3,33,1145, -8,33,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1, -34,1,34,1,34,1,34,3,34,1164,8,34,5,34,1166,8,34,10,34,12,34,1169,9,34,1, -35,3,35,1172,8,35,1,35,1,35,3,35,1176,8,35,1,35,1,35,3,35,1180,8,35,1,35, -1,35,3,35,1184,8,35,3,35,1186,8,35,1,36,1,36,1,36,1,36,1,36,1,36,1,36,5, -36,1195,8,36,10,36,12,36,1198,9,36,1,36,1,36,3,36,1202,8,36,1,37,1,37,1, -37,1,37,1,37,1,37,1,37,3,37,1211,8,37,1,38,1,38,1,39,1,39,3,39,1217,8,39, -1,39,1,39,3,39,1221,8,39,3,39,1223,8,39,1,40,1,40,1,40,1,40,5,40,1229,8, -40,10,40,12,40,1232,9,40,1,40,1,40,1,41,1,41,3,41,1238,8,41,1,41,1,41,1, -41,1,41,1,41,1,41,1,41,1,41,1,41,5,41,1249,8,41,10,41,12,41,1252,9,41,1, -41,1,41,1,41,3,41,1257,8,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41, -3,41,1268,8,41,1,42,1,42,1,43,1,43,1,43,3,43,1275,8,43,1,43,1,43,3,43,1279, -8,43,1,43,1,43,1,43,1,43,1,43,1,43,5,43,1287,8,43,10,43,12,43,1290,9,43, -1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,3,44,1302,8,44,1,44,1, -44,1,44,1,44,1,44,1,44,3,44,1310,8,44,1,44,1,44,1,44,1,44,1,44,5,44,1317, -8,44,10,44,12,44,1320,9,44,1,44,1,44,1,44,3,44,1325,8,44,1,44,1,44,1,44, -1,44,1,44,1,44,3,44,1333,8,44,1,44,1,44,1,44,1,44,3,44,1339,8,44,1,44,1, -44,3,44,1343,8,44,1,44,1,44,1,44,3,44,1348,8,44,1,44,1,44,1,44,3,44,1353, -8,44,1,45,1,45,1,45,1,45,3,45,1359,8,45,1,45,1,45,1,45,1,45,1,45,1,45,1, -45,1,45,1,45,1,45,1,45,1,45,5,45,1373,8,45,10,45,12,45,1376,9,45,1,46,1, +78,7,78,2,79,7,79,2,80,7,80,2,81,7,81,2,82,7,82,2,83,7,83,2,84,7,84,2,85, +7,85,2,86,7,86,2,87,7,87,2,88,7,88,2,89,7,89,2,90,7,90,2,91,7,91,2,92,7, +92,2,93,7,93,2,94,7,94,2,95,7,95,2,96,7,96,1,0,1,0,1,0,1,1,1,1,1,1,1,2,1, +2,1,2,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,3,3,217,8,3,1, +3,1,3,1,3,3,3,222,8,3,1,3,1,3,1,3,1,3,3,3,228,8,3,1,3,1,3,3,3,232,8,3,1, +3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,3,3,246,8,3,1,3,1,3,3,3,250, +8,3,1,3,1,3,3,3,254,8,3,1,3,1,3,3,3,258,8,3,1,3,1,3,1,3,1,3,1,3,1,3,3,3, +266,8,3,1,3,1,3,3,3,270,8,3,1,3,3,3,273,8,3,1,3,1,3,1,3,1,3,1,3,3,3,280, +8,3,1,3,1,3,1,3,1,3,1,3,5,3,287,8,3,10,3,12,3,290,9,3,1,3,1,3,1,3,3,3,295, +8,3,1,3,1,3,3,3,299,8,3,1,3,1,3,1,3,1,3,3,3,305,8,3,1,3,1,3,1,3,1,3,1,3, +3,3,312,8,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,3,3,321,8,3,1,3,1,3,1,3,1,3,1,3, +1,3,1,3,3,3,330,8,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,3,3,341,8,3,1,3, +1,3,1,3,1,3,1,3,3,3,348,8,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,3,3,358,8,3, +1,3,1,3,1,3,1,3,1,3,3,3,365,8,3,1,3,1,3,1,3,1,3,1,3,1,3,3,3,373,8,3,1,3, +1,3,1,3,1,3,1,3,1,3,3,3,381,8,3,1,3,1,3,1,3,1,3,1,3,1,3,3,3,389,8,3,1,3, +1,3,1,3,1,3,1,3,1,3,1,3,1,3,3,3,399,8,3,1,3,1,3,1,3,1,3,1,3,3,3,406,8,3, +1,3,1,3,1,3,1,3,1,3,1,3,3,3,414,8,3,1,3,1,3,1,3,3,3,419,8,3,1,3,1,3,1,3, +1,3,1,3,1,3,1,3,1,3,1,3,3,3,430,8,3,1,3,1,3,1,3,3,3,435,8,3,1,3,1,3,1,3, +1,3,1,3,1,3,1,3,1,3,1,3,3,3,446,8,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3, +3,3,457,8,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,5,3,467,8,3,10,3,12,3,470,9, +3,1,3,1,3,1,3,3,3,475,8,3,1,3,1,3,1,3,3,3,480,8,3,1,3,1,3,1,3,1,3,3,3,486, +8,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,3,3,495,8,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3, +1,3,1,3,3,3,506,8,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,3,3,515,8,3,1,3,1,3,1,3, +3,3,520,8,3,1,3,1,3,3,3,524,8,3,1,3,1,3,1,3,1,3,1,3,1,3,3,3,532,8,3,1,3, +1,3,1,3,1,3,1,3,3,3,539,8,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,3,3,548,8,3,1,3, +1,3,1,3,3,3,553,8,3,1,3,3,3,556,8,3,1,3,1,3,1,3,1,3,1,3,1,3,5,3,564,8,3, +10,3,12,3,567,9,3,3,3,569,8,3,1,3,1,3,1,3,1,3,1,3,3,3,576,8,3,1,3,1,3,1, +3,1,3,1,3,1,3,1,3,3,3,585,8,3,1,3,1,3,1,3,1,3,3,3,591,8,3,1,3,1,3,1,3,3, +3,596,8,3,1,3,1,3,3,3,600,8,3,1,3,1,3,1,3,1,3,1,3,1,3,5,3,608,8,3,10,3,12, +3,611,9,3,3,3,613,8,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,3,3,623,8,3,1,3,1, +3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,5,3,634,8,3,10,3,12,3,637,9,3,1,3,1,3,1,3, +3,3,642,8,3,1,3,1,3,1,3,3,3,647,8,3,1,3,1,3,1,3,1,3,3,3,653,8,3,1,3,1,3, +1,3,1,3,1,3,5,3,660,8,3,10,3,12,3,663,9,3,1,3,1,3,1,3,3,3,668,8,3,1,3,1, +3,1,3,1,3,1,3,3,3,675,8,3,1,3,1,3,1,3,1,3,5,3,681,8,3,10,3,12,3,684,9,3, +1,3,1,3,3,3,688,8,3,1,3,1,3,3,3,692,8,3,1,3,1,3,1,3,1,3,1,3,1,3,3,3,700, +8,3,1,3,1,3,1,3,1,3,3,3,706,8,3,1,3,1,3,1,3,5,3,711,8,3,10,3,12,3,714,9, +3,1,3,1,3,3,3,718,8,3,1,3,1,3,3,3,722,8,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1, +3,3,3,732,8,3,1,3,3,3,735,8,3,1,3,1,3,3,3,739,8,3,1,3,3,3,742,8,3,1,3,1, +3,1,3,1,3,5,3,748,8,3,10,3,12,3,751,9,3,1,3,1,3,3,3,755,8,3,1,3,1,3,1,3, +1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3, +1,3,1,3,3,3,780,8,3,1,3,1,3,1,3,1,3,3,3,786,8,3,1,3,1,3,1,3,1,3,3,3,792, +8,3,3,3,794,8,3,1,3,1,3,1,3,1,3,3,3,800,8,3,1,3,1,3,1,3,1,3,3,3,806,8,3, +3,3,808,8,3,1,3,1,3,1,3,1,3,1,3,1,3,3,3,816,8,3,3,3,818,8,3,1,3,1,3,1,3, +1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,3,3,837,8,3,1,3, +1,3,1,3,3,3,842,8,3,1,3,1,3,1,3,1,3,1,3,3,3,849,8,3,1,3,1,3,1,3,1,3,1,3, +1,3,1,3,1,3,1,3,1,3,3,3,861,8,3,3,3,863,8,3,1,3,1,3,1,3,1,3,1,3,1,3,3,3, +871,8,3,3,3,873,8,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3, +1,3,5,3,889,8,3,10,3,12,3,892,9,3,3,3,894,8,3,1,3,1,3,3,3,898,8,3,1,3,1, +3,3,3,902,8,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,5, +3,918,8,3,10,3,12,3,921,9,3,3,3,923,8,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3, +1,3,1,3,1,3,1,3,5,3,937,8,3,10,3,12,3,940,9,3,1,3,1,3,3,3,944,8,3,1,3,1, +3,1,3,1,3,3,3,950,8,3,1,3,3,3,953,8,3,1,3,1,3,1,3,1,3,1,3,4,3,960,8,3,11, +3,12,3,961,3,3,964,8,3,1,4,3,4,967,8,4,1,4,1,4,1,5,1,5,3,5,973,8,5,1,5,1, +5,1,5,5,5,978,8,5,10,5,12,5,981,9,5,1,6,1,6,1,6,3,6,986,8,6,1,7,1,7,1,7, +1,7,3,7,992,8,7,1,7,1,7,3,7,996,8,7,1,7,1,7,3,7,1000,8,7,1,8,1,8,1,8,1,8, +3,8,1006,8,8,1,9,1,9,1,9,1,9,5,9,1012,8,9,10,9,12,9,1015,9,9,1,9,1,9,1,10, +1,10,1,10,1,10,1,11,1,11,1,11,1,12,5,12,1027,8,12,10,12,12,12,1030,9,12, +1,13,1,13,1,13,1,13,3,13,1036,8,13,1,14,5,14,1039,8,14,10,14,12,14,1042, +9,14,1,15,1,15,1,16,1,16,3,16,1048,8,16,1,17,1,17,1,17,1,18,1,18,1,18,3, +18,1056,8,18,1,19,1,19,3,19,1060,8,19,1,20,1,20,1,20,3,20,1065,8,20,1,21, +1,21,1,21,1,21,1,21,1,21,1,21,1,21,1,21,3,21,1076,8,21,1,22,1,22,1,23,1, +23,1,23,1,23,1,23,1,23,5,23,1086,8,23,10,23,12,23,1089,9,23,3,23,1091,8, +23,1,23,1,23,1,23,3,23,1096,8,23,3,23,1098,8,23,1,23,1,23,1,23,1,23,1,23, +1,23,1,23,3,23,1107,8,23,3,23,1109,8,23,1,24,1,24,1,24,1,24,1,24,1,24,3, +24,1117,8,24,1,24,1,24,1,24,1,24,3,24,1123,8,24,1,24,5,24,1126,8,24,10,24, +12,24,1129,9,24,1,25,1,25,1,25,1,25,1,25,1,25,1,25,5,25,1138,8,25,10,25, +12,25,1141,9,25,1,25,1,25,1,25,1,25,3,25,1147,8,25,1,26,1,26,3,26,1151,8, +26,1,26,1,26,3,26,1155,8,26,1,27,1,27,3,27,1159,8,27,1,27,1,27,1,27,5,27, +1164,8,27,10,27,12,27,1167,9,27,1,27,1,27,1,27,1,27,5,27,1173,8,27,10,27, +12,27,1176,9,27,3,27,1178,8,27,1,27,1,27,3,27,1182,8,27,1,27,1,27,1,27,3, +27,1187,8,27,1,27,1,27,3,27,1191,8,27,1,28,3,28,1194,8,28,1,28,1,28,1,28, +5,28,1199,8,28,10,28,12,28,1202,9,28,1,29,1,29,1,29,1,29,1,29,1,29,5,29, +1210,8,29,10,29,12,29,1213,9,29,3,29,1215,8,29,1,29,1,29,1,29,1,29,1,29, +1,29,5,29,1223,8,29,10,29,12,29,1226,9,29,3,29,1228,8,29,1,29,1,29,1,29, +1,29,1,29,1,29,1,29,5,29,1237,8,29,10,29,12,29,1240,9,29,1,29,1,29,3,29, +1244,8,29,1,30,1,30,1,30,1,30,5,30,1250,8,30,10,30,12,30,1253,9,30,3,30, +1255,8,30,1,30,1,30,3,30,1259,8,30,1,31,1,31,3,31,1263,8,31,1,31,1,31,1, +31,1,31,1,31,1,32,1,32,1,33,1,33,3,33,1274,8,33,1,33,3,33,1277,8,33,1,33, +1,33,1,33,1,33,1,33,3,33,1284,8,33,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1, +34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,3,34,1303,8,34,5,34,1305, +8,34,10,34,12,34,1308,9,34,1,35,3,35,1311,8,35,1,35,1,35,3,35,1315,8,35, +1,35,1,35,3,35,1319,8,35,1,35,1,35,3,35,1323,8,35,3,35,1325,8,35,1,36,1, +36,1,36,1,36,1,36,1,36,1,36,5,36,1334,8,36,10,36,12,36,1337,9,36,1,36,1, +36,3,36,1341,8,36,1,37,1,37,1,37,1,37,1,37,1,37,1,37,3,37,1350,8,37,1,38, +1,38,1,39,1,39,3,39,1356,8,39,1,39,1,39,3,39,1360,8,39,3,39,1362,8,39,1, +40,1,40,1,40,1,40,5,40,1368,8,40,10,40,12,40,1371,9,40,1,40,1,40,1,41,1, +41,3,41,1377,8,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,5,41,1388, +8,41,10,41,12,41,1391,9,41,1,41,1,41,1,41,3,41,1396,8,41,1,41,1,41,1,41, +1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,3,41,1412,8,41,1, +42,1,42,1,43,1,43,1,43,3,43,1419,8,43,1,43,1,43,3,43,1423,8,43,1,43,1,43, +1,43,1,43,1,43,1,43,5,43,1431,8,43,10,43,12,43,1434,9,43,1,44,1,44,1,44, +1,44,1,44,1,44,1,44,1,44,1,44,1,44,3,44,1446,8,44,1,44,1,44,1,44,1,44,1, +44,1,44,3,44,1454,8,44,1,44,1,44,1,44,1,44,1,44,5,44,1461,8,44,10,44,12, +44,1464,9,44,1,44,1,44,1,44,3,44,1469,8,44,1,44,1,44,1,44,1,44,1,44,1,44, +3,44,1477,8,44,1,44,1,44,1,44,1,44,3,44,1483,8,44,1,44,1,44,3,44,1487,8, +44,1,44,1,44,1,44,3,44,1492,8,44,1,44,1,44,1,44,3,44,1497,8,44,1,45,1,45, +1,45,1,45,3,45,1503,8,45,1,45,1,45,1,45,1,45,1,45,1,45,1,45,1,45,1,45,1, +45,1,45,1,45,5,45,1517,8,45,10,45,12,45,1520,9,45,1,46,1,46,1,46,1,46,1, 46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46, -1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,4,46,1402,8,46,11,46,12,46,1403, -1,46,1,46,1,46,1,46,1,46,1,46,1,46,5,46,1413,8,46,10,46,12,46,1416,9,46, -1,46,1,46,1,46,1,46,1,46,1,46,1,46,3,46,1425,8,46,1,46,3,46,1428,8,46,1, -46,1,46,1,46,3,46,1433,8,46,1,46,1,46,1,46,5,46,1438,8,46,10,46,12,46,1441, -9,46,3,46,1443,8,46,1,46,1,46,1,46,1,46,1,46,5,46,1450,8,46,10,46,12,46, -1453,9,46,3,46,1455,8,46,1,46,1,46,3,46,1459,8,46,1,46,3,46,1462,8,46,1, -46,3,46,1465,8,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,5,46,1475,8,46, -10,46,12,46,1478,9,46,3,46,1480,8,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46, -1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,4,46,1497,8,46,11,46,12,46,1498, -1,46,1,46,3,46,1503,8,46,1,46,1,46,1,46,1,46,4,46,1509,8,46,11,46,12,46, -1510,1,46,1,46,3,46,1515,8,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1, -46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,5,46,1538, -8,46,10,46,12,46,1541,9,46,3,46,1543,8,46,1,46,1,46,1,46,1,46,1,46,1,46, -1,46,3,46,1552,8,46,1,46,1,46,1,46,1,46,3,46,1558,8,46,1,46,1,46,1,46,1, -46,3,46,1564,8,46,1,46,1,46,1,46,1,46,3,46,1570,8,46,1,46,1,46,1,46,1,46, -1,46,1,46,1,46,1,46,3,46,1580,8,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,3, -46,1589,8,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46, -1,46,1,46,1,46,1,46,1,46,1,46,5,46,1609,8,46,10,46,12,46,1612,9,46,3,46, -1614,8,46,1,46,3,46,1617,8,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,5, -46,1627,8,46,10,46,12,46,1630,9,46,1,47,1,47,1,47,1,47,3,47,1636,8,47,3, -47,1638,8,47,1,48,1,48,1,48,1,48,3,48,1644,8,48,1,49,1,49,1,49,1,49,1,49, -1,49,3,49,1652,8,49,1,50,1,50,1,51,1,51,1,52,1,52,1,53,1,53,3,53,1662,8, -53,1,53,1,53,1,53,1,53,3,53,1668,8,53,1,54,1,54,1,55,1,55,1,56,1,56,1,56, -1,56,5,56,1678,8,56,10,56,12,56,1681,9,56,3,56,1683,8,56,1,56,1,56,1,57, -1,57,1,57,1,57,1,57,1,57,1,57,1,57,1,57,1,57,1,57,1,57,1,57,1,57,1,57,1, -57,1,57,1,57,1,57,1,57,1,57,5,57,1708,8,57,10,57,12,57,1711,9,57,1,57,1, -57,1,57,1,57,1,57,1,57,1,57,5,57,1720,8,57,10,57,12,57,1723,9,57,1,57,1, -57,3,57,1727,8,57,1,57,1,57,1,57,1,57,1,57,3,57,1734,8,57,1,57,1,57,5,57, -1738,8,57,10,57,12,57,1741,9,57,1,58,1,58,3,58,1745,8,58,1,59,1,59,1,59, -1,59,3,59,1751,8,59,1,60,1,60,1,60,1,60,1,60,1,61,1,61,1,61,1,61,1,61,1, -61,1,62,1,62,1,62,1,62,1,62,1,62,1,62,5,62,1771,8,62,10,62,12,62,1774,9, -62,3,62,1776,8,62,1,62,1,62,1,62,1,62,1,62,5,62,1783,8,62,10,62,12,62,1786, -9,62,3,62,1788,8,62,1,62,3,62,1791,8,62,1,62,1,62,1,63,1,63,1,63,1,63,1, -63,1,63,1,63,1,63,1,63,1,63,1,63,1,63,1,63,1,63,1,63,1,63,1,63,1,63,1,63, -1,63,1,63,1,63,1,63,1,63,3,63,1819,8,63,1,64,1,64,1,64,1,64,1,64,1,64,1, -64,1,64,1,64,3,64,1830,8,64,1,65,1,65,1,65,1,65,1,66,1,66,1,66,1,66,3,66, -1840,8,66,1,67,1,67,1,67,1,67,1,67,3,67,1847,8,67,1,68,1,68,1,68,1,68,1, -68,1,68,1,68,3,68,1856,8,68,1,69,1,69,1,69,1,69,1,69,3,69,1863,8,69,1,70, -1,70,1,70,1,70,3,70,1869,8,70,1,71,1,71,1,71,5,71,1874,8,71,10,71,12,71, -1877,9,71,1,72,1,72,1,72,1,72,1,72,1,72,1,73,1,73,1,73,3,73,1888,8,73,1, -74,1,74,1,74,1,74,1,74,3,74,1895,8,74,1,75,1,75,1,75,5,75,1900,8,75,10,75, -12,75,1903,9,75,1,76,1,76,1,76,1,76,1,76,3,76,1910,8,76,1,77,1,77,1,77,3, -77,1915,8,77,1,78,1,78,1,78,0,6,48,68,86,90,92,114,79,0,2,4,6,8,10,12,14, -16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62, -64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108, -110,112,114,116,118,120,122,124,126,128,130,132,134,136,138,140,142,144, -146,148,150,152,154,156,0,24,2,0,26,26,157,157,2,0,49,49,97,97,2,0,74,74, -89,89,2,0,61,61,90,90,1,0,166,167,2,0,12,12,236,236,2,0,60,60,203,203,2, -0,19,19,51,51,2,0,70,70,104,104,2,0,12,12,54,54,2,0,21,21,183,183,1,0,227, -228,1,0,229,231,1,0,221,226,3,0,12,12,16,16,178,178,2,0,67,67,196,196,5, -0,47,47,86,86,115,116,170,170,219,219,1,0,119,122,2,0,71,71,144,144,3,0, -81,81,101,101,190,190,4,0,55,55,98,98,112,112,209,209,2,0,133,133,218,218, -3,0,184,185,193,193,212,212,48,0,10,12,14,14,16,17,19,21,24,26,29,34,39, -39,41,41,45,47,49,49,51,51,53,53,55,55,61,61,64,64,66,66,68,71,73,73,76, -81,84,84,86,88,90,90,92,92,95,95,97,98,100,101,103,105,107,107,109,109,112, -117,119,124,128,131,133,134,137,137,139,144,146,149,151,160,162,164,166, -171,173,185,187,190,192,195,197,199,201,202,205,207,209,209,211,213,217, -220,2221,0,158,1,0,0,0,2,161,1,0,0,0,4,164,1,0,0,0,6,825,1,0,0,0,8,828,1, -0,0,0,10,832,1,0,0,0,12,846,1,0,0,0,14,848,1,0,0,0,16,862,1,0,0,0,18,868, -1,0,0,0,20,879,1,0,0,0,22,883,1,0,0,0,24,889,1,0,0,0,26,896,1,0,0,0,28,901, -1,0,0,0,30,904,1,0,0,0,32,908,1,0,0,0,34,910,1,0,0,0,36,913,1,0,0,0,38,920, -1,0,0,0,40,925,1,0,0,0,42,936,1,0,0,0,44,938,1,0,0,0,46,940,1,0,0,0,48,971, -1,0,0,0,50,1007,1,0,0,0,52,1009,1,0,0,0,54,1017,1,0,0,0,56,1054,1,0,0,0, -58,1104,1,0,0,0,60,1119,1,0,0,0,62,1121,1,0,0,0,64,1130,1,0,0,0,66,1144, -1,0,0,0,68,1146,1,0,0,0,70,1185,1,0,0,0,72,1201,1,0,0,0,74,1203,1,0,0,0, -76,1212,1,0,0,0,78,1214,1,0,0,0,80,1224,1,0,0,0,82,1267,1,0,0,0,84,1269, -1,0,0,0,86,1278,1,0,0,0,88,1352,1,0,0,0,90,1358,1,0,0,0,92,1616,1,0,0,0, -94,1637,1,0,0,0,96,1643,1,0,0,0,98,1651,1,0,0,0,100,1653,1,0,0,0,102,1655, -1,0,0,0,104,1657,1,0,0,0,106,1659,1,0,0,0,108,1669,1,0,0,0,110,1671,1,0, -0,0,112,1673,1,0,0,0,114,1733,1,0,0,0,116,1744,1,0,0,0,118,1750,1,0,0,0, -120,1752,1,0,0,0,122,1757,1,0,0,0,124,1763,1,0,0,0,126,1818,1,0,0,0,128, -1829,1,0,0,0,130,1831,1,0,0,0,132,1839,1,0,0,0,134,1846,1,0,0,0,136,1855, -1,0,0,0,138,1862,1,0,0,0,140,1868,1,0,0,0,142,1870,1,0,0,0,144,1878,1,0, -0,0,146,1887,1,0,0,0,148,1894,1,0,0,0,150,1896,1,0,0,0,152,1909,1,0,0,0, -154,1914,1,0,0,0,156,1916,1,0,0,0,158,159,3,6,3,0,159,160,5,0,0,1,160,1, -1,0,0,0,161,162,3,84,42,0,162,163,5,0,0,1,163,3,1,0,0,0,164,165,3,32,16, -0,165,166,5,0,0,1,166,5,1,0,0,0,167,826,3,8,4,0,168,169,5,206,0,0,169,826, -3,152,76,0,170,171,5,206,0,0,171,172,3,152,76,0,172,173,5,1,0,0,173,174, -3,152,76,0,174,826,1,0,0,0,175,176,5,36,0,0,176,180,5,168,0,0,177,178,5, -87,0,0,178,179,5,126,0,0,179,181,5,63,0,0,180,177,1,0,0,0,180,181,1,0,0, -0,181,182,1,0,0,0,182,185,3,142,71,0,183,184,5,216,0,0,184,186,3,18,9,0, -185,183,1,0,0,0,185,186,1,0,0,0,186,826,1,0,0,0,187,188,5,56,0,0,188,191, -5,168,0,0,189,190,5,87,0,0,190,192,5,63,0,0,191,189,1,0,0,0,191,192,1,0, -0,0,192,193,1,0,0,0,193,195,3,142,71,0,194,196,7,0,0,0,195,194,1,0,0,0,195, -196,1,0,0,0,196,826,1,0,0,0,197,198,5,13,0,0,198,199,5,168,0,0,199,200,3, -142,71,0,200,201,5,152,0,0,201,202,5,194,0,0,202,203,3,152,76,0,203,826, -1,0,0,0,204,205,5,36,0,0,205,209,5,186,0,0,206,207,5,87,0,0,207,208,5,126, -0,0,208,210,5,63,0,0,209,206,1,0,0,0,209,210,1,0,0,0,210,211,1,0,0,0,211, -213,3,142,71,0,212,214,3,80,40,0,213,212,1,0,0,0,213,214,1,0,0,0,214,217, -1,0,0,0,215,216,5,32,0,0,216,218,3,94,47,0,217,215,1,0,0,0,217,218,1,0,0, -0,218,221,1,0,0,0,219,220,5,216,0,0,220,222,3,18,9,0,221,219,1,0,0,0,221, -222,1,0,0,0,222,223,1,0,0,0,223,229,5,18,0,0,224,230,3,8,4,0,225,226,5,2, -0,0,226,227,3,8,4,0,227,228,5,3,0,0,228,230,1,0,0,0,229,224,1,0,0,0,229, -225,1,0,0,0,230,236,1,0,0,0,231,233,5,216,0,0,232,234,5,123,0,0,233,232, -1,0,0,0,233,234,1,0,0,0,234,235,1,0,0,0,235,237,5,45,0,0,236,231,1,0,0,0, -236,237,1,0,0,0,237,826,1,0,0,0,238,239,5,36,0,0,239,243,5,186,0,0,240,241, -5,87,0,0,241,242,5,126,0,0,242,244,5,63,0,0,243,240,1,0,0,0,243,244,1,0, -0,0,244,245,1,0,0,0,245,246,3,142,71,0,246,247,5,2,0,0,247,252,3,12,6,0, -248,249,5,4,0,0,249,251,3,12,6,0,250,248,1,0,0,0,251,254,1,0,0,0,252,250, -1,0,0,0,252,253,1,0,0,0,253,255,1,0,0,0,254,252,1,0,0,0,255,258,5,3,0,0, -256,257,5,32,0,0,257,259,3,94,47,0,258,256,1,0,0,0,258,259,1,0,0,0,259,262, -1,0,0,0,260,261,5,216,0,0,261,263,3,18,9,0,262,260,1,0,0,0,262,263,1,0,0, -0,263,826,1,0,0,0,264,265,5,56,0,0,265,268,5,186,0,0,266,267,5,87,0,0,267, -269,5,63,0,0,268,266,1,0,0,0,268,269,1,0,0,0,269,270,1,0,0,0,270,826,3,142, -71,0,271,272,5,93,0,0,272,273,5,96,0,0,273,275,3,142,71,0,274,276,3,80,40, -0,275,274,1,0,0,0,275,276,1,0,0,0,276,277,1,0,0,0,277,278,3,8,4,0,278,826, -1,0,0,0,279,280,5,50,0,0,280,281,5,74,0,0,281,284,3,142,71,0,282,283,5,215, -0,0,283,285,3,86,43,0,284,282,1,0,0,0,284,285,1,0,0,0,285,826,1,0,0,0,286, -287,5,197,0,0,287,288,5,186,0,0,288,826,3,142,71,0,289,290,5,13,0,0,290, -293,5,186,0,0,291,292,5,87,0,0,292,294,5,63,0,0,293,291,1,0,0,0,293,294, -1,0,0,0,294,295,1,0,0,0,295,296,3,142,71,0,296,297,5,152,0,0,297,298,5,194, -0,0,298,299,3,142,71,0,299,826,1,0,0,0,300,301,5,13,0,0,301,304,5,186,0, -0,302,303,5,87,0,0,303,305,5,63,0,0,304,302,1,0,0,0,304,305,1,0,0,0,305, -306,1,0,0,0,306,307,3,142,71,0,307,308,5,152,0,0,308,311,5,30,0,0,309,310, -5,87,0,0,310,312,5,63,0,0,311,309,1,0,0,0,311,312,1,0,0,0,312,313,1,0,0, -0,313,314,3,152,76,0,314,315,5,194,0,0,315,316,3,152,76,0,316,826,1,0,0, -0,317,318,5,13,0,0,318,321,5,186,0,0,319,320,5,87,0,0,320,322,5,63,0,0,321, -319,1,0,0,0,321,322,1,0,0,0,322,323,1,0,0,0,323,324,3,142,71,0,324,325,5, -56,0,0,325,328,5,30,0,0,326,327,5,87,0,0,327,329,5,63,0,0,328,326,1,0,0, -0,328,329,1,0,0,0,329,330,1,0,0,0,330,331,3,142,71,0,331,826,1,0,0,0,332, -333,5,13,0,0,333,336,5,186,0,0,334,335,5,87,0,0,335,337,5,63,0,0,336,334, -1,0,0,0,336,337,1,0,0,0,337,338,1,0,0,0,338,339,3,142,71,0,339,340,5,10, -0,0,340,344,5,30,0,0,341,342,5,87,0,0,342,343,5,126,0,0,343,345,5,63,0,0, -344,341,1,0,0,0,344,345,1,0,0,0,345,346,1,0,0,0,346,347,3,14,7,0,347,826, -1,0,0,0,348,349,5,14,0,0,349,352,3,142,71,0,350,351,5,216,0,0,351,353,3, -18,9,0,352,350,1,0,0,0,352,353,1,0,0,0,353,826,1,0,0,0,354,355,5,36,0,0, -355,356,5,199,0,0,356,357,3,142,71,0,357,370,5,18,0,0,358,359,5,2,0,0,359, -364,3,22,11,0,360,361,5,4,0,0,361,363,3,22,11,0,362,360,1,0,0,0,363,366, -1,0,0,0,364,362,1,0,0,0,364,365,1,0,0,0,365,367,1,0,0,0,366,364,1,0,0,0, -367,368,5,3,0,0,368,371,1,0,0,0,369,371,3,114,57,0,370,358,1,0,0,0,370,369, -1,0,0,0,371,826,1,0,0,0,372,375,5,36,0,0,373,374,5,135,0,0,374,376,5,154, -0,0,375,373,1,0,0,0,375,376,1,0,0,0,376,377,1,0,0,0,377,378,5,213,0,0,378, -381,3,142,71,0,379,380,5,171,0,0,380,382,7,1,0,0,381,379,1,0,0,0,381,382, -1,0,0,0,382,383,1,0,0,0,383,384,5,18,0,0,384,385,3,8,4,0,385,826,1,0,0,0, -386,387,5,56,0,0,387,390,5,213,0,0,388,389,5,87,0,0,389,391,5,63,0,0,390, -388,1,0,0,0,390,391,1,0,0,0,391,392,1,0,0,0,392,826,3,142,71,0,393,394,5, -36,0,0,394,395,5,114,0,0,395,399,5,213,0,0,396,397,5,87,0,0,397,398,5,126, -0,0,398,400,5,63,0,0,399,396,1,0,0,0,399,400,1,0,0,0,400,401,1,0,0,0,401, -404,3,142,71,0,402,403,5,32,0,0,403,405,3,94,47,0,404,402,1,0,0,0,404,405, -1,0,0,0,405,408,1,0,0,0,406,407,5,216,0,0,407,409,3,18,9,0,408,406,1,0,0, -0,408,409,1,0,0,0,409,410,1,0,0,0,410,416,5,18,0,0,411,417,3,8,4,0,412,413, -5,2,0,0,413,414,3,8,4,0,414,415,5,3,0,0,415,417,1,0,0,0,416,411,1,0,0,0, -416,412,1,0,0,0,417,826,1,0,0,0,418,419,5,56,0,0,419,420,5,114,0,0,420,423, -5,213,0,0,421,422,5,87,0,0,422,424,5,63,0,0,423,421,1,0,0,0,423,424,1,0, -0,0,424,425,1,0,0,0,425,826,3,142,71,0,426,427,5,151,0,0,427,428,5,114,0, -0,428,429,5,213,0,0,429,430,3,142,71,0,430,431,5,215,0,0,431,432,3,86,43, -0,432,826,1,0,0,0,433,436,5,36,0,0,434,435,5,135,0,0,435,437,5,154,0,0,436, -434,1,0,0,0,436,437,1,0,0,0,437,439,1,0,0,0,438,440,5,189,0,0,439,438,1, -0,0,0,439,440,1,0,0,0,440,441,1,0,0,0,441,442,5,76,0,0,442,443,3,142,71, -0,443,452,5,2,0,0,444,449,3,22,11,0,445,446,5,4,0,0,446,448,3,22,11,0,447, -445,1,0,0,0,448,451,1,0,0,0,449,447,1,0,0,0,449,450,1,0,0,0,450,453,1,0, -0,0,451,449,1,0,0,0,452,444,1,0,0,0,452,453,1,0,0,0,453,454,1,0,0,0,454, -455,5,3,0,0,455,456,5,159,0,0,456,459,3,114,57,0,457,458,5,32,0,0,458,460, -3,94,47,0,459,457,1,0,0,0,459,460,1,0,0,0,460,461,1,0,0,0,461,462,3,24,12, -0,462,463,3,32,16,0,463,826,1,0,0,0,464,465,5,13,0,0,465,466,5,76,0,0,466, -468,3,142,71,0,467,469,3,112,56,0,468,467,1,0,0,0,468,469,1,0,0,0,469,470, -1,0,0,0,470,471,3,28,14,0,471,826,1,0,0,0,472,474,5,56,0,0,473,475,5,189, -0,0,474,473,1,0,0,0,474,475,1,0,0,0,475,476,1,0,0,0,476,479,5,76,0,0,477, -478,5,87,0,0,478,480,5,63,0,0,479,477,1,0,0,0,479,480,1,0,0,0,480,481,1, -0,0,0,481,483,3,142,71,0,482,484,3,112,56,0,483,482,1,0,0,0,483,484,1,0, -0,0,484,826,1,0,0,0,485,486,5,24,0,0,486,487,3,142,71,0,487,496,5,2,0,0, -488,493,3,138,69,0,489,490,5,4,0,0,490,492,3,138,69,0,491,489,1,0,0,0,492, -495,1,0,0,0,493,491,1,0,0,0,493,494,1,0,0,0,494,497,1,0,0,0,495,493,1,0, -0,0,496,488,1,0,0,0,496,497,1,0,0,0,497,498,1,0,0,0,498,499,5,3,0,0,499, -826,1,0,0,0,500,501,5,36,0,0,501,502,5,162,0,0,502,506,3,152,76,0,503,504, -5,216,0,0,504,505,5,11,0,0,505,507,3,146,73,0,506,503,1,0,0,0,506,507,1, -0,0,0,507,826,1,0,0,0,508,509,5,56,0,0,509,510,5,162,0,0,510,826,3,152,76, -0,511,512,5,78,0,0,512,513,3,150,75,0,513,514,5,194,0,0,514,519,3,148,74, -0,515,516,5,4,0,0,516,518,3,148,74,0,517,515,1,0,0,0,518,521,1,0,0,0,519, -517,1,0,0,0,519,520,1,0,0,0,520,525,1,0,0,0,521,519,1,0,0,0,522,523,5,216, -0,0,523,524,5,11,0,0,524,526,5,134,0,0,525,522,1,0,0,0,525,526,1,0,0,0,526, -530,1,0,0,0,527,528,5,79,0,0,528,529,5,23,0,0,529,531,3,146,73,0,530,527, -1,0,0,0,530,531,1,0,0,0,531,826,1,0,0,0,532,536,5,160,0,0,533,534,5,11,0, -0,534,535,5,134,0,0,535,537,5,72,0,0,536,533,1,0,0,0,536,537,1,0,0,0,537, -538,1,0,0,0,538,539,3,150,75,0,539,540,5,74,0,0,540,545,3,148,74,0,541,542, -5,4,0,0,542,544,3,148,74,0,543,541,1,0,0,0,544,547,1,0,0,0,545,543,1,0,0, -0,545,546,1,0,0,0,546,551,1,0,0,0,547,545,1,0,0,0,548,549,5,79,0,0,549,550, -5,23,0,0,550,552,3,146,73,0,551,548,1,0,0,0,551,552,1,0,0,0,552,826,1,0, -0,0,553,554,5,175,0,0,554,558,5,162,0,0,555,559,5,12,0,0,556,559,5,124,0, -0,557,559,3,152,76,0,558,555,1,0,0,0,558,556,1,0,0,0,558,557,1,0,0,0,559, -826,1,0,0,0,560,571,5,78,0,0,561,566,3,140,70,0,562,563,5,4,0,0,563,565, -3,140,70,0,564,562,1,0,0,0,565,568,1,0,0,0,566,564,1,0,0,0,566,567,1,0,0, -0,567,572,1,0,0,0,568,566,1,0,0,0,569,570,5,12,0,0,570,572,5,146,0,0,571, -561,1,0,0,0,571,569,1,0,0,0,572,573,1,0,0,0,573,575,5,132,0,0,574,576,5, -186,0,0,575,574,1,0,0,0,575,576,1,0,0,0,576,577,1,0,0,0,577,578,3,142,71, -0,578,579,5,194,0,0,579,583,3,148,74,0,580,581,5,216,0,0,581,582,5,78,0, -0,582,584,5,134,0,0,583,580,1,0,0,0,583,584,1,0,0,0,584,826,1,0,0,0,585, -589,5,160,0,0,586,587,5,78,0,0,587,588,5,134,0,0,588,590,5,72,0,0,589,586, -1,0,0,0,589,590,1,0,0,0,590,601,1,0,0,0,591,596,3,140,70,0,592,593,5,4,0, -0,593,595,3,140,70,0,594,592,1,0,0,0,595,598,1,0,0,0,596,594,1,0,0,0,596, -597,1,0,0,0,597,602,1,0,0,0,598,596,1,0,0,0,599,600,5,12,0,0,600,602,5,146, -0,0,601,591,1,0,0,0,601,599,1,0,0,0,602,603,1,0,0,0,603,605,5,132,0,0,604, -606,5,186,0,0,605,604,1,0,0,0,605,606,1,0,0,0,606,607,1,0,0,0,607,608,3, -142,71,0,608,609,5,74,0,0,609,610,3,148,74,0,610,826,1,0,0,0,611,612,5,177, -0,0,612,618,5,80,0,0,613,615,5,132,0,0,614,616,5,186,0,0,615,614,1,0,0,0, -615,616,1,0,0,0,616,617,1,0,0,0,617,619,3,142,71,0,618,613,1,0,0,0,618,619, -1,0,0,0,619,826,1,0,0,0,620,622,5,64,0,0,621,623,5,14,0,0,622,621,1,0,0, -0,622,623,1,0,0,0,623,625,1,0,0,0,624,626,5,211,0,0,625,624,1,0,0,0,625, -626,1,0,0,0,626,638,1,0,0,0,627,628,5,2,0,0,628,633,3,132,66,0,629,630,5, -4,0,0,630,632,3,132,66,0,631,629,1,0,0,0,632,635,1,0,0,0,633,631,1,0,0,0, -633,634,1,0,0,0,634,636,1,0,0,0,635,633,1,0,0,0,636,637,5,3,0,0,637,639, -1,0,0,0,638,627,1,0,0,0,638,639,1,0,0,0,639,640,1,0,0,0,640,826,3,6,3,0, -641,642,5,177,0,0,642,643,5,36,0,0,643,644,5,186,0,0,644,826,3,142,71,0, -645,646,5,177,0,0,646,647,5,36,0,0,647,648,5,213,0,0,648,826,3,142,71,0, -649,650,5,177,0,0,650,651,5,36,0,0,651,652,5,114,0,0,652,653,5,213,0,0,653, -826,3,142,71,0,654,655,5,177,0,0,655,656,5,36,0,0,656,657,5,76,0,0,657,659, -3,142,71,0,658,660,3,112,56,0,659,658,1,0,0,0,659,660,1,0,0,0,660,826,1, -0,0,0,661,662,5,177,0,0,662,665,5,187,0,0,663,664,7,2,0,0,664,666,3,142, -71,0,665,663,1,0,0,0,665,666,1,0,0,0,666,673,1,0,0,0,667,668,5,108,0,0,668, -671,3,94,47,0,669,670,5,59,0,0,670,672,3,94,47,0,671,669,1,0,0,0,671,672, -1,0,0,0,672,674,1,0,0,0,673,667,1,0,0,0,673,674,1,0,0,0,674,826,1,0,0,0, -675,676,5,177,0,0,676,679,5,169,0,0,677,678,7,2,0,0,678,680,3,152,76,0,679, -677,1,0,0,0,679,680,1,0,0,0,680,687,1,0,0,0,681,682,5,108,0,0,682,685,3, -94,47,0,683,684,5,59,0,0,684,686,3,94,47,0,685,683,1,0,0,0,685,686,1,0,0, -0,686,688,1,0,0,0,687,681,1,0,0,0,687,688,1,0,0,0,688,826,1,0,0,0,689,690, -5,177,0,0,690,697,5,29,0,0,691,692,5,108,0,0,692,695,3,94,47,0,693,694,5, -59,0,0,694,696,3,94,47,0,695,693,1,0,0,0,695,696,1,0,0,0,696,698,1,0,0,0, -697,691,1,0,0,0,697,698,1,0,0,0,698,826,1,0,0,0,699,700,5,177,0,0,700,701, -5,31,0,0,701,702,7,2,0,0,702,826,3,142,71,0,703,704,5,177,0,0,704,705,5, -181,0,0,705,706,5,72,0,0,706,826,3,142,71,0,707,708,5,177,0,0,708,709,5, -181,0,0,709,710,5,72,0,0,710,711,5,2,0,0,711,712,3,54,27,0,712,713,5,3,0, -0,713,826,1,0,0,0,714,716,5,177,0,0,715,717,5,39,0,0,716,715,1,0,0,0,716, -717,1,0,0,0,717,718,1,0,0,0,718,721,5,163,0,0,719,720,7,2,0,0,720,722,3, -152,76,0,721,719,1,0,0,0,721,722,1,0,0,0,722,826,1,0,0,0,723,724,5,177,0, -0,724,725,5,162,0,0,725,728,5,80,0,0,726,727,7,2,0,0,727,729,3,152,76,0, -728,726,1,0,0,0,728,729,1,0,0,0,729,826,1,0,0,0,730,731,5,52,0,0,731,826, -3,142,71,0,732,733,5,51,0,0,733,826,3,142,71,0,734,735,5,177,0,0,735,742, -5,77,0,0,736,737,5,108,0,0,737,740,3,94,47,0,738,739,5,59,0,0,739,741,3, -94,47,0,740,738,1,0,0,0,740,741,1,0,0,0,741,743,1,0,0,0,742,736,1,0,0,0, -742,743,1,0,0,0,743,826,1,0,0,0,744,745,5,177,0,0,745,752,5,174,0,0,746, -747,5,108,0,0,747,750,3,94,47,0,748,749,5,59,0,0,749,751,3,94,47,0,750,748, -1,0,0,0,750,751,1,0,0,0,751,753,1,0,0,0,752,746,1,0,0,0,752,753,1,0,0,0, -753,826,1,0,0,0,754,755,5,175,0,0,755,756,5,174,0,0,756,757,3,142,71,0,757, -758,5,221,0,0,758,759,3,84,42,0,759,826,1,0,0,0,760,761,5,155,0,0,761,762, -5,174,0,0,762,826,3,142,71,0,763,764,5,180,0,0,764,773,5,195,0,0,765,770, -3,134,67,0,766,767,5,4,0,0,767,769,3,134,67,0,768,766,1,0,0,0,769,772,1, -0,0,0,770,768,1,0,0,0,770,771,1,0,0,0,771,774,1,0,0,0,772,770,1,0,0,0,773, -765,1,0,0,0,773,774,1,0,0,0,774,826,1,0,0,0,775,777,5,33,0,0,776,778,5,217, -0,0,777,776,1,0,0,0,777,778,1,0,0,0,778,826,1,0,0,0,779,781,5,164,0,0,780, -782,5,217,0,0,781,780,1,0,0,0,781,782,1,0,0,0,782,826,1,0,0,0,783,784,5, -145,0,0,784,785,3,152,76,0,785,786,5,74,0,0,786,787,3,6,3,0,787,826,1,0, -0,0,788,789,5,48,0,0,789,790,5,145,0,0,790,826,3,152,76,0,791,792,5,62,0, -0,792,802,3,152,76,0,793,794,5,208,0,0,794,799,3,84,42,0,795,796,5,4,0,0, -796,798,3,84,42,0,797,795,1,0,0,0,798,801,1,0,0,0,799,797,1,0,0,0,799,800, -1,0,0,0,800,803,1,0,0,0,801,799,1,0,0,0,802,793,1,0,0,0,802,803,1,0,0,0, -803,826,1,0,0,0,804,805,5,52,0,0,805,806,5,92,0,0,806,826,3,152,76,0,807, -808,5,52,0,0,808,809,5,139,0,0,809,826,3,152,76,0,810,811,5,205,0,0,811, -812,3,142,71,0,812,813,5,175,0,0,813,818,3,130,65,0,814,815,5,4,0,0,815, -817,3,130,65,0,816,814,1,0,0,0,817,820,1,0,0,0,818,816,1,0,0,0,818,819,1, -0,0,0,819,823,1,0,0,0,820,818,1,0,0,0,821,822,5,215,0,0,822,824,3,86,43, -0,823,821,1,0,0,0,823,824,1,0,0,0,824,826,1,0,0,0,825,167,1,0,0,0,825,168, -1,0,0,0,825,170,1,0,0,0,825,175,1,0,0,0,825,187,1,0,0,0,825,197,1,0,0,0, -825,204,1,0,0,0,825,238,1,0,0,0,825,264,1,0,0,0,825,271,1,0,0,0,825,279, -1,0,0,0,825,286,1,0,0,0,825,289,1,0,0,0,825,300,1,0,0,0,825,317,1,0,0,0, -825,332,1,0,0,0,825,348,1,0,0,0,825,354,1,0,0,0,825,372,1,0,0,0,825,386, -1,0,0,0,825,393,1,0,0,0,825,418,1,0,0,0,825,426,1,0,0,0,825,433,1,0,0,0, -825,464,1,0,0,0,825,472,1,0,0,0,825,485,1,0,0,0,825,500,1,0,0,0,825,508, -1,0,0,0,825,511,1,0,0,0,825,532,1,0,0,0,825,553,1,0,0,0,825,560,1,0,0,0, -825,585,1,0,0,0,825,611,1,0,0,0,825,620,1,0,0,0,825,641,1,0,0,0,825,645, -1,0,0,0,825,649,1,0,0,0,825,654,1,0,0,0,825,661,1,0,0,0,825,675,1,0,0,0, -825,689,1,0,0,0,825,699,1,0,0,0,825,703,1,0,0,0,825,707,1,0,0,0,825,714, -1,0,0,0,825,723,1,0,0,0,825,730,1,0,0,0,825,732,1,0,0,0,825,734,1,0,0,0, -825,744,1,0,0,0,825,754,1,0,0,0,825,760,1,0,0,0,825,763,1,0,0,0,825,775, -1,0,0,0,825,779,1,0,0,0,825,783,1,0,0,0,825,788,1,0,0,0,825,791,1,0,0,0, -825,804,1,0,0,0,825,807,1,0,0,0,825,810,1,0,0,0,826,7,1,0,0,0,827,829,3, -10,5,0,828,827,1,0,0,0,828,829,1,0,0,0,829,830,1,0,0,0,830,831,3,46,23,0, -831,9,1,0,0,0,832,834,5,216,0,0,833,835,5,150,0,0,834,833,1,0,0,0,834,835, -1,0,0,0,835,836,1,0,0,0,836,841,3,62,31,0,837,838,5,4,0,0,838,840,3,62,31, -0,839,837,1,0,0,0,840,843,1,0,0,0,841,839,1,0,0,0,841,842,1,0,0,0,842,11, -1,0,0,0,843,841,1,0,0,0,844,847,3,14,7,0,845,847,3,16,8,0,846,844,1,0,0, -0,846,845,1,0,0,0,847,13,1,0,0,0,848,849,3,152,76,0,849,852,3,114,57,0,850, -851,5,126,0,0,851,853,5,127,0,0,852,850,1,0,0,0,852,853,1,0,0,0,853,856, -1,0,0,0,854,855,5,32,0,0,855,857,3,94,47,0,856,854,1,0,0,0,856,857,1,0,0, -0,857,860,1,0,0,0,858,859,5,216,0,0,859,861,3,18,9,0,860,858,1,0,0,0,860, -861,1,0,0,0,861,15,1,0,0,0,862,863,5,108,0,0,863,866,3,142,71,0,864,865, -7,3,0,0,865,867,5,147,0,0,866,864,1,0,0,0,866,867,1,0,0,0,867,17,1,0,0,0, -868,869,5,2,0,0,869,874,3,20,10,0,870,871,5,4,0,0,871,873,3,20,10,0,872, -870,1,0,0,0,873,876,1,0,0,0,874,872,1,0,0,0,874,875,1,0,0,0,875,877,1,0, -0,0,876,874,1,0,0,0,877,878,5,3,0,0,878,19,1,0,0,0,879,880,3,152,76,0,880, -881,5,221,0,0,881,882,3,84,42,0,882,21,1,0,0,0,883,884,3,152,76,0,884,885, -3,114,57,0,885,23,1,0,0,0,886,888,3,26,13,0,887,886,1,0,0,0,888,891,1,0, -0,0,889,887,1,0,0,0,889,890,1,0,0,0,890,25,1,0,0,0,891,889,1,0,0,0,892,893, -5,103,0,0,893,897,3,38,19,0,894,897,3,40,20,0,895,897,3,42,21,0,896,892, -1,0,0,0,896,894,1,0,0,0,896,895,1,0,0,0,897,27,1,0,0,0,898,900,3,30,15,0, -899,898,1,0,0,0,900,903,1,0,0,0,901,899,1,0,0,0,901,902,1,0,0,0,902,29,1, -0,0,0,903,901,1,0,0,0,904,905,3,42,21,0,905,31,1,0,0,0,906,909,3,34,17,0, -907,909,3,36,18,0,908,906,1,0,0,0,908,907,1,0,0,0,909,33,1,0,0,0,910,911, -5,158,0,0,911,912,3,84,42,0,912,35,1,0,0,0,913,916,5,66,0,0,914,915,5,117, -0,0,915,917,3,44,22,0,916,914,1,0,0,0,916,917,1,0,0,0,917,37,1,0,0,0,918, -921,5,179,0,0,919,921,3,152,76,0,920,918,1,0,0,0,920,919,1,0,0,0,921,39, -1,0,0,0,922,926,5,53,0,0,923,924,5,126,0,0,924,926,5,53,0,0,925,922,1,0, -0,0,925,923,1,0,0,0,926,41,1,0,0,0,927,928,5,159,0,0,928,929,5,127,0,0,929, -930,5,132,0,0,930,931,5,127,0,0,931,937,5,92,0,0,932,933,5,25,0,0,933,934, -5,132,0,0,934,935,5,127,0,0,935,937,5,92,0,0,936,927,1,0,0,0,936,932,1,0, -0,0,937,43,1,0,0,0,938,939,3,152,76,0,939,45,1,0,0,0,940,951,3,48,24,0,941, -942,5,136,0,0,942,943,5,23,0,0,943,948,3,52,26,0,944,945,5,4,0,0,945,947, -3,52,26,0,946,944,1,0,0,0,947,950,1,0,0,0,948,946,1,0,0,0,948,949,1,0,0, -0,949,952,1,0,0,0,950,948,1,0,0,0,951,941,1,0,0,0,951,952,1,0,0,0,952,958, -1,0,0,0,953,954,5,131,0,0,954,956,5,236,0,0,955,957,7,4,0,0,956,955,1,0, -0,0,956,957,1,0,0,0,957,959,1,0,0,0,958,953,1,0,0,0,958,959,1,0,0,0,959, -969,1,0,0,0,960,961,5,109,0,0,961,968,7,5,0,0,962,963,5,68,0,0,963,964,5, -70,0,0,964,965,5,236,0,0,965,966,5,167,0,0,966,968,5,133,0,0,967,960,1,0, -0,0,967,962,1,0,0,0,967,968,1,0,0,0,968,970,1,0,0,0,969,967,1,0,0,0,969, -970,1,0,0,0,970,47,1,0,0,0,971,972,6,24,-1,0,972,973,3,50,25,0,973,988,1, -0,0,0,974,975,10,2,0,0,975,977,5,94,0,0,976,978,3,64,32,0,977,976,1,0,0, -0,977,978,1,0,0,0,978,979,1,0,0,0,979,987,3,48,24,3,980,981,10,1,0,0,981, -983,7,6,0,0,982,984,3,64,32,0,983,982,1,0,0,0,983,984,1,0,0,0,984,985,1, -0,0,0,985,987,3,48,24,2,986,974,1,0,0,0,986,980,1,0,0,0,987,990,1,0,0,0, -988,986,1,0,0,0,988,989,1,0,0,0,989,49,1,0,0,0,990,988,1,0,0,0,991,1008, -3,54,27,0,992,993,5,186,0,0,993,1008,3,142,71,0,994,995,5,210,0,0,995,1000, -3,84,42,0,996,997,5,4,0,0,997,999,3,84,42,0,998,996,1,0,0,0,999,1002,1,0, -0,0,1000,998,1,0,0,0,1000,1001,1,0,0,0,1001,1008,1,0,0,0,1002,1000,1,0,0, -0,1003,1004,5,2,0,0,1004,1005,3,46,23,0,1005,1006,5,3,0,0,1006,1008,1,0, -0,0,1007,991,1,0,0,0,1007,992,1,0,0,0,1007,994,1,0,0,0,1007,1003,1,0,0,0, -1008,51,1,0,0,0,1009,1011,3,84,42,0,1010,1012,7,7,0,0,1011,1010,1,0,0,0, -1011,1012,1,0,0,0,1012,1015,1,0,0,0,1013,1014,5,129,0,0,1014,1016,7,8,0, -0,1015,1013,1,0,0,0,1015,1016,1,0,0,0,1016,53,1,0,0,0,1017,1019,5,172,0, -0,1018,1020,3,64,32,0,1019,1018,1,0,0,0,1019,1020,1,0,0,0,1020,1021,1,0, -0,0,1021,1026,3,66,33,0,1022,1023,5,4,0,0,1023,1025,3,66,33,0,1024,1022, -1,0,0,0,1025,1028,1,0,0,0,1026,1024,1,0,0,0,1026,1027,1,0,0,0,1027,1038, -1,0,0,0,1028,1026,1,0,0,0,1029,1030,5,74,0,0,1030,1035,3,68,34,0,1031,1032, -5,4,0,0,1032,1034,3,68,34,0,1033,1031,1,0,0,0,1034,1037,1,0,0,0,1035,1033, -1,0,0,0,1035,1036,1,0,0,0,1036,1039,1,0,0,0,1037,1035,1,0,0,0,1038,1029, -1,0,0,0,1038,1039,1,0,0,0,1039,1042,1,0,0,0,1040,1041,5,215,0,0,1041,1043, -3,86,43,0,1042,1040,1,0,0,0,1042,1043,1,0,0,0,1043,1047,1,0,0,0,1044,1045, -5,82,0,0,1045,1046,5,23,0,0,1046,1048,3,56,28,0,1047,1044,1,0,0,0,1047,1048, -1,0,0,0,1048,1051,1,0,0,0,1049,1050,5,85,0,0,1050,1052,3,86,43,0,1051,1049, -1,0,0,0,1051,1052,1,0,0,0,1052,55,1,0,0,0,1053,1055,3,64,32,0,1054,1053, -1,0,0,0,1054,1055,1,0,0,0,1055,1056,1,0,0,0,1056,1061,3,58,29,0,1057,1058, -5,4,0,0,1058,1060,3,58,29,0,1059,1057,1,0,0,0,1060,1063,1,0,0,0,1061,1059, -1,0,0,0,1061,1062,1,0,0,0,1062,57,1,0,0,0,1063,1061,1,0,0,0,1064,1105,3, -60,30,0,1065,1066,5,165,0,0,1066,1075,5,2,0,0,1067,1072,3,84,42,0,1068,1069, -5,4,0,0,1069,1071,3,84,42,0,1070,1068,1,0,0,0,1071,1074,1,0,0,0,1072,1070, -1,0,0,0,1072,1073,1,0,0,0,1073,1076,1,0,0,0,1074,1072,1,0,0,0,1075,1067, -1,0,0,0,1075,1076,1,0,0,0,1076,1077,1,0,0,0,1077,1105,5,3,0,0,1078,1079, -5,38,0,0,1079,1088,5,2,0,0,1080,1085,3,84,42,0,1081,1082,5,4,0,0,1082,1084, -3,84,42,0,1083,1081,1,0,0,0,1084,1087,1,0,0,0,1085,1083,1,0,0,0,1085,1086, -1,0,0,0,1086,1089,1,0,0,0,1087,1085,1,0,0,0,1088,1080,1,0,0,0,1088,1089, -1,0,0,0,1089,1090,1,0,0,0,1090,1105,5,3,0,0,1091,1092,5,83,0,0,1092,1093, -5,176,0,0,1093,1094,5,2,0,0,1094,1099,3,60,30,0,1095,1096,5,4,0,0,1096,1098, -3,60,30,0,1097,1095,1,0,0,0,1098,1101,1,0,0,0,1099,1097,1,0,0,0,1099,1100, -1,0,0,0,1100,1102,1,0,0,0,1101,1099,1,0,0,0,1102,1103,5,3,0,0,1103,1105, -1,0,0,0,1104,1064,1,0,0,0,1104,1065,1,0,0,0,1104,1078,1,0,0,0,1104,1091, -1,0,0,0,1105,59,1,0,0,0,1106,1115,5,2,0,0,1107,1112,3,84,42,0,1108,1109, -5,4,0,0,1109,1111,3,84,42,0,1110,1108,1,0,0,0,1111,1114,1,0,0,0,1112,1110, -1,0,0,0,1112,1113,1,0,0,0,1113,1116,1,0,0,0,1114,1112,1,0,0,0,1115,1107, -1,0,0,0,1115,1116,1,0,0,0,1116,1117,1,0,0,0,1117,1120,5,3,0,0,1118,1120, -3,84,42,0,1119,1106,1,0,0,0,1119,1118,1,0,0,0,1120,61,1,0,0,0,1121,1123, -3,152,76,0,1122,1124,3,80,40,0,1123,1122,1,0,0,0,1123,1124,1,0,0,0,1124, -1125,1,0,0,0,1125,1126,5,18,0,0,1126,1127,5,2,0,0,1127,1128,3,8,4,0,1128, -1129,5,3,0,0,1129,63,1,0,0,0,1130,1131,7,9,0,0,1131,65,1,0,0,0,1132,1137, -3,84,42,0,1133,1135,5,18,0,0,1134,1133,1,0,0,0,1134,1135,1,0,0,0,1135,1136, -1,0,0,0,1136,1138,3,152,76,0,1137,1134,1,0,0,0,1137,1138,1,0,0,0,1138,1145, -1,0,0,0,1139,1140,3,142,71,0,1140,1141,5,1,0,0,1141,1142,5,229,0,0,1142, -1145,1,0,0,0,1143,1145,5,229,0,0,1144,1132,1,0,0,0,1144,1139,1,0,0,0,1144, -1143,1,0,0,0,1145,67,1,0,0,0,1146,1147,6,34,-1,0,1147,1148,3,74,37,0,1148, -1167,1,0,0,0,1149,1163,10,2,0,0,1150,1151,5,37,0,0,1151,1152,5,102,0,0,1152, -1164,3,74,37,0,1153,1154,3,70,35,0,1154,1155,5,102,0,0,1155,1156,3,68,34, -0,1156,1157,3,72,36,0,1157,1164,1,0,0,0,1158,1159,5,118,0,0,1159,1160,3, -70,35,0,1160,1161,5,102,0,0,1161,1162,3,74,37,0,1162,1164,1,0,0,0,1163,1150, -1,0,0,0,1163,1153,1,0,0,0,1163,1158,1,0,0,0,1164,1166,1,0,0,0,1165,1149, -1,0,0,0,1166,1169,1,0,0,0,1167,1165,1,0,0,0,1167,1168,1,0,0,0,1168,69,1, -0,0,0,1169,1167,1,0,0,0,1170,1172,5,91,0,0,1171,1170,1,0,0,0,1171,1172,1, -0,0,0,1172,1186,1,0,0,0,1173,1175,5,106,0,0,1174,1176,5,138,0,0,1175,1174, -1,0,0,0,1175,1176,1,0,0,0,1176,1186,1,0,0,0,1177,1179,5,161,0,0,1178,1180, -5,138,0,0,1179,1178,1,0,0,0,1179,1180,1,0,0,0,1180,1186,1,0,0,0,1181,1183, -5,75,0,0,1182,1184,5,138,0,0,1183,1182,1,0,0,0,1183,1184,1,0,0,0,1184,1186, -1,0,0,0,1185,1171,1,0,0,0,1185,1173,1,0,0,0,1185,1177,1,0,0,0,1185,1181, -1,0,0,0,1186,71,1,0,0,0,1187,1188,5,132,0,0,1188,1202,3,86,43,0,1189,1190, -5,208,0,0,1190,1191,5,2,0,0,1191,1196,3,152,76,0,1192,1193,5,4,0,0,1193, -1195,3,152,76,0,1194,1192,1,0,0,0,1195,1198,1,0,0,0,1196,1194,1,0,0,0,1196, -1197,1,0,0,0,1197,1199,1,0,0,0,1198,1196,1,0,0,0,1199,1200,5,3,0,0,1200, -1202,1,0,0,0,1201,1187,1,0,0,0,1201,1189,1,0,0,0,1202,73,1,0,0,0,1203,1210, -3,78,39,0,1204,1205,5,188,0,0,1205,1206,3,76,38,0,1206,1207,5,2,0,0,1207, -1208,3,84,42,0,1208,1209,5,3,0,0,1209,1211,1,0,0,0,1210,1204,1,0,0,0,1210, -1211,1,0,0,0,1211,75,1,0,0,0,1212,1213,7,10,0,0,1213,77,1,0,0,0,1214,1222, -3,82,41,0,1215,1217,5,18,0,0,1216,1215,1,0,0,0,1216,1217,1,0,0,0,1217,1218, -1,0,0,0,1218,1220,3,152,76,0,1219,1221,3,80,40,0,1220,1219,1,0,0,0,1220, -1221,1,0,0,0,1221,1223,1,0,0,0,1222,1216,1,0,0,0,1222,1223,1,0,0,0,1223, -79,1,0,0,0,1224,1225,5,2,0,0,1225,1230,3,152,76,0,1226,1227,5,4,0,0,1227, -1229,3,152,76,0,1228,1226,1,0,0,0,1229,1232,1,0,0,0,1230,1228,1,0,0,0,1230, -1231,1,0,0,0,1231,1233,1,0,0,0,1232,1230,1,0,0,0,1233,1234,5,3,0,0,1234, -81,1,0,0,0,1235,1237,3,142,71,0,1236,1238,3,144,72,0,1237,1236,1,0,0,0,1237, -1238,1,0,0,0,1238,1268,1,0,0,0,1239,1240,5,2,0,0,1240,1241,3,8,4,0,1241, -1242,5,3,0,0,1242,1268,1,0,0,0,1243,1244,5,204,0,0,1244,1245,5,2,0,0,1245, -1250,3,84,42,0,1246,1247,5,4,0,0,1247,1249,3,84,42,0,1248,1246,1,0,0,0,1249, -1252,1,0,0,0,1250,1248,1,0,0,0,1250,1251,1,0,0,0,1251,1253,1,0,0,0,1252, -1250,1,0,0,0,1253,1256,5,3,0,0,1254,1255,5,216,0,0,1255,1257,5,137,0,0,1256, -1254,1,0,0,0,1256,1257,1,0,0,0,1257,1268,1,0,0,0,1258,1259,5,105,0,0,1259, -1260,5,2,0,0,1260,1261,3,8,4,0,1261,1262,5,3,0,0,1262,1268,1,0,0,0,1263, -1264,5,2,0,0,1264,1265,3,68,34,0,1265,1266,5,3,0,0,1266,1268,1,0,0,0,1267, -1235,1,0,0,0,1267,1239,1,0,0,0,1267,1243,1,0,0,0,1267,1258,1,0,0,0,1267, -1263,1,0,0,0,1268,83,1,0,0,0,1269,1270,3,86,43,0,1270,85,1,0,0,0,1271,1272, -6,43,-1,0,1272,1274,3,90,45,0,1273,1275,3,88,44,0,1274,1273,1,0,0,0,1274, -1275,1,0,0,0,1275,1279,1,0,0,0,1276,1277,5,126,0,0,1277,1279,3,86,43,3,1278, -1271,1,0,0,0,1278,1276,1,0,0,0,1279,1288,1,0,0,0,1280,1281,10,2,0,0,1281, -1282,5,15,0,0,1282,1287,3,86,43,3,1283,1284,10,1,0,0,1284,1285,5,135,0,0, -1285,1287,3,86,43,2,1286,1280,1,0,0,0,1286,1283,1,0,0,0,1287,1290,1,0,0, -0,1288,1286,1,0,0,0,1288,1289,1,0,0,0,1289,87,1,0,0,0,1290,1288,1,0,0,0, -1291,1292,3,100,50,0,1292,1293,3,90,45,0,1293,1353,1,0,0,0,1294,1295,3,100, -50,0,1295,1296,3,102,51,0,1296,1297,5,2,0,0,1297,1298,3,8,4,0,1298,1299, -5,3,0,0,1299,1353,1,0,0,0,1300,1302,5,126,0,0,1301,1300,1,0,0,0,1301,1302, -1,0,0,0,1302,1303,1,0,0,0,1303,1304,5,22,0,0,1304,1305,3,90,45,0,1305,1306, -5,15,0,0,1306,1307,3,90,45,0,1307,1353,1,0,0,0,1308,1310,5,126,0,0,1309, -1308,1,0,0,0,1309,1310,1,0,0,0,1310,1311,1,0,0,0,1311,1312,5,89,0,0,1312, -1313,5,2,0,0,1313,1318,3,84,42,0,1314,1315,5,4,0,0,1315,1317,3,84,42,0,1316, -1314,1,0,0,0,1317,1320,1,0,0,0,1318,1316,1,0,0,0,1318,1319,1,0,0,0,1319, -1321,1,0,0,0,1320,1318,1,0,0,0,1321,1322,5,3,0,0,1322,1353,1,0,0,0,1323, -1325,5,126,0,0,1324,1323,1,0,0,0,1324,1325,1,0,0,0,1325,1326,1,0,0,0,1326, -1327,5,89,0,0,1327,1328,5,2,0,0,1328,1329,3,8,4,0,1329,1330,5,3,0,0,1330, -1353,1,0,0,0,1331,1333,5,126,0,0,1332,1331,1,0,0,0,1332,1333,1,0,0,0,1333, -1334,1,0,0,0,1334,1335,5,108,0,0,1335,1338,3,90,45,0,1336,1337,5,59,0,0, -1337,1339,3,90,45,0,1338,1336,1,0,0,0,1338,1339,1,0,0,0,1339,1353,1,0,0, -0,1340,1342,5,99,0,0,1341,1343,5,126,0,0,1342,1341,1,0,0,0,1342,1343,1,0, -0,0,1343,1344,1,0,0,0,1344,1353,5,127,0,0,1345,1347,5,99,0,0,1346,1348,5, -126,0,0,1347,1346,1,0,0,0,1347,1348,1,0,0,0,1348,1349,1,0,0,0,1349,1350, -5,54,0,0,1350,1351,5,74,0,0,1351,1353,3,90,45,0,1352,1291,1,0,0,0,1352,1294, -1,0,0,0,1352,1301,1,0,0,0,1352,1309,1,0,0,0,1352,1324,1,0,0,0,1352,1332, -1,0,0,0,1352,1340,1,0,0,0,1352,1345,1,0,0,0,1353,89,1,0,0,0,1354,1355,6, -45,-1,0,1355,1359,3,92,46,0,1356,1357,7,11,0,0,1357,1359,3,90,45,4,1358, -1354,1,0,0,0,1358,1356,1,0,0,0,1359,1374,1,0,0,0,1360,1361,10,3,0,0,1361, -1362,7,12,0,0,1362,1373,3,90,45,4,1363,1364,10,2,0,0,1364,1365,7,11,0,0, -1365,1373,3,90,45,3,1366,1367,10,1,0,0,1367,1368,5,232,0,0,1368,1373,3,90, -45,2,1369,1370,10,5,0,0,1370,1371,5,20,0,0,1371,1373,3,98,49,0,1372,1360, -1,0,0,0,1372,1363,1,0,0,0,1372,1366,1,0,0,0,1372,1369,1,0,0,0,1373,1376, -1,0,0,0,1374,1372,1,0,0,0,1374,1375,1,0,0,0,1375,91,1,0,0,0,1376,1374,1, -0,0,0,1377,1378,6,46,-1,0,1378,1617,5,127,0,0,1379,1617,3,106,53,0,1380, -1381,3,152,76,0,1381,1382,3,94,47,0,1382,1617,1,0,0,0,1383,1384,5,245,0, -0,1384,1617,3,94,47,0,1385,1617,3,154,77,0,1386,1617,3,104,52,0,1387,1617, -3,94,47,0,1388,1617,5,235,0,0,1389,1617,5,5,0,0,1390,1391,5,143,0,0,1391, -1392,5,2,0,0,1392,1393,3,90,45,0,1393,1394,5,89,0,0,1394,1395,3,90,45,0, -1395,1396,5,3,0,0,1396,1617,1,0,0,0,1397,1398,5,2,0,0,1398,1401,3,84,42, -0,1399,1400,5,4,0,0,1400,1402,3,84,42,0,1401,1399,1,0,0,0,1402,1403,1,0, -0,0,1403,1401,1,0,0,0,1403,1404,1,0,0,0,1404,1405,1,0,0,0,1405,1406,5,3, -0,0,1406,1617,1,0,0,0,1407,1408,5,166,0,0,1408,1409,5,2,0,0,1409,1414,3, -84,42,0,1410,1411,5,4,0,0,1411,1413,3,84,42,0,1412,1410,1,0,0,0,1413,1416, -1,0,0,0,1414,1412,1,0,0,0,1414,1415,1,0,0,0,1415,1417,1,0,0,0,1416,1414, -1,0,0,0,1417,1418,5,3,0,0,1418,1617,1,0,0,0,1419,1420,3,142,71,0,1420,1421, -5,2,0,0,1421,1422,5,229,0,0,1422,1424,5,3,0,0,1423,1425,3,122,61,0,1424, -1423,1,0,0,0,1424,1425,1,0,0,0,1425,1427,1,0,0,0,1426,1428,3,124,62,0,1427, -1426,1,0,0,0,1427,1428,1,0,0,0,1428,1617,1,0,0,0,1429,1430,3,142,71,0,1430, -1442,5,2,0,0,1431,1433,3,64,32,0,1432,1431,1,0,0,0,1432,1433,1,0,0,0,1433, -1434,1,0,0,0,1434,1439,3,84,42,0,1435,1436,5,4,0,0,1436,1438,3,84,42,0,1437, -1435,1,0,0,0,1438,1441,1,0,0,0,1439,1437,1,0,0,0,1439,1440,1,0,0,0,1440, -1443,1,0,0,0,1441,1439,1,0,0,0,1442,1432,1,0,0,0,1442,1443,1,0,0,0,1443, -1454,1,0,0,0,1444,1445,5,136,0,0,1445,1446,5,23,0,0,1446,1451,3,52,26,0, -1447,1448,5,4,0,0,1448,1450,3,52,26,0,1449,1447,1,0,0,0,1450,1453,1,0,0, -0,1451,1449,1,0,0,0,1451,1452,1,0,0,0,1452,1455,1,0,0,0,1453,1451,1,0,0, -0,1454,1444,1,0,0,0,1454,1455,1,0,0,0,1455,1456,1,0,0,0,1456,1458,5,3,0, -0,1457,1459,3,122,61,0,1458,1457,1,0,0,0,1458,1459,1,0,0,0,1459,1464,1,0, -0,0,1460,1462,3,96,48,0,1461,1460,1,0,0,0,1461,1462,1,0,0,0,1462,1463,1, -0,0,0,1463,1465,3,124,62,0,1464,1461,1,0,0,0,1464,1465,1,0,0,0,1465,1617, -1,0,0,0,1466,1467,3,152,76,0,1467,1468,5,6,0,0,1468,1469,3,84,42,0,1469, -1617,1,0,0,0,1470,1479,5,2,0,0,1471,1476,3,152,76,0,1472,1473,5,4,0,0,1473, -1475,3,152,76,0,1474,1472,1,0,0,0,1475,1478,1,0,0,0,1476,1474,1,0,0,0,1476, -1477,1,0,0,0,1477,1480,1,0,0,0,1478,1476,1,0,0,0,1479,1471,1,0,0,0,1479, -1480,1,0,0,0,1480,1481,1,0,0,0,1481,1482,5,3,0,0,1482,1483,5,6,0,0,1483, -1617,3,84,42,0,1484,1485,5,2,0,0,1485,1486,3,8,4,0,1486,1487,5,3,0,0,1487, -1617,1,0,0,0,1488,1489,5,63,0,0,1489,1490,5,2,0,0,1490,1491,3,8,4,0,1491, -1492,5,3,0,0,1492,1617,1,0,0,0,1493,1494,5,27,0,0,1494,1496,3,90,45,0,1495, -1497,3,120,60,0,1496,1495,1,0,0,0,1497,1498,1,0,0,0,1498,1496,1,0,0,0,1498, -1499,1,0,0,0,1499,1502,1,0,0,0,1500,1501,5,57,0,0,1501,1503,3,84,42,0,1502, -1500,1,0,0,0,1502,1503,1,0,0,0,1503,1504,1,0,0,0,1504,1505,5,58,0,0,1505, -1617,1,0,0,0,1506,1508,5,27,0,0,1507,1509,3,120,60,0,1508,1507,1,0,0,0,1509, -1510,1,0,0,0,1510,1508,1,0,0,0,1510,1511,1,0,0,0,1511,1514,1,0,0,0,1512, -1513,5,57,0,0,1513,1515,3,84,42,0,1514,1512,1,0,0,0,1514,1515,1,0,0,0,1515, -1516,1,0,0,0,1516,1517,5,58,0,0,1517,1617,1,0,0,0,1518,1519,5,28,0,0,1519, -1520,5,2,0,0,1520,1521,3,84,42,0,1521,1522,5,18,0,0,1522,1523,3,114,57,0, -1523,1524,5,3,0,0,1524,1617,1,0,0,0,1525,1526,5,198,0,0,1526,1527,5,2,0, -0,1527,1528,3,84,42,0,1528,1529,5,18,0,0,1529,1530,3,114,57,0,1530,1531, -5,3,0,0,1531,1617,1,0,0,0,1532,1533,5,17,0,0,1533,1542,5,7,0,0,1534,1539, -3,84,42,0,1535,1536,5,4,0,0,1536,1538,3,84,42,0,1537,1535,1,0,0,0,1538,1541, -1,0,0,0,1539,1537,1,0,0,0,1539,1540,1,0,0,0,1540,1543,1,0,0,0,1541,1539, -1,0,0,0,1542,1534,1,0,0,0,1542,1543,1,0,0,0,1543,1544,1,0,0,0,1544,1617, -5,8,0,0,1545,1617,3,152,76,0,1546,1617,5,40,0,0,1547,1551,5,42,0,0,1548, -1549,5,2,0,0,1549,1550,5,236,0,0,1550,1552,5,3,0,0,1551,1548,1,0,0,0,1551, -1552,1,0,0,0,1552,1617,1,0,0,0,1553,1557,5,43,0,0,1554,1555,5,2,0,0,1555, -1556,5,236,0,0,1556,1558,5,3,0,0,1557,1554,1,0,0,0,1557,1558,1,0,0,0,1558, -1617,1,0,0,0,1559,1563,5,110,0,0,1560,1561,5,2,0,0,1561,1562,5,236,0,0,1562, -1564,5,3,0,0,1563,1560,1,0,0,0,1563,1564,1,0,0,0,1564,1617,1,0,0,0,1565, -1569,5,111,0,0,1566,1567,5,2,0,0,1567,1568,5,236,0,0,1568,1570,5,3,0,0,1569, -1566,1,0,0,0,1569,1570,1,0,0,0,1570,1617,1,0,0,0,1571,1617,5,44,0,0,1572, -1573,5,182,0,0,1573,1574,5,2,0,0,1574,1575,3,90,45,0,1575,1576,5,74,0,0, -1576,1579,3,90,45,0,1577,1578,5,72,0,0,1578,1580,3,90,45,0,1579,1577,1,0, -0,0,1579,1580,1,0,0,0,1580,1581,1,0,0,0,1581,1582,5,3,0,0,1582,1617,1,0, -0,0,1583,1584,5,125,0,0,1584,1585,5,2,0,0,1585,1588,3,90,45,0,1586,1587, -5,4,0,0,1587,1589,3,110,55,0,1588,1586,1,0,0,0,1588,1589,1,0,0,0,1589,1590, -1,0,0,0,1590,1591,5,3,0,0,1591,1617,1,0,0,0,1592,1593,5,65,0,0,1593,1594, -5,2,0,0,1594,1595,3,152,76,0,1595,1596,5,74,0,0,1596,1597,3,90,45,0,1597, -1598,5,3,0,0,1598,1617,1,0,0,0,1599,1600,5,2,0,0,1600,1601,3,84,42,0,1601, -1602,5,3,0,0,1602,1617,1,0,0,0,1603,1604,5,83,0,0,1604,1613,5,2,0,0,1605, -1610,3,142,71,0,1606,1607,5,4,0,0,1607,1609,3,142,71,0,1608,1606,1,0,0,0, -1609,1612,1,0,0,0,1610,1608,1,0,0,0,1610,1611,1,0,0,0,1611,1614,1,0,0,0, -1612,1610,1,0,0,0,1613,1605,1,0,0,0,1613,1614,1,0,0,0,1614,1615,1,0,0,0, -1615,1617,5,3,0,0,1616,1377,1,0,0,0,1616,1379,1,0,0,0,1616,1380,1,0,0,0, -1616,1383,1,0,0,0,1616,1385,1,0,0,0,1616,1386,1,0,0,0,1616,1387,1,0,0,0, -1616,1388,1,0,0,0,1616,1389,1,0,0,0,1616,1390,1,0,0,0,1616,1397,1,0,0,0, -1616,1407,1,0,0,0,1616,1419,1,0,0,0,1616,1429,1,0,0,0,1616,1466,1,0,0,0, -1616,1470,1,0,0,0,1616,1484,1,0,0,0,1616,1488,1,0,0,0,1616,1493,1,0,0,0, -1616,1506,1,0,0,0,1616,1518,1,0,0,0,1616,1525,1,0,0,0,1616,1532,1,0,0,0, -1616,1545,1,0,0,0,1616,1546,1,0,0,0,1616,1547,1,0,0,0,1616,1553,1,0,0,0, -1616,1559,1,0,0,0,1616,1565,1,0,0,0,1616,1571,1,0,0,0,1616,1572,1,0,0,0, -1616,1583,1,0,0,0,1616,1592,1,0,0,0,1616,1599,1,0,0,0,1616,1603,1,0,0,0, -1617,1628,1,0,0,0,1618,1619,10,14,0,0,1619,1620,5,7,0,0,1620,1621,3,90,45, -0,1621,1622,5,8,0,0,1622,1627,1,0,0,0,1623,1624,10,12,0,0,1624,1625,5,1, -0,0,1625,1627,3,152,76,0,1626,1618,1,0,0,0,1626,1623,1,0,0,0,1627,1630,1, -0,0,0,1628,1626,1,0,0,0,1628,1629,1,0,0,0,1629,93,1,0,0,0,1630,1628,1,0, -0,0,1631,1638,5,233,0,0,1632,1635,5,234,0,0,1633,1634,5,200,0,0,1634,1636, -5,233,0,0,1635,1633,1,0,0,0,1635,1636,1,0,0,0,1636,1638,1,0,0,0,1637,1631, -1,0,0,0,1637,1632,1,0,0,0,1638,95,1,0,0,0,1639,1640,5,88,0,0,1640,1644,5, -129,0,0,1641,1642,5,156,0,0,1642,1644,5,129,0,0,1643,1639,1,0,0,0,1643,1641, -1,0,0,0,1644,97,1,0,0,0,1645,1646,5,192,0,0,1646,1647,5,220,0,0,1647,1652, -3,106,53,0,1648,1649,5,192,0,0,1649,1650,5,220,0,0,1650,1652,3,94,47,0,1651, -1645,1,0,0,0,1651,1648,1,0,0,0,1652,99,1,0,0,0,1653,1654,7,13,0,0,1654,101, -1,0,0,0,1655,1656,7,14,0,0,1656,103,1,0,0,0,1657,1658,7,15,0,0,1658,105, -1,0,0,0,1659,1661,5,95,0,0,1660,1662,7,11,0,0,1661,1660,1,0,0,0,1661,1662, -1,0,0,0,1662,1663,1,0,0,0,1663,1664,3,94,47,0,1664,1667,3,108,54,0,1665, -1666,5,194,0,0,1666,1668,3,108,54,0,1667,1665,1,0,0,0,1667,1668,1,0,0,0, -1668,107,1,0,0,0,1669,1670,7,16,0,0,1670,109,1,0,0,0,1671,1672,7,17,0,0, -1672,111,1,0,0,0,1673,1682,5,2,0,0,1674,1679,3,114,57,0,1675,1676,5,4,0, -0,1676,1678,3,114,57,0,1677,1675,1,0,0,0,1678,1681,1,0,0,0,1679,1677,1,0, -0,0,1679,1680,1,0,0,0,1680,1683,1,0,0,0,1681,1679,1,0,0,0,1682,1674,1,0, -0,0,1682,1683,1,0,0,0,1683,1684,1,0,0,0,1684,1685,5,3,0,0,1685,113,1,0,0, -0,1686,1687,6,57,-1,0,1687,1688,5,17,0,0,1688,1689,5,223,0,0,1689,1690,3, -114,57,0,1690,1691,5,225,0,0,1691,1734,1,0,0,0,1692,1693,5,113,0,0,1693, -1694,5,223,0,0,1694,1695,3,114,57,0,1695,1696,5,4,0,0,1696,1697,3,114,57, -0,1697,1698,5,225,0,0,1698,1734,1,0,0,0,1699,1700,5,166,0,0,1700,1701,5, -2,0,0,1701,1702,3,152,76,0,1702,1709,3,114,57,0,1703,1704,5,4,0,0,1704,1705, -3,152,76,0,1705,1706,3,114,57,0,1706,1708,1,0,0,0,1707,1703,1,0,0,0,1708, -1711,1,0,0,0,1709,1707,1,0,0,0,1709,1710,1,0,0,0,1710,1712,1,0,0,0,1711, -1709,1,0,0,0,1712,1713,5,3,0,0,1713,1734,1,0,0,0,1714,1726,3,118,59,0,1715, -1716,5,2,0,0,1716,1721,3,116,58,0,1717,1718,5,4,0,0,1718,1720,3,116,58,0, -1719,1717,1,0,0,0,1720,1723,1,0,0,0,1721,1719,1,0,0,0,1721,1722,1,0,0,0, -1722,1724,1,0,0,0,1723,1721,1,0,0,0,1724,1725,5,3,0,0,1725,1727,1,0,0,0, -1726,1715,1,0,0,0,1726,1727,1,0,0,0,1727,1734,1,0,0,0,1728,1729,5,95,0,0, -1729,1730,3,108,54,0,1730,1731,5,194,0,0,1731,1732,3,108,54,0,1732,1734, -1,0,0,0,1733,1686,1,0,0,0,1733,1692,1,0,0,0,1733,1699,1,0,0,0,1733,1714, -1,0,0,0,1733,1728,1,0,0,0,1734,1739,1,0,0,0,1735,1736,10,6,0,0,1736,1738, -5,17,0,0,1737,1735,1,0,0,0,1738,1741,1,0,0,0,1739,1737,1,0,0,0,1739,1740, -1,0,0,0,1740,115,1,0,0,0,1741,1739,1,0,0,0,1742,1745,5,236,0,0,1743,1745, -3,114,57,0,1744,1742,1,0,0,0,1744,1743,1,0,0,0,1745,117,1,0,0,0,1746,1751, -5,243,0,0,1747,1751,5,244,0,0,1748,1751,5,245,0,0,1749,1751,3,142,71,0,1750, -1746,1,0,0,0,1750,1747,1,0,0,0,1750,1748,1,0,0,0,1750,1749,1,0,0,0,1751, -119,1,0,0,0,1752,1753,5,214,0,0,1753,1754,3,84,42,0,1754,1755,5,191,0,0, -1755,1756,3,84,42,0,1756,121,1,0,0,0,1757,1758,5,69,0,0,1758,1759,5,2,0, -0,1759,1760,5,215,0,0,1760,1761,3,86,43,0,1761,1762,5,3,0,0,1762,123,1,0, -0,0,1763,1764,5,140,0,0,1764,1775,5,2,0,0,1765,1766,5,141,0,0,1766,1767, -5,23,0,0,1767,1772,3,84,42,0,1768,1769,5,4,0,0,1769,1771,3,84,42,0,1770, -1768,1,0,0,0,1771,1774,1,0,0,0,1772,1770,1,0,0,0,1772,1773,1,0,0,0,1773, -1776,1,0,0,0,1774,1772,1,0,0,0,1775,1765,1,0,0,0,1775,1776,1,0,0,0,1776, -1787,1,0,0,0,1777,1778,5,136,0,0,1778,1779,5,23,0,0,1779,1784,3,52,26,0, -1780,1781,5,4,0,0,1781,1783,3,52,26,0,1782,1780,1,0,0,0,1783,1786,1,0,0, -0,1784,1782,1,0,0,0,1784,1785,1,0,0,0,1785,1788,1,0,0,0,1786,1784,1,0,0, -0,1787,1777,1,0,0,0,1787,1788,1,0,0,0,1788,1790,1,0,0,0,1789,1791,3,126, -63,0,1790,1789,1,0,0,0,1790,1791,1,0,0,0,1791,1792,1,0,0,0,1792,1793,5,3, -0,0,1793,125,1,0,0,0,1794,1795,5,148,0,0,1795,1819,3,128,64,0,1796,1797, -5,167,0,0,1797,1819,3,128,64,0,1798,1799,5,84,0,0,1799,1819,3,128,64,0,1800, -1801,5,148,0,0,1801,1802,5,22,0,0,1802,1803,3,128,64,0,1803,1804,5,15,0, -0,1804,1805,3,128,64,0,1805,1819,1,0,0,0,1806,1807,5,167,0,0,1807,1808,5, -22,0,0,1808,1809,3,128,64,0,1809,1810,5,15,0,0,1810,1811,3,128,64,0,1811, -1819,1,0,0,0,1812,1813,5,84,0,0,1813,1814,5,22,0,0,1814,1815,3,128,64,0, -1815,1816,5,15,0,0,1816,1817,3,128,64,0,1817,1819,1,0,0,0,1818,1794,1,0, -0,0,1818,1796,1,0,0,0,1818,1798,1,0,0,0,1818,1800,1,0,0,0,1818,1806,1,0, -0,0,1818,1812,1,0,0,0,1819,127,1,0,0,0,1820,1821,5,201,0,0,1821,1830,5,144, -0,0,1822,1823,5,201,0,0,1823,1830,5,71,0,0,1824,1825,5,39,0,0,1825,1830, -5,166,0,0,1826,1827,3,84,42,0,1827,1828,7,18,0,0,1828,1830,1,0,0,0,1829, -1820,1,0,0,0,1829,1822,1,0,0,0,1829,1824,1,0,0,0,1829,1826,1,0,0,0,1830, -129,1,0,0,0,1831,1832,3,152,76,0,1832,1833,5,221,0,0,1833,1834,3,84,42,0, -1834,131,1,0,0,0,1835,1836,5,73,0,0,1836,1840,7,19,0,0,1837,1838,5,199,0, -0,1838,1840,7,20,0,0,1839,1835,1,0,0,0,1839,1837,1,0,0,0,1840,133,1,0,0, -0,1841,1842,5,100,0,0,1842,1843,5,107,0,0,1843,1847,3,136,68,0,1844,1845, -5,149,0,0,1845,1847,7,21,0,0,1846,1841,1,0,0,0,1846,1844,1,0,0,0,1847,135, -1,0,0,0,1848,1849,5,149,0,0,1849,1856,5,202,0,0,1850,1851,5,149,0,0,1851, -1856,5,34,0,0,1852,1853,5,153,0,0,1853,1856,5,149,0,0,1854,1856,5,173,0, -0,1855,1848,1,0,0,0,1855,1850,1,0,0,0,1855,1852,1,0,0,0,1855,1854,1,0,0, -0,1856,137,1,0,0,0,1857,1863,3,84,42,0,1858,1859,3,152,76,0,1859,1860,5, -9,0,0,1860,1861,3,84,42,0,1861,1863,1,0,0,0,1862,1857,1,0,0,0,1862,1858, -1,0,0,0,1863,139,1,0,0,0,1864,1869,5,172,0,0,1865,1869,5,50,0,0,1866,1869, -5,93,0,0,1867,1869,3,152,76,0,1868,1864,1,0,0,0,1868,1865,1,0,0,0,1868,1866, -1,0,0,0,1868,1867,1,0,0,0,1869,141,1,0,0,0,1870,1875,3,152,76,0,1871,1872, -5,1,0,0,1872,1874,3,152,76,0,1873,1871,1,0,0,0,1874,1877,1,0,0,0,1875,1873, -1,0,0,0,1875,1876,1,0,0,0,1876,143,1,0,0,0,1877,1875,1,0,0,0,1878,1879,5, -72,0,0,1879,1880,7,22,0,0,1880,1881,5,18,0,0,1881,1882,5,130,0,0,1882,1883, -3,90,45,0,1883,145,1,0,0,0,1884,1888,5,44,0,0,1885,1888,5,41,0,0,1886,1888, -3,148,74,0,1887,1884,1,0,0,0,1887,1885,1,0,0,0,1887,1886,1,0,0,0,1888,147, -1,0,0,0,1889,1890,5,207,0,0,1890,1895,3,152,76,0,1891,1892,5,162,0,0,1892, -1895,3,152,76,0,1893,1895,3,152,76,0,1894,1889,1,0,0,0,1894,1891,1,0,0,0, -1894,1893,1,0,0,0,1895,149,1,0,0,0,1896,1901,3,152,76,0,1897,1898,5,4,0, -0,1898,1900,3,152,76,0,1899,1897,1,0,0,0,1900,1903,1,0,0,0,1901,1899,1,0, -0,0,1901,1902,1,0,0,0,1902,151,1,0,0,0,1903,1901,1,0,0,0,1904,1910,5,239, -0,0,1905,1910,5,241,0,0,1906,1910,3,156,78,0,1907,1910,5,242,0,0,1908,1910, -5,240,0,0,1909,1904,1,0,0,0,1909,1905,1,0,0,0,1909,1906,1,0,0,0,1909,1907, -1,0,0,0,1909,1908,1,0,0,0,1910,153,1,0,0,0,1911,1915,5,237,0,0,1912,1915, -5,238,0,0,1913,1915,5,236,0,0,1914,1911,1,0,0,0,1914,1912,1,0,0,0,1914,1913, -1,0,0,0,1915,155,1,0,0,0,1916,1917,7,23,0,0,1917,157,1,0,0,0,245,180,185, -191,195,209,213,217,221,229,233,236,243,252,258,262,268,275,284,293,304, -311,321,328,336,344,352,364,370,375,381,390,399,404,408,416,423,436,439, -449,452,459,468,474,479,483,493,496,506,519,525,530,536,545,551,558,566, -571,575,583,589,596,601,605,615,618,622,625,633,638,659,665,671,673,679, -685,687,695,697,716,721,728,740,742,750,752,770,773,777,781,799,802,818, -823,825,828,834,841,846,852,856,860,866,874,889,896,901,908,916,920,925, -936,948,951,956,958,967,969,977,983,986,988,1000,1007,1011,1015,1019,1026, -1035,1038,1042,1047,1051,1054,1061,1072,1075,1085,1088,1099,1104,1112,1115, -1119,1123,1134,1137,1144,1163,1167,1171,1175,1179,1183,1185,1196,1201,1210, -1216,1220,1222,1230,1237,1250,1256,1267,1274,1278,1286,1288,1301,1309,1318, -1324,1332,1338,1342,1347,1352,1358,1372,1374,1403,1414,1424,1427,1432,1439, -1442,1451,1454,1458,1461,1464,1476,1479,1498,1502,1510,1514,1539,1542,1551, -1557,1563,1569,1579,1588,1610,1613,1616,1626,1628,1635,1637,1643,1651,1661, -1667,1679,1682,1709,1721,1726,1733,1739,1744,1750,1772,1775,1784,1787,1790, -1818,1829,1839,1846,1855,1862,1868,1875,1887,1894,1901,1909,1914]; +1,46,1,46,1,46,1,46,1,46,4,46,1546,8,46,11,46,12,46,1547,1,46,1,46,1,46, +1,46,1,46,1,46,1,46,5,46,1557,8,46,10,46,12,46,1560,9,46,1,46,1,46,1,46, +1,46,1,46,1,46,1,46,3,46,1569,8,46,1,46,3,46,1572,8,46,1,46,1,46,1,46,3, +46,1577,8,46,1,46,1,46,1,46,5,46,1582,8,46,10,46,12,46,1585,9,46,3,46,1587, +8,46,1,46,1,46,1,46,1,46,1,46,5,46,1594,8,46,10,46,12,46,1597,9,46,3,46, +1599,8,46,1,46,1,46,3,46,1603,8,46,1,46,3,46,1606,8,46,1,46,3,46,1609,8, +46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,5,46,1619,8,46,10,46,12,46,1622, +9,46,3,46,1624,8,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1, +46,1,46,1,46,1,46,1,46,4,46,1641,8,46,11,46,12,46,1642,1,46,1,46,3,46,1647, +8,46,1,46,1,46,1,46,1,46,4,46,1653,8,46,11,46,12,46,1654,1,46,1,46,3,46, +1659,8,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1, +46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,5,46,1682,8,46,10,46,12,46,1685, +9,46,3,46,1687,8,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,3,46,1696,8,46,1, +46,1,46,1,46,1,46,3,46,1702,8,46,1,46,1,46,1,46,1,46,3,46,1708,8,46,1,46, +1,46,1,46,1,46,3,46,1714,8,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,3, +46,1724,8,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,3,46,1733,8,46,1,46,1,46, +1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1, +46,1,46,5,46,1753,8,46,10,46,12,46,1756,9,46,3,46,1758,8,46,1,46,3,46,1761, +8,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,5,46,1771,8,46,10,46,12,46, +1774,9,46,1,47,1,47,1,47,1,47,3,47,1780,8,47,3,47,1782,8,47,1,48,1,48,1, +48,1,48,3,48,1788,8,48,1,49,1,49,1,49,1,49,1,49,1,49,3,49,1796,8,49,1,50, +1,50,1,51,1,51,1,52,1,52,1,53,1,53,3,53,1806,8,53,1,53,1,53,1,53,1,53,3, +53,1812,8,53,1,54,1,54,1,55,1,55,1,56,1,56,1,56,1,56,5,56,1822,8,56,10,56, +12,56,1825,9,56,3,56,1827,8,56,1,56,1,56,1,57,1,57,1,57,1,57,1,57,1,57,1, +57,1,57,1,57,1,57,1,57,1,57,1,57,1,57,1,57,1,57,1,57,1,57,1,57,1,57,1,57, +5,57,1852,8,57,10,57,12,57,1855,9,57,1,57,1,57,1,57,1,57,1,57,1,57,1,57, +5,57,1864,8,57,10,57,12,57,1867,9,57,1,57,1,57,3,57,1871,8,57,1,57,1,57, +1,57,1,57,1,57,3,57,1878,8,57,1,57,1,57,5,57,1882,8,57,10,57,12,57,1885, +9,57,1,58,1,58,1,58,1,58,1,58,5,58,1892,8,58,10,58,12,58,1895,9,58,3,58, +1897,8,58,1,58,1,58,1,58,1,58,5,58,1903,8,58,10,58,12,58,1906,9,58,3,58, +1908,8,58,1,58,1,58,1,59,1,59,1,59,3,59,1915,8,59,1,59,1,59,1,59,3,59,1920, +8,59,1,60,1,60,1,60,1,60,1,60,1,60,1,60,5,60,1929,8,60,10,60,12,60,1932, +9,60,3,60,1934,8,60,1,60,1,60,3,60,1938,8,60,3,60,1940,8,60,1,60,1,60,1, +60,1,60,1,60,1,60,3,60,1948,8,60,1,60,1,60,1,60,1,60,1,60,1,60,5,60,1956, +8,60,10,60,12,60,1959,9,60,1,60,1,60,1,60,3,60,1964,8,60,3,60,1966,8,60, +1,61,1,61,1,61,1,61,1,61,3,61,1973,8,61,1,61,1,61,3,61,1977,8,61,3,61,1979, +8,61,1,61,1,61,1,61,1,61,1,61,3,61,1986,8,61,1,61,1,61,3,61,1990,8,61,3, +61,1992,8,61,3,61,1994,8,61,1,62,1,62,1,62,1,62,1,62,5,62,2001,8,62,10,62, +12,62,2004,9,62,1,62,1,62,1,62,1,62,1,62,1,62,1,62,1,62,3,62,2014,8,62,1, +63,1,63,3,63,2018,8,63,1,64,1,64,1,64,1,64,1,64,1,64,5,64,2026,8,64,10,64, +12,64,2029,9,64,1,64,1,64,1,65,1,65,3,65,2035,8,65,1,66,1,66,1,66,1,66,3, +66,2041,8,66,1,67,1,67,1,67,1,67,1,67,1,68,1,68,1,68,1,68,1,68,1,68,1,69, +1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,5,69,2067,8, +69,10,69,12,69,2070,9,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,5, +69,2081,8,69,10,69,12,69,2084,9,69,1,69,1,69,3,69,2088,8,69,1,69,1,69,1, +69,1,69,1,69,5,69,2095,8,69,10,69,12,69,2098,9,69,1,69,1,69,3,69,2102,8, +69,1,70,1,70,1,70,1,70,1,70,1,70,1,70,5,70,2111,8,70,10,70,12,70,2114,9, +70,3,70,2116,8,70,1,70,1,70,1,70,1,70,1,70,5,70,2123,8,70,10,70,12,70,2126, +9,70,3,70,2128,8,70,1,70,3,70,2131,8,70,1,70,1,70,1,71,1,71,1,71,1,71,1, +71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71, +1,71,1,71,1,71,1,71,1,71,3,71,2159,8,71,1,72,1,72,1,72,1,72,1,72,1,72,1, +72,1,72,1,72,3,72,2170,8,72,1,73,1,73,1,73,1,73,1,74,1,74,1,74,1,74,3,74, +2180,8,74,1,75,1,75,1,75,1,75,1,75,3,75,2187,8,75,1,76,1,76,1,76,1,76,1, +76,1,76,1,76,3,76,2196,8,76,1,77,1,77,1,77,1,77,1,77,3,77,2203,8,77,1,78, +1,78,1,78,1,78,3,78,2209,8,78,1,79,1,79,1,79,5,79,2214,8,79,10,79,12,79, +2217,9,79,1,80,1,80,1,80,1,80,1,80,1,81,1,81,1,81,3,81,2227,8,81,1,82,1, +82,1,82,3,82,2232,8,82,1,83,1,83,1,83,1,83,1,83,3,83,2239,8,83,1,84,1,84, +1,84,5,84,2244,8,84,10,84,12,84,2247,9,84,1,85,1,85,1,85,1,85,1,85,3,85, +2254,8,85,1,86,1,86,1,86,3,86,2259,8,86,1,87,1,87,3,87,2263,8,87,1,88,1, +88,1,88,1,88,1,89,1,89,1,89,3,89,2272,8,89,1,90,1,90,1,90,3,90,2277,8,90, +1,91,5,91,2280,8,91,10,91,12,91,2283,9,91,1,92,1,92,1,92,3,92,2288,8,92, +1,93,1,93,1,93,3,93,2293,8,93,1,94,1,94,1,95,1,95,1,95,3,95,2300,8,95,1, +96,1,96,1,96,0,6,48,68,86,90,92,114,97,0,2,4,6,8,10,12,14,16,18,20,22,24, +26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72, +74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116, +118,120,122,124,126,128,130,132,134,136,138,140,142,144,146,148,150,152, +154,156,158,160,162,164,166,168,170,172,174,176,178,180,182,184,186,188, +190,192,0,25,2,0,27,27,171,171,2,0,51,51,104,104,2,0,81,81,96,96,2,0,68, +68,97,97,1,0,180,181,2,0,12,12,251,251,2,0,67,67,217,217,2,0,19,19,53,53, +2,0,77,77,113,113,2,0,12,12,58,58,2,0,22,22,197,197,1,0,242,243,1,0,244, +246,1,0,236,241,3,0,12,12,16,16,192,192,2,0,74,74,210,210,5,0,49,49,93,93, +126,127,184,184,234,234,1,0,130,133,2,0,78,78,155,155,3,0,88,88,108,108, +204,204,4,0,59,59,105,105,121,121,224,224,2,0,144,144,233,233,3,0,198,199, +207,207,227,227,2,0,57,57,63,63,52,0,10,12,14,14,16,17,19,22,25,27,30,35, +38,38,41,41,43,43,47,49,51,51,53,53,55,57,59,59,62,63,65,65,68,68,71,71, +73,73,75,78,80,80,83,88,91,91,93,95,97,97,99,99,102,102,104,105,107,108, +110,114,116,116,118,118,121,128,130,135,139,142,144,145,148,148,150,155, +157,162,164,174,176,178,180,185,187,199,201,204,206,209,211,213,215,216, +218,218,220,222,224,224,226,228,232,235,2651,0,194,1,0,0,0,2,197,1,0,0,0, +4,200,1,0,0,0,6,963,1,0,0,0,8,966,1,0,0,0,10,970,1,0,0,0,12,985,1,0,0,0, +14,987,1,0,0,0,16,1001,1,0,0,0,18,1007,1,0,0,0,20,1018,1,0,0,0,22,1022,1, +0,0,0,24,1028,1,0,0,0,26,1035,1,0,0,0,28,1040,1,0,0,0,30,1043,1,0,0,0,32, +1047,1,0,0,0,34,1049,1,0,0,0,36,1052,1,0,0,0,38,1059,1,0,0,0,40,1064,1,0, +0,0,42,1075,1,0,0,0,44,1077,1,0,0,0,46,1079,1,0,0,0,48,1110,1,0,0,0,50,1146, +1,0,0,0,52,1148,1,0,0,0,54,1156,1,0,0,0,56,1193,1,0,0,0,58,1243,1,0,0,0, +60,1258,1,0,0,0,62,1260,1,0,0,0,64,1269,1,0,0,0,66,1283,1,0,0,0,68,1285, +1,0,0,0,70,1324,1,0,0,0,72,1340,1,0,0,0,74,1342,1,0,0,0,76,1351,1,0,0,0, +78,1353,1,0,0,0,80,1363,1,0,0,0,82,1411,1,0,0,0,84,1413,1,0,0,0,86,1422, +1,0,0,0,88,1496,1,0,0,0,90,1502,1,0,0,0,92,1760,1,0,0,0,94,1781,1,0,0,0, +96,1787,1,0,0,0,98,1795,1,0,0,0,100,1797,1,0,0,0,102,1799,1,0,0,0,104,1801, +1,0,0,0,106,1803,1,0,0,0,108,1813,1,0,0,0,110,1815,1,0,0,0,112,1817,1,0, +0,0,114,1877,1,0,0,0,116,1886,1,0,0,0,118,1914,1,0,0,0,120,1921,1,0,0,0, +122,1993,1,0,0,0,124,2013,1,0,0,0,126,2015,1,0,0,0,128,2019,1,0,0,0,130, +2034,1,0,0,0,132,2040,1,0,0,0,134,2042,1,0,0,0,136,2047,1,0,0,0,138,2101, +1,0,0,0,140,2103,1,0,0,0,142,2158,1,0,0,0,144,2169,1,0,0,0,146,2171,1,0, +0,0,148,2179,1,0,0,0,150,2186,1,0,0,0,152,2195,1,0,0,0,154,2202,1,0,0,0, +156,2208,1,0,0,0,158,2210,1,0,0,0,160,2218,1,0,0,0,162,2226,1,0,0,0,164, +2231,1,0,0,0,166,2238,1,0,0,0,168,2240,1,0,0,0,170,2253,1,0,0,0,172,2258, +1,0,0,0,174,2262,1,0,0,0,176,2264,1,0,0,0,178,2268,1,0,0,0,180,2276,1,0, +0,0,182,2281,1,0,0,0,184,2287,1,0,0,0,186,2292,1,0,0,0,188,2294,1,0,0,0, +190,2299,1,0,0,0,192,2301,1,0,0,0,194,195,3,6,3,0,195,196,5,0,0,1,196,1, +1,0,0,0,197,198,3,84,42,0,198,199,5,0,0,1,199,3,1,0,0,0,200,201,3,32,16, +0,201,202,5,0,0,1,202,5,1,0,0,0,203,964,3,8,4,0,204,205,5,221,0,0,205,964, +3,170,85,0,206,207,5,221,0,0,207,208,3,170,85,0,208,209,5,1,0,0,209,210, +3,170,85,0,210,964,1,0,0,0,211,212,5,37,0,0,212,216,5,182,0,0,213,214,5, +94,0,0,214,215,5,137,0,0,215,217,5,70,0,0,216,213,1,0,0,0,216,217,1,0,0, +0,217,218,1,0,0,0,218,221,3,158,79,0,219,220,5,231,0,0,220,222,3,18,9,0, +221,219,1,0,0,0,221,222,1,0,0,0,222,964,1,0,0,0,223,224,5,60,0,0,224,227, +5,182,0,0,225,226,5,94,0,0,226,228,5,70,0,0,227,225,1,0,0,0,227,228,1,0, +0,0,228,229,1,0,0,0,229,231,3,158,79,0,230,232,7,0,0,0,231,230,1,0,0,0,231, +232,1,0,0,0,232,964,1,0,0,0,233,234,5,13,0,0,234,235,5,182,0,0,235,236,3, +158,79,0,236,237,5,166,0,0,237,238,5,208,0,0,238,239,3,170,85,0,239,964, +1,0,0,0,240,241,5,37,0,0,241,245,5,200,0,0,242,243,5,94,0,0,243,244,5,137, +0,0,244,246,5,70,0,0,245,242,1,0,0,0,245,246,1,0,0,0,246,247,1,0,0,0,247, +249,3,158,79,0,248,250,3,80,40,0,249,248,1,0,0,0,249,250,1,0,0,0,250,253, +1,0,0,0,251,252,5,33,0,0,252,254,3,94,47,0,253,251,1,0,0,0,253,254,1,0,0, +0,254,257,1,0,0,0,255,256,5,231,0,0,256,258,3,18,9,0,257,255,1,0,0,0,257, +258,1,0,0,0,258,259,1,0,0,0,259,265,5,18,0,0,260,266,3,8,4,0,261,262,5,2, +0,0,262,263,3,8,4,0,263,264,5,3,0,0,264,266,1,0,0,0,265,260,1,0,0,0,265, +261,1,0,0,0,266,272,1,0,0,0,267,269,5,231,0,0,268,270,5,134,0,0,269,268, +1,0,0,0,269,270,1,0,0,0,270,271,1,0,0,0,271,273,5,47,0,0,272,267,1,0,0,0, +272,273,1,0,0,0,273,964,1,0,0,0,274,275,5,37,0,0,275,279,5,200,0,0,276,277, +5,94,0,0,277,278,5,137,0,0,278,280,5,70,0,0,279,276,1,0,0,0,279,280,1,0, +0,0,280,281,1,0,0,0,281,282,3,158,79,0,282,283,5,2,0,0,283,288,3,12,6,0, +284,285,5,4,0,0,285,287,3,12,6,0,286,284,1,0,0,0,287,290,1,0,0,0,288,286, +1,0,0,0,288,289,1,0,0,0,289,291,1,0,0,0,290,288,1,0,0,0,291,294,5,3,0,0, +292,293,5,33,0,0,293,295,3,94,47,0,294,292,1,0,0,0,294,295,1,0,0,0,295,298, +1,0,0,0,296,297,5,231,0,0,297,299,3,18,9,0,298,296,1,0,0,0,298,299,1,0,0, +0,299,964,1,0,0,0,300,301,5,60,0,0,301,304,5,200,0,0,302,303,5,94,0,0,303, +305,5,70,0,0,304,302,1,0,0,0,304,305,1,0,0,0,305,306,1,0,0,0,306,964,3,158, +79,0,307,308,5,100,0,0,308,309,5,103,0,0,309,311,3,158,79,0,310,312,3,80, +40,0,311,310,1,0,0,0,311,312,1,0,0,0,312,313,1,0,0,0,313,314,3,8,4,0,314, +964,1,0,0,0,315,316,5,52,0,0,316,317,5,81,0,0,317,320,3,158,79,0,318,319, +5,230,0,0,319,321,3,86,43,0,320,318,1,0,0,0,320,321,1,0,0,0,321,964,1,0, +0,0,322,323,5,211,0,0,323,324,5,200,0,0,324,964,3,158,79,0,325,326,5,13, +0,0,326,329,5,200,0,0,327,328,5,94,0,0,328,330,5,70,0,0,329,327,1,0,0,0, +329,330,1,0,0,0,330,331,1,0,0,0,331,332,3,158,79,0,332,333,5,166,0,0,333, +334,5,208,0,0,334,335,3,158,79,0,335,964,1,0,0,0,336,337,5,13,0,0,337,340, +5,200,0,0,338,339,5,94,0,0,339,341,5,70,0,0,340,338,1,0,0,0,340,341,1,0, +0,0,341,342,1,0,0,0,342,343,3,158,79,0,343,344,5,166,0,0,344,347,5,31,0, +0,345,346,5,94,0,0,346,348,5,70,0,0,347,345,1,0,0,0,347,348,1,0,0,0,348, +349,1,0,0,0,349,350,3,170,85,0,350,351,5,208,0,0,351,352,3,170,85,0,352, +964,1,0,0,0,353,354,5,13,0,0,354,357,5,200,0,0,355,356,5,94,0,0,356,358, +5,70,0,0,357,355,1,0,0,0,357,358,1,0,0,0,358,359,1,0,0,0,359,360,3,158,79, +0,360,361,5,60,0,0,361,364,5,31,0,0,362,363,5,94,0,0,363,365,5,70,0,0,364, +362,1,0,0,0,364,365,1,0,0,0,365,366,1,0,0,0,366,367,3,158,79,0,367,964,1, +0,0,0,368,369,5,13,0,0,369,372,5,200,0,0,370,371,5,94,0,0,371,373,5,70,0, +0,372,370,1,0,0,0,372,373,1,0,0,0,373,374,1,0,0,0,374,375,3,158,79,0,375, +376,5,10,0,0,376,380,5,31,0,0,377,378,5,94,0,0,378,379,5,137,0,0,379,381, +5,70,0,0,380,377,1,0,0,0,380,381,1,0,0,0,381,382,1,0,0,0,382,383,3,14,7, +0,383,964,1,0,0,0,384,385,5,13,0,0,385,388,5,200,0,0,386,387,5,94,0,0,387, +389,5,70,0,0,388,386,1,0,0,0,388,389,1,0,0,0,389,390,1,0,0,0,390,391,3,158, +79,0,391,392,5,10,0,0,392,393,3,174,87,0,393,964,1,0,0,0,394,395,5,13,0, +0,395,398,5,200,0,0,396,397,5,94,0,0,397,399,5,70,0,0,398,396,1,0,0,0,398, +399,1,0,0,0,399,400,1,0,0,0,400,401,3,158,79,0,401,402,5,60,0,0,402,405, +5,36,0,0,403,404,5,94,0,0,404,406,5,70,0,0,405,403,1,0,0,0,405,406,1,0,0, +0,406,407,1,0,0,0,407,408,3,170,85,0,408,964,1,0,0,0,409,410,5,13,0,0,410, +413,5,200,0,0,411,412,5,94,0,0,412,414,5,70,0,0,413,411,1,0,0,0,413,414, +1,0,0,0,414,415,1,0,0,0,415,416,3,158,79,0,416,418,5,13,0,0,417,419,5,31, +0,0,418,417,1,0,0,0,418,419,1,0,0,0,419,420,1,0,0,0,420,421,3,170,85,0,421, +422,5,189,0,0,422,423,5,137,0,0,423,424,5,138,0,0,424,964,1,0,0,0,425,426, +5,13,0,0,426,429,5,200,0,0,427,428,5,94,0,0,428,430,5,70,0,0,429,427,1,0, +0,0,429,430,1,0,0,0,430,431,1,0,0,0,431,432,3,158,79,0,432,434,5,13,0,0, +433,435,5,31,0,0,434,433,1,0,0,0,434,435,1,0,0,0,435,436,1,0,0,0,436,437, +3,170,85,0,437,438,5,60,0,0,438,439,5,137,0,0,439,440,5,138,0,0,440,964, +1,0,0,0,441,442,5,13,0,0,442,445,5,200,0,0,443,444,5,94,0,0,444,446,5,70, +0,0,445,443,1,0,0,0,445,446,1,0,0,0,446,447,1,0,0,0,447,448,3,158,79,0,448, +449,5,189,0,0,449,450,5,159,0,0,450,451,3,18,9,0,451,964,1,0,0,0,452,453, +5,14,0,0,453,456,3,158,79,0,454,455,5,231,0,0,455,457,3,18,9,0,456,454,1, +0,0,0,456,457,1,0,0,0,457,964,1,0,0,0,458,459,5,37,0,0,459,460,5,213,0,0, +460,461,3,158,79,0,461,474,5,18,0,0,462,463,5,2,0,0,463,468,3,22,11,0,464, +465,5,4,0,0,465,467,3,22,11,0,466,464,1,0,0,0,467,470,1,0,0,0,468,466,1, +0,0,0,468,469,1,0,0,0,469,471,1,0,0,0,470,468,1,0,0,0,471,472,5,3,0,0,472, +475,1,0,0,0,473,475,3,114,57,0,474,462,1,0,0,0,474,473,1,0,0,0,475,964,1, +0,0,0,476,479,5,37,0,0,477,478,5,146,0,0,478,480,5,168,0,0,479,477,1,0,0, +0,479,480,1,0,0,0,480,481,1,0,0,0,481,482,5,228,0,0,482,485,3,158,79,0,483, +484,5,185,0,0,484,486,7,1,0,0,485,483,1,0,0,0,485,486,1,0,0,0,486,487,1, +0,0,0,487,488,5,18,0,0,488,489,3,8,4,0,489,964,1,0,0,0,490,491,5,13,0,0, +491,494,5,228,0,0,492,493,5,94,0,0,493,495,5,70,0,0,494,492,1,0,0,0,494, +495,1,0,0,0,495,496,1,0,0,0,496,497,3,158,79,0,497,498,5,166,0,0,498,499, +5,208,0,0,499,500,3,158,79,0,500,964,1,0,0,0,501,502,5,60,0,0,502,505,5, +228,0,0,503,504,5,94,0,0,504,506,5,70,0,0,505,503,1,0,0,0,505,506,1,0,0, +0,506,507,1,0,0,0,507,964,3,158,79,0,508,509,5,37,0,0,509,510,5,124,0,0, +510,514,5,228,0,0,511,512,5,94,0,0,512,513,5,137,0,0,513,515,5,70,0,0,514, +511,1,0,0,0,514,515,1,0,0,0,515,516,1,0,0,0,516,519,3,158,79,0,517,518,5, +33,0,0,518,520,3,94,47,0,519,517,1,0,0,0,519,520,1,0,0,0,520,523,1,0,0,0, +521,522,5,231,0,0,522,524,3,18,9,0,523,521,1,0,0,0,523,524,1,0,0,0,524,525, +1,0,0,0,525,531,5,18,0,0,526,532,3,8,4,0,527,528,5,2,0,0,528,529,3,8,4,0, +529,530,5,3,0,0,530,532,1,0,0,0,531,526,1,0,0,0,531,527,1,0,0,0,532,964, +1,0,0,0,533,534,5,60,0,0,534,535,5,124,0,0,535,538,5,228,0,0,536,537,5,94, +0,0,537,539,5,70,0,0,538,536,1,0,0,0,538,539,1,0,0,0,539,540,1,0,0,0,540, +964,3,158,79,0,541,542,5,164,0,0,542,543,5,124,0,0,543,544,5,228,0,0,544, +547,3,158,79,0,545,546,5,230,0,0,546,548,3,86,43,0,547,545,1,0,0,0,547,548, +1,0,0,0,548,964,1,0,0,0,549,552,5,37,0,0,550,551,5,146,0,0,551,553,5,168, +0,0,552,550,1,0,0,0,552,553,1,0,0,0,553,555,1,0,0,0,554,556,5,203,0,0,555, +554,1,0,0,0,555,556,1,0,0,0,556,557,1,0,0,0,557,558,5,83,0,0,558,559,3,158, +79,0,559,568,5,2,0,0,560,565,3,22,11,0,561,562,5,4,0,0,562,564,3,22,11,0, +563,561,1,0,0,0,564,567,1,0,0,0,565,563,1,0,0,0,565,566,1,0,0,0,566,569, +1,0,0,0,567,565,1,0,0,0,568,560,1,0,0,0,568,569,1,0,0,0,569,570,1,0,0,0, +570,571,5,3,0,0,571,572,5,173,0,0,572,575,3,114,57,0,573,574,5,33,0,0,574, +576,3,94,47,0,575,573,1,0,0,0,575,576,1,0,0,0,576,577,1,0,0,0,577,578,3, +24,12,0,578,579,3,32,16,0,579,964,1,0,0,0,580,581,5,13,0,0,581,582,5,83, +0,0,582,584,3,158,79,0,583,585,3,112,56,0,584,583,1,0,0,0,584,585,1,0,0, +0,585,586,1,0,0,0,586,587,3,28,14,0,587,964,1,0,0,0,588,590,5,60,0,0,589, +591,5,203,0,0,590,589,1,0,0,0,590,591,1,0,0,0,591,592,1,0,0,0,592,595,5, +83,0,0,593,594,5,94,0,0,594,596,5,70,0,0,595,593,1,0,0,0,595,596,1,0,0,0, +596,597,1,0,0,0,597,599,3,158,79,0,598,600,3,112,56,0,599,598,1,0,0,0,599, +600,1,0,0,0,600,964,1,0,0,0,601,602,5,25,0,0,602,603,3,158,79,0,603,612, +5,2,0,0,604,609,3,154,77,0,605,606,5,4,0,0,606,608,3,154,77,0,607,605,1, +0,0,0,608,611,1,0,0,0,609,607,1,0,0,0,609,610,1,0,0,0,610,613,1,0,0,0,611, +609,1,0,0,0,612,604,1,0,0,0,612,613,1,0,0,0,613,614,1,0,0,0,614,615,5,3, +0,0,615,964,1,0,0,0,616,617,5,37,0,0,617,618,5,176,0,0,618,622,3,170,85, +0,619,620,5,231,0,0,620,621,5,11,0,0,621,623,3,164,82,0,622,619,1,0,0,0, +622,623,1,0,0,0,623,964,1,0,0,0,624,625,5,60,0,0,625,626,5,176,0,0,626,964, +3,170,85,0,627,628,5,85,0,0,628,629,3,168,84,0,629,630,5,208,0,0,630,635, +3,166,83,0,631,632,5,4,0,0,632,634,3,166,83,0,633,631,1,0,0,0,634,637,1, +0,0,0,635,633,1,0,0,0,635,636,1,0,0,0,636,641,1,0,0,0,637,635,1,0,0,0,638, +639,5,231,0,0,639,640,5,11,0,0,640,642,5,145,0,0,641,638,1,0,0,0,641,642, +1,0,0,0,642,646,1,0,0,0,643,644,5,86,0,0,644,645,5,24,0,0,645,647,3,164, +82,0,646,643,1,0,0,0,646,647,1,0,0,0,647,964,1,0,0,0,648,652,5,174,0,0,649, +650,5,11,0,0,650,651,5,145,0,0,651,653,5,79,0,0,652,649,1,0,0,0,652,653, +1,0,0,0,653,654,1,0,0,0,654,655,3,168,84,0,655,656,5,81,0,0,656,661,3,166, +83,0,657,658,5,4,0,0,658,660,3,166,83,0,659,657,1,0,0,0,660,663,1,0,0,0, +661,659,1,0,0,0,661,662,1,0,0,0,662,667,1,0,0,0,663,661,1,0,0,0,664,665, +5,86,0,0,665,666,5,24,0,0,666,668,3,164,82,0,667,664,1,0,0,0,667,668,1,0, +0,0,668,964,1,0,0,0,669,670,5,189,0,0,670,674,5,176,0,0,671,675,5,12,0,0, +672,675,5,135,0,0,673,675,3,170,85,0,674,671,1,0,0,0,674,672,1,0,0,0,674, +673,1,0,0,0,675,964,1,0,0,0,676,687,5,85,0,0,677,682,3,156,78,0,678,679, +5,4,0,0,679,681,3,156,78,0,680,678,1,0,0,0,681,684,1,0,0,0,682,680,1,0,0, +0,682,683,1,0,0,0,683,688,1,0,0,0,684,682,1,0,0,0,685,686,5,12,0,0,686,688, +5,158,0,0,687,677,1,0,0,0,687,685,1,0,0,0,688,689,1,0,0,0,689,691,5,143, +0,0,690,692,5,200,0,0,691,690,1,0,0,0,691,692,1,0,0,0,692,693,1,0,0,0,693, +694,3,158,79,0,694,695,5,208,0,0,695,699,3,166,83,0,696,697,5,231,0,0,697, +698,5,85,0,0,698,700,5,145,0,0,699,696,1,0,0,0,699,700,1,0,0,0,700,964,1, +0,0,0,701,705,5,174,0,0,702,703,5,85,0,0,703,704,5,145,0,0,704,706,5,79, +0,0,705,702,1,0,0,0,705,706,1,0,0,0,706,717,1,0,0,0,707,712,3,156,78,0,708, +709,5,4,0,0,709,711,3,156,78,0,710,708,1,0,0,0,711,714,1,0,0,0,712,710,1, +0,0,0,712,713,1,0,0,0,713,718,1,0,0,0,714,712,1,0,0,0,715,716,5,12,0,0,716, +718,5,158,0,0,717,707,1,0,0,0,717,715,1,0,0,0,718,719,1,0,0,0,719,721,5, +143,0,0,720,722,5,200,0,0,721,720,1,0,0,0,721,722,1,0,0,0,722,723,1,0,0, +0,723,724,3,158,79,0,724,725,5,81,0,0,725,726,3,166,83,0,726,964,1,0,0,0, +727,728,5,191,0,0,728,734,5,87,0,0,729,731,5,143,0,0,730,732,5,200,0,0,731, +730,1,0,0,0,731,732,1,0,0,0,732,733,1,0,0,0,733,735,3,158,79,0,734,729,1, +0,0,0,734,735,1,0,0,0,735,964,1,0,0,0,736,738,5,71,0,0,737,739,5,14,0,0, +738,737,1,0,0,0,738,739,1,0,0,0,739,741,1,0,0,0,740,742,5,226,0,0,741,740, +1,0,0,0,741,742,1,0,0,0,742,754,1,0,0,0,743,744,5,2,0,0,744,749,3,148,74, +0,745,746,5,4,0,0,746,748,3,148,74,0,747,745,1,0,0,0,748,751,1,0,0,0,749, +747,1,0,0,0,749,750,1,0,0,0,750,752,1,0,0,0,751,749,1,0,0,0,752,753,5,3, +0,0,753,755,1,0,0,0,754,743,1,0,0,0,754,755,1,0,0,0,755,756,1,0,0,0,756, +964,3,6,3,0,757,758,5,191,0,0,758,759,5,37,0,0,759,760,5,200,0,0,760,964, +3,158,79,0,761,762,5,191,0,0,762,763,5,37,0,0,763,764,5,182,0,0,764,964, +3,158,79,0,765,766,5,191,0,0,766,767,5,37,0,0,767,768,5,228,0,0,768,964, +3,158,79,0,769,770,5,191,0,0,770,771,5,37,0,0,771,772,5,124,0,0,772,773, +5,228,0,0,773,964,3,158,79,0,774,775,5,191,0,0,775,776,5,37,0,0,776,777, +5,83,0,0,777,779,3,158,79,0,778,780,3,112,56,0,779,778,1,0,0,0,779,780,1, +0,0,0,780,964,1,0,0,0,781,782,5,191,0,0,782,785,5,201,0,0,783,784,7,2,0, +0,784,786,3,158,79,0,785,783,1,0,0,0,785,786,1,0,0,0,786,793,1,0,0,0,787, +788,5,117,0,0,788,791,3,94,47,0,789,790,5,66,0,0,790,792,3,94,47,0,791,789, +1,0,0,0,791,792,1,0,0,0,792,794,1,0,0,0,793,787,1,0,0,0,793,794,1,0,0,0, +794,964,1,0,0,0,795,796,5,191,0,0,796,799,5,183,0,0,797,798,7,2,0,0,798, +800,3,170,85,0,799,797,1,0,0,0,799,800,1,0,0,0,800,807,1,0,0,0,801,802,5, +117,0,0,802,805,3,94,47,0,803,804,5,66,0,0,804,806,3,94,47,0,805,803,1,0, +0,0,805,806,1,0,0,0,806,808,1,0,0,0,807,801,1,0,0,0,807,808,1,0,0,0,808, +964,1,0,0,0,809,810,5,191,0,0,810,817,5,30,0,0,811,812,5,117,0,0,812,815, +3,94,47,0,813,814,5,66,0,0,814,816,3,94,47,0,815,813,1,0,0,0,815,816,1,0, +0,0,816,818,1,0,0,0,817,811,1,0,0,0,817,818,1,0,0,0,818,964,1,0,0,0,819, +820,5,191,0,0,820,821,5,32,0,0,821,822,7,2,0,0,822,964,3,158,79,0,823,824, +5,191,0,0,824,825,5,195,0,0,825,826,5,79,0,0,826,964,3,158,79,0,827,828, +5,191,0,0,828,829,5,195,0,0,829,830,5,79,0,0,830,831,5,2,0,0,831,832,3,54, +27,0,832,833,5,3,0,0,833,964,1,0,0,0,834,836,5,191,0,0,835,837,5,41,0,0, +836,835,1,0,0,0,836,837,1,0,0,0,837,838,1,0,0,0,838,841,5,177,0,0,839,840, +7,2,0,0,840,842,3,170,85,0,841,839,1,0,0,0,841,842,1,0,0,0,842,964,1,0,0, +0,843,844,5,191,0,0,844,845,5,176,0,0,845,848,5,87,0,0,846,847,7,2,0,0,847, +849,3,170,85,0,848,846,1,0,0,0,848,849,1,0,0,0,849,964,1,0,0,0,850,851,5, +54,0,0,851,964,3,158,79,0,852,853,5,53,0,0,853,964,3,158,79,0,854,855,5, +191,0,0,855,862,5,84,0,0,856,857,5,117,0,0,857,860,3,94,47,0,858,859,5,66, +0,0,859,861,3,94,47,0,860,858,1,0,0,0,860,861,1,0,0,0,861,863,1,0,0,0,862, +856,1,0,0,0,862,863,1,0,0,0,863,964,1,0,0,0,864,865,5,191,0,0,865,872,5, +188,0,0,866,867,5,117,0,0,867,870,3,94,47,0,868,869,5,66,0,0,869,871,3,94, +47,0,870,868,1,0,0,0,870,871,1,0,0,0,871,873,1,0,0,0,872,866,1,0,0,0,872, +873,1,0,0,0,873,964,1,0,0,0,874,875,5,189,0,0,875,876,5,188,0,0,876,877, +3,158,79,0,877,878,5,236,0,0,878,879,3,84,42,0,879,964,1,0,0,0,880,881,5, +169,0,0,881,882,5,188,0,0,882,964,3,158,79,0,883,884,5,194,0,0,884,893,5, +209,0,0,885,890,3,150,75,0,886,887,5,4,0,0,887,889,3,150,75,0,888,886,1, +0,0,0,889,892,1,0,0,0,890,888,1,0,0,0,890,891,1,0,0,0,891,894,1,0,0,0,892, +890,1,0,0,0,893,885,1,0,0,0,893,894,1,0,0,0,894,964,1,0,0,0,895,897,5,34, +0,0,896,898,5,232,0,0,897,896,1,0,0,0,897,898,1,0,0,0,898,964,1,0,0,0,899, +901,5,178,0,0,900,902,5,232,0,0,901,900,1,0,0,0,901,902,1,0,0,0,902,964, +1,0,0,0,903,904,5,156,0,0,904,905,3,170,85,0,905,906,5,81,0,0,906,907,3, +6,3,0,907,964,1,0,0,0,908,909,5,50,0,0,909,910,5,156,0,0,910,964,3,170,85, +0,911,912,5,69,0,0,912,922,3,170,85,0,913,914,5,223,0,0,914,919,3,84,42, +0,915,916,5,4,0,0,916,918,3,84,42,0,917,915,1,0,0,0,918,921,1,0,0,0,919, +917,1,0,0,0,919,920,1,0,0,0,920,923,1,0,0,0,921,919,1,0,0,0,922,913,1,0, +0,0,922,923,1,0,0,0,923,964,1,0,0,0,924,925,5,54,0,0,925,926,5,99,0,0,926, +964,3,170,85,0,927,928,5,54,0,0,928,929,5,150,0,0,929,964,3,170,85,0,930, +931,5,220,0,0,931,932,3,158,79,0,932,933,5,189,0,0,933,938,3,146,73,0,934, +935,5,4,0,0,935,937,3,146,73,0,936,934,1,0,0,0,937,940,1,0,0,0,938,936,1, +0,0,0,938,939,1,0,0,0,939,943,1,0,0,0,940,938,1,0,0,0,941,942,5,230,0,0, +942,944,3,86,43,0,943,941,1,0,0,0,943,944,1,0,0,0,944,964,1,0,0,0,945,946, +5,125,0,0,946,947,5,103,0,0,947,952,3,158,79,0,948,950,5,18,0,0,949,948, +1,0,0,0,949,950,1,0,0,0,950,951,1,0,0,0,951,953,3,170,85,0,952,949,1,0,0, +0,952,953,1,0,0,0,953,954,1,0,0,0,954,955,5,223,0,0,955,956,3,68,34,0,956, +957,5,143,0,0,957,959,3,84,42,0,958,960,3,138,69,0,959,958,1,0,0,0,960,961, +1,0,0,0,961,959,1,0,0,0,961,962,1,0,0,0,962,964,1,0,0,0,963,203,1,0,0,0, +963,204,1,0,0,0,963,206,1,0,0,0,963,211,1,0,0,0,963,223,1,0,0,0,963,233, +1,0,0,0,963,240,1,0,0,0,963,274,1,0,0,0,963,300,1,0,0,0,963,307,1,0,0,0, +963,315,1,0,0,0,963,322,1,0,0,0,963,325,1,0,0,0,963,336,1,0,0,0,963,353, +1,0,0,0,963,368,1,0,0,0,963,384,1,0,0,0,963,394,1,0,0,0,963,409,1,0,0,0, +963,425,1,0,0,0,963,441,1,0,0,0,963,452,1,0,0,0,963,458,1,0,0,0,963,476, +1,0,0,0,963,490,1,0,0,0,963,501,1,0,0,0,963,508,1,0,0,0,963,533,1,0,0,0, +963,541,1,0,0,0,963,549,1,0,0,0,963,580,1,0,0,0,963,588,1,0,0,0,963,601, +1,0,0,0,963,616,1,0,0,0,963,624,1,0,0,0,963,627,1,0,0,0,963,648,1,0,0,0, +963,669,1,0,0,0,963,676,1,0,0,0,963,701,1,0,0,0,963,727,1,0,0,0,963,736, +1,0,0,0,963,757,1,0,0,0,963,761,1,0,0,0,963,765,1,0,0,0,963,769,1,0,0,0, +963,774,1,0,0,0,963,781,1,0,0,0,963,795,1,0,0,0,963,809,1,0,0,0,963,819, +1,0,0,0,963,823,1,0,0,0,963,827,1,0,0,0,963,834,1,0,0,0,963,843,1,0,0,0, +963,850,1,0,0,0,963,852,1,0,0,0,963,854,1,0,0,0,963,864,1,0,0,0,963,874, +1,0,0,0,963,880,1,0,0,0,963,883,1,0,0,0,963,895,1,0,0,0,963,899,1,0,0,0, +963,903,1,0,0,0,963,908,1,0,0,0,963,911,1,0,0,0,963,924,1,0,0,0,963,927, +1,0,0,0,963,930,1,0,0,0,963,945,1,0,0,0,964,7,1,0,0,0,965,967,3,10,5,0,966, +965,1,0,0,0,966,967,1,0,0,0,967,968,1,0,0,0,968,969,3,46,23,0,969,9,1,0, +0,0,970,972,5,231,0,0,971,973,5,163,0,0,972,971,1,0,0,0,972,973,1,0,0,0, +973,974,1,0,0,0,974,979,3,62,31,0,975,976,5,4,0,0,976,978,3,62,31,0,977, +975,1,0,0,0,978,981,1,0,0,0,979,977,1,0,0,0,979,980,1,0,0,0,980,11,1,0,0, +0,981,979,1,0,0,0,982,986,3,174,87,0,983,986,3,14,7,0,984,986,3,16,8,0,985, +982,1,0,0,0,985,983,1,0,0,0,985,984,1,0,0,0,986,13,1,0,0,0,987,988,3,170, +85,0,988,991,3,114,57,0,989,990,5,137,0,0,990,992,5,138,0,0,991,989,1,0, +0,0,991,992,1,0,0,0,992,995,1,0,0,0,993,994,5,33,0,0,994,996,3,94,47,0,995, +993,1,0,0,0,995,996,1,0,0,0,996,999,1,0,0,0,997,998,5,231,0,0,998,1000,3, +18,9,0,999,997,1,0,0,0,999,1000,1,0,0,0,1000,15,1,0,0,0,1001,1002,5,117, +0,0,1002,1005,3,158,79,0,1003,1004,7,3,0,0,1004,1006,5,159,0,0,1005,1003, +1,0,0,0,1005,1006,1,0,0,0,1006,17,1,0,0,0,1007,1008,5,2,0,0,1008,1013,3, +20,10,0,1009,1010,5,4,0,0,1010,1012,3,20,10,0,1011,1009,1,0,0,0,1012,1015, +1,0,0,0,1013,1011,1,0,0,0,1013,1014,1,0,0,0,1014,1016,1,0,0,0,1015,1013, +1,0,0,0,1016,1017,5,3,0,0,1017,19,1,0,0,0,1018,1019,3,170,85,0,1019,1020, +5,236,0,0,1020,1021,3,84,42,0,1021,21,1,0,0,0,1022,1023,3,170,85,0,1023, +1024,3,114,57,0,1024,23,1,0,0,0,1025,1027,3,26,13,0,1026,1025,1,0,0,0,1027, +1030,1,0,0,0,1028,1026,1,0,0,0,1028,1029,1,0,0,0,1029,25,1,0,0,0,1030,1028, +1,0,0,0,1031,1032,5,112,0,0,1032,1036,3,38,19,0,1033,1036,3,40,20,0,1034, +1036,3,42,21,0,1035,1031,1,0,0,0,1035,1033,1,0,0,0,1035,1034,1,0,0,0,1036, +27,1,0,0,0,1037,1039,3,30,15,0,1038,1037,1,0,0,0,1039,1042,1,0,0,0,1040, +1038,1,0,0,0,1040,1041,1,0,0,0,1041,29,1,0,0,0,1042,1040,1,0,0,0,1043,1044, +3,42,21,0,1044,31,1,0,0,0,1045,1048,3,34,17,0,1046,1048,3,36,18,0,1047,1045, +1,0,0,0,1047,1046,1,0,0,0,1048,33,1,0,0,0,1049,1050,5,172,0,0,1050,1051, +3,84,42,0,1051,35,1,0,0,0,1052,1055,5,73,0,0,1053,1054,5,128,0,0,1054,1056, +3,44,22,0,1055,1053,1,0,0,0,1055,1056,1,0,0,0,1056,37,1,0,0,0,1057,1060, +5,193,0,0,1058,1060,3,170,85,0,1059,1057,1,0,0,0,1059,1058,1,0,0,0,1060, +39,1,0,0,0,1061,1065,5,56,0,0,1062,1063,5,137,0,0,1063,1065,5,56,0,0,1064, +1061,1,0,0,0,1064,1062,1,0,0,0,1065,41,1,0,0,0,1066,1067,5,173,0,0,1067, +1068,5,138,0,0,1068,1069,5,143,0,0,1069,1070,5,138,0,0,1070,1076,5,99,0, +0,1071,1072,5,26,0,0,1072,1073,5,143,0,0,1073,1074,5,138,0,0,1074,1076,5, +99,0,0,1075,1066,1,0,0,0,1075,1071,1,0,0,0,1076,43,1,0,0,0,1077,1078,3,170, +85,0,1078,45,1,0,0,0,1079,1090,3,48,24,0,1080,1081,5,147,0,0,1081,1082,5, +24,0,0,1082,1087,3,52,26,0,1083,1084,5,4,0,0,1084,1086,3,52,26,0,1085,1083, +1,0,0,0,1086,1089,1,0,0,0,1087,1085,1,0,0,0,1087,1088,1,0,0,0,1088,1091, +1,0,0,0,1089,1087,1,0,0,0,1090,1080,1,0,0,0,1090,1091,1,0,0,0,1091,1097, +1,0,0,0,1092,1093,5,142,0,0,1093,1095,5,251,0,0,1094,1096,7,4,0,0,1095,1094, +1,0,0,0,1095,1096,1,0,0,0,1096,1098,1,0,0,0,1097,1092,1,0,0,0,1097,1098, +1,0,0,0,1098,1108,1,0,0,0,1099,1100,5,118,0,0,1100,1107,7,5,0,0,1101,1102, +5,75,0,0,1102,1103,5,77,0,0,1103,1104,5,251,0,0,1104,1105,5,181,0,0,1105, +1107,5,144,0,0,1106,1099,1,0,0,0,1106,1101,1,0,0,0,1107,1109,1,0,0,0,1108, +1106,1,0,0,0,1108,1109,1,0,0,0,1109,47,1,0,0,0,1110,1111,6,24,-1,0,1111, +1112,3,50,25,0,1112,1127,1,0,0,0,1113,1114,10,2,0,0,1114,1116,5,101,0,0, +1115,1117,3,64,32,0,1116,1115,1,0,0,0,1116,1117,1,0,0,0,1117,1118,1,0,0, +0,1118,1126,3,48,24,3,1119,1120,10,1,0,0,1120,1122,7,6,0,0,1121,1123,3,64, +32,0,1122,1121,1,0,0,0,1122,1123,1,0,0,0,1123,1124,1,0,0,0,1124,1126,3,48, +24,2,1125,1113,1,0,0,0,1125,1119,1,0,0,0,1126,1129,1,0,0,0,1127,1125,1,0, +0,0,1127,1128,1,0,0,0,1128,49,1,0,0,0,1129,1127,1,0,0,0,1130,1147,3,54,27, +0,1131,1132,5,200,0,0,1132,1147,3,158,79,0,1133,1134,5,225,0,0,1134,1139, +3,84,42,0,1135,1136,5,4,0,0,1136,1138,3,84,42,0,1137,1135,1,0,0,0,1138,1141, +1,0,0,0,1139,1137,1,0,0,0,1139,1140,1,0,0,0,1140,1147,1,0,0,0,1141,1139, +1,0,0,0,1142,1143,5,2,0,0,1143,1144,3,46,23,0,1144,1145,5,3,0,0,1145,1147, +1,0,0,0,1146,1130,1,0,0,0,1146,1131,1,0,0,0,1146,1133,1,0,0,0,1146,1142, +1,0,0,0,1147,51,1,0,0,0,1148,1150,3,84,42,0,1149,1151,7,7,0,0,1150,1149, +1,0,0,0,1150,1151,1,0,0,0,1151,1154,1,0,0,0,1152,1153,5,140,0,0,1153,1155, +7,8,0,0,1154,1152,1,0,0,0,1154,1155,1,0,0,0,1155,53,1,0,0,0,1156,1158,5, +186,0,0,1157,1159,3,64,32,0,1158,1157,1,0,0,0,1158,1159,1,0,0,0,1159,1160, +1,0,0,0,1160,1165,3,66,33,0,1161,1162,5,4,0,0,1162,1164,3,66,33,0,1163,1161, +1,0,0,0,1164,1167,1,0,0,0,1165,1163,1,0,0,0,1165,1166,1,0,0,0,1166,1177, +1,0,0,0,1167,1165,1,0,0,0,1168,1169,5,81,0,0,1169,1174,3,68,34,0,1170,1171, +5,4,0,0,1171,1173,3,68,34,0,1172,1170,1,0,0,0,1173,1176,1,0,0,0,1174,1172, +1,0,0,0,1174,1175,1,0,0,0,1175,1178,1,0,0,0,1176,1174,1,0,0,0,1177,1168, +1,0,0,0,1177,1178,1,0,0,0,1178,1181,1,0,0,0,1179,1180,5,230,0,0,1180,1182, +3,86,43,0,1181,1179,1,0,0,0,1181,1182,1,0,0,0,1182,1186,1,0,0,0,1183,1184, +5,89,0,0,1184,1185,5,24,0,0,1185,1187,3,56,28,0,1186,1183,1,0,0,0,1186,1187, +1,0,0,0,1187,1190,1,0,0,0,1188,1189,5,92,0,0,1189,1191,3,86,43,0,1190,1188, +1,0,0,0,1190,1191,1,0,0,0,1191,55,1,0,0,0,1192,1194,3,64,32,0,1193,1192, +1,0,0,0,1193,1194,1,0,0,0,1194,1195,1,0,0,0,1195,1200,3,58,29,0,1196,1197, +5,4,0,0,1197,1199,3,58,29,0,1198,1196,1,0,0,0,1199,1202,1,0,0,0,1200,1198, +1,0,0,0,1200,1201,1,0,0,0,1201,57,1,0,0,0,1202,1200,1,0,0,0,1203,1244,3, +60,30,0,1204,1205,5,179,0,0,1205,1214,5,2,0,0,1206,1211,3,84,42,0,1207,1208, +5,4,0,0,1208,1210,3,84,42,0,1209,1207,1,0,0,0,1210,1213,1,0,0,0,1211,1209, +1,0,0,0,1211,1212,1,0,0,0,1212,1215,1,0,0,0,1213,1211,1,0,0,0,1214,1206, +1,0,0,0,1214,1215,1,0,0,0,1215,1216,1,0,0,0,1216,1244,5,3,0,0,1217,1218, +5,40,0,0,1218,1227,5,2,0,0,1219,1224,3,84,42,0,1220,1221,5,4,0,0,1221,1223, +3,84,42,0,1222,1220,1,0,0,0,1223,1226,1,0,0,0,1224,1222,1,0,0,0,1224,1225, +1,0,0,0,1225,1228,1,0,0,0,1226,1224,1,0,0,0,1227,1219,1,0,0,0,1227,1228, +1,0,0,0,1228,1229,1,0,0,0,1229,1244,5,3,0,0,1230,1231,5,90,0,0,1231,1232, +5,190,0,0,1232,1233,5,2,0,0,1233,1238,3,60,30,0,1234,1235,5,4,0,0,1235,1237, +3,60,30,0,1236,1234,1,0,0,0,1237,1240,1,0,0,0,1238,1236,1,0,0,0,1238,1239, +1,0,0,0,1239,1241,1,0,0,0,1240,1238,1,0,0,0,1241,1242,5,3,0,0,1242,1244, +1,0,0,0,1243,1203,1,0,0,0,1243,1204,1,0,0,0,1243,1217,1,0,0,0,1243,1230, +1,0,0,0,1244,59,1,0,0,0,1245,1254,5,2,0,0,1246,1251,3,84,42,0,1247,1248, +5,4,0,0,1248,1250,3,84,42,0,1249,1247,1,0,0,0,1250,1253,1,0,0,0,1251,1249, +1,0,0,0,1251,1252,1,0,0,0,1252,1255,1,0,0,0,1253,1251,1,0,0,0,1254,1246, +1,0,0,0,1254,1255,1,0,0,0,1255,1256,1,0,0,0,1256,1259,5,3,0,0,1257,1259, +3,84,42,0,1258,1245,1,0,0,0,1258,1257,1,0,0,0,1259,61,1,0,0,0,1260,1262, +3,170,85,0,1261,1263,3,80,40,0,1262,1261,1,0,0,0,1262,1263,1,0,0,0,1263, +1264,1,0,0,0,1264,1265,5,18,0,0,1265,1266,5,2,0,0,1266,1267,3,8,4,0,1267, +1268,5,3,0,0,1268,63,1,0,0,0,1269,1270,7,9,0,0,1270,65,1,0,0,0,1271,1276, +3,84,42,0,1272,1274,5,18,0,0,1273,1272,1,0,0,0,1273,1274,1,0,0,0,1274,1275, +1,0,0,0,1275,1277,3,170,85,0,1276,1273,1,0,0,0,1276,1277,1,0,0,0,1277,1284, +1,0,0,0,1278,1279,3,158,79,0,1279,1280,5,1,0,0,1280,1281,5,244,0,0,1281, +1284,1,0,0,0,1282,1284,5,244,0,0,1283,1271,1,0,0,0,1283,1278,1,0,0,0,1283, +1282,1,0,0,0,1284,67,1,0,0,0,1285,1286,6,34,-1,0,1286,1287,3,74,37,0,1287, +1306,1,0,0,0,1288,1302,10,2,0,0,1289,1290,5,39,0,0,1290,1291,5,109,0,0,1291, +1303,3,74,37,0,1292,1293,3,70,35,0,1293,1294,5,109,0,0,1294,1295,3,68,34, +0,1295,1296,3,72,36,0,1296,1303,1,0,0,0,1297,1298,5,129,0,0,1298,1299,3, +70,35,0,1299,1300,5,109,0,0,1300,1301,3,74,37,0,1301,1303,1,0,0,0,1302,1289, +1,0,0,0,1302,1292,1,0,0,0,1302,1297,1,0,0,0,1303,1305,1,0,0,0,1304,1288, +1,0,0,0,1305,1308,1,0,0,0,1306,1304,1,0,0,0,1306,1307,1,0,0,0,1307,69,1, +0,0,0,1308,1306,1,0,0,0,1309,1311,5,98,0,0,1310,1309,1,0,0,0,1310,1311,1, +0,0,0,1311,1325,1,0,0,0,1312,1314,5,115,0,0,1313,1315,5,149,0,0,1314,1313, +1,0,0,0,1314,1315,1,0,0,0,1315,1325,1,0,0,0,1316,1318,5,175,0,0,1317,1319, +5,149,0,0,1318,1317,1,0,0,0,1318,1319,1,0,0,0,1319,1325,1,0,0,0,1320,1322, +5,82,0,0,1321,1323,5,149,0,0,1322,1321,1,0,0,0,1322,1323,1,0,0,0,1323,1325, +1,0,0,0,1324,1310,1,0,0,0,1324,1312,1,0,0,0,1324,1316,1,0,0,0,1324,1320, +1,0,0,0,1325,71,1,0,0,0,1326,1327,5,143,0,0,1327,1341,3,86,43,0,1328,1329, +5,223,0,0,1329,1330,5,2,0,0,1330,1335,3,170,85,0,1331,1332,5,4,0,0,1332, +1334,3,170,85,0,1333,1331,1,0,0,0,1334,1337,1,0,0,0,1335,1333,1,0,0,0,1335, +1336,1,0,0,0,1336,1338,1,0,0,0,1337,1335,1,0,0,0,1338,1339,5,3,0,0,1339, +1341,1,0,0,0,1340,1326,1,0,0,0,1340,1328,1,0,0,0,1341,73,1,0,0,0,1342,1349, +3,78,39,0,1343,1344,5,202,0,0,1344,1345,3,76,38,0,1345,1346,5,2,0,0,1346, +1347,3,84,42,0,1347,1348,5,3,0,0,1348,1350,1,0,0,0,1349,1343,1,0,0,0,1349, +1350,1,0,0,0,1350,75,1,0,0,0,1351,1352,7,10,0,0,1352,77,1,0,0,0,1353,1361, +3,82,41,0,1354,1356,5,18,0,0,1355,1354,1,0,0,0,1355,1356,1,0,0,0,1356,1357, +1,0,0,0,1357,1359,3,170,85,0,1358,1360,3,80,40,0,1359,1358,1,0,0,0,1359, +1360,1,0,0,0,1360,1362,1,0,0,0,1361,1355,1,0,0,0,1361,1362,1,0,0,0,1362, +79,1,0,0,0,1363,1364,5,2,0,0,1364,1369,3,170,85,0,1365,1366,5,4,0,0,1366, +1368,3,170,85,0,1367,1365,1,0,0,0,1368,1371,1,0,0,0,1369,1367,1,0,0,0,1369, +1370,1,0,0,0,1370,1372,1,0,0,0,1371,1369,1,0,0,0,1372,1373,5,3,0,0,1373, +81,1,0,0,0,1374,1376,3,158,79,0,1375,1377,3,160,80,0,1376,1375,1,0,0,0,1376, +1377,1,0,0,0,1377,1412,1,0,0,0,1378,1379,5,2,0,0,1379,1380,3,8,4,0,1380, +1381,5,3,0,0,1381,1412,1,0,0,0,1382,1383,5,219,0,0,1383,1384,5,2,0,0,1384, +1389,3,84,42,0,1385,1386,5,4,0,0,1386,1388,3,84,42,0,1387,1385,1,0,0,0,1388, +1391,1,0,0,0,1389,1387,1,0,0,0,1389,1390,1,0,0,0,1390,1392,1,0,0,0,1391, +1389,1,0,0,0,1392,1395,5,3,0,0,1393,1394,5,231,0,0,1394,1396,5,148,0,0,1395, +1393,1,0,0,0,1395,1396,1,0,0,0,1396,1412,1,0,0,0,1397,1398,5,114,0,0,1398, +1399,5,2,0,0,1399,1400,3,8,4,0,1400,1401,5,3,0,0,1401,1412,1,0,0,0,1402, +1403,5,2,0,0,1403,1404,3,68,34,0,1404,1405,5,3,0,0,1405,1412,1,0,0,0,1406, +1407,5,200,0,0,1407,1408,5,2,0,0,1408,1409,3,116,58,0,1409,1410,5,3,0,0, +1410,1412,1,0,0,0,1411,1374,1,0,0,0,1411,1378,1,0,0,0,1411,1382,1,0,0,0, +1411,1397,1,0,0,0,1411,1402,1,0,0,0,1411,1406,1,0,0,0,1412,83,1,0,0,0,1413, +1414,3,86,43,0,1414,85,1,0,0,0,1415,1416,6,43,-1,0,1416,1418,3,90,45,0,1417, +1419,3,88,44,0,1418,1417,1,0,0,0,1418,1419,1,0,0,0,1419,1423,1,0,0,0,1420, +1421,5,137,0,0,1421,1423,3,86,43,3,1422,1415,1,0,0,0,1422,1420,1,0,0,0,1423, +1432,1,0,0,0,1424,1425,10,2,0,0,1425,1426,5,15,0,0,1426,1431,3,86,43,3,1427, +1428,10,1,0,0,1428,1429,5,146,0,0,1429,1431,3,86,43,2,1430,1424,1,0,0,0, +1430,1427,1,0,0,0,1431,1434,1,0,0,0,1432,1430,1,0,0,0,1432,1433,1,0,0,0, +1433,87,1,0,0,0,1434,1432,1,0,0,0,1435,1436,3,100,50,0,1436,1437,3,90,45, +0,1437,1497,1,0,0,0,1438,1439,3,100,50,0,1439,1440,3,102,51,0,1440,1441, +5,2,0,0,1441,1442,3,8,4,0,1442,1443,5,3,0,0,1443,1497,1,0,0,0,1444,1446, +5,137,0,0,1445,1444,1,0,0,0,1445,1446,1,0,0,0,1446,1447,1,0,0,0,1447,1448, +5,23,0,0,1448,1449,3,90,45,0,1449,1450,5,15,0,0,1450,1451,3,90,45,0,1451, +1497,1,0,0,0,1452,1454,5,137,0,0,1453,1452,1,0,0,0,1453,1454,1,0,0,0,1454, +1455,1,0,0,0,1455,1456,5,96,0,0,1456,1457,5,2,0,0,1457,1462,3,84,42,0,1458, +1459,5,4,0,0,1459,1461,3,84,42,0,1460,1458,1,0,0,0,1461,1464,1,0,0,0,1462, +1460,1,0,0,0,1462,1463,1,0,0,0,1463,1465,1,0,0,0,1464,1462,1,0,0,0,1465, +1466,5,3,0,0,1466,1497,1,0,0,0,1467,1469,5,137,0,0,1468,1467,1,0,0,0,1468, +1469,1,0,0,0,1469,1470,1,0,0,0,1470,1471,5,96,0,0,1471,1472,5,2,0,0,1472, +1473,3,8,4,0,1473,1474,5,3,0,0,1474,1497,1,0,0,0,1475,1477,5,137,0,0,1476, +1475,1,0,0,0,1476,1477,1,0,0,0,1477,1478,1,0,0,0,1478,1479,5,117,0,0,1479, +1482,3,90,45,0,1480,1481,5,66,0,0,1481,1483,3,90,45,0,1482,1480,1,0,0,0, +1482,1483,1,0,0,0,1483,1497,1,0,0,0,1484,1486,5,106,0,0,1485,1487,5,137, +0,0,1486,1485,1,0,0,0,1486,1487,1,0,0,0,1487,1488,1,0,0,0,1488,1497,5,138, +0,0,1489,1491,5,106,0,0,1490,1492,5,137,0,0,1491,1490,1,0,0,0,1491,1492, +1,0,0,0,1492,1493,1,0,0,0,1493,1494,5,58,0,0,1494,1495,5,81,0,0,1495,1497, +3,90,45,0,1496,1435,1,0,0,0,1496,1438,1,0,0,0,1496,1445,1,0,0,0,1496,1453, +1,0,0,0,1496,1468,1,0,0,0,1496,1476,1,0,0,0,1496,1484,1,0,0,0,1496,1489, +1,0,0,0,1497,89,1,0,0,0,1498,1499,6,45,-1,0,1499,1503,3,92,46,0,1500,1501, +7,11,0,0,1501,1503,3,90,45,4,1502,1498,1,0,0,0,1502,1500,1,0,0,0,1503,1518, +1,0,0,0,1504,1505,10,3,0,0,1505,1506,7,12,0,0,1506,1517,3,90,45,4,1507,1508, +10,2,0,0,1508,1509,7,11,0,0,1509,1517,3,90,45,3,1510,1511,10,1,0,0,1511, +1512,5,247,0,0,1512,1517,3,90,45,2,1513,1514,10,5,0,0,1514,1515,5,20,0,0, +1515,1517,3,98,49,0,1516,1504,1,0,0,0,1516,1507,1,0,0,0,1516,1510,1,0,0, +0,1516,1513,1,0,0,0,1517,1520,1,0,0,0,1518,1516,1,0,0,0,1518,1519,1,0,0, +0,1519,91,1,0,0,0,1520,1518,1,0,0,0,1521,1522,6,46,-1,0,1522,1761,5,138, +0,0,1523,1761,3,106,53,0,1524,1525,3,170,85,0,1525,1526,3,94,47,0,1526,1761, +1,0,0,0,1527,1528,5,260,0,0,1528,1761,3,94,47,0,1529,1761,3,172,86,0,1530, +1761,3,104,52,0,1531,1761,3,94,47,0,1532,1761,5,250,0,0,1533,1761,5,5,0, +0,1534,1535,5,154,0,0,1535,1536,5,2,0,0,1536,1537,3,90,45,0,1537,1538,5, +96,0,0,1538,1539,3,90,45,0,1539,1540,5,3,0,0,1540,1761,1,0,0,0,1541,1542, +5,2,0,0,1542,1545,3,84,42,0,1543,1544,5,4,0,0,1544,1546,3,84,42,0,1545,1543, +1,0,0,0,1546,1547,1,0,0,0,1547,1545,1,0,0,0,1547,1548,1,0,0,0,1548,1549, +1,0,0,0,1549,1550,5,3,0,0,1550,1761,1,0,0,0,1551,1552,5,180,0,0,1552,1553, +5,2,0,0,1553,1558,3,84,42,0,1554,1555,5,4,0,0,1555,1557,3,84,42,0,1556,1554, +1,0,0,0,1557,1560,1,0,0,0,1558,1556,1,0,0,0,1558,1559,1,0,0,0,1559,1561, +1,0,0,0,1560,1558,1,0,0,0,1561,1562,5,3,0,0,1562,1761,1,0,0,0,1563,1564, +3,158,79,0,1564,1565,5,2,0,0,1565,1566,5,244,0,0,1566,1568,5,3,0,0,1567, +1569,3,136,68,0,1568,1567,1,0,0,0,1568,1569,1,0,0,0,1569,1571,1,0,0,0,1570, +1572,3,140,70,0,1571,1570,1,0,0,0,1571,1572,1,0,0,0,1572,1761,1,0,0,0,1573, +1574,3,158,79,0,1574,1586,5,2,0,0,1575,1577,3,64,32,0,1576,1575,1,0,0,0, +1576,1577,1,0,0,0,1577,1578,1,0,0,0,1578,1583,3,84,42,0,1579,1580,5,4,0, +0,1580,1582,3,84,42,0,1581,1579,1,0,0,0,1582,1585,1,0,0,0,1583,1581,1,0, +0,0,1583,1584,1,0,0,0,1584,1587,1,0,0,0,1585,1583,1,0,0,0,1586,1576,1,0, +0,0,1586,1587,1,0,0,0,1587,1598,1,0,0,0,1588,1589,5,147,0,0,1589,1590,5, +24,0,0,1590,1595,3,52,26,0,1591,1592,5,4,0,0,1592,1594,3,52,26,0,1593,1591, +1,0,0,0,1594,1597,1,0,0,0,1595,1593,1,0,0,0,1595,1596,1,0,0,0,1596,1599, +1,0,0,0,1597,1595,1,0,0,0,1598,1588,1,0,0,0,1598,1599,1,0,0,0,1599,1600, +1,0,0,0,1600,1602,5,3,0,0,1601,1603,3,136,68,0,1602,1601,1,0,0,0,1602,1603, +1,0,0,0,1603,1608,1,0,0,0,1604,1606,3,96,48,0,1605,1604,1,0,0,0,1605,1606, +1,0,0,0,1606,1607,1,0,0,0,1607,1609,3,140,70,0,1608,1605,1,0,0,0,1608,1609, +1,0,0,0,1609,1761,1,0,0,0,1610,1611,3,170,85,0,1611,1612,5,6,0,0,1612,1613, +3,84,42,0,1613,1761,1,0,0,0,1614,1623,5,2,0,0,1615,1620,3,170,85,0,1616, +1617,5,4,0,0,1617,1619,3,170,85,0,1618,1616,1,0,0,0,1619,1622,1,0,0,0,1620, +1618,1,0,0,0,1620,1621,1,0,0,0,1621,1624,1,0,0,0,1622,1620,1,0,0,0,1623, +1615,1,0,0,0,1623,1624,1,0,0,0,1624,1625,1,0,0,0,1625,1626,5,3,0,0,1626, +1627,5,6,0,0,1627,1761,3,84,42,0,1628,1629,5,2,0,0,1629,1630,3,8,4,0,1630, +1631,5,3,0,0,1631,1761,1,0,0,0,1632,1633,5,70,0,0,1633,1634,5,2,0,0,1634, +1635,3,8,4,0,1635,1636,5,3,0,0,1636,1761,1,0,0,0,1637,1638,5,28,0,0,1638, +1640,3,90,45,0,1639,1641,3,134,67,0,1640,1639,1,0,0,0,1641,1642,1,0,0,0, +1642,1640,1,0,0,0,1642,1643,1,0,0,0,1643,1646,1,0,0,0,1644,1645,5,61,0,0, +1645,1647,3,84,42,0,1646,1644,1,0,0,0,1646,1647,1,0,0,0,1647,1648,1,0,0, +0,1648,1649,5,64,0,0,1649,1761,1,0,0,0,1650,1652,5,28,0,0,1651,1653,3,134, +67,0,1652,1651,1,0,0,0,1653,1654,1,0,0,0,1654,1652,1,0,0,0,1654,1655,1,0, +0,0,1655,1658,1,0,0,0,1656,1657,5,61,0,0,1657,1659,3,84,42,0,1658,1656,1, +0,0,0,1658,1659,1,0,0,0,1659,1660,1,0,0,0,1660,1661,5,64,0,0,1661,1761,1, +0,0,0,1662,1663,5,29,0,0,1663,1664,5,2,0,0,1664,1665,3,84,42,0,1665,1666, +5,18,0,0,1666,1667,3,114,57,0,1667,1668,5,3,0,0,1668,1761,1,0,0,0,1669,1670, +5,212,0,0,1670,1671,5,2,0,0,1671,1672,3,84,42,0,1672,1673,5,18,0,0,1673, +1674,3,114,57,0,1674,1675,5,3,0,0,1675,1761,1,0,0,0,1676,1677,5,17,0,0,1677, +1686,5,7,0,0,1678,1683,3,84,42,0,1679,1680,5,4,0,0,1680,1682,3,84,42,0,1681, +1679,1,0,0,0,1682,1685,1,0,0,0,1683,1681,1,0,0,0,1683,1684,1,0,0,0,1684, +1687,1,0,0,0,1685,1683,1,0,0,0,1686,1678,1,0,0,0,1686,1687,1,0,0,0,1687, +1688,1,0,0,0,1688,1761,5,8,0,0,1689,1761,3,170,85,0,1690,1761,5,42,0,0,1691, +1695,5,44,0,0,1692,1693,5,2,0,0,1693,1694,5,251,0,0,1694,1696,5,3,0,0,1695, +1692,1,0,0,0,1695,1696,1,0,0,0,1696,1761,1,0,0,0,1697,1701,5,45,0,0,1698, +1699,5,2,0,0,1699,1700,5,251,0,0,1700,1702,5,3,0,0,1701,1698,1,0,0,0,1701, +1702,1,0,0,0,1702,1761,1,0,0,0,1703,1707,5,119,0,0,1704,1705,5,2,0,0,1705, +1706,5,251,0,0,1706,1708,5,3,0,0,1707,1704,1,0,0,0,1707,1708,1,0,0,0,1708, +1761,1,0,0,0,1709,1713,5,120,0,0,1710,1711,5,2,0,0,1711,1712,5,251,0,0,1712, +1714,5,3,0,0,1713,1710,1,0,0,0,1713,1714,1,0,0,0,1714,1761,1,0,0,0,1715, +1761,5,46,0,0,1716,1717,5,196,0,0,1717,1718,5,2,0,0,1718,1719,3,90,45,0, +1719,1720,5,81,0,0,1720,1723,3,90,45,0,1721,1722,5,79,0,0,1722,1724,3,90, +45,0,1723,1721,1,0,0,0,1723,1724,1,0,0,0,1724,1725,1,0,0,0,1725,1726,5,3, +0,0,1726,1761,1,0,0,0,1727,1728,5,136,0,0,1728,1729,5,2,0,0,1729,1732,3, +90,45,0,1730,1731,5,4,0,0,1731,1733,3,110,55,0,1732,1730,1,0,0,0,1732,1733, +1,0,0,0,1733,1734,1,0,0,0,1734,1735,5,3,0,0,1735,1761,1,0,0,0,1736,1737, +5,72,0,0,1737,1738,5,2,0,0,1738,1739,3,170,85,0,1739,1740,5,81,0,0,1740, +1741,3,90,45,0,1741,1742,5,3,0,0,1742,1761,1,0,0,0,1743,1744,5,2,0,0,1744, +1745,3,84,42,0,1745,1746,5,3,0,0,1746,1761,1,0,0,0,1747,1748,5,90,0,0,1748, +1757,5,2,0,0,1749,1754,3,158,79,0,1750,1751,5,4,0,0,1751,1753,3,158,79,0, +1752,1750,1,0,0,0,1753,1756,1,0,0,0,1754,1752,1,0,0,0,1754,1755,1,0,0,0, +1755,1758,1,0,0,0,1756,1754,1,0,0,0,1757,1749,1,0,0,0,1757,1758,1,0,0,0, +1758,1759,1,0,0,0,1759,1761,5,3,0,0,1760,1521,1,0,0,0,1760,1523,1,0,0,0, +1760,1524,1,0,0,0,1760,1527,1,0,0,0,1760,1529,1,0,0,0,1760,1530,1,0,0,0, +1760,1531,1,0,0,0,1760,1532,1,0,0,0,1760,1533,1,0,0,0,1760,1534,1,0,0,0, +1760,1541,1,0,0,0,1760,1551,1,0,0,0,1760,1563,1,0,0,0,1760,1573,1,0,0,0, +1760,1610,1,0,0,0,1760,1614,1,0,0,0,1760,1628,1,0,0,0,1760,1632,1,0,0,0, +1760,1637,1,0,0,0,1760,1650,1,0,0,0,1760,1662,1,0,0,0,1760,1669,1,0,0,0, +1760,1676,1,0,0,0,1760,1689,1,0,0,0,1760,1690,1,0,0,0,1760,1691,1,0,0,0, +1760,1697,1,0,0,0,1760,1703,1,0,0,0,1760,1709,1,0,0,0,1760,1715,1,0,0,0, +1760,1716,1,0,0,0,1760,1727,1,0,0,0,1760,1736,1,0,0,0,1760,1743,1,0,0,0, +1760,1747,1,0,0,0,1761,1772,1,0,0,0,1762,1763,10,14,0,0,1763,1764,5,7,0, +0,1764,1765,3,90,45,0,1765,1766,5,8,0,0,1766,1771,1,0,0,0,1767,1768,10,12, +0,0,1768,1769,5,1,0,0,1769,1771,3,170,85,0,1770,1762,1,0,0,0,1770,1767,1, +0,0,0,1771,1774,1,0,0,0,1772,1770,1,0,0,0,1772,1773,1,0,0,0,1773,93,1,0, +0,0,1774,1772,1,0,0,0,1775,1782,5,248,0,0,1776,1779,5,249,0,0,1777,1778, +5,214,0,0,1778,1780,5,248,0,0,1779,1777,1,0,0,0,1779,1780,1,0,0,0,1780,1782, +1,0,0,0,1781,1775,1,0,0,0,1781,1776,1,0,0,0,1782,95,1,0,0,0,1783,1784,5, +95,0,0,1784,1788,5,140,0,0,1785,1786,5,170,0,0,1786,1788,5,140,0,0,1787, +1783,1,0,0,0,1787,1785,1,0,0,0,1788,97,1,0,0,0,1789,1790,5,206,0,0,1790, +1791,5,235,0,0,1791,1796,3,106,53,0,1792,1793,5,206,0,0,1793,1794,5,235, +0,0,1794,1796,3,94,47,0,1795,1789,1,0,0,0,1795,1792,1,0,0,0,1796,99,1,0, +0,0,1797,1798,7,13,0,0,1798,101,1,0,0,0,1799,1800,7,14,0,0,1800,103,1,0, +0,0,1801,1802,7,15,0,0,1802,105,1,0,0,0,1803,1805,5,102,0,0,1804,1806,7, +11,0,0,1805,1804,1,0,0,0,1805,1806,1,0,0,0,1806,1807,1,0,0,0,1807,1808,3, +94,47,0,1808,1811,3,108,54,0,1809,1810,5,208,0,0,1810,1812,3,108,54,0,1811, +1809,1,0,0,0,1811,1812,1,0,0,0,1812,107,1,0,0,0,1813,1814,7,16,0,0,1814, +109,1,0,0,0,1815,1816,7,17,0,0,1816,111,1,0,0,0,1817,1826,5,2,0,0,1818,1823, +3,114,57,0,1819,1820,5,4,0,0,1820,1822,3,114,57,0,1821,1819,1,0,0,0,1822, +1825,1,0,0,0,1823,1821,1,0,0,0,1823,1824,1,0,0,0,1824,1827,1,0,0,0,1825, +1823,1,0,0,0,1826,1818,1,0,0,0,1826,1827,1,0,0,0,1827,1828,1,0,0,0,1828, +1829,5,3,0,0,1829,113,1,0,0,0,1830,1831,6,57,-1,0,1831,1832,5,17,0,0,1832, +1833,5,238,0,0,1833,1834,3,114,57,0,1834,1835,5,240,0,0,1835,1878,1,0,0, +0,1836,1837,5,122,0,0,1837,1838,5,238,0,0,1838,1839,3,114,57,0,1839,1840, +5,4,0,0,1840,1841,3,114,57,0,1841,1842,5,240,0,0,1842,1878,1,0,0,0,1843, +1844,5,180,0,0,1844,1845,5,2,0,0,1845,1846,3,170,85,0,1846,1853,3,114,57, +0,1847,1848,5,4,0,0,1848,1849,3,170,85,0,1849,1850,3,114,57,0,1850,1852, +1,0,0,0,1851,1847,1,0,0,0,1852,1855,1,0,0,0,1853,1851,1,0,0,0,1853,1854, +1,0,0,0,1854,1856,1,0,0,0,1855,1853,1,0,0,0,1856,1857,5,3,0,0,1857,1878, +1,0,0,0,1858,1870,3,132,66,0,1859,1860,5,2,0,0,1860,1865,3,130,65,0,1861, +1862,5,4,0,0,1862,1864,3,130,65,0,1863,1861,1,0,0,0,1864,1867,1,0,0,0,1865, +1863,1,0,0,0,1865,1866,1,0,0,0,1866,1868,1,0,0,0,1867,1865,1,0,0,0,1868, +1869,5,3,0,0,1869,1871,1,0,0,0,1870,1859,1,0,0,0,1870,1871,1,0,0,0,1871, +1878,1,0,0,0,1872,1873,5,102,0,0,1873,1874,3,108,54,0,1874,1875,5,208,0, +0,1875,1876,3,108,54,0,1876,1878,1,0,0,0,1877,1830,1,0,0,0,1877,1836,1,0, +0,0,1877,1843,1,0,0,0,1877,1858,1,0,0,0,1877,1872,1,0,0,0,1878,1883,1,0, +0,0,1879,1880,10,6,0,0,1880,1882,5,17,0,0,1881,1879,1,0,0,0,1882,1885,1, +0,0,0,1883,1881,1,0,0,0,1883,1884,1,0,0,0,1884,115,1,0,0,0,1885,1883,1,0, +0,0,1886,1887,3,158,79,0,1887,1896,5,2,0,0,1888,1893,3,118,59,0,1889,1890, +5,4,0,0,1890,1892,3,118,59,0,1891,1889,1,0,0,0,1892,1895,1,0,0,0,1893,1891, +1,0,0,0,1893,1894,1,0,0,0,1894,1897,1,0,0,0,1895,1893,1,0,0,0,1896,1888, +1,0,0,0,1896,1897,1,0,0,0,1897,1907,1,0,0,0,1898,1899,5,38,0,0,1899,1904, +3,128,64,0,1900,1901,5,4,0,0,1901,1903,3,128,64,0,1902,1900,1,0,0,0,1903, +1906,1,0,0,0,1904,1902,1,0,0,0,1904,1905,1,0,0,0,1905,1908,1,0,0,0,1906, +1904,1,0,0,0,1907,1898,1,0,0,0,1907,1908,1,0,0,0,1908,1909,1,0,0,0,1909, +1910,5,3,0,0,1910,117,1,0,0,0,1911,1912,3,170,85,0,1912,1913,5,9,0,0,1913, +1915,1,0,0,0,1914,1911,1,0,0,0,1914,1915,1,0,0,0,1915,1919,1,0,0,0,1916, +1920,3,120,60,0,1917,1920,3,124,62,0,1918,1920,3,84,42,0,1919,1916,1,0,0, +0,1919,1917,1,0,0,0,1919,1918,1,0,0,0,1920,119,1,0,0,0,1921,1939,3,122,61, +0,1922,1923,5,152,0,0,1923,1937,5,24,0,0,1924,1933,5,2,0,0,1925,1930,3,84, +42,0,1926,1927,5,4,0,0,1927,1929,3,84,42,0,1928,1926,1,0,0,0,1929,1932,1, +0,0,0,1930,1928,1,0,0,0,1930,1931,1,0,0,0,1931,1934,1,0,0,0,1932,1930,1, +0,0,0,1933,1925,1,0,0,0,1933,1934,1,0,0,0,1934,1935,1,0,0,0,1935,1938,5, +3,0,0,1936,1938,3,84,42,0,1937,1924,1,0,0,0,1937,1936,1,0,0,0,1938,1940, +1,0,0,0,1939,1922,1,0,0,0,1939,1940,1,0,0,0,1940,1947,1,0,0,0,1941,1942, +5,160,0,0,1942,1943,5,229,0,0,1943,1948,5,62,0,0,1944,1945,5,110,0,0,1945, +1946,5,229,0,0,1946,1948,5,62,0,0,1947,1941,1,0,0,0,1947,1944,1,0,0,0,1947, +1948,1,0,0,0,1948,1965,1,0,0,0,1949,1950,5,147,0,0,1950,1963,5,24,0,0,1951, +1952,5,2,0,0,1952,1957,3,52,26,0,1953,1954,5,4,0,0,1954,1956,3,52,26,0,1955, +1953,1,0,0,0,1956,1959,1,0,0,0,1957,1955,1,0,0,0,1957,1958,1,0,0,0,1958, +1960,1,0,0,0,1959,1957,1,0,0,0,1960,1961,5,3,0,0,1961,1964,1,0,0,0,1962, +1964,3,52,26,0,1963,1951,1,0,0,0,1963,1962,1,0,0,0,1964,1966,1,0,0,0,1965, +1949,1,0,0,0,1965,1966,1,0,0,0,1966,121,1,0,0,0,1967,1968,5,200,0,0,1968, +1969,5,2,0,0,1969,1970,3,158,79,0,1970,1978,5,3,0,0,1971,1973,5,18,0,0,1972, +1971,1,0,0,0,1972,1973,1,0,0,0,1973,1974,1,0,0,0,1974,1976,3,170,85,0,1975, +1977,3,80,40,0,1976,1975,1,0,0,0,1976,1977,1,0,0,0,1977,1979,1,0,0,0,1978, +1972,1,0,0,0,1978,1979,1,0,0,0,1979,1994,1,0,0,0,1980,1981,5,200,0,0,1981, +1982,5,2,0,0,1982,1983,3,8,4,0,1983,1991,5,3,0,0,1984,1986,5,18,0,0,1985, +1984,1,0,0,0,1985,1986,1,0,0,0,1986,1987,1,0,0,0,1987,1989,3,170,85,0,1988, +1990,3,80,40,0,1989,1988,1,0,0,0,1989,1990,1,0,0,0,1990,1992,1,0,0,0,1991, +1985,1,0,0,0,1991,1992,1,0,0,0,1992,1994,1,0,0,0,1993,1967,1,0,0,0,1993, +1980,1,0,0,0,1994,123,1,0,0,0,1995,1996,5,55,0,0,1996,1997,5,2,0,0,1997, +2002,3,126,63,0,1998,1999,5,4,0,0,1999,2001,3,126,63,0,2000,1998,1,0,0,0, +2001,2004,1,0,0,0,2002,2000,1,0,0,0,2002,2003,1,0,0,0,2003,2005,1,0,0,0, +2004,2002,1,0,0,0,2005,2006,5,3,0,0,2006,2014,1,0,0,0,2007,2008,5,29,0,0, +2008,2009,5,2,0,0,2009,2010,5,138,0,0,2010,2011,5,18,0,0,2011,2012,5,55, +0,0,2012,2014,5,3,0,0,2013,1995,1,0,0,0,2013,2007,1,0,0,0,2014,125,1,0,0, +0,2015,2017,3,170,85,0,2016,2018,3,114,57,0,2017,2016,1,0,0,0,2017,2018, +1,0,0,0,2018,127,1,0,0,0,2019,2020,5,2,0,0,2020,2021,3,158,79,0,2021,2022, +5,4,0,0,2022,2027,3,158,79,0,2023,2024,5,4,0,0,2024,2026,3,158,79,0,2025, +2023,1,0,0,0,2026,2029,1,0,0,0,2027,2025,1,0,0,0,2027,2028,1,0,0,0,2028, +2030,1,0,0,0,2029,2027,1,0,0,0,2030,2031,5,3,0,0,2031,129,1,0,0,0,2032,2035, +5,251,0,0,2033,2035,3,114,57,0,2034,2032,1,0,0,0,2034,2033,1,0,0,0,2035, +131,1,0,0,0,2036,2041,5,258,0,0,2037,2041,5,259,0,0,2038,2041,5,260,0,0, +2039,2041,3,158,79,0,2040,2036,1,0,0,0,2040,2037,1,0,0,0,2040,2038,1,0,0, +0,2040,2039,1,0,0,0,2041,133,1,0,0,0,2042,2043,5,229,0,0,2043,2044,3,84, +42,0,2044,2045,5,205,0,0,2045,2046,3,84,42,0,2046,135,1,0,0,0,2047,2048, +5,76,0,0,2048,2049,5,2,0,0,2049,2050,5,230,0,0,2050,2051,3,86,43,0,2051, +2052,5,3,0,0,2052,137,1,0,0,0,2053,2054,5,229,0,0,2054,2055,5,123,0,0,2055, +2056,5,205,0,0,2056,2057,5,220,0,0,2057,2058,5,189,0,0,2058,2059,3,170,85, +0,2059,2060,5,236,0,0,2060,2068,3,84,42,0,2061,2062,5,4,0,0,2062,2063,3, +170,85,0,2063,2064,5,236,0,0,2064,2065,3,84,42,0,2065,2067,1,0,0,0,2066, +2061,1,0,0,0,2067,2070,1,0,0,0,2068,2066,1,0,0,0,2068,2069,1,0,0,0,2069, +2102,1,0,0,0,2070,2068,1,0,0,0,2071,2072,5,229,0,0,2072,2073,5,137,0,0,2073, +2074,5,123,0,0,2074,2075,5,205,0,0,2075,2087,5,100,0,0,2076,2077,5,2,0,0, +2077,2082,3,170,85,0,2078,2079,5,4,0,0,2079,2081,3,170,85,0,2080,2078,1, +0,0,0,2081,2084,1,0,0,0,2082,2080,1,0,0,0,2082,2083,1,0,0,0,2083,2085,1, +0,0,0,2084,2082,1,0,0,0,2085,2086,5,3,0,0,2086,2088,1,0,0,0,2087,2076,1, +0,0,0,2087,2088,1,0,0,0,2088,2089,1,0,0,0,2089,2090,5,225,0,0,2090,2091, +5,2,0,0,2091,2096,3,84,42,0,2092,2093,5,4,0,0,2093,2095,3,84,42,0,2094,2092, +1,0,0,0,2095,2098,1,0,0,0,2096,2094,1,0,0,0,2096,2097,1,0,0,0,2097,2099, +1,0,0,0,2098,2096,1,0,0,0,2099,2100,5,3,0,0,2100,2102,1,0,0,0,2101,2053, +1,0,0,0,2101,2071,1,0,0,0,2102,139,1,0,0,0,2103,2104,5,151,0,0,2104,2115, +5,2,0,0,2105,2106,5,152,0,0,2106,2107,5,24,0,0,2107,2112,3,84,42,0,2108, +2109,5,4,0,0,2109,2111,3,84,42,0,2110,2108,1,0,0,0,2111,2114,1,0,0,0,2112, +2110,1,0,0,0,2112,2113,1,0,0,0,2113,2116,1,0,0,0,2114,2112,1,0,0,0,2115, +2105,1,0,0,0,2115,2116,1,0,0,0,2116,2127,1,0,0,0,2117,2118,5,147,0,0,2118, +2119,5,24,0,0,2119,2124,3,52,26,0,2120,2121,5,4,0,0,2121,2123,3,52,26,0, +2122,2120,1,0,0,0,2123,2126,1,0,0,0,2124,2122,1,0,0,0,2124,2125,1,0,0,0, +2125,2128,1,0,0,0,2126,2124,1,0,0,0,2127,2117,1,0,0,0,2127,2128,1,0,0,0, +2128,2130,1,0,0,0,2129,2131,3,142,71,0,2130,2129,1,0,0,0,2130,2131,1,0,0, +0,2131,2132,1,0,0,0,2132,2133,5,3,0,0,2133,141,1,0,0,0,2134,2135,5,161,0, +0,2135,2159,3,144,72,0,2136,2137,5,181,0,0,2137,2159,3,144,72,0,2138,2139, +5,91,0,0,2139,2159,3,144,72,0,2140,2141,5,161,0,0,2141,2142,5,23,0,0,2142, +2143,3,144,72,0,2143,2144,5,15,0,0,2144,2145,3,144,72,0,2145,2159,1,0,0, +0,2146,2147,5,181,0,0,2147,2148,5,23,0,0,2148,2149,3,144,72,0,2149,2150, +5,15,0,0,2150,2151,3,144,72,0,2151,2159,1,0,0,0,2152,2153,5,91,0,0,2153, +2154,5,23,0,0,2154,2155,3,144,72,0,2155,2156,5,15,0,0,2156,2157,3,144,72, +0,2157,2159,1,0,0,0,2158,2134,1,0,0,0,2158,2136,1,0,0,0,2158,2138,1,0,0, +0,2158,2140,1,0,0,0,2158,2146,1,0,0,0,2158,2152,1,0,0,0,2159,143,1,0,0,0, +2160,2161,5,215,0,0,2161,2170,5,155,0,0,2162,2163,5,215,0,0,2163,2170,5, +78,0,0,2164,2165,5,41,0,0,2165,2170,5,180,0,0,2166,2167,3,84,42,0,2167,2168, +7,18,0,0,2168,2170,1,0,0,0,2169,2160,1,0,0,0,2169,2162,1,0,0,0,2169,2164, +1,0,0,0,2169,2166,1,0,0,0,2170,145,1,0,0,0,2171,2172,3,170,85,0,2172,2173, +5,236,0,0,2173,2174,3,84,42,0,2174,147,1,0,0,0,2175,2176,5,80,0,0,2176,2180, +7,19,0,0,2177,2178,5,213,0,0,2178,2180,7,20,0,0,2179,2175,1,0,0,0,2179,2177, +1,0,0,0,2180,149,1,0,0,0,2181,2182,5,107,0,0,2182,2183,5,116,0,0,2183,2187, +3,152,76,0,2184,2185,5,162,0,0,2185,2187,7,21,0,0,2186,2181,1,0,0,0,2186, +2184,1,0,0,0,2187,151,1,0,0,0,2188,2189,5,162,0,0,2189,2196,5,216,0,0,2190, +2191,5,162,0,0,2191,2196,5,35,0,0,2192,2193,5,167,0,0,2193,2196,5,162,0, +0,2194,2196,5,187,0,0,2195,2188,1,0,0,0,2195,2190,1,0,0,0,2195,2192,1,0, +0,0,2195,2194,1,0,0,0,2196,153,1,0,0,0,2197,2203,3,84,42,0,2198,2199,3,170, +85,0,2199,2200,5,9,0,0,2200,2201,3,84,42,0,2201,2203,1,0,0,0,2202,2197,1, +0,0,0,2202,2198,1,0,0,0,2203,155,1,0,0,0,2204,2209,5,186,0,0,2205,2209,5, +52,0,0,2206,2209,5,100,0,0,2207,2209,3,170,85,0,2208,2204,1,0,0,0,2208,2205, +1,0,0,0,2208,2206,1,0,0,0,2208,2207,1,0,0,0,2209,157,1,0,0,0,2210,2215,3, +170,85,0,2211,2212,5,1,0,0,2212,2214,3,170,85,0,2213,2211,1,0,0,0,2214,2217, +1,0,0,0,2215,2213,1,0,0,0,2215,2216,1,0,0,0,2216,159,1,0,0,0,2217,2215,1, +0,0,0,2218,2219,5,79,0,0,2219,2220,7,22,0,0,2220,2221,3,162,81,0,2221,2222, +3,90,45,0,2222,161,1,0,0,0,2223,2224,5,18,0,0,2224,2227,5,141,0,0,2225,2227, +5,21,0,0,2226,2223,1,0,0,0,2226,2225,1,0,0,0,2227,163,1,0,0,0,2228,2232, +5,46,0,0,2229,2232,5,43,0,0,2230,2232,3,166,83,0,2231,2228,1,0,0,0,2231, +2229,1,0,0,0,2231,2230,1,0,0,0,2232,165,1,0,0,0,2233,2234,5,222,0,0,2234, +2239,3,170,85,0,2235,2236,5,176,0,0,2236,2239,3,170,85,0,2237,2239,3,170, +85,0,2238,2233,1,0,0,0,2238,2235,1,0,0,0,2238,2237,1,0,0,0,2239,167,1,0, +0,0,2240,2245,3,170,85,0,2241,2242,5,4,0,0,2242,2244,3,170,85,0,2243,2241, +1,0,0,0,2244,2247,1,0,0,0,2245,2243,1,0,0,0,2245,2246,1,0,0,0,2246,169,1, +0,0,0,2247,2245,1,0,0,0,2248,2254,5,254,0,0,2249,2254,5,256,0,0,2250,2254, +3,192,96,0,2251,2254,5,257,0,0,2252,2254,5,255,0,0,2253,2248,1,0,0,0,2253, +2249,1,0,0,0,2253,2250,1,0,0,0,2253,2251,1,0,0,0,2253,2252,1,0,0,0,2254, +171,1,0,0,0,2255,2259,5,252,0,0,2256,2259,5,253,0,0,2257,2259,5,251,0,0, +2258,2255,1,0,0,0,2258,2256,1,0,0,0,2258,2257,1,0,0,0,2259,173,1,0,0,0,2260, +2263,3,176,88,0,2261,2263,3,178,89,0,2262,2260,1,0,0,0,2262,2261,1,0,0,0, +2263,175,1,0,0,0,2264,2265,5,36,0,0,2265,2266,3,170,85,0,2266,2267,3,178, +89,0,2267,177,1,0,0,0,2268,2269,3,180,90,0,2269,2271,3,80,40,0,2270,2272, +3,182,91,0,2271,2270,1,0,0,0,2271,2272,1,0,0,0,2272,179,1,0,0,0,2273,2277, +5,218,0,0,2274,2275,5,157,0,0,2275,2277,5,111,0,0,2276,2273,1,0,0,0,2276, +2274,1,0,0,0,2277,181,1,0,0,0,2278,2280,3,184,92,0,2279,2278,1,0,0,0,2280, +2283,1,0,0,0,2281,2279,1,0,0,0,2281,2282,1,0,0,0,2282,183,1,0,0,0,2283,2281, +1,0,0,0,2284,2288,3,188,94,0,2285,2288,3,186,93,0,2286,2288,3,190,95,0,2287, +2284,1,0,0,0,2287,2285,1,0,0,0,2287,2286,1,0,0,0,2288,185,1,0,0,0,2289,2293, +5,165,0,0,2290,2291,5,137,0,0,2291,2293,5,165,0,0,2292,2289,1,0,0,0,2292, +2290,1,0,0,0,2293,187,1,0,0,0,2294,2295,7,23,0,0,2295,189,1,0,0,0,2296,2300, +5,65,0,0,2297,2298,5,137,0,0,2298,2300,5,65,0,0,2299,2296,1,0,0,0,2299,2297, +1,0,0,0,2300,191,1,0,0,0,2301,2302,7,24,0,0,2302,193,1,0,0,0,296,216,221, +227,231,245,249,253,257,265,269,272,279,288,294,298,304,311,320,329,340, +347,357,364,372,380,388,398,405,413,418,429,434,445,456,468,474,479,485, +494,505,514,519,523,531,538,547,552,555,565,568,575,584,590,595,599,609, +612,622,635,641,646,652,661,667,674,682,687,691,699,705,712,717,721,731, +734,738,741,749,754,779,785,791,793,799,805,807,815,817,836,841,848,860, +862,870,872,890,893,897,901,919,922,938,943,949,952,961,963,966,972,979, +985,991,995,999,1005,1013,1028,1035,1040,1047,1055,1059,1064,1075,1087,1090, +1095,1097,1106,1108,1116,1122,1125,1127,1139,1146,1150,1154,1158,1165,1174, +1177,1181,1186,1190,1193,1200,1211,1214,1224,1227,1238,1243,1251,1254,1258, +1262,1273,1276,1283,1302,1306,1310,1314,1318,1322,1324,1335,1340,1349,1355, +1359,1361,1369,1376,1389,1395,1411,1418,1422,1430,1432,1445,1453,1462,1468, +1476,1482,1486,1491,1496,1502,1516,1518,1547,1558,1568,1571,1576,1583,1586, +1595,1598,1602,1605,1608,1620,1623,1642,1646,1654,1658,1683,1686,1695,1701, +1707,1713,1723,1732,1754,1757,1760,1770,1772,1779,1781,1787,1795,1805,1811, +1823,1826,1853,1865,1870,1877,1883,1893,1896,1904,1907,1914,1919,1930,1933, +1937,1939,1947,1957,1963,1965,1972,1976,1978,1985,1989,1991,1993,2002,2013, +2017,2027,2034,2040,2068,2082,2087,2096,2101,2112,2115,2124,2127,2130,2158, +2169,2179,2186,2195,2202,2208,2215,2226,2231,2238,2245,2253,2258,2262,2271, +2276,2281,2287,2292,2299]; const atn = new antlr4.atn.ATNDeserializer().deserialize(serializedATN); @@ -726,44 +872,47 @@ export default class SqlBaseParser extends antlr4.Parser { static literalNames = [ null, "'.'", "'('", "')'", "','", "'?'", "'->'", "'['", "']'", "'=>'", "'ADD'", "'ADMIN'", "'ALL'", "'ALTER'", "'ANALYZE'", "'AND'", "'ANY'", "'ARRAY'", - "'AS'", "'ASC'", "'AT'", "'BERNOULLI'", "'BETWEEN'", - "'BY'", "'CALL'", "'CALLED'", "'CASCADE'", "'CASE'", - "'CAST'", "'CATALOGS'", "'COLUMN'", "'COLUMNS'", - "'COMMENT'", "'COMMIT'", "'COMMITTED'", "'CONSTRAINT'", - "'CREATE'", "'CROSS'", "'CUBE'", "'CURRENT'", - "'CURRENT_DATE'", "'CURRENT_ROLE'", "'CURRENT_TIME'", - "'CURRENT_TIMESTAMP'", "'CURRENT_USER'", "'DATA'", - "'DATE'", "'DAY'", "'DEALLOCATE'", "'DEFINER'", - "'DELETE'", "'DESC'", "'DESCRIBE'", "'DETERMINISTIC'", - "'DISTINCT'", "'DISTRIBUTED'", "'DROP'", "'ELSE'", - "'END'", "'ESCAPE'", "'EXCEPT'", "'EXCLUDING'", - "'EXECUTE'", "'EXISTS'", "'EXPLAIN'", "'EXTRACT'", - "'EXTERNAL'", "'FALSE'", "'FETCH'", "'FILTER'", - "'FIRST'", "'FOLLOWING'", "'FOR'", "'FORMAT'", - "'FROM'", "'FULL'", "'FUNCTION'", "'FUNCTIONS'", - "'GRANT'", "'GRANTED'", "'GRANTS'", "'GRAPHVIZ'", - "'GROUP'", "'GROUPING'", "'GROUPS'", "'HAVING'", - "'HOUR'", "'IF'", "'IGNORE'", "'IN'", "'INCLUDING'", - "'INNER'", "'INPUT'", "'INSERT'", "'INTERSECT'", - "'INTERVAL'", "'INTO'", "'INVOKER'", "'IO'", - "'IS'", "'ISOLATION'", "'JSON'", "'JOIN'", "'LANGUAGE'", - "'LAST'", "'LATERAL'", "'LEFT'", "'LEVEL'", - "'LIKE'", "'LIMIT'", "'LOCALTIME'", "'LOCALTIMESTAMP'", - "'LOGICAL'", "'MAP'", "'MATERIALIZED'", "'MINUTE'", - "'MONTH'", "'NAME'", "'NATURAL'", "'NFC'", "'NFD'", - "'NFKC'", "'NFKD'", "'NO'", "'NONE'", "'NORMALIZE'", - "'NOT'", "'NULL'", "'NULLIF'", "'NULLS'", "'OF'", - "'OFFSET'", "'ON'", "'ONLY'", "'OPTION'", "'OR'", - "'ORDER'", "'ORDINALITY'", "'OUTER'", "'OUTPUT'", - "'OVER'", "'PARTITION'", "'PARTITIONS'", "'POSITION'", - "'PRECEDING'", "'PREPARE'", "'PRIVILEGES'", - "'PROPERTIES'", "'RANGE'", "'READ'", "'RECURSIVE'", - "'REFRESH'", "'RENAME'", "'REPEATABLE'", "'REPLACE'", - "'RESET'", "'RESPECT'", "'RESTRICT'", "'RETURN'", - "'RETURNS'", "'REVOKE'", "'RIGHT'", "'ROLE'", - "'ROLES'", "'ROLLBACK'", "'ROLLUP'", "'ROW'", - "'ROWS'", "'SCHEMA'", "'SCHEMAS'", "'SECOND'", - "'SECURITY'", "'SELECT'", "'SERIALIZABLE'", + "'AS'", "'ASC'", "'AT'", "'BEFORE'", "'BERNOULLI'", + "'BETWEEN'", "'BY'", "'CALL'", "'CALLED'", "'CASCADE'", + "'CASE'", "'CAST'", "'CATALOGS'", "'COLUMN'", + "'COLUMNS'", "'COMMENT'", "'COMMIT'", "'COMMITTED'", + "'CONSTRAINT'", "'CREATE'", "'COPARTITION'", + "'CROSS'", "'CUBE'", "'CURRENT'", "'CURRENT_DATE'", + "'CURRENT_ROLE'", "'CURRENT_TIME'", "'CURRENT_TIMESTAMP'", + "'CURRENT_USER'", "'DATA'", "'DATE'", "'DAY'", + "'DEALLOCATE'", "'DEFINER'", "'DELETE'", "'DESC'", + "'DESCRIBE'", "'DESCRIPTOR'", "'DETERMINISTIC'", + "'DISABLED'", "'DISTINCT'", "'DISTRIBUTED'", + "'DROP'", "'ELSE'", "'EMPTY'", "'ENABLED'", + "'END'", "'ENFORCED'", "'ESCAPE'", "'EXCEPT'", + "'EXCLUDING'", "'EXECUTE'", "'EXISTS'", "'EXPLAIN'", + "'EXTRACT'", "'EXTERNAL'", "'FALSE'", "'FETCH'", + "'FILTER'", "'FIRST'", "'FOLLOWING'", "'FOR'", + "'FORMAT'", "'FROM'", "'FULL'", "'FUNCTION'", + "'FUNCTIONS'", "'GRANT'", "'GRANTED'", "'GRANTS'", + "'GRAPHVIZ'", "'GROUP'", "'GROUPING'", "'GROUPS'", + "'HAVING'", "'HOUR'", "'IF'", "'IGNORE'", "'IN'", + "'INCLUDING'", "'INNER'", "'INPUT'", "'INSERT'", + "'INTERSECT'", "'INTERVAL'", "'INTO'", "'INVOKER'", + "'IO'", "'IS'", "'ISOLATION'", "'JSON'", "'JOIN'", + "'KEEP'", "'KEY'", "'LANGUAGE'", "'LAST'", "'LATERAL'", + "'LEFT'", "'LEVEL'", "'LIKE'", "'LIMIT'", "'LOCALTIME'", + "'LOCALTIMESTAMP'", "'LOGICAL'", "'MAP'", "'MATCHED'", + "'MATERIALIZED'", "'MERGE'", "'MINUTE'", "'MONTH'", + "'NAME'", "'NATURAL'", "'NFC'", "'NFD'", "'NFKC'", + "'NFKD'", "'NO'", "'NONE'", "'NORMALIZE'", "'NOT'", + "'NULL'", "'NULLIF'", "'NULLS'", "'OF'", "'OFFSET'", + "'ON'", "'ONLY'", "'OPTION'", "'OR'", "'ORDER'", + "'ORDINALITY'", "'OUTER'", "'OUTPUT'", "'OVER'", + "'PARTITION'", "'PARTITIONS'", "'POSITION'", + "'PRECEDING'", "'PREPARE'", "'PRIMARY'", "'PRIVILEGES'", + "'PROPERTIES'", "'PRUNE'", "'RANGE'", "'READ'", + "'RECURSIVE'", "'REFRESH'", "'RELY'", "'RENAME'", + "'REPEATABLE'", "'REPLACE'", "'RESET'", "'RESPECT'", + "'RESTRICT'", "'RETURN'", "'RETURNS'", "'REVOKE'", + "'RIGHT'", "'ROLE'", "'ROLES'", "'ROLLBACK'", + "'ROLLUP'", "'ROW'", "'ROWS'", "'SCHEMA'", "'SCHEMAS'", + "'SECOND'", "'SECURITY'", "'SELECT'", "'SERIALIZABLE'", "'SESSION'", "'SET'", "'SETS'", "'SHOW'", "'SOME'", "'SQL'", "'START'", "'STATS'", "'SUBSTRING'", "'SYSTEM'", "'SYSTEM_TIME'", "'SYSTEM_VERSION'", @@ -771,8 +920,8 @@ export default class SqlBaseParser extends antlr4.Parser { "'TEXT'", "'THEN'", "'TIME'", "'TIMESTAMP'", "'TO'", "'TRANSACTION'", "'TRUE'", "'TRUNCATE'", "'TRY_CAST'", "'TYPE'", "'UESCAPE'", "'UNBOUNDED'", - "'UNCOMMITTED'", "'UNION'", "'UNNEST'", "'UPDATE'", - "'USE'", "'USER'", "'USING'", "'VALIDATE'", + "'UNCOMMITTED'", "'UNION'", "'UNIQUE'", "'UNNEST'", + "'UPDATE'", "'USE'", "'USER'", "'USING'", "'VALIDATE'", "'VALUES'", "'VERBOSE'", "'VERSION'", "'VIEW'", "'WHEN'", "'WHERE'", "'WITH'", "'WORK'", "'WRITE'", "'YEAR'", "'ZONE'", "'='", null, "'<'", "'<='", @@ -781,54 +930,58 @@ export default class SqlBaseParser extends antlr4.Parser { static symbolicNames = [ null, null, null, null, null, null, null, null, null, null, "ADD", "ADMIN", "ALL", "ALTER", "ANALYZE", "AND", "ANY", "ARRAY", "AS", "ASC", - "AT", "BERNOULLI", "BETWEEN", "BY", "CALL", - "CALLED", "CASCADE", "CASE", "CAST", "CATALOGS", - "COLUMN", "COLUMNS", "COMMENT", "COMMIT", "COMMITTED", - "CONSTRAINT", "CREATE", "CROSS", "CUBE", "CURRENT", + "AT", "BEFORE", "BERNOULLI", "BETWEEN", "BY", + "CALL", "CALLED", "CASCADE", "CASE", "CAST", + "CATALOGS", "COLUMN", "COLUMNS", "COMMENT", + "COMMIT", "COMMITTED", "CONSTRAINT", "CREATE", + "COPARTITION", "CROSS", "CUBE", "CURRENT", "CURRENT_DATE", "CURRENT_ROLE", "CURRENT_TIME", "CURRENT_TIMESTAMP", "CURRENT_USER", "DATA", "DATE", "DAY", "DEALLOCATE", "DEFINER", "DELETE", - "DESC", "DESCRIBE", "DETERMINISTIC", "DISTINCT", - "DISTRIBUTED", "DROP", "ELSE", "END", "ESCAPE", - "EXCEPT", "EXCLUDING", "EXECUTE", "EXISTS", - "EXPLAIN", "EXTRACT", "EXTERNAL", "FALSE", - "FETCH", "FILTER", "FIRST", "FOLLOWING", "FOR", - "FORMAT", "FROM", "FULL", "FUNCTION", "FUNCTIONS", - "GRANT", "GRANTED", "GRANTS", "GRAPHVIZ", "GROUP", - "GROUPING", "GROUPS", "HAVING", "HOUR", "IF", - "IGNORE", "IN", "INCLUDING", "INNER", "INPUT", - "INSERT", "INTERSECT", "INTERVAL", "INTO", - "INVOKER", "IO", "IS", "ISOLATION", "JSON", - "JOIN", "LANGUAGE", "LAST", "LATERAL", "LEFT", - "LEVEL", "LIKE", "LIMIT", "LOCALTIME", "LOCALTIMESTAMP", - "LOGICAL", "MAP", "MATERIALIZED", "MINUTE", - "MONTH", "NAME", "NATURAL", "NFC", "NFD", "NFKC", - "NFKD", "NO", "NONE", "NORMALIZE", "NOT", "NULL", - "NULLIF", "NULLS", "OF", "OFFSET", "ON", "ONLY", - "OPTION", "OR", "ORDER", "ORDINALITY", "OUTER", - "OUTPUT", "OVER", "PARTITION", "PARTITIONS", - "POSITION", "PRECEDING", "PREPARE", "PRIVILEGES", - "PROPERTIES", "RANGE", "READ", "RECURSIVE", - "REFRESH", "RENAME", "REPEATABLE", "REPLACE", - "RESET", "RESPECT", "RESTRICT", "RETURN", "RETURNS", - "REVOKE", "RIGHT", "ROLE", "ROLES", "ROLLBACK", - "ROLLUP", "ROW", "ROWS", "SCHEMA", "SCHEMAS", - "SECOND", "SECURITY", "SELECT", "SERIALIZABLE", - "SESSION", "SET", "SETS", "SHOW", "SOME", "SQL", - "START", "STATS", "SUBSTRING", "SYSTEM", "SYSTEM_TIME", + "DESC", "DESCRIBE", "DESCRIPTOR", "DETERMINISTIC", + "DISABLED", "DISTINCT", "DISTRIBUTED", "DROP", + "ELSE", "EMPTY", "ENABLED", "END", "ENFORCED", + "ESCAPE", "EXCEPT", "EXCLUDING", "EXECUTE", + "EXISTS", "EXPLAIN", "EXTRACT", "EXTERNAL", + "FALSE", "FETCH", "FILTER", "FIRST", "FOLLOWING", + "FOR", "FORMAT", "FROM", "FULL", "FUNCTION", + "FUNCTIONS", "GRANT", "GRANTED", "GRANTS", + "GRAPHVIZ", "GROUP", "GROUPING", "GROUPS", + "HAVING", "HOUR", "IF", "IGNORE", "IN", "INCLUDING", + "INNER", "INPUT", "INSERT", "INTERSECT", "INTERVAL", + "INTO", "INVOKER", "IO", "IS", "ISOLATION", + "JSON", "JOIN", "KEEP", "KEY", "LANGUAGE", + "LAST", "LATERAL", "LEFT", "LEVEL", "LIKE", + "LIMIT", "LOCALTIME", "LOCALTIMESTAMP", "LOGICAL", + "MAP", "MATCHED", "MATERIALIZED", "MERGE", + "MINUTE", "MONTH", "NAME", "NATURAL", "NFC", + "NFD", "NFKC", "NFKD", "NO", "NONE", "NORMALIZE", + "NOT", "NULL", "NULLIF", "NULLS", "OF", "OFFSET", + "ON", "ONLY", "OPTION", "OR", "ORDER", "ORDINALITY", + "OUTER", "OUTPUT", "OVER", "PARTITION", "PARTITIONS", + "POSITION", "PRECEDING", "PREPARE", "PRIMARY", + "PRIVILEGES", "PROPERTIES", "PRUNE", "RANGE", + "READ", "RECURSIVE", "REFRESH", "RELY", "RENAME", + "REPEATABLE", "REPLACE", "RESET", "RESPECT", + "RESTRICT", "RETURN", "RETURNS", "REVOKE", + "RIGHT", "ROLE", "ROLES", "ROLLBACK", "ROLLUP", + "ROW", "ROWS", "SCHEMA", "SCHEMAS", "SECOND", + "SECURITY", "SELECT", "SERIALIZABLE", "SESSION", + "SET", "SETS", "SHOW", "SOME", "SQL", "START", + "STATS", "SUBSTRING", "SYSTEM", "SYSTEM_TIME", "SYSTEM_VERSION", "TABLE", "TABLES", "TABLESAMPLE", "TEMPORARY", "TEXT", "THEN", "TIME", "TIMESTAMP", "TO", "TRANSACTION", "TRUE", "TRUNCATE", "TRY_CAST", "TYPE", "UESCAPE", "UNBOUNDED", "UNCOMMITTED", - "UNION", "UNNEST", "UPDATE", "USE", "USER", - "USING", "VALIDATE", "VALUES", "VERBOSE", "VERSION", - "VIEW", "WHEN", "WHERE", "WITH", "WORK", "WRITE", - "YEAR", "ZONE", "EQ", "NEQ", "LT", "LTE", "GT", - "GTE", "PLUS", "MINUS", "ASTERISK", "SLASH", - "PERCENT", "CONCAT", "STRING", "UNICODE_STRING", - "BINARY_LITERAL", "INTEGER_VALUE", "DECIMAL_VALUE", - "DOUBLE_VALUE", "IDENTIFIER", "DIGIT_IDENTIFIER", - "QUOTED_IDENTIFIER", "BACKQUOTED_IDENTIFIER", + "UNION", "UNIQUE", "UNNEST", "UPDATE", "USE", + "USER", "USING", "VALIDATE", "VALUES", "VERBOSE", + "VERSION", "VIEW", "WHEN", "WHERE", "WITH", + "WORK", "WRITE", "YEAR", "ZONE", "EQ", "NEQ", + "LT", "LTE", "GT", "GTE", "PLUS", "MINUS", + "ASTERISK", "SLASH", "PERCENT", "CONCAT", "STRING", + "UNICODE_STRING", "BINARY_LITERAL", "INTEGER_VALUE", + "DECIMAL_VALUE", "DOUBLE_VALUE", "IDENTIFIER", + "DIGIT_IDENTIFIER", "QUOTED_IDENTIFIER", "BACKQUOTED_IDENTIFIER", "TIME_WITH_TIME_ZONE", "TIMESTAMP_WITH_TIME_ZONE", "DOUBLE_PRECISION", "SIMPLE_COMMENT", "BRACKETED_COMMENT", "WS", "UNRECOGNIZED", "DELIMITER" ]; @@ -849,12 +1002,19 @@ export default class SqlBaseParser extends antlr4.Parser { "string", "nullTreatment", "timeZoneSpecifier", "comparisonOperator", "comparisonQuantifier", "booleanValue", "interval", "intervalField", "normalForm", "types", - "type", "typeParameter", "baseType", "whenClause", - "filter", "over", "windowFrame", "frameBound", - "updateAssignment", "explainOption", "transactionMode", - "levelOfIsolation", "callArgument", "privilege", - "qualifiedName", "tableVersionExpression", "grantor", - "principal", "roles", "identifier", "number", "nonReserved" ]; + "type", "tableFunctionCall", "tableFunctionArgument", + "tableArgument", "tableArgumentRelation", "descriptorArgument", + "descriptorField", "copartitionTables", "typeParameter", + "baseType", "whenClause", "filter", "mergeCase", + "over", "windowFrame", "frameBound", "updateAssignment", + "explainOption", "transactionMode", "levelOfIsolation", + "callArgument", "privilege", "qualifiedName", "tableVersionExpression", + "tableVersionState", "grantor", "principal", "roles", + "identifier", "number", "constraintSpecification", + "namedConstraintSpecification", "unnamedConstraintSpecification", + "constraintType", "constraintQualifiers", "constraintQualifier", + "constraintRely", "constraintEnabled", "constraintEnforced", + "nonReserved" ]; constructor(input) { super(input); @@ -957,9 +1117,9 @@ export default class SqlBaseParser extends antlr4.Parser { this.enterRule(localctx, 0, SqlBaseParser.RULE_singleStatement); try { this.enterOuterAlt(localctx, 1); - this.state = 158; + this.state = 194; this.statement(); - this.state = 159; + this.state = 195; this.match(SqlBaseParser.EOF); } catch (re) { if(re instanceof antlr4.error.RecognitionException) { @@ -982,9 +1142,9 @@ export default class SqlBaseParser extends antlr4.Parser { this.enterRule(localctx, 2, SqlBaseParser.RULE_standaloneExpression); try { this.enterOuterAlt(localctx, 1); - this.state = 161; + this.state = 197; this.expression(); - this.state = 162; + this.state = 198; this.match(SqlBaseParser.EOF); } catch (re) { if(re instanceof antlr4.error.RecognitionException) { @@ -1007,9 +1167,9 @@ export default class SqlBaseParser extends antlr4.Parser { this.enterRule(localctx, 4, SqlBaseParser.RULE_standaloneRoutineBody); try { this.enterOuterAlt(localctx, 1); - this.state = 164; + this.state = 200; this.routineBody(); - this.state = 165; + this.state = 201; this.match(SqlBaseParser.EOF); } catch (re) { if(re instanceof antlr4.error.RecognitionException) { @@ -1032,67 +1192,67 @@ export default class SqlBaseParser extends antlr4.Parser { this.enterRule(localctx, 6, SqlBaseParser.RULE_statement); var _la = 0; try { - this.state = 825; + this.state = 963; this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,93,this._ctx); + var la_ = this._interp.adaptivePredict(this._input,106,this._ctx); switch(la_) { case 1: localctx = new StatementDefaultContext(this, localctx); this.enterOuterAlt(localctx, 1); - this.state = 167; + this.state = 203; this.query(); break; case 2: localctx = new UseContext(this, localctx); this.enterOuterAlt(localctx, 2); - this.state = 168; + this.state = 204; this.match(SqlBaseParser.USE); - this.state = 169; + this.state = 205; localctx.schema = this.identifier(); break; case 3: localctx = new UseContext(this, localctx); this.enterOuterAlt(localctx, 3); - this.state = 170; + this.state = 206; this.match(SqlBaseParser.USE); - this.state = 171; + this.state = 207; localctx.catalog = this.identifier(); - this.state = 172; + this.state = 208; this.match(SqlBaseParser.T__0); - this.state = 173; + this.state = 209; localctx.schema = this.identifier(); break; case 4: localctx = new CreateSchemaContext(this, localctx); this.enterOuterAlt(localctx, 4); - this.state = 175; + this.state = 211; this.match(SqlBaseParser.CREATE); - this.state = 176; + this.state = 212; this.match(SqlBaseParser.SCHEMA); - this.state = 180; + this.state = 216; this._errHandler.sync(this); var la_ = this._interp.adaptivePredict(this._input,0,this._ctx); if(la_===1) { - this.state = 177; + this.state = 213; this.match(SqlBaseParser.IF); - this.state = 178; + this.state = 214; this.match(SqlBaseParser.NOT); - this.state = 179; + this.state = 215; this.match(SqlBaseParser.EXISTS); } - this.state = 182; + this.state = 218; this.qualifiedName(); - this.state = 185; + this.state = 221; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===216) { - this.state = 183; + if(_la===231) { + this.state = 219; this.match(SqlBaseParser.WITH); - this.state = 184; + this.state = 220; this.properties(); } @@ -1101,29 +1261,29 @@ export default class SqlBaseParser extends antlr4.Parser { case 5: localctx = new DropSchemaContext(this, localctx); this.enterOuterAlt(localctx, 5); - this.state = 187; + this.state = 223; this.match(SqlBaseParser.DROP); - this.state = 188; + this.state = 224; this.match(SqlBaseParser.SCHEMA); - this.state = 191; + this.state = 227; this._errHandler.sync(this); var la_ = this._interp.adaptivePredict(this._input,2,this._ctx); if(la_===1) { - this.state = 189; + this.state = 225; this.match(SqlBaseParser.IF); - this.state = 190; + this.state = 226; this.match(SqlBaseParser.EXISTS); } - this.state = 193; + this.state = 229; this.qualifiedName(); - this.state = 195; + this.state = 231; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===26 || _la===157) { - this.state = 194; + if(_la===27 || _la===171) { + this.state = 230; _la = this._input.LA(1); - if(!(_la===26 || _la===157)) { + if(!(_la===27 || _la===171)) { this._errHandler.recoverInline(this); } else { @@ -1137,105 +1297,105 @@ export default class SqlBaseParser extends antlr4.Parser { case 6: localctx = new RenameSchemaContext(this, localctx); this.enterOuterAlt(localctx, 6); - this.state = 197; + this.state = 233; this.match(SqlBaseParser.ALTER); - this.state = 198; + this.state = 234; this.match(SqlBaseParser.SCHEMA); - this.state = 199; + this.state = 235; this.qualifiedName(); - this.state = 200; + this.state = 236; this.match(SqlBaseParser.RENAME); - this.state = 201; + this.state = 237; this.match(SqlBaseParser.TO); - this.state = 202; + this.state = 238; this.identifier(); break; case 7: localctx = new CreateTableAsSelectContext(this, localctx); this.enterOuterAlt(localctx, 7); - this.state = 204; + this.state = 240; this.match(SqlBaseParser.CREATE); - this.state = 205; + this.state = 241; this.match(SqlBaseParser.TABLE); - this.state = 209; + this.state = 245; this._errHandler.sync(this); var la_ = this._interp.adaptivePredict(this._input,4,this._ctx); if(la_===1) { - this.state = 206; + this.state = 242; this.match(SqlBaseParser.IF); - this.state = 207; + this.state = 243; this.match(SqlBaseParser.NOT); - this.state = 208; + this.state = 244; this.match(SqlBaseParser.EXISTS); } - this.state = 211; + this.state = 247; this.qualifiedName(); - this.state = 213; + this.state = 249; this._errHandler.sync(this); _la = this._input.LA(1); if(_la===2) { - this.state = 212; + this.state = 248; this.columnAliases(); } - this.state = 217; + this.state = 253; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===32) { - this.state = 215; + if(_la===33) { + this.state = 251; this.match(SqlBaseParser.COMMENT); - this.state = 216; + this.state = 252; this.string(); } - this.state = 221; + this.state = 257; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===216) { - this.state = 219; + if(_la===231) { + this.state = 255; this.match(SqlBaseParser.WITH); - this.state = 220; + this.state = 256; this.properties(); } - this.state = 223; + this.state = 259; this.match(SqlBaseParser.AS); - this.state = 229; + this.state = 265; this._errHandler.sync(this); var la_ = this._interp.adaptivePredict(this._input,8,this._ctx); switch(la_) { case 1: - this.state = 224; + this.state = 260; this.query(); break; case 2: - this.state = 225; + this.state = 261; this.match(SqlBaseParser.T__1); - this.state = 226; + this.state = 262; this.query(); - this.state = 227; + this.state = 263; this.match(SqlBaseParser.T__2); break; } - this.state = 236; + this.state = 272; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===216) { - this.state = 231; + if(_la===231) { + this.state = 267; this.match(SqlBaseParser.WITH); - this.state = 233; + this.state = 269; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===123) { - this.state = 232; + if(_la===134) { + this.state = 268; this.match(SqlBaseParser.NO); } - this.state = 235; + this.state = 271; this.match(SqlBaseParser.DATA); } @@ -1244,59 +1404,59 @@ export default class SqlBaseParser extends antlr4.Parser { case 8: localctx = new CreateTableContext(this, localctx); this.enterOuterAlt(localctx, 8); - this.state = 238; + this.state = 274; this.match(SqlBaseParser.CREATE); - this.state = 239; + this.state = 275; this.match(SqlBaseParser.TABLE); - this.state = 243; + this.state = 279; this._errHandler.sync(this); var la_ = this._interp.adaptivePredict(this._input,11,this._ctx); if(la_===1) { - this.state = 240; + this.state = 276; this.match(SqlBaseParser.IF); - this.state = 241; + this.state = 277; this.match(SqlBaseParser.NOT); - this.state = 242; + this.state = 278; this.match(SqlBaseParser.EXISTS); } - this.state = 245; + this.state = 281; this.qualifiedName(); - this.state = 246; + this.state = 282; this.match(SqlBaseParser.T__1); - this.state = 247; + this.state = 283; this.tableElement(); - this.state = 252; + this.state = 288; this._errHandler.sync(this); _la = this._input.LA(1); while(_la===4) { - this.state = 248; + this.state = 284; this.match(SqlBaseParser.T__3); - this.state = 249; + this.state = 285; this.tableElement(); - this.state = 254; + this.state = 290; this._errHandler.sync(this); _la = this._input.LA(1); } - this.state = 255; + this.state = 291; this.match(SqlBaseParser.T__2); - this.state = 258; + this.state = 294; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===32) { - this.state = 256; + if(_la===33) { + this.state = 292; this.match(SqlBaseParser.COMMENT); - this.state = 257; + this.state = 293; this.string(); } - this.state = 262; + this.state = 298; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===216) { - this.state = 260; + if(_la===231) { + this.state = 296; this.match(SqlBaseParser.WITH); - this.state = 261; + this.state = 297; this.properties(); } @@ -1305,61 +1465,61 @@ export default class SqlBaseParser extends antlr4.Parser { case 9: localctx = new DropTableContext(this, localctx); this.enterOuterAlt(localctx, 9); - this.state = 264; + this.state = 300; this.match(SqlBaseParser.DROP); - this.state = 265; + this.state = 301; this.match(SqlBaseParser.TABLE); - this.state = 268; + this.state = 304; this._errHandler.sync(this); var la_ = this._interp.adaptivePredict(this._input,15,this._ctx); if(la_===1) { - this.state = 266; + this.state = 302; this.match(SqlBaseParser.IF); - this.state = 267; + this.state = 303; this.match(SqlBaseParser.EXISTS); } - this.state = 270; + this.state = 306; this.qualifiedName(); break; case 10: localctx = new InsertIntoContext(this, localctx); this.enterOuterAlt(localctx, 10); - this.state = 271; + this.state = 307; this.match(SqlBaseParser.INSERT); - this.state = 272; + this.state = 308; this.match(SqlBaseParser.INTO); - this.state = 273; + this.state = 309; this.qualifiedName(); - this.state = 275; + this.state = 311; this._errHandler.sync(this); var la_ = this._interp.adaptivePredict(this._input,16,this._ctx); if(la_===1) { - this.state = 274; + this.state = 310; this.columnAliases(); } - this.state = 277; + this.state = 313; this.query(); break; case 11: localctx = new DeleteContext(this, localctx); this.enterOuterAlt(localctx, 11); - this.state = 279; + this.state = 315; this.match(SqlBaseParser.DELETE); - this.state = 280; + this.state = 316; this.match(SqlBaseParser.FROM); - this.state = 281; + this.state = 317; this.qualifiedName(); - this.state = 284; + this.state = 320; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===215) { - this.state = 282; + if(_la===230) { + this.state = 318; this.match(SqlBaseParser.WHERE); - this.state = 283; + this.state = 319; this.booleanExpression(0); } @@ -1368,209 +1528,376 @@ export default class SqlBaseParser extends antlr4.Parser { case 12: localctx = new TruncateTableContext(this, localctx); this.enterOuterAlt(localctx, 12); - this.state = 286; + this.state = 322; this.match(SqlBaseParser.TRUNCATE); - this.state = 287; + this.state = 323; this.match(SqlBaseParser.TABLE); - this.state = 288; + this.state = 324; this.qualifiedName(); break; case 13: localctx = new RenameTableContext(this, localctx); this.enterOuterAlt(localctx, 13); - this.state = 289; + this.state = 325; this.match(SqlBaseParser.ALTER); - this.state = 290; + this.state = 326; this.match(SqlBaseParser.TABLE); - this.state = 293; + this.state = 329; this._errHandler.sync(this); var la_ = this._interp.adaptivePredict(this._input,18,this._ctx); if(la_===1) { - this.state = 291; + this.state = 327; this.match(SqlBaseParser.IF); - this.state = 292; + this.state = 328; this.match(SqlBaseParser.EXISTS); } - this.state = 295; + this.state = 331; localctx.from = this.qualifiedName(); - this.state = 296; + this.state = 332; this.match(SqlBaseParser.RENAME); - this.state = 297; + this.state = 333; this.match(SqlBaseParser.TO); - this.state = 298; + this.state = 334; localctx.to = this.qualifiedName(); break; case 14: localctx = new RenameColumnContext(this, localctx); this.enterOuterAlt(localctx, 14); - this.state = 300; + this.state = 336; this.match(SqlBaseParser.ALTER); - this.state = 301; + this.state = 337; this.match(SqlBaseParser.TABLE); - this.state = 304; + this.state = 340; this._errHandler.sync(this); var la_ = this._interp.adaptivePredict(this._input,19,this._ctx); if(la_===1) { - this.state = 302; + this.state = 338; this.match(SqlBaseParser.IF); - this.state = 303; + this.state = 339; this.match(SqlBaseParser.EXISTS); } - this.state = 306; + this.state = 342; localctx.tableName = this.qualifiedName(); - this.state = 307; + this.state = 343; this.match(SqlBaseParser.RENAME); - this.state = 308; + this.state = 344; this.match(SqlBaseParser.COLUMN); - this.state = 311; + this.state = 347; this._errHandler.sync(this); var la_ = this._interp.adaptivePredict(this._input,20,this._ctx); if(la_===1) { - this.state = 309; + this.state = 345; this.match(SqlBaseParser.IF); - this.state = 310; + this.state = 346; this.match(SqlBaseParser.EXISTS); } - this.state = 313; + this.state = 349; localctx.from = this.identifier(); - this.state = 314; + this.state = 350; this.match(SqlBaseParser.TO); - this.state = 315; + this.state = 351; localctx.to = this.identifier(); break; case 15: localctx = new DropColumnContext(this, localctx); this.enterOuterAlt(localctx, 15); - this.state = 317; + this.state = 353; this.match(SqlBaseParser.ALTER); - this.state = 318; + this.state = 354; this.match(SqlBaseParser.TABLE); - this.state = 321; + this.state = 357; this._errHandler.sync(this); var la_ = this._interp.adaptivePredict(this._input,21,this._ctx); if(la_===1) { - this.state = 319; + this.state = 355; this.match(SqlBaseParser.IF); - this.state = 320; + this.state = 356; this.match(SqlBaseParser.EXISTS); } - this.state = 323; + this.state = 359; localctx.tableName = this.qualifiedName(); - this.state = 324; + this.state = 360; this.match(SqlBaseParser.DROP); - this.state = 325; + this.state = 361; this.match(SqlBaseParser.COLUMN); - this.state = 328; + this.state = 364; this._errHandler.sync(this); var la_ = this._interp.adaptivePredict(this._input,22,this._ctx); if(la_===1) { - this.state = 326; + this.state = 362; this.match(SqlBaseParser.IF); - this.state = 327; + this.state = 363; this.match(SqlBaseParser.EXISTS); } - this.state = 330; + this.state = 366; localctx.column = this.qualifiedName(); break; case 16: localctx = new AddColumnContext(this, localctx); this.enterOuterAlt(localctx, 16); - this.state = 332; + this.state = 368; this.match(SqlBaseParser.ALTER); - this.state = 333; + this.state = 369; this.match(SqlBaseParser.TABLE); - this.state = 336; + this.state = 372; this._errHandler.sync(this); var la_ = this._interp.adaptivePredict(this._input,23,this._ctx); if(la_===1) { - this.state = 334; + this.state = 370; this.match(SqlBaseParser.IF); - this.state = 335; + this.state = 371; this.match(SqlBaseParser.EXISTS); } - this.state = 338; + this.state = 374; localctx.tableName = this.qualifiedName(); - this.state = 339; + this.state = 375; this.match(SqlBaseParser.ADD); - this.state = 340; + this.state = 376; this.match(SqlBaseParser.COLUMN); - this.state = 344; + this.state = 380; this._errHandler.sync(this); var la_ = this._interp.adaptivePredict(this._input,24,this._ctx); if(la_===1) { - this.state = 341; + this.state = 377; this.match(SqlBaseParser.IF); - this.state = 342; + this.state = 378; this.match(SqlBaseParser.NOT); - this.state = 343; + this.state = 379; this.match(SqlBaseParser.EXISTS); } - this.state = 346; + this.state = 382; localctx.column = this.columnDefinition(); break; case 17: - localctx = new AnalyzeContext(this, localctx); + localctx = new AddConstraintContext(this, localctx); this.enterOuterAlt(localctx, 17); - this.state = 348; + this.state = 384; + this.match(SqlBaseParser.ALTER); + this.state = 385; + this.match(SqlBaseParser.TABLE); + this.state = 388; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,25,this._ctx); + if(la_===1) { + this.state = 386; + this.match(SqlBaseParser.IF); + this.state = 387; + this.match(SqlBaseParser.EXISTS); + + } + this.state = 390; + localctx.tableName = this.qualifiedName(); + this.state = 391; + this.match(SqlBaseParser.ADD); + this.state = 392; + this.constraintSpecification(); + break; + + case 18: + localctx = new DropConstraintContext(this, localctx); + this.enterOuterAlt(localctx, 18); + this.state = 394; + this.match(SqlBaseParser.ALTER); + this.state = 395; + this.match(SqlBaseParser.TABLE); + this.state = 398; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,26,this._ctx); + if(la_===1) { + this.state = 396; + this.match(SqlBaseParser.IF); + this.state = 397; + this.match(SqlBaseParser.EXISTS); + + } + this.state = 400; + localctx.tableName = this.qualifiedName(); + this.state = 401; + this.match(SqlBaseParser.DROP); + this.state = 402; + this.match(SqlBaseParser.CONSTRAINT); + this.state = 405; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,27,this._ctx); + if(la_===1) { + this.state = 403; + this.match(SqlBaseParser.IF); + this.state = 404; + this.match(SqlBaseParser.EXISTS); + + } + this.state = 407; + localctx.name = this.identifier(); + break; + + case 19: + localctx = new AlterColumnSetNotNullContext(this, localctx); + this.enterOuterAlt(localctx, 19); + this.state = 409; + this.match(SqlBaseParser.ALTER); + this.state = 410; + this.match(SqlBaseParser.TABLE); + this.state = 413; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,28,this._ctx); + if(la_===1) { + this.state = 411; + this.match(SqlBaseParser.IF); + this.state = 412; + this.match(SqlBaseParser.EXISTS); + + } + this.state = 415; + localctx.tableName = this.qualifiedName(); + this.state = 416; + this.match(SqlBaseParser.ALTER); + this.state = 418; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,29,this._ctx); + if(la_===1) { + this.state = 417; + this.match(SqlBaseParser.COLUMN); + + } + this.state = 420; + localctx.column = this.identifier(); + this.state = 421; + this.match(SqlBaseParser.SET); + this.state = 422; + this.match(SqlBaseParser.NOT); + this.state = 423; + this.match(SqlBaseParser.NULL); + break; + + case 20: + localctx = new AlterColumnDropNotNullContext(this, localctx); + this.enterOuterAlt(localctx, 20); + this.state = 425; + this.match(SqlBaseParser.ALTER); + this.state = 426; + this.match(SqlBaseParser.TABLE); + this.state = 429; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,30,this._ctx); + if(la_===1) { + this.state = 427; + this.match(SqlBaseParser.IF); + this.state = 428; + this.match(SqlBaseParser.EXISTS); + + } + this.state = 431; + localctx.tableName = this.qualifiedName(); + this.state = 432; + this.match(SqlBaseParser.ALTER); + this.state = 434; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,31,this._ctx); + if(la_===1) { + this.state = 433; + this.match(SqlBaseParser.COLUMN); + + } + this.state = 436; + localctx.column = this.identifier(); + this.state = 437; + this.match(SqlBaseParser.DROP); + this.state = 438; + this.match(SqlBaseParser.NOT); + this.state = 439; + this.match(SqlBaseParser.NULL); + break; + + case 21: + localctx = new SetTablePropertiesContext(this, localctx); + this.enterOuterAlt(localctx, 21); + this.state = 441; + this.match(SqlBaseParser.ALTER); + this.state = 442; + this.match(SqlBaseParser.TABLE); + this.state = 445; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,32,this._ctx); + if(la_===1) { + this.state = 443; + this.match(SqlBaseParser.IF); + this.state = 444; + this.match(SqlBaseParser.EXISTS); + + } + this.state = 447; + localctx.tableName = this.qualifiedName(); + this.state = 448; + this.match(SqlBaseParser.SET); + this.state = 449; + this.match(SqlBaseParser.PROPERTIES); + this.state = 450; + this.properties(); + break; + + case 22: + localctx = new AnalyzeContext(this, localctx); + this.enterOuterAlt(localctx, 22); + this.state = 452; this.match(SqlBaseParser.ANALYZE); - this.state = 349; + this.state = 453; this.qualifiedName(); - this.state = 352; + this.state = 456; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===216) { - this.state = 350; + if(_la===231) { + this.state = 454; this.match(SqlBaseParser.WITH); - this.state = 351; + this.state = 455; this.properties(); } break; - case 18: + case 23: localctx = new CreateTypeContext(this, localctx); - this.enterOuterAlt(localctx, 18); - this.state = 354; + this.enterOuterAlt(localctx, 23); + this.state = 458; this.match(SqlBaseParser.CREATE); - this.state = 355; + this.state = 459; this.match(SqlBaseParser.TYPE); - this.state = 356; + this.state = 460; this.qualifiedName(); - this.state = 357; + this.state = 461; this.match(SqlBaseParser.AS); - this.state = 370; + this.state = 474; this._errHandler.sync(this); switch(this._input.LA(1)) { case 2: - this.state = 358; + this.state = 462; this.match(SqlBaseParser.T__1); - this.state = 359; + this.state = 463; this.sqlParameterDeclaration(); - this.state = 364; + this.state = 468; this._errHandler.sync(this); _la = this._input.LA(1); while(_la===4) { - this.state = 360; + this.state = 464; this.match(SqlBaseParser.T__3); - this.state = 361; + this.state = 465; this.sqlParameterDeclaration(); - this.state = 366; + this.state = 470; this._errHandler.sync(this); _la = this._input.LA(1); } - this.state = 367; + this.state = 471; this.match(SqlBaseParser.T__2); break; case 10: @@ -1582,109 +1909,110 @@ export default class SqlBaseParser extends antlr4.Parser { case 19: case 20: case 21: - case 24: + case 22: case 25: case 26: - case 29: + case 27: case 30: case 31: case 32: case 33: case 34: - case 39: + case 35: + case 38: case 41: - case 45: - case 46: + case 43: case 47: + case 48: case 49: case 51: case 53: case 55: - case 61: - case 64: - case 66: + case 56: + case 57: + case 59: + case 62: + case 63: + case 65: case 68: - case 69: - case 70: case 71: case 73: + case 75: case 76: case 77: case 78: - case 79: case 80: - case 81: + case 83: case 84: + case 85: case 86: case 87: case 88: - case 90: - case 92: + case 91: + case 93: + case 94: case 95: case 97: - case 98: - case 100: - case 101: - case 103: + case 99: + case 102: case 104: case 105: case 107: - case 109: + case 108: + case 110: + case 111: case 112: case 113: case 114: - case 115: case 116: - case 117: - case 119: - case 120: + case 118: case 121: case 122: case 123: case 124: + case 125: + case 126: + case 127: case 128: - case 129: case 130: case 131: + case 132: case 133: case 134: - case 137: + case 135: case 139: case 140: case 141: case 142: - case 143: case 144: - case 146: - case 147: + case 145: case 148: - case 149: + case 150: case 151: case 152: case 153: case 154: case 155: - case 156: case 157: case 158: case 159: case 160: + case 161: case 162: - case 163: case 164: + case 165: case 166: case 167: case 168: case 169: case 170: case 171: + case 172: case 173: case 174: - case 175: case 176: case 177: case 178: - case 179: case 180: case 181: case 182: @@ -1695,34 +2023,48 @@ export default class SqlBaseParser extends antlr4.Parser { case 188: case 189: case 190: + case 191: case 192: case 193: case 194: case 195: + case 196: case 197: case 198: case 199: case 201: case 202: - case 205: + case 203: + case 204: case 206: case 207: + case 208: case 209: case 211: case 212: case 213: - case 217: + case 215: + case 216: case 218: - case 219: case 220: - case 239: - case 240: - case 241: - case 242: - case 243: - case 244: - case 245: - this.state = 369; + case 221: + case 222: + case 224: + case 226: + case 227: + case 228: + case 232: + case 233: + case 234: + case 235: + case 254: + case 255: + case 256: + case 257: + case 258: + case 259: + case 260: + this.state = 473; this.type(0); break; default: @@ -1730,34 +2072,34 @@ export default class SqlBaseParser extends antlr4.Parser { } break; - case 19: + case 24: localctx = new CreateViewContext(this, localctx); - this.enterOuterAlt(localctx, 19); - this.state = 372; + this.enterOuterAlt(localctx, 24); + this.state = 476; this.match(SqlBaseParser.CREATE); - this.state = 375; + this.state = 479; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===135) { - this.state = 373; + if(_la===146) { + this.state = 477; this.match(SqlBaseParser.OR); - this.state = 374; + this.state = 478; this.match(SqlBaseParser.REPLACE); } - this.state = 377; + this.state = 481; this.match(SqlBaseParser.VIEW); - this.state = 378; + this.state = 482; this.qualifiedName(); - this.state = 381; + this.state = 485; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===171) { - this.state = 379; + if(_la===185) { + this.state = 483; this.match(SqlBaseParser.SECURITY); - this.state = 380; + this.state = 484; _la = this._input.LA(1); - if(!(_la===49 || _la===97)) { + if(!(_la===51 || _la===104)) { this._errHandler.recoverInline(this); } else { @@ -1766,767 +2108,813 @@ export default class SqlBaseParser extends antlr4.Parser { } } - this.state = 383; + this.state = 487; this.match(SqlBaseParser.AS); - this.state = 384; + this.state = 488; this.query(); break; - case 20: + case 25: + localctx = new RenameViewContext(this, localctx); + this.enterOuterAlt(localctx, 25); + this.state = 490; + this.match(SqlBaseParser.ALTER); + this.state = 491; + this.match(SqlBaseParser.VIEW); + this.state = 494; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,38,this._ctx); + if(la_===1) { + this.state = 492; + this.match(SqlBaseParser.IF); + this.state = 493; + this.match(SqlBaseParser.EXISTS); + + } + this.state = 496; + localctx.from = this.qualifiedName(); + this.state = 497; + this.match(SqlBaseParser.RENAME); + this.state = 498; + this.match(SqlBaseParser.TO); + this.state = 499; + localctx.to = this.qualifiedName(); + break; + + case 26: localctx = new DropViewContext(this, localctx); - this.enterOuterAlt(localctx, 20); - this.state = 386; + this.enterOuterAlt(localctx, 26); + this.state = 501; this.match(SqlBaseParser.DROP); - this.state = 387; + this.state = 502; this.match(SqlBaseParser.VIEW); - this.state = 390; + this.state = 505; this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,30,this._ctx); + var la_ = this._interp.adaptivePredict(this._input,39,this._ctx); if(la_===1) { - this.state = 388; + this.state = 503; this.match(SqlBaseParser.IF); - this.state = 389; + this.state = 504; this.match(SqlBaseParser.EXISTS); } - this.state = 392; + this.state = 507; this.qualifiedName(); break; - case 21: + case 27: localctx = new CreateMaterializedViewContext(this, localctx); - this.enterOuterAlt(localctx, 21); - this.state = 393; + this.enterOuterAlt(localctx, 27); + this.state = 508; this.match(SqlBaseParser.CREATE); - this.state = 394; + this.state = 509; this.match(SqlBaseParser.MATERIALIZED); - this.state = 395; + this.state = 510; this.match(SqlBaseParser.VIEW); - this.state = 399; + this.state = 514; this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,31,this._ctx); + var la_ = this._interp.adaptivePredict(this._input,40,this._ctx); if(la_===1) { - this.state = 396; + this.state = 511; this.match(SqlBaseParser.IF); - this.state = 397; + this.state = 512; this.match(SqlBaseParser.NOT); - this.state = 398; + this.state = 513; this.match(SqlBaseParser.EXISTS); } - this.state = 401; + this.state = 516; this.qualifiedName(); - this.state = 404; + this.state = 519; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===32) { - this.state = 402; + if(_la===33) { + this.state = 517; this.match(SqlBaseParser.COMMENT); - this.state = 403; + this.state = 518; this.string(); } - this.state = 408; + this.state = 523; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===216) { - this.state = 406; + if(_la===231) { + this.state = 521; this.match(SqlBaseParser.WITH); - this.state = 407; + this.state = 522; this.properties(); } - this.state = 410; + this.state = 525; this.match(SqlBaseParser.AS); - this.state = 416; + this.state = 531; this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,34,this._ctx); + var la_ = this._interp.adaptivePredict(this._input,43,this._ctx); switch(la_) { case 1: - this.state = 411; + this.state = 526; this.query(); break; case 2: - this.state = 412; + this.state = 527; this.match(SqlBaseParser.T__1); - this.state = 413; + this.state = 528; this.query(); - this.state = 414; + this.state = 529; this.match(SqlBaseParser.T__2); break; } break; - case 22: + case 28: localctx = new DropMaterializedViewContext(this, localctx); - this.enterOuterAlt(localctx, 22); - this.state = 418; + this.enterOuterAlt(localctx, 28); + this.state = 533; this.match(SqlBaseParser.DROP); - this.state = 419; + this.state = 534; this.match(SqlBaseParser.MATERIALIZED); - this.state = 420; + this.state = 535; this.match(SqlBaseParser.VIEW); - this.state = 423; + this.state = 538; this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,35,this._ctx); + var la_ = this._interp.adaptivePredict(this._input,44,this._ctx); if(la_===1) { - this.state = 421; + this.state = 536; this.match(SqlBaseParser.IF); - this.state = 422; + this.state = 537; this.match(SqlBaseParser.EXISTS); } - this.state = 425; + this.state = 540; this.qualifiedName(); break; - case 23: + case 29: localctx = new RefreshMaterializedViewContext(this, localctx); - this.enterOuterAlt(localctx, 23); - this.state = 426; + this.enterOuterAlt(localctx, 29); + this.state = 541; this.match(SqlBaseParser.REFRESH); - this.state = 427; + this.state = 542; this.match(SqlBaseParser.MATERIALIZED); - this.state = 428; + this.state = 543; this.match(SqlBaseParser.VIEW); - this.state = 429; + this.state = 544; this.qualifiedName(); - this.state = 430; - this.match(SqlBaseParser.WHERE); - this.state = 431; - this.booleanExpression(0); + this.state = 547; + this._errHandler.sync(this); + _la = this._input.LA(1); + if(_la===230) { + this.state = 545; + this.match(SqlBaseParser.WHERE); + this.state = 546; + localctx.where = this.booleanExpression(0); + } + break; - case 24: + case 30: localctx = new CreateFunctionContext(this, localctx); - this.enterOuterAlt(localctx, 24); - this.state = 433; + this.enterOuterAlt(localctx, 30); + this.state = 549; this.match(SqlBaseParser.CREATE); - this.state = 436; + this.state = 552; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===135) { - this.state = 434; + if(_la===146) { + this.state = 550; this.match(SqlBaseParser.OR); - this.state = 435; + this.state = 551; this.match(SqlBaseParser.REPLACE); } - this.state = 439; + this.state = 555; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===189) { - this.state = 438; + if(_la===203) { + this.state = 554; this.match(SqlBaseParser.TEMPORARY); } - this.state = 441; + this.state = 557; this.match(SqlBaseParser.FUNCTION); - this.state = 442; + this.state = 558; localctx.functionName = this.qualifiedName(); - this.state = 443; + this.state = 559; this.match(SqlBaseParser.T__1); - this.state = 452; + this.state = 568; this._errHandler.sync(this); _la = this._input.LA(1); - if((((_la) & ~0x1f) === 0 && ((1 << _la) & 3879427072) !== 0) || ((((_la - 32)) & ~0x1f) === 0 && ((1 << (_la - 32)) & 548070023) !== 0) || ((((_la - 64)) & ~0x1f) === 0 && ((1 << (_la - 64)) & 2513695477) !== 0) || ((((_la - 97)) & ~0x1f) === 0 && ((1 << (_la - 97)) & 2413794779) !== 0) || ((((_la - 129)) & ~0x1f) === 0 && ((1 << (_la - 129)) & 4292803895) !== 0) || ((((_la - 162)) & ~0x1f) === 0 && ((1 << (_la - 162)) & 3741318135) !== 0) || ((((_la - 194)) & ~0x1f) === 0 && ((1 << (_la - 194)) & 126794171) !== 0) || ((((_la - 239)) & ~0x1f) === 0 && ((1 << (_la - 239)) & 15) !== 0)) { - this.state = 444; + if((((_la) & ~0x1f) === 0 && ((1 << _la) & 3464190976) !== 0) || ((((_la - 32)) & ~0x1f) === 0 && ((1 << (_la - 32)) & 3417016911) !== 0) || ((((_la - 65)) & ~0x1f) === 0 && ((1 << (_la - 65)) & 1962720585) !== 0) || ((((_la - 97)) & ~0x1f) === 0 && ((1 << (_la - 97)) & 4281068965) !== 0) || ((((_la - 130)) & ~0x1f) === 0 && ((1 << (_la - 130)) & 4227128895) !== 0) || ((((_la - 162)) & ~0x1f) === 0 && ((1 << (_la - 162)) & 4278050813) !== 0) || ((((_la - 194)) & ~0x1f) === 0 && ((1 << (_la - 194)) & 1567553471) !== 0) || ((((_la - 226)) & ~0x1f) === 0 && ((1 << (_la - 226)) & 4026532807) !== 0)) { + this.state = 560; this.sqlParameterDeclaration(); - this.state = 449; + this.state = 565; this._errHandler.sync(this); _la = this._input.LA(1); while(_la===4) { - this.state = 445; + this.state = 561; this.match(SqlBaseParser.T__3); - this.state = 446; + this.state = 562; this.sqlParameterDeclaration(); - this.state = 451; + this.state = 567; this._errHandler.sync(this); _la = this._input.LA(1); } } - this.state = 454; + this.state = 570; this.match(SqlBaseParser.T__2); - this.state = 455; + this.state = 571; this.match(SqlBaseParser.RETURNS); - this.state = 456; + this.state = 572; localctx.returnType = this.type(0); - this.state = 459; + this.state = 575; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===32) { - this.state = 457; + if(_la===33) { + this.state = 573; this.match(SqlBaseParser.COMMENT); - this.state = 458; + this.state = 574; this.string(); } - this.state = 461; + this.state = 577; this.routineCharacteristics(); - this.state = 462; + this.state = 578; this.routineBody(); break; - case 25: + case 31: localctx = new AlterFunctionContext(this, localctx); - this.enterOuterAlt(localctx, 25); - this.state = 464; + this.enterOuterAlt(localctx, 31); + this.state = 580; this.match(SqlBaseParser.ALTER); - this.state = 465; + this.state = 581; this.match(SqlBaseParser.FUNCTION); - this.state = 466; + this.state = 582; this.qualifiedName(); - this.state = 468; + this.state = 584; this._errHandler.sync(this); _la = this._input.LA(1); if(_la===2) { - this.state = 467; + this.state = 583; this.types(); } - this.state = 470; + this.state = 586; this.alterRoutineCharacteristics(); break; - case 26: + case 32: localctx = new DropFunctionContext(this, localctx); - this.enterOuterAlt(localctx, 26); - this.state = 472; + this.enterOuterAlt(localctx, 32); + this.state = 588; this.match(SqlBaseParser.DROP); - this.state = 474; + this.state = 590; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===189) { - this.state = 473; + if(_la===203) { + this.state = 589; this.match(SqlBaseParser.TEMPORARY); } - this.state = 476; + this.state = 592; this.match(SqlBaseParser.FUNCTION); - this.state = 479; + this.state = 595; this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,43,this._ctx); + var la_ = this._interp.adaptivePredict(this._input,53,this._ctx); if(la_===1) { - this.state = 477; + this.state = 593; this.match(SqlBaseParser.IF); - this.state = 478; + this.state = 594; this.match(SqlBaseParser.EXISTS); } - this.state = 481; + this.state = 597; this.qualifiedName(); - this.state = 483; + this.state = 599; this._errHandler.sync(this); _la = this._input.LA(1); if(_la===2) { - this.state = 482; + this.state = 598; this.types(); } break; - case 27: + case 33: localctx = new CallContext(this, localctx); - this.enterOuterAlt(localctx, 27); - this.state = 485; + this.enterOuterAlt(localctx, 33); + this.state = 601; this.match(SqlBaseParser.CALL); - this.state = 486; + this.state = 602; this.qualifiedName(); - this.state = 487; + this.state = 603; this.match(SqlBaseParser.T__1); - this.state = 496; + this.state = 612; this._errHandler.sync(this); _la = this._input.LA(1); - if((((_la) & ~0x1f) === 0 && ((1 << _la) & 4282080292) !== 0) || ((((_la - 32)) & ~0x1f) === 0 && ((1 << (_la - 32)) & 2695561095) !== 0) || ((((_la - 64)) & ~0x1f) === 0 && ((1 << (_la - 64)) & 2514219775) !== 0) || ((((_la - 97)) & ~0x1f) === 0 && ((1 << (_la - 97)) & 4292867547) !== 0) || ((((_la - 129)) & ~0x1f) === 0 && ((1 << (_la - 129)) & 4292803895) !== 0) || ((((_la - 162)) & ~0x1f) === 0 && ((1 << (_la - 162)) & 3741318135) !== 0) || ((((_la - 194)) & ~0x1f) === 0 && ((1 << (_la - 194)) & 126794175) !== 0) || ((((_la - 227)) & ~0x1f) === 0 && ((1 << (_la - 227)) & 327619) !== 0)) { - this.state = 488; + if(((((_la - 2)) & ~0x1f) === 0 && ((1 << (_la - 2)) & 4288599817) !== 0) || ((((_la - 34)) & ~0x1f) === 0 && ((1 << (_la - 34)) & 3001745299) !== 0) || ((((_la - 68)) & ~0x1f) === 0 && ((1 << (_la - 68)) & 2933889021) !== 0) || ((((_la - 102)) & ~0x1f) === 0 && ((1 << (_la - 102)) & 4160708461) !== 0) || ((((_la - 134)) & ~0x1f) === 0 && ((1 << (_la - 134)) & 3753856511) !== 0) || ((((_la - 166)) & ~0x1f) === 0 && ((1 << (_la - 166)) & 4293910015) !== 0) || ((((_la - 198)) & ~0x1f) === 0 && ((1 << (_la - 198)) & 1977024379) !== 0) || ((((_la - 232)) & ~0x1f) === 0 && ((1 << (_la - 232)) & 335481871) !== 0)) { + this.state = 604; this.callArgument(); - this.state = 493; + this.state = 609; this._errHandler.sync(this); _la = this._input.LA(1); while(_la===4) { - this.state = 489; + this.state = 605; this.match(SqlBaseParser.T__3); - this.state = 490; + this.state = 606; this.callArgument(); - this.state = 495; + this.state = 611; this._errHandler.sync(this); _la = this._input.LA(1); } } - this.state = 498; + this.state = 614; this.match(SqlBaseParser.T__2); break; - case 28: + case 34: localctx = new CreateRoleContext(this, localctx); - this.enterOuterAlt(localctx, 28); - this.state = 500; + this.enterOuterAlt(localctx, 34); + this.state = 616; this.match(SqlBaseParser.CREATE); - this.state = 501; + this.state = 617; this.match(SqlBaseParser.ROLE); - this.state = 502; + this.state = 618; localctx.name = this.identifier(); - this.state = 506; + this.state = 622; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===216) { - this.state = 503; + if(_la===231) { + this.state = 619; this.match(SqlBaseParser.WITH); - this.state = 504; + this.state = 620; this.match(SqlBaseParser.ADMIN); - this.state = 505; + this.state = 621; this.grantor(); } break; - case 29: + case 35: localctx = new DropRoleContext(this, localctx); - this.enterOuterAlt(localctx, 29); - this.state = 508; + this.enterOuterAlt(localctx, 35); + this.state = 624; this.match(SqlBaseParser.DROP); - this.state = 509; + this.state = 625; this.match(SqlBaseParser.ROLE); - this.state = 510; + this.state = 626; localctx.name = this.identifier(); break; - case 30: + case 36: localctx = new GrantRolesContext(this, localctx); - this.enterOuterAlt(localctx, 30); - this.state = 511; + this.enterOuterAlt(localctx, 36); + this.state = 627; this.match(SqlBaseParser.GRANT); - this.state = 512; + this.state = 628; this.roles(); - this.state = 513; + this.state = 629; this.match(SqlBaseParser.TO); - this.state = 514; + this.state = 630; this.principal(); - this.state = 519; + this.state = 635; this._errHandler.sync(this); _la = this._input.LA(1); while(_la===4) { - this.state = 515; + this.state = 631; this.match(SqlBaseParser.T__3); - this.state = 516; + this.state = 632; this.principal(); - this.state = 521; + this.state = 637; this._errHandler.sync(this); _la = this._input.LA(1); } - this.state = 525; + this.state = 641; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===216) { - this.state = 522; + if(_la===231) { + this.state = 638; this.match(SqlBaseParser.WITH); - this.state = 523; + this.state = 639; this.match(SqlBaseParser.ADMIN); - this.state = 524; + this.state = 640; this.match(SqlBaseParser.OPTION); } - this.state = 530; + this.state = 646; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===79) { - this.state = 527; + if(_la===86) { + this.state = 643; this.match(SqlBaseParser.GRANTED); - this.state = 528; + this.state = 644; this.match(SqlBaseParser.BY); - this.state = 529; + this.state = 645; this.grantor(); } break; - case 31: + case 37: localctx = new RevokeRolesContext(this, localctx); - this.enterOuterAlt(localctx, 31); - this.state = 532; + this.enterOuterAlt(localctx, 37); + this.state = 648; this.match(SqlBaseParser.REVOKE); - this.state = 536; + this.state = 652; this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,51,this._ctx); + var la_ = this._interp.adaptivePredict(this._input,61,this._ctx); if(la_===1) { - this.state = 533; + this.state = 649; this.match(SqlBaseParser.ADMIN); - this.state = 534; + this.state = 650; this.match(SqlBaseParser.OPTION); - this.state = 535; + this.state = 651; this.match(SqlBaseParser.FOR); } - this.state = 538; + this.state = 654; this.roles(); - this.state = 539; + this.state = 655; this.match(SqlBaseParser.FROM); - this.state = 540; + this.state = 656; this.principal(); - this.state = 545; + this.state = 661; this._errHandler.sync(this); _la = this._input.LA(1); while(_la===4) { - this.state = 541; + this.state = 657; this.match(SqlBaseParser.T__3); - this.state = 542; + this.state = 658; this.principal(); - this.state = 547; + this.state = 663; this._errHandler.sync(this); _la = this._input.LA(1); } - this.state = 551; + this.state = 667; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===79) { - this.state = 548; + if(_la===86) { + this.state = 664; this.match(SqlBaseParser.GRANTED); - this.state = 549; + this.state = 665; this.match(SqlBaseParser.BY); - this.state = 550; + this.state = 666; this.grantor(); } break; - case 32: + case 38: localctx = new SetRoleContext(this, localctx); - this.enterOuterAlt(localctx, 32); - this.state = 553; + this.enterOuterAlt(localctx, 38); + this.state = 669; this.match(SqlBaseParser.SET); - this.state = 554; + this.state = 670; this.match(SqlBaseParser.ROLE); - this.state = 558; + this.state = 674; this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,54,this._ctx); + var la_ = this._interp.adaptivePredict(this._input,64,this._ctx); switch(la_) { case 1: - this.state = 555; + this.state = 671; this.match(SqlBaseParser.ALL); break; case 2: - this.state = 556; + this.state = 672; this.match(SqlBaseParser.NONE); break; case 3: - this.state = 557; + this.state = 673; localctx.role = this.identifier(); break; } break; - case 33: + case 39: localctx = new GrantContext(this, localctx); - this.enterOuterAlt(localctx, 33); - this.state = 560; + this.enterOuterAlt(localctx, 39); + this.state = 676; this.match(SqlBaseParser.GRANT); - this.state = 571; + this.state = 687; this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,56,this._ctx); + var la_ = this._interp.adaptivePredict(this._input,66,this._ctx); switch(la_) { case 1: - this.state = 561; + this.state = 677; this.privilege(); - this.state = 566; + this.state = 682; this._errHandler.sync(this); _la = this._input.LA(1); while(_la===4) { - this.state = 562; + this.state = 678; this.match(SqlBaseParser.T__3); - this.state = 563; + this.state = 679; this.privilege(); - this.state = 568; + this.state = 684; this._errHandler.sync(this); _la = this._input.LA(1); } break; case 2: - this.state = 569; + this.state = 685; this.match(SqlBaseParser.ALL); - this.state = 570; + this.state = 686; this.match(SqlBaseParser.PRIVILEGES); break; } - this.state = 573; + this.state = 689; this.match(SqlBaseParser.ON); - this.state = 575; + this.state = 691; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===186) { - this.state = 574; + if(_la===200) { + this.state = 690; this.match(SqlBaseParser.TABLE); } - this.state = 577; + this.state = 693; this.qualifiedName(); - this.state = 578; + this.state = 694; this.match(SqlBaseParser.TO); - this.state = 579; + this.state = 695; localctx.grantee = this.principal(); - this.state = 583; + this.state = 699; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===216) { - this.state = 580; + if(_la===231) { + this.state = 696; this.match(SqlBaseParser.WITH); - this.state = 581; + this.state = 697; this.match(SqlBaseParser.GRANT); - this.state = 582; + this.state = 698; this.match(SqlBaseParser.OPTION); } break; - case 34: + case 40: localctx = new RevokeContext(this, localctx); - this.enterOuterAlt(localctx, 34); - this.state = 585; + this.enterOuterAlt(localctx, 40); + this.state = 701; this.match(SqlBaseParser.REVOKE); - this.state = 589; + this.state = 705; this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,59,this._ctx); + var la_ = this._interp.adaptivePredict(this._input,69,this._ctx); if(la_===1) { - this.state = 586; + this.state = 702; this.match(SqlBaseParser.GRANT); - this.state = 587; + this.state = 703; this.match(SqlBaseParser.OPTION); - this.state = 588; + this.state = 704; this.match(SqlBaseParser.FOR); } - this.state = 601; + this.state = 717; this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,61,this._ctx); + var la_ = this._interp.adaptivePredict(this._input,71,this._ctx); switch(la_) { case 1: - this.state = 591; + this.state = 707; this.privilege(); - this.state = 596; + this.state = 712; this._errHandler.sync(this); _la = this._input.LA(1); while(_la===4) { - this.state = 592; + this.state = 708; this.match(SqlBaseParser.T__3); - this.state = 593; + this.state = 709; this.privilege(); - this.state = 598; + this.state = 714; this._errHandler.sync(this); _la = this._input.LA(1); } break; case 2: - this.state = 599; + this.state = 715; this.match(SqlBaseParser.ALL); - this.state = 600; + this.state = 716; this.match(SqlBaseParser.PRIVILEGES); break; } - this.state = 603; + this.state = 719; this.match(SqlBaseParser.ON); - this.state = 605; + this.state = 721; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===186) { - this.state = 604; + if(_la===200) { + this.state = 720; this.match(SqlBaseParser.TABLE); } - this.state = 607; + this.state = 723; this.qualifiedName(); - this.state = 608; + this.state = 724; this.match(SqlBaseParser.FROM); - this.state = 609; + this.state = 725; localctx.grantee = this.principal(); break; - case 35: + case 41: localctx = new ShowGrantsContext(this, localctx); - this.enterOuterAlt(localctx, 35); - this.state = 611; + this.enterOuterAlt(localctx, 41); + this.state = 727; this.match(SqlBaseParser.SHOW); - this.state = 612; + this.state = 728; this.match(SqlBaseParser.GRANTS); - this.state = 618; + this.state = 734; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===132) { - this.state = 613; + if(_la===143) { + this.state = 729; this.match(SqlBaseParser.ON); - this.state = 615; + this.state = 731; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===186) { - this.state = 614; + if(_la===200) { + this.state = 730; this.match(SqlBaseParser.TABLE); } - this.state = 617; + this.state = 733; this.qualifiedName(); } break; - case 36: + case 42: localctx = new ExplainContext(this, localctx); - this.enterOuterAlt(localctx, 36); - this.state = 620; + this.enterOuterAlt(localctx, 42); + this.state = 736; this.match(SqlBaseParser.EXPLAIN); - this.state = 622; + this.state = 738; this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,65,this._ctx); + var la_ = this._interp.adaptivePredict(this._input,75,this._ctx); if(la_===1) { - this.state = 621; + this.state = 737; this.match(SqlBaseParser.ANALYZE); } - this.state = 625; + this.state = 741; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===211) { - this.state = 624; + if(_la===226) { + this.state = 740; this.match(SqlBaseParser.VERBOSE); } - this.state = 638; + this.state = 754; this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,68,this._ctx); + var la_ = this._interp.adaptivePredict(this._input,78,this._ctx); if(la_===1) { - this.state = 627; + this.state = 743; this.match(SqlBaseParser.T__1); - this.state = 628; + this.state = 744; this.explainOption(); - this.state = 633; + this.state = 749; this._errHandler.sync(this); _la = this._input.LA(1); while(_la===4) { - this.state = 629; + this.state = 745; this.match(SqlBaseParser.T__3); - this.state = 630; + this.state = 746; this.explainOption(); - this.state = 635; + this.state = 751; this._errHandler.sync(this); _la = this._input.LA(1); } - this.state = 636; + this.state = 752; this.match(SqlBaseParser.T__2); } - this.state = 640; + this.state = 756; this.statement(); break; - case 37: + case 43: localctx = new ShowCreateTableContext(this, localctx); - this.enterOuterAlt(localctx, 37); - this.state = 641; + this.enterOuterAlt(localctx, 43); + this.state = 757; this.match(SqlBaseParser.SHOW); - this.state = 642; + this.state = 758; this.match(SqlBaseParser.CREATE); - this.state = 643; + this.state = 759; this.match(SqlBaseParser.TABLE); - this.state = 644; + this.state = 760; this.qualifiedName(); break; - case 38: + case 44: + localctx = new ShowCreateSchemaContext(this, localctx); + this.enterOuterAlt(localctx, 44); + this.state = 761; + this.match(SqlBaseParser.SHOW); + this.state = 762; + this.match(SqlBaseParser.CREATE); + this.state = 763; + this.match(SqlBaseParser.SCHEMA); + this.state = 764; + this.qualifiedName(); + break; + + case 45: localctx = new ShowCreateViewContext(this, localctx); - this.enterOuterAlt(localctx, 38); - this.state = 645; + this.enterOuterAlt(localctx, 45); + this.state = 765; this.match(SqlBaseParser.SHOW); - this.state = 646; + this.state = 766; this.match(SqlBaseParser.CREATE); - this.state = 647; + this.state = 767; this.match(SqlBaseParser.VIEW); - this.state = 648; + this.state = 768; this.qualifiedName(); break; - case 39: + case 46: localctx = new ShowCreateMaterializedViewContext(this, localctx); - this.enterOuterAlt(localctx, 39); - this.state = 649; + this.enterOuterAlt(localctx, 46); + this.state = 769; this.match(SqlBaseParser.SHOW); - this.state = 650; + this.state = 770; this.match(SqlBaseParser.CREATE); - this.state = 651; + this.state = 771; this.match(SqlBaseParser.MATERIALIZED); - this.state = 652; + this.state = 772; this.match(SqlBaseParser.VIEW); - this.state = 653; + this.state = 773; this.qualifiedName(); break; - case 40: + case 47: localctx = new ShowCreateFunctionContext(this, localctx); - this.enterOuterAlt(localctx, 40); - this.state = 654; + this.enterOuterAlt(localctx, 47); + this.state = 774; this.match(SqlBaseParser.SHOW); - this.state = 655; + this.state = 775; this.match(SqlBaseParser.CREATE); - this.state = 656; + this.state = 776; this.match(SqlBaseParser.FUNCTION); - this.state = 657; + this.state = 777; this.qualifiedName(); - this.state = 659; + this.state = 779; this._errHandler.sync(this); _la = this._input.LA(1); if(_la===2) { - this.state = 658; + this.state = 778; this.types(); } break; - case 41: + case 48: localctx = new ShowTablesContext(this, localctx); - this.enterOuterAlt(localctx, 41); - this.state = 661; + this.enterOuterAlt(localctx, 48); + this.state = 781; this.match(SqlBaseParser.SHOW); - this.state = 662; + this.state = 782; this.match(SqlBaseParser.TABLES); - this.state = 665; + this.state = 785; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===74 || _la===89) { - this.state = 663; + if(_la===81 || _la===96) { + this.state = 783; _la = this._input.LA(1); - if(!(_la===74 || _la===89)) { + if(!(_la===81 || _la===96)) { this._errHandler.recoverInline(this); } else { this._errHandler.reportMatch(this); this.consume(); } - this.state = 664; + this.state = 784; this.qualifiedName(); } - this.state = 673; + this.state = 793; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===108) { - this.state = 667; + if(_la===117) { + this.state = 787; this.match(SqlBaseParser.LIKE); - this.state = 668; + this.state = 788; localctx.pattern = this.string(); - this.state = 671; + this.state = 791; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===59) { - this.state = 669; + if(_la===66) { + this.state = 789; this.match(SqlBaseParser.ESCAPE); - this.state = 670; + this.state = 790; localctx.escape = this.string(); } @@ -2534,45 +2922,45 @@ export default class SqlBaseParser extends antlr4.Parser { break; - case 42: + case 49: localctx = new ShowSchemasContext(this, localctx); - this.enterOuterAlt(localctx, 42); - this.state = 675; + this.enterOuterAlt(localctx, 49); + this.state = 795; this.match(SqlBaseParser.SHOW); - this.state = 676; + this.state = 796; this.match(SqlBaseParser.SCHEMAS); - this.state = 679; + this.state = 799; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===74 || _la===89) { - this.state = 677; + if(_la===81 || _la===96) { + this.state = 797; _la = this._input.LA(1); - if(!(_la===74 || _la===89)) { + if(!(_la===81 || _la===96)) { this._errHandler.recoverInline(this); } else { this._errHandler.reportMatch(this); this.consume(); } - this.state = 678; + this.state = 798; this.identifier(); } - this.state = 687; + this.state = 807; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===108) { - this.state = 681; + if(_la===117) { + this.state = 801; this.match(SqlBaseParser.LIKE); - this.state = 682; + this.state = 802; localctx.pattern = this.string(); - this.state = 685; + this.state = 805; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===59) { - this.state = 683; + if(_la===66) { + this.state = 803; this.match(SqlBaseParser.ESCAPE); - this.state = 684; + this.state = 804; localctx.escape = this.string(); } @@ -2580,28 +2968,28 @@ export default class SqlBaseParser extends antlr4.Parser { break; - case 43: + case 50: localctx = new ShowCatalogsContext(this, localctx); - this.enterOuterAlt(localctx, 43); - this.state = 689; + this.enterOuterAlt(localctx, 50); + this.state = 809; this.match(SqlBaseParser.SHOW); - this.state = 690; + this.state = 810; this.match(SqlBaseParser.CATALOGS); - this.state = 697; + this.state = 817; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===108) { - this.state = 691; + if(_la===117) { + this.state = 811; this.match(SqlBaseParser.LIKE); - this.state = 692; + this.state = 812; localctx.pattern = this.string(); - this.state = 695; + this.state = 815; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===59) { - this.state = 693; + if(_la===66) { + this.state = 813; this.match(SqlBaseParser.ESCAPE); - this.state = 694; + this.state = 814; localctx.escape = this.string(); } @@ -2609,158 +2997,158 @@ export default class SqlBaseParser extends antlr4.Parser { break; - case 44: + case 51: localctx = new ShowColumnsContext(this, localctx); - this.enterOuterAlt(localctx, 44); - this.state = 699; + this.enterOuterAlt(localctx, 51); + this.state = 819; this.match(SqlBaseParser.SHOW); - this.state = 700; + this.state = 820; this.match(SqlBaseParser.COLUMNS); - this.state = 701; + this.state = 821; _la = this._input.LA(1); - if(!(_la===74 || _la===89)) { + if(!(_la===81 || _la===96)) { this._errHandler.recoverInline(this); } else { this._errHandler.reportMatch(this); this.consume(); } - this.state = 702; + this.state = 822; this.qualifiedName(); break; - case 45: + case 52: localctx = new ShowStatsContext(this, localctx); - this.enterOuterAlt(localctx, 45); - this.state = 703; + this.enterOuterAlt(localctx, 52); + this.state = 823; this.match(SqlBaseParser.SHOW); - this.state = 704; + this.state = 824; this.match(SqlBaseParser.STATS); - this.state = 705; + this.state = 825; this.match(SqlBaseParser.FOR); - this.state = 706; + this.state = 826; this.qualifiedName(); break; - case 46: + case 53: localctx = new ShowStatsForQueryContext(this, localctx); - this.enterOuterAlt(localctx, 46); - this.state = 707; + this.enterOuterAlt(localctx, 53); + this.state = 827; this.match(SqlBaseParser.SHOW); - this.state = 708; + this.state = 828; this.match(SqlBaseParser.STATS); - this.state = 709; + this.state = 829; this.match(SqlBaseParser.FOR); - this.state = 710; + this.state = 830; this.match(SqlBaseParser.T__1); - this.state = 711; + this.state = 831; this.querySpecification(); - this.state = 712; + this.state = 832; this.match(SqlBaseParser.T__2); break; - case 47: + case 54: localctx = new ShowRolesContext(this, localctx); - this.enterOuterAlt(localctx, 47); - this.state = 714; + this.enterOuterAlt(localctx, 54); + this.state = 834; this.match(SqlBaseParser.SHOW); - this.state = 716; + this.state = 836; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===39) { - this.state = 715; + if(_la===41) { + this.state = 835; this.match(SqlBaseParser.CURRENT); } - this.state = 718; + this.state = 838; this.match(SqlBaseParser.ROLES); - this.state = 721; + this.state = 841; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===74 || _la===89) { - this.state = 719; + if(_la===81 || _la===96) { + this.state = 839; _la = this._input.LA(1); - if(!(_la===74 || _la===89)) { + if(!(_la===81 || _la===96)) { this._errHandler.recoverInline(this); } else { this._errHandler.reportMatch(this); this.consume(); } - this.state = 720; + this.state = 840; this.identifier(); } break; - case 48: + case 55: localctx = new ShowRoleGrantsContext(this, localctx); - this.enterOuterAlt(localctx, 48); - this.state = 723; + this.enterOuterAlt(localctx, 55); + this.state = 843; this.match(SqlBaseParser.SHOW); - this.state = 724; + this.state = 844; this.match(SqlBaseParser.ROLE); - this.state = 725; + this.state = 845; this.match(SqlBaseParser.GRANTS); - this.state = 728; + this.state = 848; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===74 || _la===89) { - this.state = 726; + if(_la===81 || _la===96) { + this.state = 846; _la = this._input.LA(1); - if(!(_la===74 || _la===89)) { + if(!(_la===81 || _la===96)) { this._errHandler.recoverInline(this); } else { this._errHandler.reportMatch(this); this.consume(); } - this.state = 727; + this.state = 847; this.identifier(); } break; - case 49: + case 56: localctx = new ShowColumnsContext(this, localctx); - this.enterOuterAlt(localctx, 49); - this.state = 730; + this.enterOuterAlt(localctx, 56); + this.state = 850; this.match(SqlBaseParser.DESCRIBE); - this.state = 731; + this.state = 851; this.qualifiedName(); break; - case 50: + case 57: localctx = new ShowColumnsContext(this, localctx); - this.enterOuterAlt(localctx, 50); - this.state = 732; + this.enterOuterAlt(localctx, 57); + this.state = 852; this.match(SqlBaseParser.DESC); - this.state = 733; + this.state = 853; this.qualifiedName(); break; - case 51: + case 58: localctx = new ShowFunctionsContext(this, localctx); - this.enterOuterAlt(localctx, 51); - this.state = 734; + this.enterOuterAlt(localctx, 58); + this.state = 854; this.match(SqlBaseParser.SHOW); - this.state = 735; + this.state = 855; this.match(SqlBaseParser.FUNCTIONS); - this.state = 742; + this.state = 862; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===108) { - this.state = 736; + if(_la===117) { + this.state = 856; this.match(SqlBaseParser.LIKE); - this.state = 737; + this.state = 857; localctx.pattern = this.string(); - this.state = 740; + this.state = 860; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===59) { - this.state = 738; + if(_la===66) { + this.state = 858; this.match(SqlBaseParser.ESCAPE); - this.state = 739; + this.state = 859; localctx.escape = this.string(); } @@ -2768,28 +3156,28 @@ export default class SqlBaseParser extends antlr4.Parser { break; - case 52: + case 59: localctx = new ShowSessionContext(this, localctx); - this.enterOuterAlt(localctx, 52); - this.state = 744; + this.enterOuterAlt(localctx, 59); + this.state = 864; this.match(SqlBaseParser.SHOW); - this.state = 745; + this.state = 865; this.match(SqlBaseParser.SESSION); - this.state = 752; + this.state = 872; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===108) { - this.state = 746; + if(_la===117) { + this.state = 866; this.match(SqlBaseParser.LIKE); - this.state = 747; + this.state = 867; localctx.pattern = this.string(); - this.state = 750; + this.state = 870; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===59) { - this.state = 748; + if(_la===66) { + this.state = 868; this.match(SqlBaseParser.ESCAPE); - this.state = 749; + this.state = 869; localctx.escape = this.string(); } @@ -2797,54 +3185,54 @@ export default class SqlBaseParser extends antlr4.Parser { break; - case 53: + case 60: localctx = new SetSessionContext(this, localctx); - this.enterOuterAlt(localctx, 53); - this.state = 754; + this.enterOuterAlt(localctx, 60); + this.state = 874; this.match(SqlBaseParser.SET); - this.state = 755; + this.state = 875; this.match(SqlBaseParser.SESSION); - this.state = 756; + this.state = 876; this.qualifiedName(); - this.state = 757; + this.state = 877; this.match(SqlBaseParser.EQ); - this.state = 758; + this.state = 878; this.expression(); break; - case 54: + case 61: localctx = new ResetSessionContext(this, localctx); - this.enterOuterAlt(localctx, 54); - this.state = 760; + this.enterOuterAlt(localctx, 61); + this.state = 880; this.match(SqlBaseParser.RESET); - this.state = 761; + this.state = 881; this.match(SqlBaseParser.SESSION); - this.state = 762; + this.state = 882; this.qualifiedName(); break; - case 55: + case 62: localctx = new StartTransactionContext(this, localctx); - this.enterOuterAlt(localctx, 55); - this.state = 763; + this.enterOuterAlt(localctx, 62); + this.state = 883; this.match(SqlBaseParser.START); - this.state = 764; + this.state = 884; this.match(SqlBaseParser.TRANSACTION); - this.state = 773; + this.state = 893; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===100 || _la===149) { - this.state = 765; + if(_la===107 || _la===162) { + this.state = 885; this.transactionMode(); - this.state = 770; + this.state = 890; this._errHandler.sync(this); _la = this._input.LA(1); while(_la===4) { - this.state = 766; + this.state = 886; this.match(SqlBaseParser.T__3); - this.state = 767; + this.state = 887; this.transactionMode(); - this.state = 772; + this.state = 892; this._errHandler.sync(this); _la = this._input.LA(1); } @@ -2852,84 +3240,84 @@ export default class SqlBaseParser extends antlr4.Parser { break; - case 56: + case 63: localctx = new CommitContext(this, localctx); - this.enterOuterAlt(localctx, 56); - this.state = 775; + this.enterOuterAlt(localctx, 63); + this.state = 895; this.match(SqlBaseParser.COMMIT); - this.state = 777; + this.state = 897; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===217) { - this.state = 776; + if(_la===232) { + this.state = 896; this.match(SqlBaseParser.WORK); } break; - case 57: + case 64: localctx = new RollbackContext(this, localctx); - this.enterOuterAlt(localctx, 57); - this.state = 779; + this.enterOuterAlt(localctx, 64); + this.state = 899; this.match(SqlBaseParser.ROLLBACK); - this.state = 781; + this.state = 901; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===217) { - this.state = 780; + if(_la===232) { + this.state = 900; this.match(SqlBaseParser.WORK); } break; - case 58: + case 65: localctx = new PrepareContext(this, localctx); - this.enterOuterAlt(localctx, 58); - this.state = 783; + this.enterOuterAlt(localctx, 65); + this.state = 903; this.match(SqlBaseParser.PREPARE); - this.state = 784; + this.state = 904; this.identifier(); - this.state = 785; + this.state = 905; this.match(SqlBaseParser.FROM); - this.state = 786; + this.state = 906; this.statement(); break; - case 59: + case 66: localctx = new DeallocateContext(this, localctx); - this.enterOuterAlt(localctx, 59); - this.state = 788; + this.enterOuterAlt(localctx, 66); + this.state = 908; this.match(SqlBaseParser.DEALLOCATE); - this.state = 789; + this.state = 909; this.match(SqlBaseParser.PREPARE); - this.state = 790; + this.state = 910; this.identifier(); break; - case 60: + case 67: localctx = new ExecuteContext(this, localctx); - this.enterOuterAlt(localctx, 60); - this.state = 791; + this.enterOuterAlt(localctx, 67); + this.state = 911; this.match(SqlBaseParser.EXECUTE); - this.state = 792; + this.state = 912; this.identifier(); - this.state = 802; + this.state = 922; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===208) { - this.state = 793; + if(_la===223) { + this.state = 913; this.match(SqlBaseParser.USING); - this.state = 794; + this.state = 914; this.expression(); - this.state = 799; + this.state = 919; this._errHandler.sync(this); _la = this._input.LA(1); while(_la===4) { - this.state = 795; + this.state = 915; this.match(SqlBaseParser.T__3); - this.state = 796; + this.state = 916; this.expression(); - this.state = 801; + this.state = 921; this._errHandler.sync(this); _la = this._input.LA(1); } @@ -2937,63 +3325,108 @@ export default class SqlBaseParser extends antlr4.Parser { break; - case 61: + case 68: localctx = new DescribeInputContext(this, localctx); - this.enterOuterAlt(localctx, 61); - this.state = 804; + this.enterOuterAlt(localctx, 68); + this.state = 924; this.match(SqlBaseParser.DESCRIBE); - this.state = 805; + this.state = 925; this.match(SqlBaseParser.INPUT); - this.state = 806; + this.state = 926; this.identifier(); break; - case 62: + case 69: localctx = new DescribeOutputContext(this, localctx); - this.enterOuterAlt(localctx, 62); - this.state = 807; + this.enterOuterAlt(localctx, 69); + this.state = 927; this.match(SqlBaseParser.DESCRIBE); - this.state = 808; + this.state = 928; this.match(SqlBaseParser.OUTPUT); - this.state = 809; + this.state = 929; this.identifier(); break; - case 63: + case 70: localctx = new UpdateContext(this, localctx); - this.enterOuterAlt(localctx, 63); - this.state = 810; + this.enterOuterAlt(localctx, 70); + this.state = 930; this.match(SqlBaseParser.UPDATE); - this.state = 811; + this.state = 931; this.qualifiedName(); - this.state = 812; + this.state = 932; this.match(SqlBaseParser.SET); - this.state = 813; + this.state = 933; this.updateAssignment(); - this.state = 818; + this.state = 938; this._errHandler.sync(this); _la = this._input.LA(1); while(_la===4) { - this.state = 814; + this.state = 934; this.match(SqlBaseParser.T__3); - this.state = 815; + this.state = 935; this.updateAssignment(); - this.state = 820; + this.state = 940; this._errHandler.sync(this); _la = this._input.LA(1); } - this.state = 823; + this.state = 943; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===215) { - this.state = 821; + if(_la===230) { + this.state = 941; this.match(SqlBaseParser.WHERE); - this.state = 822; + this.state = 942; localctx.where = this.booleanExpression(0); } break; + case 71: + localctx = new MergeIntoContext(this, localctx); + this.enterOuterAlt(localctx, 71); + this.state = 945; + this.match(SqlBaseParser.MERGE); + this.state = 946; + this.match(SqlBaseParser.INTO); + this.state = 947; + this.qualifiedName(); + this.state = 952; + this._errHandler.sync(this); + _la = this._input.LA(1); + if((((_la) & ~0x1f) === 0 && ((1 << _la) & 3464453120) !== 0) || ((((_la - 32)) & ~0x1f) === 0 && ((1 << (_la - 32)) & 3417016911) !== 0) || ((((_la - 65)) & ~0x1f) === 0 && ((1 << (_la - 65)) & 1962720585) !== 0) || ((((_la - 97)) & ~0x1f) === 0 && ((1 << (_la - 97)) & 4281068965) !== 0) || ((((_la - 130)) & ~0x1f) === 0 && ((1 << (_la - 130)) & 4227128895) !== 0) || ((((_la - 162)) & ~0x1f) === 0 && ((1 << (_la - 162)) & 4278050813) !== 0) || ((((_la - 194)) & ~0x1f) === 0 && ((1 << (_la - 194)) & 1567553471) !== 0) || ((((_la - 226)) & ~0x1f) === 0 && ((1 << (_la - 226)) & 4026532807) !== 0)) { + this.state = 949; + this._errHandler.sync(this); + _la = this._input.LA(1); + if(_la===18) { + this.state = 948; + this.match(SqlBaseParser.AS); + } + + this.state = 951; + this.identifier(); + } + + this.state = 954; + this.match(SqlBaseParser.USING); + this.state = 955; + this.relation(0); + this.state = 956; + this.match(SqlBaseParser.ON); + this.state = 957; + this.expression(); + this.state = 959; + this._errHandler.sync(this); + _la = this._input.LA(1); + do { + this.state = 958; + this.mergeCase(); + this.state = 961; + this._errHandler.sync(this); + _la = this._input.LA(1); + } while(_la===229); + break; + } } catch (re) { if(re instanceof antlr4.error.RecognitionException) { @@ -3017,15 +3450,15 @@ export default class SqlBaseParser extends antlr4.Parser { var _la = 0; try { this.enterOuterAlt(localctx, 1); - this.state = 828; + this.state = 966; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===216) { - this.state = 827; + if(_la===231) { + this.state = 965; this.with_(); } - this.state = 830; + this.state = 968; this.queryNoWith(); } catch (re) { if(re instanceof antlr4.error.RecognitionException) { @@ -3049,27 +3482,27 @@ export default class SqlBaseParser extends antlr4.Parser { var _la = 0; try { this.enterOuterAlt(localctx, 1); - this.state = 832; + this.state = 970; this.match(SqlBaseParser.WITH); - this.state = 834; + this.state = 972; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===150) { - this.state = 833; + if(_la===163) { + this.state = 971; this.match(SqlBaseParser.RECURSIVE); } - this.state = 836; + this.state = 974; this.namedQuery(); - this.state = 841; + this.state = 979; this._errHandler.sync(this); _la = this._input.LA(1); while(_la===4) { - this.state = 837; + this.state = 975; this.match(SqlBaseParser.T__3); - this.state = 838; + this.state = 976; this.namedQuery(); - this.state = 843; + this.state = 981; this._errHandler.sync(this); _la = this._input.LA(1); } @@ -3093,166 +3526,28 @@ export default class SqlBaseParser extends antlr4.Parser { let localctx = new TableElementContext(this, this._ctx, this.state); this.enterRule(localctx, 12, SqlBaseParser.RULE_tableElement); try { - this.state = 846; + this.state = 985; this._errHandler.sync(this); - switch(this._input.LA(1)) { - case 10: - case 11: - case 12: - case 14: - case 16: - case 17: - case 19: - case 20: - case 21: - case 24: - case 25: - case 26: - case 29: - case 30: - case 31: - case 32: - case 33: - case 34: - case 39: - case 41: - case 45: - case 46: - case 47: - case 49: - case 51: - case 53: - case 55: - case 61: - case 64: - case 66: - case 68: - case 69: - case 70: - case 71: - case 73: - case 76: - case 77: - case 78: - case 79: - case 80: - case 81: - case 84: - case 86: - case 87: - case 88: - case 90: - case 92: - case 95: - case 97: - case 98: - case 100: - case 101: - case 103: - case 104: - case 105: - case 107: - case 109: - case 112: - case 113: - case 114: - case 115: - case 116: - case 117: - case 119: - case 120: - case 121: - case 122: - case 123: - case 124: - case 128: - case 129: - case 130: - case 131: - case 133: - case 134: - case 137: - case 139: - case 140: - case 141: - case 142: - case 143: - case 144: - case 146: - case 147: - case 148: - case 149: - case 151: - case 152: - case 153: - case 154: - case 155: - case 156: - case 157: - case 158: - case 159: - case 160: - case 162: - case 163: - case 164: - case 166: - case 167: - case 168: - case 169: - case 170: - case 171: - case 173: - case 174: - case 175: - case 176: - case 177: - case 178: - case 179: - case 180: - case 181: - case 182: - case 183: - case 184: - case 185: - case 187: - case 188: - case 189: - case 190: - case 192: - case 193: - case 194: - case 195: - case 197: - case 198: - case 199: - case 201: - case 202: - case 205: - case 206: - case 207: - case 209: - case 211: - case 212: - case 213: - case 217: - case 218: - case 219: - case 220: - case 239: - case 240: - case 241: - case 242: + var la_ = this._interp.adaptivePredict(this._input,110,this._ctx); + switch(la_) { + case 1: this.enterOuterAlt(localctx, 1); - this.state = 844; - this.columnDefinition(); + this.state = 982; + this.constraintSpecification(); break; - case 108: + + case 2: this.enterOuterAlt(localctx, 2); - this.state = 845; + this.state = 983; + this.columnDefinition(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 984; this.likeClause(); break; - default: - throw new antlr4.error.NoViableAltException(this); + } } catch (re) { if(re instanceof antlr4.error.RecognitionException) { @@ -3276,37 +3571,37 @@ export default class SqlBaseParser extends antlr4.Parser { var _la = 0; try { this.enterOuterAlt(localctx, 1); - this.state = 848; + this.state = 987; this.identifier(); - this.state = 849; + this.state = 988; this.type(0); - this.state = 852; + this.state = 991; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===126) { - this.state = 850; + if(_la===137) { + this.state = 989; this.match(SqlBaseParser.NOT); - this.state = 851; + this.state = 990; this.match(SqlBaseParser.NULL); } - this.state = 856; + this.state = 995; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===32) { - this.state = 854; + if(_la===33) { + this.state = 993; this.match(SqlBaseParser.COMMENT); - this.state = 855; + this.state = 994; this.string(); } - this.state = 860; + this.state = 999; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===216) { - this.state = 858; + if(_la===231) { + this.state = 997; this.match(SqlBaseParser.WITH); - this.state = 859; + this.state = 998; this.properties(); } @@ -3332,25 +3627,25 @@ export default class SqlBaseParser extends antlr4.Parser { var _la = 0; try { this.enterOuterAlt(localctx, 1); - this.state = 862; + this.state = 1001; this.match(SqlBaseParser.LIKE); - this.state = 863; + this.state = 1002; this.qualifiedName(); - this.state = 866; + this.state = 1005; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===61 || _la===90) { - this.state = 864; + if(_la===68 || _la===97) { + this.state = 1003; localctx.optionType = this._input.LT(1); _la = this._input.LA(1); - if(!(_la===61 || _la===90)) { + if(!(_la===68 || _la===97)) { localctx.optionType = this._errHandler.recoverInline(this); } else { this._errHandler.reportMatch(this); this.consume(); } - this.state = 865; + this.state = 1004; this.match(SqlBaseParser.PROPERTIES); } @@ -3376,23 +3671,23 @@ export default class SqlBaseParser extends antlr4.Parser { var _la = 0; try { this.enterOuterAlt(localctx, 1); - this.state = 868; + this.state = 1007; this.match(SqlBaseParser.T__1); - this.state = 869; + this.state = 1008; this.property(); - this.state = 874; + this.state = 1013; this._errHandler.sync(this); _la = this._input.LA(1); while(_la===4) { - this.state = 870; + this.state = 1009; this.match(SqlBaseParser.T__3); - this.state = 871; + this.state = 1010; this.property(); - this.state = 876; + this.state = 1015; this._errHandler.sync(this); _la = this._input.LA(1); } - this.state = 877; + this.state = 1016; this.match(SqlBaseParser.T__2); } catch (re) { if(re instanceof antlr4.error.RecognitionException) { @@ -3415,11 +3710,11 @@ export default class SqlBaseParser extends antlr4.Parser { this.enterRule(localctx, 20, SqlBaseParser.RULE_property); try { this.enterOuterAlt(localctx, 1); - this.state = 879; + this.state = 1018; this.identifier(); - this.state = 880; + this.state = 1019; this.match(SqlBaseParser.EQ); - this.state = 881; + this.state = 1020; this.expression(); } catch (re) { if(re instanceof antlr4.error.RecognitionException) { @@ -3442,9 +3737,9 @@ export default class SqlBaseParser extends antlr4.Parser { this.enterRule(localctx, 22, SqlBaseParser.RULE_sqlParameterDeclaration); try { this.enterOuterAlt(localctx, 1); - this.state = 883; + this.state = 1022; this.identifier(); - this.state = 884; + this.state = 1023; this.type(0); } catch (re) { if(re instanceof antlr4.error.RecognitionException) { @@ -3468,13 +3763,13 @@ export default class SqlBaseParser extends antlr4.Parser { var _la = 0; try { this.enterOuterAlt(localctx, 1); - this.state = 889; + this.state = 1028; this._errHandler.sync(this); _la = this._input.LA(1); - while(_la===25 || _la===53 || _la===103 || _la===126 || _la===159) { - this.state = 886; + while(_la===26 || _la===56 || _la===112 || _la===137 || _la===173) { + this.state = 1025; this.routineCharacteristic(); - this.state = 891; + this.state = 1030; this._errHandler.sync(this); _la = this._input.LA(1); } @@ -3498,26 +3793,26 @@ export default class SqlBaseParser extends antlr4.Parser { let localctx = new RoutineCharacteristicContext(this, this._ctx, this.state); this.enterRule(localctx, 26, SqlBaseParser.RULE_routineCharacteristic); try { - this.state = 896; + this.state = 1035; this._errHandler.sync(this); switch(this._input.LA(1)) { - case 103: + case 112: this.enterOuterAlt(localctx, 1); - this.state = 892; + this.state = 1031; this.match(SqlBaseParser.LANGUAGE); - this.state = 893; + this.state = 1032; this.language(); break; - case 53: - case 126: + case 56: + case 137: this.enterOuterAlt(localctx, 2); - this.state = 894; + this.state = 1033; this.determinism(); break; - case 25: - case 159: + case 26: + case 173: this.enterOuterAlt(localctx, 3); - this.state = 895; + this.state = 1034; this.nullCallClause(); break; default: @@ -3545,13 +3840,13 @@ export default class SqlBaseParser extends antlr4.Parser { var _la = 0; try { this.enterOuterAlt(localctx, 1); - this.state = 901; + this.state = 1040; this._errHandler.sync(this); _la = this._input.LA(1); - while(_la===25 || _la===159) { - this.state = 898; + while(_la===26 || _la===173) { + this.state = 1037; this.alterRoutineCharacteristic(); - this.state = 903; + this.state = 1042; this._errHandler.sync(this); _la = this._input.LA(1); } @@ -3576,7 +3871,7 @@ export default class SqlBaseParser extends antlr4.Parser { this.enterRule(localctx, 30, SqlBaseParser.RULE_alterRoutineCharacteristic); try { this.enterOuterAlt(localctx, 1); - this.state = 904; + this.state = 1043; this.nullCallClause(); } catch (re) { if(re instanceof antlr4.error.RecognitionException) { @@ -3598,17 +3893,17 @@ export default class SqlBaseParser extends antlr4.Parser { let localctx = new RoutineBodyContext(this, this._ctx, this.state); this.enterRule(localctx, 32, SqlBaseParser.RULE_routineBody); try { - this.state = 908; + this.state = 1047; this._errHandler.sync(this); switch(this._input.LA(1)) { - case 158: + case 172: this.enterOuterAlt(localctx, 1); - this.state = 906; + this.state = 1045; this.returnStatement(); break; - case 66: + case 73: this.enterOuterAlt(localctx, 2); - this.state = 907; + this.state = 1046; this.externalBodyReference(); break; default: @@ -3635,9 +3930,9 @@ export default class SqlBaseParser extends antlr4.Parser { this.enterRule(localctx, 34, SqlBaseParser.RULE_returnStatement); try { this.enterOuterAlt(localctx, 1); - this.state = 910; + this.state = 1049; this.match(SqlBaseParser.RETURN); - this.state = 911; + this.state = 1050; this.expression(); } catch (re) { if(re instanceof antlr4.error.RecognitionException) { @@ -3661,15 +3956,15 @@ export default class SqlBaseParser extends antlr4.Parser { var _la = 0; try { this.enterOuterAlt(localctx, 1); - this.state = 913; + this.state = 1052; this.match(SqlBaseParser.EXTERNAL); - this.state = 916; + this.state = 1055; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===117) { - this.state = 914; + if(_la===128) { + this.state = 1053; this.match(SqlBaseParser.NAME); - this.state = 915; + this.state = 1054; this.externalRoutineName(); } @@ -3693,19 +3988,19 @@ export default class SqlBaseParser extends antlr4.Parser { let localctx = new LanguageContext(this, this._ctx, this.state); this.enterRule(localctx, 38, SqlBaseParser.RULE_language); try { - this.state = 920; + this.state = 1059; this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,108,this._ctx); + var la_ = this._interp.adaptivePredict(this._input,121,this._ctx); switch(la_) { case 1: this.enterOuterAlt(localctx, 1); - this.state = 918; + this.state = 1057; this.match(SqlBaseParser.SQL); break; case 2: this.enterOuterAlt(localctx, 2); - this.state = 919; + this.state = 1058; this.identifier(); break; @@ -3730,19 +4025,19 @@ export default class SqlBaseParser extends antlr4.Parser { let localctx = new DeterminismContext(this, this._ctx, this.state); this.enterRule(localctx, 40, SqlBaseParser.RULE_determinism); try { - this.state = 925; + this.state = 1064; this._errHandler.sync(this); switch(this._input.LA(1)) { - case 53: + case 56: this.enterOuterAlt(localctx, 1); - this.state = 922; + this.state = 1061; this.match(SqlBaseParser.DETERMINISTIC); break; - case 126: + case 137: this.enterOuterAlt(localctx, 2); - this.state = 923; + this.state = 1062; this.match(SqlBaseParser.NOT); - this.state = 924; + this.state = 1063; this.match(SqlBaseParser.DETERMINISTIC); break; default: @@ -3768,31 +4063,31 @@ export default class SqlBaseParser extends antlr4.Parser { let localctx = new NullCallClauseContext(this, this._ctx, this.state); this.enterRule(localctx, 42, SqlBaseParser.RULE_nullCallClause); try { - this.state = 936; + this.state = 1075; this._errHandler.sync(this); switch(this._input.LA(1)) { - case 159: + case 173: this.enterOuterAlt(localctx, 1); - this.state = 927; + this.state = 1066; this.match(SqlBaseParser.RETURNS); - this.state = 928; + this.state = 1067; this.match(SqlBaseParser.NULL); - this.state = 929; + this.state = 1068; this.match(SqlBaseParser.ON); - this.state = 930; + this.state = 1069; this.match(SqlBaseParser.NULL); - this.state = 931; + this.state = 1070; this.match(SqlBaseParser.INPUT); break; - case 25: + case 26: this.enterOuterAlt(localctx, 2); - this.state = 932; + this.state = 1071; this.match(SqlBaseParser.CALLED); - this.state = 933; + this.state = 1072; this.match(SqlBaseParser.ON); - this.state = 934; + this.state = 1073; this.match(SqlBaseParser.NULL); - this.state = 935; + this.state = 1074; this.match(SqlBaseParser.INPUT); break; default: @@ -3819,7 +4114,7 @@ export default class SqlBaseParser extends antlr4.Parser { this.enterRule(localctx, 44, SqlBaseParser.RULE_externalRoutineName); try { this.enterOuterAlt(localctx, 1); - this.state = 938; + this.state = 1077; this.identifier(); } catch (re) { if(re instanceof antlr4.error.RecognitionException) { @@ -3843,47 +4138,47 @@ export default class SqlBaseParser extends antlr4.Parser { var _la = 0; try { this.enterOuterAlt(localctx, 1); - this.state = 940; + this.state = 1079; this.queryTerm(0); - this.state = 951; + this.state = 1090; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===136) { - this.state = 941; + if(_la===147) { + this.state = 1080; this.match(SqlBaseParser.ORDER); - this.state = 942; + this.state = 1081; this.match(SqlBaseParser.BY); - this.state = 943; + this.state = 1082; this.sortItem(); - this.state = 948; + this.state = 1087; this._errHandler.sync(this); _la = this._input.LA(1); while(_la===4) { - this.state = 944; + this.state = 1083; this.match(SqlBaseParser.T__3); - this.state = 945; + this.state = 1084; this.sortItem(); - this.state = 950; + this.state = 1089; this._errHandler.sync(this); _la = this._input.LA(1); } } - this.state = 958; + this.state = 1097; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===131) { - this.state = 953; + if(_la===142) { + this.state = 1092; this.match(SqlBaseParser.OFFSET); - this.state = 954; + this.state = 1093; localctx.offset = this.match(SqlBaseParser.INTEGER_VALUE); - this.state = 956; + this.state = 1095; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===166 || _la===167) { - this.state = 955; + if(_la===180 || _la===181) { + this.state = 1094; _la = this._input.LA(1); - if(!(_la===166 || _la===167)) { + if(!(_la===180 || _la===181)) { this._errHandler.recoverInline(this); } else { @@ -3894,48 +4189,44 @@ export default class SqlBaseParser extends antlr4.Parser { } - this.state = 969; + this.state = 1108; this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,116,this._ctx); - if(la_===1) { - this.state = 967; + _la = this._input.LA(1); + if(_la===75 || _la===118) { + this.state = 1106; this._errHandler.sync(this); - switch (this._input.LA(1)) { - case 109: - this.state = 960; - this.match(SqlBaseParser.LIMIT); - this.state = 961; - localctx.limit = this._input.LT(1); - _la = this._input.LA(1); - if(!(_la===12 || _la===236)) { - localctx.limit = this._errHandler.recoverInline(this); - } - else { - this._errHandler.reportMatch(this); - this.consume(); - } - break; - case 68: - this.state = 962; - this.match(SqlBaseParser.FETCH); - this.state = 963; - this.match(SqlBaseParser.FIRST); - this.state = 964; - localctx.fetchFirstNRows = this.match(SqlBaseParser.INTEGER_VALUE); - this.state = 965; - this.match(SqlBaseParser.ROWS); - this.state = 966; - this.match(SqlBaseParser.ONLY); - break; - case -1: - case 3: - case 216: - break; + switch(this._input.LA(1)) { + case 118: + this.state = 1099; + this.match(SqlBaseParser.LIMIT); + this.state = 1100; + localctx.limit = this._input.LT(1); + _la = this._input.LA(1); + if(!(_la===12 || _la===251)) { + localctx.limit = this._errHandler.recoverInline(this); + } + else { + this._errHandler.reportMatch(this); + this.consume(); + } + break; + case 75: + this.state = 1101; + this.match(SqlBaseParser.FETCH); + this.state = 1102; + this.match(SqlBaseParser.FIRST); + this.state = 1103; + localctx.fetchFirstNRows = this.match(SqlBaseParser.INTEGER_VALUE); + this.state = 1104; + this.match(SqlBaseParser.ROWS); + this.state = 1105; + this.match(SqlBaseParser.ONLY); + break; default: - break; + throw new antlr4.error.NoViableAltException(this); } - } + } catch (re) { if(re instanceof antlr4.error.RecognitionException) { localctx.exception = re; @@ -3968,41 +4259,41 @@ export default class SqlBaseParser extends antlr4.Parser { this._ctx = localctx; _prevctx = localctx; - this.state = 972; + this.state = 1111; this.queryPrimary(); this._ctx.stop = this._input.LT(-1); - this.state = 988; + this.state = 1127; this._errHandler.sync(this); - var _alt = this._interp.adaptivePredict(this._input,120,this._ctx) + var _alt = this._interp.adaptivePredict(this._input,133,this._ctx) while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) { if(_alt===1) { if(this._parseListeners!==null) { this.triggerExitRuleEvent(); } _prevctx = localctx; - this.state = 986; + this.state = 1125; this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,119,this._ctx); + var la_ = this._interp.adaptivePredict(this._input,132,this._ctx); switch(la_) { case 1: localctx = new SetOperationContext(this, new QueryTermContext(this, _parentctx, _parentState)); localctx.left = _prevctx; this.pushNewRecursionContext(localctx, _startState, SqlBaseParser.RULE_queryTerm); - this.state = 974; + this.state = 1113; if (!( this.precpred(this._ctx, 2))) { throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 2)"); } - this.state = 975; + this.state = 1114; localctx.operator = this.match(SqlBaseParser.INTERSECT); - this.state = 977; + this.state = 1116; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===12 || _la===54) { - this.state = 976; + if(_la===12 || _la===58) { + this.state = 1115; this.setQuantifier(); } - this.state = 979; + this.state = 1118; localctx.right = this.queryTerm(3); break; @@ -4010,37 +4301,37 @@ export default class SqlBaseParser extends antlr4.Parser { localctx = new SetOperationContext(this, new QueryTermContext(this, _parentctx, _parentState)); localctx.left = _prevctx; this.pushNewRecursionContext(localctx, _startState, SqlBaseParser.RULE_queryTerm); - this.state = 980; + this.state = 1119; if (!( this.precpred(this._ctx, 1))) { throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 1)"); } - this.state = 981; + this.state = 1120; localctx.operator = this._input.LT(1); _la = this._input.LA(1); - if(!(_la===60 || _la===203)) { + if(!(_la===67 || _la===217)) { localctx.operator = this._errHandler.recoverInline(this); } else { this._errHandler.reportMatch(this); this.consume(); } - this.state = 983; + this.state = 1122; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===12 || _la===54) { - this.state = 982; + if(_la===12 || _la===58) { + this.state = 1121; this.setQuantifier(); } - this.state = 985; + this.state = 1124; localctx.right = this.queryTerm(2); break; } } - this.state = 990; + this.state = 1129; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input,120,this._ctx); + _alt = this._interp.adaptivePredict(this._input,133,this._ctx); } } catch( error) { @@ -4063,54 +4354,54 @@ export default class SqlBaseParser extends antlr4.Parser { let localctx = new QueryPrimaryContext(this, this._ctx, this.state); this.enterRule(localctx, 50, SqlBaseParser.RULE_queryPrimary); try { - this.state = 1007; + this.state = 1146; this._errHandler.sync(this); switch(this._input.LA(1)) { - case 172: + case 186: localctx = new QueryPrimaryDefaultContext(this, localctx); this.enterOuterAlt(localctx, 1); - this.state = 991; + this.state = 1130; this.querySpecification(); break; - case 186: + case 200: localctx = new TableContext(this, localctx); this.enterOuterAlt(localctx, 2); - this.state = 992; + this.state = 1131; this.match(SqlBaseParser.TABLE); - this.state = 993; + this.state = 1132; this.qualifiedName(); break; - case 210: + case 225: localctx = new InlineTableContext(this, localctx); this.enterOuterAlt(localctx, 3); - this.state = 994; + this.state = 1133; this.match(SqlBaseParser.VALUES); - this.state = 995; + this.state = 1134; this.expression(); - this.state = 1000; + this.state = 1139; this._errHandler.sync(this); - var _alt = this._interp.adaptivePredict(this._input,121,this._ctx) + var _alt = this._interp.adaptivePredict(this._input,134,this._ctx) while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) { if(_alt===1) { - this.state = 996; + this.state = 1135; this.match(SqlBaseParser.T__3); - this.state = 997; + this.state = 1136; this.expression(); } - this.state = 1002; + this.state = 1141; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input,121,this._ctx); + _alt = this._interp.adaptivePredict(this._input,134,this._ctx); } break; case 2: localctx = new SubqueryContext(this, localctx); this.enterOuterAlt(localctx, 4); - this.state = 1003; + this.state = 1142; this.match(SqlBaseParser.T__1); - this.state = 1004; + this.state = 1143; this.queryNoWith(); - this.state = 1005; + this.state = 1144; this.match(SqlBaseParser.T__2); break; default: @@ -4138,16 +4429,16 @@ export default class SqlBaseParser extends antlr4.Parser { var _la = 0; try { this.enterOuterAlt(localctx, 1); - this.state = 1009; + this.state = 1148; this.expression(); - this.state = 1011; + this.state = 1150; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===19 || _la===51) { - this.state = 1010; + if(_la===19 || _la===53) { + this.state = 1149; localctx.ordering = this._input.LT(1); _la = this._input.LA(1); - if(!(_la===19 || _la===51)) { + if(!(_la===19 || _la===53)) { localctx.ordering = this._errHandler.recoverInline(this); } else { @@ -4156,16 +4447,16 @@ export default class SqlBaseParser extends antlr4.Parser { } } - this.state = 1015; + this.state = 1154; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===129) { - this.state = 1013; + if(_la===140) { + this.state = 1152; this.match(SqlBaseParser.NULLS); - this.state = 1014; + this.state = 1153; localctx.nullOrdering = this._input.LT(1); _la = this._input.LA(1); - if(!(_la===70 || _la===104)) { + if(!(_la===77 || _la===113)) { localctx.nullOrdering = this._errHandler.recoverInline(this); } else { @@ -4195,87 +4486,87 @@ export default class SqlBaseParser extends antlr4.Parser { this.enterRule(localctx, 54, SqlBaseParser.RULE_querySpecification); try { this.enterOuterAlt(localctx, 1); - this.state = 1017; + this.state = 1156; this.match(SqlBaseParser.SELECT); - this.state = 1019; + this.state = 1158; this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,125,this._ctx); + var la_ = this._interp.adaptivePredict(this._input,138,this._ctx); if(la_===1) { - this.state = 1018; + this.state = 1157; this.setQuantifier(); } - this.state = 1021; + this.state = 1160; this.selectItem(); - this.state = 1026; + this.state = 1165; this._errHandler.sync(this); - var _alt = this._interp.adaptivePredict(this._input,126,this._ctx) + var _alt = this._interp.adaptivePredict(this._input,139,this._ctx) while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) { if(_alt===1) { - this.state = 1022; + this.state = 1161; this.match(SqlBaseParser.T__3); - this.state = 1023; + this.state = 1162; this.selectItem(); } - this.state = 1028; + this.state = 1167; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input,126,this._ctx); + _alt = this._interp.adaptivePredict(this._input,139,this._ctx); } - this.state = 1038; + this.state = 1177; this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,128,this._ctx); + var la_ = this._interp.adaptivePredict(this._input,141,this._ctx); if(la_===1) { - this.state = 1029; + this.state = 1168; this.match(SqlBaseParser.FROM); - this.state = 1030; + this.state = 1169; this.relation(0); - this.state = 1035; + this.state = 1174; this._errHandler.sync(this); - var _alt = this._interp.adaptivePredict(this._input,127,this._ctx) + var _alt = this._interp.adaptivePredict(this._input,140,this._ctx) while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) { if(_alt===1) { - this.state = 1031; + this.state = 1170; this.match(SqlBaseParser.T__3); - this.state = 1032; + this.state = 1171; this.relation(0); } - this.state = 1037; + this.state = 1176; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input,127,this._ctx); + _alt = this._interp.adaptivePredict(this._input,140,this._ctx); } } - this.state = 1042; + this.state = 1181; this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,129,this._ctx); + var la_ = this._interp.adaptivePredict(this._input,142,this._ctx); if(la_===1) { - this.state = 1040; + this.state = 1179; this.match(SqlBaseParser.WHERE); - this.state = 1041; + this.state = 1180; localctx.where = this.booleanExpression(0); } - this.state = 1047; + this.state = 1186; this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,130,this._ctx); + var la_ = this._interp.adaptivePredict(this._input,143,this._ctx); if(la_===1) { - this.state = 1044; + this.state = 1183; this.match(SqlBaseParser.GROUP); - this.state = 1045; + this.state = 1184; this.match(SqlBaseParser.BY); - this.state = 1046; + this.state = 1185; this.groupBy(); } - this.state = 1051; + this.state = 1190; this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,131,this._ctx); + var la_ = this._interp.adaptivePredict(this._input,144,this._ctx); if(la_===1) { - this.state = 1049; + this.state = 1188; this.match(SqlBaseParser.HAVING); - this.state = 1050; + this.state = 1189; localctx.having = this.booleanExpression(0); } @@ -4300,29 +4591,29 @@ export default class SqlBaseParser extends antlr4.Parser { this.enterRule(localctx, 56, SqlBaseParser.RULE_groupBy); try { this.enterOuterAlt(localctx, 1); - this.state = 1054; + this.state = 1193; this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,132,this._ctx); + var la_ = this._interp.adaptivePredict(this._input,145,this._ctx); if(la_===1) { - this.state = 1053; + this.state = 1192; this.setQuantifier(); } - this.state = 1056; + this.state = 1195; this.groupingElement(); - this.state = 1061; + this.state = 1200; this._errHandler.sync(this); - var _alt = this._interp.adaptivePredict(this._input,133,this._ctx) + var _alt = this._interp.adaptivePredict(this._input,146,this._ctx) while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) { if(_alt===1) { - this.state = 1057; + this.state = 1196; this.match(SqlBaseParser.T__3); - this.state = 1058; + this.state = 1197; this.groupingElement(); } - this.state = 1063; + this.state = 1202; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input,133,this._ctx); + _alt = this._interp.adaptivePredict(this._input,146,this._ctx); } } catch (re) { @@ -4346,103 +4637,103 @@ export default class SqlBaseParser extends antlr4.Parser { this.enterRule(localctx, 58, SqlBaseParser.RULE_groupingElement); var _la = 0; try { - this.state = 1104; + this.state = 1243; this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,139,this._ctx); + var la_ = this._interp.adaptivePredict(this._input,152,this._ctx); switch(la_) { case 1: localctx = new SingleGroupingSetContext(this, localctx); this.enterOuterAlt(localctx, 1); - this.state = 1064; + this.state = 1203; this.groupingSet(); break; case 2: localctx = new RollupContext(this, localctx); this.enterOuterAlt(localctx, 2); - this.state = 1065; + this.state = 1204; this.match(SqlBaseParser.ROLLUP); - this.state = 1066; + this.state = 1205; this.match(SqlBaseParser.T__1); - this.state = 1075; + this.state = 1214; this._errHandler.sync(this); _la = this._input.LA(1); - if((((_la) & ~0x1f) === 0 && ((1 << _la) & 4282080292) !== 0) || ((((_la - 32)) & ~0x1f) === 0 && ((1 << (_la - 32)) & 2695561095) !== 0) || ((((_la - 64)) & ~0x1f) === 0 && ((1 << (_la - 64)) & 2514219775) !== 0) || ((((_la - 97)) & ~0x1f) === 0 && ((1 << (_la - 97)) & 4292867547) !== 0) || ((((_la - 129)) & ~0x1f) === 0 && ((1 << (_la - 129)) & 4292803895) !== 0) || ((((_la - 162)) & ~0x1f) === 0 && ((1 << (_la - 162)) & 3741318135) !== 0) || ((((_la - 194)) & ~0x1f) === 0 && ((1 << (_la - 194)) & 126794175) !== 0) || ((((_la - 227)) & ~0x1f) === 0 && ((1 << (_la - 227)) & 327619) !== 0)) { - this.state = 1067; + if(((((_la - 2)) & ~0x1f) === 0 && ((1 << (_la - 2)) & 4288599817) !== 0) || ((((_la - 34)) & ~0x1f) === 0 && ((1 << (_la - 34)) & 3001745299) !== 0) || ((((_la - 68)) & ~0x1f) === 0 && ((1 << (_la - 68)) & 2933889021) !== 0) || ((((_la - 102)) & ~0x1f) === 0 && ((1 << (_la - 102)) & 4160708461) !== 0) || ((((_la - 134)) & ~0x1f) === 0 && ((1 << (_la - 134)) & 3753856511) !== 0) || ((((_la - 166)) & ~0x1f) === 0 && ((1 << (_la - 166)) & 4293910015) !== 0) || ((((_la - 198)) & ~0x1f) === 0 && ((1 << (_la - 198)) & 1977024379) !== 0) || ((((_la - 232)) & ~0x1f) === 0 && ((1 << (_la - 232)) & 335481871) !== 0)) { + this.state = 1206; this.expression(); - this.state = 1072; + this.state = 1211; this._errHandler.sync(this); _la = this._input.LA(1); while(_la===4) { - this.state = 1068; + this.state = 1207; this.match(SqlBaseParser.T__3); - this.state = 1069; + this.state = 1208; this.expression(); - this.state = 1074; + this.state = 1213; this._errHandler.sync(this); _la = this._input.LA(1); } } - this.state = 1077; + this.state = 1216; this.match(SqlBaseParser.T__2); break; case 3: localctx = new CubeContext(this, localctx); this.enterOuterAlt(localctx, 3); - this.state = 1078; + this.state = 1217; this.match(SqlBaseParser.CUBE); - this.state = 1079; + this.state = 1218; this.match(SqlBaseParser.T__1); - this.state = 1088; + this.state = 1227; this._errHandler.sync(this); _la = this._input.LA(1); - if((((_la) & ~0x1f) === 0 && ((1 << _la) & 4282080292) !== 0) || ((((_la - 32)) & ~0x1f) === 0 && ((1 << (_la - 32)) & 2695561095) !== 0) || ((((_la - 64)) & ~0x1f) === 0 && ((1 << (_la - 64)) & 2514219775) !== 0) || ((((_la - 97)) & ~0x1f) === 0 && ((1 << (_la - 97)) & 4292867547) !== 0) || ((((_la - 129)) & ~0x1f) === 0 && ((1 << (_la - 129)) & 4292803895) !== 0) || ((((_la - 162)) & ~0x1f) === 0 && ((1 << (_la - 162)) & 3741318135) !== 0) || ((((_la - 194)) & ~0x1f) === 0 && ((1 << (_la - 194)) & 126794175) !== 0) || ((((_la - 227)) & ~0x1f) === 0 && ((1 << (_la - 227)) & 327619) !== 0)) { - this.state = 1080; + if(((((_la - 2)) & ~0x1f) === 0 && ((1 << (_la - 2)) & 4288599817) !== 0) || ((((_la - 34)) & ~0x1f) === 0 && ((1 << (_la - 34)) & 3001745299) !== 0) || ((((_la - 68)) & ~0x1f) === 0 && ((1 << (_la - 68)) & 2933889021) !== 0) || ((((_la - 102)) & ~0x1f) === 0 && ((1 << (_la - 102)) & 4160708461) !== 0) || ((((_la - 134)) & ~0x1f) === 0 && ((1 << (_la - 134)) & 3753856511) !== 0) || ((((_la - 166)) & ~0x1f) === 0 && ((1 << (_la - 166)) & 4293910015) !== 0) || ((((_la - 198)) & ~0x1f) === 0 && ((1 << (_la - 198)) & 1977024379) !== 0) || ((((_la - 232)) & ~0x1f) === 0 && ((1 << (_la - 232)) & 335481871) !== 0)) { + this.state = 1219; this.expression(); - this.state = 1085; + this.state = 1224; this._errHandler.sync(this); _la = this._input.LA(1); while(_la===4) { - this.state = 1081; + this.state = 1220; this.match(SqlBaseParser.T__3); - this.state = 1082; + this.state = 1221; this.expression(); - this.state = 1087; + this.state = 1226; this._errHandler.sync(this); _la = this._input.LA(1); } } - this.state = 1090; + this.state = 1229; this.match(SqlBaseParser.T__2); break; case 4: localctx = new MultipleGroupingSetsContext(this, localctx); this.enterOuterAlt(localctx, 4); - this.state = 1091; + this.state = 1230; this.match(SqlBaseParser.GROUPING); - this.state = 1092; + this.state = 1231; this.match(SqlBaseParser.SETS); - this.state = 1093; + this.state = 1232; this.match(SqlBaseParser.T__1); - this.state = 1094; + this.state = 1233; this.groupingSet(); - this.state = 1099; + this.state = 1238; this._errHandler.sync(this); _la = this._input.LA(1); while(_la===4) { - this.state = 1095; + this.state = 1234; this.match(SqlBaseParser.T__3); - this.state = 1096; + this.state = 1235; this.groupingSet(); - this.state = 1101; + this.state = 1240; this._errHandler.sync(this); _la = this._input.LA(1); } - this.state = 1102; + this.state = 1241; this.match(SqlBaseParser.T__2); break; @@ -4468,41 +4759,41 @@ export default class SqlBaseParser extends antlr4.Parser { this.enterRule(localctx, 60, SqlBaseParser.RULE_groupingSet); var _la = 0; try { - this.state = 1119; + this.state = 1258; this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,142,this._ctx); + var la_ = this._interp.adaptivePredict(this._input,155,this._ctx); switch(la_) { case 1: this.enterOuterAlt(localctx, 1); - this.state = 1106; + this.state = 1245; this.match(SqlBaseParser.T__1); - this.state = 1115; + this.state = 1254; this._errHandler.sync(this); _la = this._input.LA(1); - if((((_la) & ~0x1f) === 0 && ((1 << _la) & 4282080292) !== 0) || ((((_la - 32)) & ~0x1f) === 0 && ((1 << (_la - 32)) & 2695561095) !== 0) || ((((_la - 64)) & ~0x1f) === 0 && ((1 << (_la - 64)) & 2514219775) !== 0) || ((((_la - 97)) & ~0x1f) === 0 && ((1 << (_la - 97)) & 4292867547) !== 0) || ((((_la - 129)) & ~0x1f) === 0 && ((1 << (_la - 129)) & 4292803895) !== 0) || ((((_la - 162)) & ~0x1f) === 0 && ((1 << (_la - 162)) & 3741318135) !== 0) || ((((_la - 194)) & ~0x1f) === 0 && ((1 << (_la - 194)) & 126794175) !== 0) || ((((_la - 227)) & ~0x1f) === 0 && ((1 << (_la - 227)) & 327619) !== 0)) { - this.state = 1107; + if(((((_la - 2)) & ~0x1f) === 0 && ((1 << (_la - 2)) & 4288599817) !== 0) || ((((_la - 34)) & ~0x1f) === 0 && ((1 << (_la - 34)) & 3001745299) !== 0) || ((((_la - 68)) & ~0x1f) === 0 && ((1 << (_la - 68)) & 2933889021) !== 0) || ((((_la - 102)) & ~0x1f) === 0 && ((1 << (_la - 102)) & 4160708461) !== 0) || ((((_la - 134)) & ~0x1f) === 0 && ((1 << (_la - 134)) & 3753856511) !== 0) || ((((_la - 166)) & ~0x1f) === 0 && ((1 << (_la - 166)) & 4293910015) !== 0) || ((((_la - 198)) & ~0x1f) === 0 && ((1 << (_la - 198)) & 1977024379) !== 0) || ((((_la - 232)) & ~0x1f) === 0 && ((1 << (_la - 232)) & 335481871) !== 0)) { + this.state = 1246; this.expression(); - this.state = 1112; + this.state = 1251; this._errHandler.sync(this); _la = this._input.LA(1); while(_la===4) { - this.state = 1108; + this.state = 1247; this.match(SqlBaseParser.T__3); - this.state = 1109; + this.state = 1248; this.expression(); - this.state = 1114; + this.state = 1253; this._errHandler.sync(this); _la = this._input.LA(1); } } - this.state = 1117; + this.state = 1256; this.match(SqlBaseParser.T__2); break; case 2: this.enterOuterAlt(localctx, 2); - this.state = 1118; + this.state = 1257; this.expression(); break; @@ -4529,23 +4820,23 @@ export default class SqlBaseParser extends antlr4.Parser { var _la = 0; try { this.enterOuterAlt(localctx, 1); - this.state = 1121; + this.state = 1260; localctx.name = this.identifier(); - this.state = 1123; + this.state = 1262; this._errHandler.sync(this); _la = this._input.LA(1); if(_la===2) { - this.state = 1122; + this.state = 1261; this.columnAliases(); } - this.state = 1125; + this.state = 1264; this.match(SqlBaseParser.AS); - this.state = 1126; + this.state = 1265; this.match(SqlBaseParser.T__1); - this.state = 1127; + this.state = 1266; this.query(); - this.state = 1128; + this.state = 1267; this.match(SqlBaseParser.T__2); } catch (re) { if(re instanceof antlr4.error.RecognitionException) { @@ -4569,9 +4860,9 @@ export default class SqlBaseParser extends antlr4.Parser { var _la = 0; try { this.enterOuterAlt(localctx, 1); - this.state = 1130; + this.state = 1269; _la = this._input.LA(1); - if(!(_la===12 || _la===54)) { + if(!(_la===12 || _la===58)) { this._errHandler.recoverInline(this); } else { @@ -4599,28 +4890,28 @@ export default class SqlBaseParser extends antlr4.Parser { this.enterRule(localctx, 66, SqlBaseParser.RULE_selectItem); var _la = 0; try { - this.state = 1144; + this.state = 1283; this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,146,this._ctx); + var la_ = this._interp.adaptivePredict(this._input,159,this._ctx); switch(la_) { case 1: localctx = new SelectSingleContext(this, localctx); this.enterOuterAlt(localctx, 1); - this.state = 1132; + this.state = 1271; this.expression(); - this.state = 1137; + this.state = 1276; this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,145,this._ctx); + var la_ = this._interp.adaptivePredict(this._input,158,this._ctx); if(la_===1) { - this.state = 1134; + this.state = 1273; this._errHandler.sync(this); _la = this._input.LA(1); if(_la===18) { - this.state = 1133; + this.state = 1272; this.match(SqlBaseParser.AS); } - this.state = 1136; + this.state = 1275; this.identifier(); } @@ -4629,18 +4920,18 @@ export default class SqlBaseParser extends antlr4.Parser { case 2: localctx = new SelectAllContext(this, localctx); this.enterOuterAlt(localctx, 2); - this.state = 1139; + this.state = 1278; this.qualifiedName(); - this.state = 1140; + this.state = 1279; this.match(SqlBaseParser.T__0); - this.state = 1141; + this.state = 1280; this.match(SqlBaseParser.ASTERISK); break; case 3: localctx = new SelectAllContext(this, localctx); this.enterOuterAlt(localctx, 3); - this.state = 1143; + this.state = 1282; this.match(SqlBaseParser.ASTERISK); break; @@ -4676,12 +4967,12 @@ export default class SqlBaseParser extends antlr4.Parser { this._ctx = localctx; _prevctx = localctx; - this.state = 1147; + this.state = 1286; this.sampledRelation(); this._ctx.stop = this._input.LT(-1); - this.state = 1167; + this.state = 1306; this._errHandler.sync(this); - var _alt = this._interp.adaptivePredict(this._input,148,this._ctx) + var _alt = this._interp.adaptivePredict(this._input,161,this._ctx) while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) { if(_alt===1) { if(this._parseListeners!==null) { @@ -4691,52 +4982,52 @@ export default class SqlBaseParser extends antlr4.Parser { localctx = new JoinRelationContext(this, new RelationContext(this, _parentctx, _parentState)); localctx.left = _prevctx; this.pushNewRecursionContext(localctx, _startState, SqlBaseParser.RULE_relation); - this.state = 1149; + this.state = 1288; if (!( this.precpred(this._ctx, 2))) { throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 2)"); } - this.state = 1163; + this.state = 1302; this._errHandler.sync(this); switch(this._input.LA(1)) { - case 37: - this.state = 1150; + case 39: + this.state = 1289; this.match(SqlBaseParser.CROSS); - this.state = 1151; + this.state = 1290; this.match(SqlBaseParser.JOIN); - this.state = 1152; + this.state = 1291; localctx.right = this.sampledRelation(); break; - case 75: - case 91: - case 102: - case 106: - case 161: - this.state = 1153; + case 82: + case 98: + case 109: + case 115: + case 175: + this.state = 1292; this.joinType(); - this.state = 1154; + this.state = 1293; this.match(SqlBaseParser.JOIN); - this.state = 1155; + this.state = 1294; localctx.rightRelation = this.relation(0); - this.state = 1156; + this.state = 1295; this.joinCriteria(); break; - case 118: - this.state = 1158; + case 129: + this.state = 1297; this.match(SqlBaseParser.NATURAL); - this.state = 1159; + this.state = 1298; this.joinType(); - this.state = 1160; + this.state = 1299; this.match(SqlBaseParser.JOIN); - this.state = 1161; + this.state = 1300; localctx.right = this.sampledRelation(); break; default: throw new antlr4.error.NoViableAltException(this); } } - this.state = 1169; + this.state = 1308; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input,148,this._ctx); + _alt = this._interp.adaptivePredict(this._input,161,this._ctx); } } catch( error) { @@ -4760,56 +5051,56 @@ export default class SqlBaseParser extends antlr4.Parser { this.enterRule(localctx, 70, SqlBaseParser.RULE_joinType); var _la = 0; try { - this.state = 1185; + this.state = 1324; this._errHandler.sync(this); switch(this._input.LA(1)) { - case 91: - case 102: + case 98: + case 109: this.enterOuterAlt(localctx, 1); - this.state = 1171; + this.state = 1310; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===91) { - this.state = 1170; + if(_la===98) { + this.state = 1309; this.match(SqlBaseParser.INNER); } break; - case 106: + case 115: this.enterOuterAlt(localctx, 2); - this.state = 1173; + this.state = 1312; this.match(SqlBaseParser.LEFT); - this.state = 1175; + this.state = 1314; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===138) { - this.state = 1174; + if(_la===149) { + this.state = 1313; this.match(SqlBaseParser.OUTER); } break; - case 161: + case 175: this.enterOuterAlt(localctx, 3); - this.state = 1177; + this.state = 1316; this.match(SqlBaseParser.RIGHT); - this.state = 1179; + this.state = 1318; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===138) { - this.state = 1178; + if(_la===149) { + this.state = 1317; this.match(SqlBaseParser.OUTER); } break; - case 75: + case 82: this.enterOuterAlt(localctx, 4); - this.state = 1181; + this.state = 1320; this.match(SqlBaseParser.FULL); - this.state = 1183; + this.state = 1322; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===138) { - this.state = 1182; + if(_la===149) { + this.state = 1321; this.match(SqlBaseParser.OUTER); } @@ -4838,37 +5129,37 @@ export default class SqlBaseParser extends antlr4.Parser { this.enterRule(localctx, 72, SqlBaseParser.RULE_joinCriteria); var _la = 0; try { - this.state = 1201; + this.state = 1340; this._errHandler.sync(this); switch(this._input.LA(1)) { - case 132: + case 143: this.enterOuterAlt(localctx, 1); - this.state = 1187; + this.state = 1326; this.match(SqlBaseParser.ON); - this.state = 1188; + this.state = 1327; this.booleanExpression(0); break; - case 208: + case 223: this.enterOuterAlt(localctx, 2); - this.state = 1189; + this.state = 1328; this.match(SqlBaseParser.USING); - this.state = 1190; + this.state = 1329; this.match(SqlBaseParser.T__1); - this.state = 1191; + this.state = 1330; this.identifier(); - this.state = 1196; + this.state = 1335; this._errHandler.sync(this); _la = this._input.LA(1); while(_la===4) { - this.state = 1192; + this.state = 1331; this.match(SqlBaseParser.T__3); - this.state = 1193; + this.state = 1332; this.identifier(); - this.state = 1198; + this.state = 1337; this._errHandler.sync(this); _la = this._input.LA(1); } - this.state = 1199; + this.state = 1338; this.match(SqlBaseParser.T__2); break; default: @@ -4895,21 +5186,21 @@ export default class SqlBaseParser extends antlr4.Parser { this.enterRule(localctx, 74, SqlBaseParser.RULE_sampledRelation); try { this.enterOuterAlt(localctx, 1); - this.state = 1203; + this.state = 1342; this.aliasedRelation(); - this.state = 1210; + this.state = 1349; this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,156,this._ctx); + var la_ = this._interp.adaptivePredict(this._input,169,this._ctx); if(la_===1) { - this.state = 1204; + this.state = 1343; this.match(SqlBaseParser.TABLESAMPLE); - this.state = 1205; + this.state = 1344; this.sampleType(); - this.state = 1206; + this.state = 1345; this.match(SqlBaseParser.T__1); - this.state = 1207; + this.state = 1346; localctx.percentage = this.expression(); - this.state = 1208; + this.state = 1347; this.match(SqlBaseParser.T__2); } @@ -4935,9 +5226,9 @@ export default class SqlBaseParser extends antlr4.Parser { var _la = 0; try { this.enterOuterAlt(localctx, 1); - this.state = 1212; + this.state = 1351; _la = this._input.LA(1); - if(!(_la===21 || _la===183)) { + if(!(_la===22 || _la===197)) { this._errHandler.recoverInline(this); } else { @@ -4966,27 +5257,27 @@ export default class SqlBaseParser extends antlr4.Parser { var _la = 0; try { this.enterOuterAlt(localctx, 1); - this.state = 1214; + this.state = 1353; this.relationPrimary(); - this.state = 1222; + this.state = 1361; this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,159,this._ctx); + var la_ = this._interp.adaptivePredict(this._input,172,this._ctx); if(la_===1) { - this.state = 1216; + this.state = 1355; this._errHandler.sync(this); _la = this._input.LA(1); if(_la===18) { - this.state = 1215; + this.state = 1354; this.match(SqlBaseParser.AS); } - this.state = 1218; + this.state = 1357; this.identifier(); - this.state = 1220; + this.state = 1359; this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,158,this._ctx); + var la_ = this._interp.adaptivePredict(this._input,171,this._ctx); if(la_===1) { - this.state = 1219; + this.state = 1358; this.columnAliases(); } @@ -5014,23 +5305,23 @@ export default class SqlBaseParser extends antlr4.Parser { var _la = 0; try { this.enterOuterAlt(localctx, 1); - this.state = 1224; + this.state = 1363; this.match(SqlBaseParser.T__1); - this.state = 1225; + this.state = 1364; this.identifier(); - this.state = 1230; + this.state = 1369; this._errHandler.sync(this); _la = this._input.LA(1); while(_la===4) { - this.state = 1226; + this.state = 1365; this.match(SqlBaseParser.T__3); - this.state = 1227; + this.state = 1366; this.identifier(); - this.state = 1232; + this.state = 1371; this._errHandler.sync(this); _la = this._input.LA(1); } - this.state = 1233; + this.state = 1372; this.match(SqlBaseParser.T__2); } catch (re) { if(re instanceof antlr4.error.RecognitionException) { @@ -5053,20 +5344,20 @@ export default class SqlBaseParser extends antlr4.Parser { this.enterRule(localctx, 82, SqlBaseParser.RULE_relationPrimary); var _la = 0; try { - this.state = 1267; + this.state = 1411; this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,164,this._ctx); + var la_ = this._interp.adaptivePredict(this._input,177,this._ctx); switch(la_) { case 1: localctx = new TableNameContext(this, localctx); this.enterOuterAlt(localctx, 1); - this.state = 1235; + this.state = 1374; this.qualifiedName(); - this.state = 1237; + this.state = 1376; this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,161,this._ctx); + var la_ = this._interp.adaptivePredict(this._input,174,this._ctx); if(la_===1) { - this.state = 1236; + this.state = 1375; this.tableVersionExpression(); } @@ -5075,44 +5366,44 @@ export default class SqlBaseParser extends antlr4.Parser { case 2: localctx = new SubqueryRelationContext(this, localctx); this.enterOuterAlt(localctx, 2); - this.state = 1239; + this.state = 1378; this.match(SqlBaseParser.T__1); - this.state = 1240; + this.state = 1379; this.query(); - this.state = 1241; + this.state = 1380; this.match(SqlBaseParser.T__2); break; case 3: localctx = new UnnestContext(this, localctx); this.enterOuterAlt(localctx, 3); - this.state = 1243; + this.state = 1382; this.match(SqlBaseParser.UNNEST); - this.state = 1244; + this.state = 1383; this.match(SqlBaseParser.T__1); - this.state = 1245; + this.state = 1384; this.expression(); - this.state = 1250; + this.state = 1389; this._errHandler.sync(this); _la = this._input.LA(1); while(_la===4) { - this.state = 1246; + this.state = 1385; this.match(SqlBaseParser.T__3); - this.state = 1247; + this.state = 1386; this.expression(); - this.state = 1252; + this.state = 1391; this._errHandler.sync(this); _la = this._input.LA(1); } - this.state = 1253; + this.state = 1392; this.match(SqlBaseParser.T__2); - this.state = 1256; + this.state = 1395; this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,163,this._ctx); + var la_ = this._interp.adaptivePredict(this._input,176,this._ctx); if(la_===1) { - this.state = 1254; + this.state = 1393; this.match(SqlBaseParser.WITH); - this.state = 1255; + this.state = 1394; this.match(SqlBaseParser.ORDINALITY); } @@ -5121,24 +5412,37 @@ export default class SqlBaseParser extends antlr4.Parser { case 4: localctx = new LateralContext(this, localctx); this.enterOuterAlt(localctx, 4); - this.state = 1258; + this.state = 1397; this.match(SqlBaseParser.LATERAL); - this.state = 1259; + this.state = 1398; this.match(SqlBaseParser.T__1); - this.state = 1260; + this.state = 1399; this.query(); - this.state = 1261; + this.state = 1400; this.match(SqlBaseParser.T__2); break; case 5: localctx = new ParenthesizedRelationContext(this, localctx); this.enterOuterAlt(localctx, 5); - this.state = 1263; + this.state = 1402; this.match(SqlBaseParser.T__1); - this.state = 1264; + this.state = 1403; this.relation(0); - this.state = 1265; + this.state = 1404; + this.match(SqlBaseParser.T__2); + break; + + case 6: + localctx = new TableFunctionInvocationContext(this, localctx); + this.enterOuterAlt(localctx, 6); + this.state = 1406; + this.match(SqlBaseParser.TABLE); + this.state = 1407; + this.match(SqlBaseParser.T__1); + this.state = 1408; + this.tableFunctionCall(); + this.state = 1409; this.match(SqlBaseParser.T__2); break; @@ -5164,7 +5468,7 @@ export default class SqlBaseParser extends antlr4.Parser { this.enterRule(localctx, 84, SqlBaseParser.RULE_expression); try { this.enterOuterAlt(localctx, 1); - this.state = 1269; + this.state = 1413; this.booleanExpression(0); } catch (re) { if(re instanceof antlr4.error.RecognitionException) { @@ -5193,7 +5497,7 @@ export default class SqlBaseParser extends antlr4.Parser { this.enterRecursionRule(localctx, 86, SqlBaseParser.RULE_booleanExpression, _p); try { this.enterOuterAlt(localctx, 1); - this.state = 1278; + this.state = 1422; this._errHandler.sync(this); switch(this._input.LA(1)) { case 2: @@ -5207,7 +5511,7 @@ export default class SqlBaseParser extends antlr4.Parser { case 19: case 20: case 21: - case 24: + case 22: case 25: case 26: case 27: @@ -5218,8 +5522,8 @@ export default class SqlBaseParser extends antlr4.Parser { case 32: case 33: case 34: - case 39: - case 40: + case 35: + case 38: case 41: case 42: case 43: @@ -5227,52 +5531,53 @@ export default class SqlBaseParser extends antlr4.Parser { case 45: case 46: case 47: + case 48: case 49: case 51: case 53: case 55: - case 61: + case 56: + case 57: + case 59: + case 62: case 63: - case 64: case 65: - case 66: - case 67: case 68: - case 69: case 70: case 71: + case 72: case 73: + case 74: + case 75: case 76: case 77: case 78: - case 79: case 80: - case 81: case 83: case 84: + case 85: case 86: case 87: case 88: case 90: - case 92: + case 91: + case 93: + case 94: case 95: case 97: - case 98: - case 100: - case 101: - case 103: + case 99: + case 102: case 104: case 105: case 107: - case 109: + case 108: case 110: case 111: case 112: case 113: case 114: - case 115: case 116: - case 117: + case 118: case 119: case 120: case 121: @@ -5280,50 +5585,50 @@ export default class SqlBaseParser extends antlr4.Parser { case 123: case 124: case 125: + case 126: case 127: case 128: - case 129: case 130: case 131: + case 132: case 133: case 134: - case 137: + case 135: + case 136: + case 138: case 139: case 140: case 141: case 142: - case 143: case 144: - case 146: - case 147: + case 145: case 148: - case 149: + case 150: case 151: case 152: case 153: case 154: case 155: - case 156: case 157: case 158: case 159: case 160: + case 161: case 162: - case 163: case 164: + case 165: case 166: case 167: case 168: case 169: case 170: case 171: + case 172: case 173: case 174: - case 175: case 176: case 177: case 178: - case 179: case 180: case 181: case 182: @@ -5334,6 +5639,7 @@ export default class SqlBaseParser extends antlr4.Parser { case 188: case 189: case 190: + case 191: case 192: case 193: case 194: @@ -5344,82 +5650,95 @@ export default class SqlBaseParser extends antlr4.Parser { case 199: case 201: case 202: - case 205: + case 203: + case 204: case 206: case 207: + case 208: case 209: + case 210: case 211: case 212: case 213: - case 217: + case 215: + case 216: case 218: - case 219: case 220: + case 221: + case 222: + case 224: + case 226: case 227: case 228: + case 232: case 233: case 234: case 235: - case 236: - case 237: - case 238: - case 239: - case 240: - case 241: case 242: - case 245: + case 243: + case 248: + case 249: + case 250: + case 251: + case 252: + case 253: + case 254: + case 255: + case 256: + case 257: + case 260: localctx = new PredicatedContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 1272; + this.state = 1416; localctx._valueExpression = this.valueExpression(0); - this.state = 1274; + this.state = 1418; this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,165,this._ctx); + var la_ = this._interp.adaptivePredict(this._input,178,this._ctx); if(la_===1) { - this.state = 1273; + this.state = 1417; this.predicate(localctx._valueExpression); } break; - case 126: + case 137: localctx = new LogicalNotContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 1276; + this.state = 1420; this.match(SqlBaseParser.NOT); - this.state = 1277; + this.state = 1421; this.booleanExpression(3); break; default: throw new antlr4.error.NoViableAltException(this); } this._ctx.stop = this._input.LT(-1); - this.state = 1288; + this.state = 1432; this._errHandler.sync(this); - var _alt = this._interp.adaptivePredict(this._input,168,this._ctx) + var _alt = this._interp.adaptivePredict(this._input,181,this._ctx) while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) { if(_alt===1) { if(this._parseListeners!==null) { this.triggerExitRuleEvent(); } _prevctx = localctx; - this.state = 1286; + this.state = 1430; this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,167,this._ctx); + var la_ = this._interp.adaptivePredict(this._input,180,this._ctx); switch(la_) { case 1: localctx = new LogicalBinaryContext(this, new BooleanExpressionContext(this, _parentctx, _parentState)); localctx.left = _prevctx; this.pushNewRecursionContext(localctx, _startState, SqlBaseParser.RULE_booleanExpression); - this.state = 1280; + this.state = 1424; if (!( this.precpred(this._ctx, 2))) { throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 2)"); } - this.state = 1281; + this.state = 1425; localctx.operator = this.match(SqlBaseParser.AND); - this.state = 1282; + this.state = 1426; localctx.right = this.booleanExpression(3); break; @@ -5427,21 +5746,21 @@ export default class SqlBaseParser extends antlr4.Parser { localctx = new LogicalBinaryContext(this, new BooleanExpressionContext(this, _parentctx, _parentState)); localctx.left = _prevctx; this.pushNewRecursionContext(localctx, _startState, SqlBaseParser.RULE_booleanExpression); - this.state = 1283; + this.state = 1427; if (!( this.precpred(this._ctx, 1))) { throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 1)"); } - this.state = 1284; + this.state = 1428; localctx.operator = this.match(SqlBaseParser.OR); - this.state = 1285; + this.state = 1429; localctx.right = this.booleanExpression(2); break; } } - this.state = 1290; + this.state = 1434; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input,168,this._ctx); + _alt = this._interp.adaptivePredict(this._input,181,this._ctx); } } catch( error) { @@ -5465,131 +5784,131 @@ export default class SqlBaseParser extends antlr4.Parser { this.enterRule(localctx, 88, SqlBaseParser.RULE_predicate); var _la = 0; try { - this.state = 1352; + this.state = 1496; this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,177,this._ctx); + var la_ = this._interp.adaptivePredict(this._input,190,this._ctx); switch(la_) { case 1: localctx = new ComparisonContext(this, localctx); this.enterOuterAlt(localctx, 1); - this.state = 1291; + this.state = 1435; this.comparisonOperator(); - this.state = 1292; + this.state = 1436; localctx.right = this.valueExpression(0); break; case 2: localctx = new QuantifiedComparisonContext(this, localctx); this.enterOuterAlt(localctx, 2); - this.state = 1294; + this.state = 1438; this.comparisonOperator(); - this.state = 1295; + this.state = 1439; this.comparisonQuantifier(); - this.state = 1296; + this.state = 1440; this.match(SqlBaseParser.T__1); - this.state = 1297; + this.state = 1441; this.query(); - this.state = 1298; + this.state = 1442; this.match(SqlBaseParser.T__2); break; case 3: localctx = new BetweenContext(this, localctx); this.enterOuterAlt(localctx, 3); - this.state = 1301; + this.state = 1445; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===126) { - this.state = 1300; + if(_la===137) { + this.state = 1444; this.match(SqlBaseParser.NOT); } - this.state = 1303; + this.state = 1447; this.match(SqlBaseParser.BETWEEN); - this.state = 1304; + this.state = 1448; localctx.lower = this.valueExpression(0); - this.state = 1305; + this.state = 1449; this.match(SqlBaseParser.AND); - this.state = 1306; + this.state = 1450; localctx.upper = this.valueExpression(0); break; case 4: localctx = new InListContext(this, localctx); this.enterOuterAlt(localctx, 4); - this.state = 1309; + this.state = 1453; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===126) { - this.state = 1308; + if(_la===137) { + this.state = 1452; this.match(SqlBaseParser.NOT); } - this.state = 1311; + this.state = 1455; this.match(SqlBaseParser.IN); - this.state = 1312; + this.state = 1456; this.match(SqlBaseParser.T__1); - this.state = 1313; + this.state = 1457; this.expression(); - this.state = 1318; + this.state = 1462; this._errHandler.sync(this); _la = this._input.LA(1); while(_la===4) { - this.state = 1314; + this.state = 1458; this.match(SqlBaseParser.T__3); - this.state = 1315; + this.state = 1459; this.expression(); - this.state = 1320; + this.state = 1464; this._errHandler.sync(this); _la = this._input.LA(1); } - this.state = 1321; + this.state = 1465; this.match(SqlBaseParser.T__2); break; case 5: localctx = new InSubqueryContext(this, localctx); this.enterOuterAlt(localctx, 5); - this.state = 1324; + this.state = 1468; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===126) { - this.state = 1323; + if(_la===137) { + this.state = 1467; this.match(SqlBaseParser.NOT); } - this.state = 1326; + this.state = 1470; this.match(SqlBaseParser.IN); - this.state = 1327; + this.state = 1471; this.match(SqlBaseParser.T__1); - this.state = 1328; + this.state = 1472; this.query(); - this.state = 1329; + this.state = 1473; this.match(SqlBaseParser.T__2); break; case 6: localctx = new LikeContext(this, localctx); this.enterOuterAlt(localctx, 6); - this.state = 1332; + this.state = 1476; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===126) { - this.state = 1331; + if(_la===137) { + this.state = 1475; this.match(SqlBaseParser.NOT); } - this.state = 1334; + this.state = 1478; this.match(SqlBaseParser.LIKE); - this.state = 1335; + this.state = 1479; localctx.pattern = this.valueExpression(0); - this.state = 1338; + this.state = 1482; this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,174,this._ctx); + var la_ = this._interp.adaptivePredict(this._input,187,this._ctx); if(la_===1) { - this.state = 1336; + this.state = 1480; this.match(SqlBaseParser.ESCAPE); - this.state = 1337; + this.state = 1481; localctx.escape = this.valueExpression(0); } @@ -5598,38 +5917,38 @@ export default class SqlBaseParser extends antlr4.Parser { case 7: localctx = new NullPredicateContext(this, localctx); this.enterOuterAlt(localctx, 7); - this.state = 1340; + this.state = 1484; this.match(SqlBaseParser.IS); - this.state = 1342; + this.state = 1486; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===126) { - this.state = 1341; + if(_la===137) { + this.state = 1485; this.match(SqlBaseParser.NOT); } - this.state = 1344; + this.state = 1488; this.match(SqlBaseParser.NULL); break; case 8: localctx = new DistinctFromContext(this, localctx); this.enterOuterAlt(localctx, 8); - this.state = 1345; + this.state = 1489; this.match(SqlBaseParser.IS); - this.state = 1347; + this.state = 1491; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===126) { - this.state = 1346; + if(_la===137) { + this.state = 1490; this.match(SqlBaseParser.NOT); } - this.state = 1349; + this.state = 1493; this.match(SqlBaseParser.DISTINCT); - this.state = 1350; + this.state = 1494; this.match(SqlBaseParser.FROM); - this.state = 1351; + this.state = 1495; localctx.right = this.valueExpression(0); break; @@ -5662,7 +5981,7 @@ export default class SqlBaseParser extends antlr4.Parser { var _la = 0; try { this.enterOuterAlt(localctx, 1); - this.state = 1358; + this.state = 1502; this._errHandler.sync(this); switch(this._input.LA(1)) { case 2: @@ -5676,7 +5995,7 @@ export default class SqlBaseParser extends antlr4.Parser { case 19: case 20: case 21: - case 24: + case 22: case 25: case 26: case 27: @@ -5687,8 +6006,8 @@ export default class SqlBaseParser extends antlr4.Parser { case 32: case 33: case 34: - case 39: - case 40: + case 35: + case 38: case 41: case 42: case 43: @@ -5696,52 +6015,53 @@ export default class SqlBaseParser extends antlr4.Parser { case 45: case 46: case 47: + case 48: case 49: case 51: case 53: case 55: - case 61: + case 56: + case 57: + case 59: + case 62: case 63: - case 64: case 65: - case 66: - case 67: case 68: - case 69: case 70: case 71: + case 72: case 73: + case 74: + case 75: case 76: case 77: case 78: - case 79: case 80: - case 81: case 83: case 84: + case 85: case 86: case 87: case 88: case 90: - case 92: + case 91: + case 93: + case 94: case 95: case 97: - case 98: - case 100: - case 101: - case 103: + case 99: + case 102: case 104: case 105: case 107: - case 109: + case 108: case 110: case 111: case 112: case 113: case 114: - case 115: case 116: - case 117: + case 118: case 119: case 120: case 121: @@ -5749,50 +6069,50 @@ export default class SqlBaseParser extends antlr4.Parser { case 123: case 124: case 125: + case 126: case 127: case 128: - case 129: case 130: case 131: + case 132: case 133: case 134: - case 137: + case 135: + case 136: + case 138: case 139: case 140: case 141: case 142: - case 143: case 144: - case 146: - case 147: + case 145: case 148: - case 149: + case 150: case 151: case 152: case 153: case 154: case 155: - case 156: case 157: case 158: case 159: case 160: + case 161: case 162: - case 163: case 164: + case 165: case 166: case 167: case 168: case 169: case 170: case 171: + case 172: case 173: case 174: - case 175: case 176: case 177: case 178: - case 179: case 180: case 181: case 182: @@ -5803,6 +6123,7 @@ export default class SqlBaseParser extends antlr4.Parser { case 188: case 189: case 190: + case 191: case 192: case 193: case 194: @@ -5813,89 +6134,102 @@ export default class SqlBaseParser extends antlr4.Parser { case 199: case 201: case 202: - case 205: + case 203: + case 204: case 206: case 207: + case 208: case 209: + case 210: case 211: case 212: case 213: - case 217: + case 215: + case 216: case 218: - case 219: case 220: + case 221: + case 222: + case 224: + case 226: + case 227: + case 228: + case 232: case 233: case 234: case 235: - case 236: - case 237: - case 238: - case 239: - case 240: - case 241: - case 242: - case 245: + case 248: + case 249: + case 250: + case 251: + case 252: + case 253: + case 254: + case 255: + case 256: + case 257: + case 260: localctx = new ValueExpressionDefaultContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 1355; + this.state = 1499; this.primaryExpression(0); break; - case 227: - case 228: + case 242: + case 243: localctx = new ArithmeticUnaryContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 1356; + this.state = 1500; localctx.operator = this._input.LT(1); _la = this._input.LA(1); - if(!(_la===227 || _la===228)) { + if(!(_la===242 || _la===243)) { localctx.operator = this._errHandler.recoverInline(this); } else { this._errHandler.reportMatch(this); this.consume(); } - this.state = 1357; + this.state = 1501; this.valueExpression(4); break; default: throw new antlr4.error.NoViableAltException(this); } this._ctx.stop = this._input.LT(-1); - this.state = 1374; + this.state = 1518; this._errHandler.sync(this); - var _alt = this._interp.adaptivePredict(this._input,180,this._ctx) + var _alt = this._interp.adaptivePredict(this._input,193,this._ctx) while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) { if(_alt===1) { if(this._parseListeners!==null) { this.triggerExitRuleEvent(); } _prevctx = localctx; - this.state = 1372; + this.state = 1516; this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,179,this._ctx); + var la_ = this._interp.adaptivePredict(this._input,192,this._ctx); switch(la_) { case 1: localctx = new ArithmeticBinaryContext(this, new ValueExpressionContext(this, _parentctx, _parentState)); localctx.left = _prevctx; this.pushNewRecursionContext(localctx, _startState, SqlBaseParser.RULE_valueExpression); - this.state = 1360; + this.state = 1504; if (!( this.precpred(this._ctx, 3))) { throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 3)"); } - this.state = 1361; + this.state = 1505; localctx.operator = this._input.LT(1); _la = this._input.LA(1); - if(!(((((_la - 229)) & ~0x1f) === 0 && ((1 << (_la - 229)) & 7) !== 0))) { + if(!(((((_la - 244)) & ~0x1f) === 0 && ((1 << (_la - 244)) & 7) !== 0))) { localctx.operator = this._errHandler.recoverInline(this); } else { this._errHandler.reportMatch(this); this.consume(); } - this.state = 1362; + this.state = 1506; localctx.right = this.valueExpression(4); break; @@ -5903,21 +6237,21 @@ export default class SqlBaseParser extends antlr4.Parser { localctx = new ArithmeticBinaryContext(this, new ValueExpressionContext(this, _parentctx, _parentState)); localctx.left = _prevctx; this.pushNewRecursionContext(localctx, _startState, SqlBaseParser.RULE_valueExpression); - this.state = 1363; + this.state = 1507; if (!( this.precpred(this._ctx, 2))) { throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 2)"); } - this.state = 1364; + this.state = 1508; localctx.operator = this._input.LT(1); _la = this._input.LA(1); - if(!(_la===227 || _la===228)) { + if(!(_la===242 || _la===243)) { localctx.operator = this._errHandler.recoverInline(this); } else { this._errHandler.reportMatch(this); this.consume(); } - this.state = 1365; + this.state = 1509; localctx.right = this.valueExpression(3); break; @@ -5925,34 +6259,34 @@ export default class SqlBaseParser extends antlr4.Parser { localctx = new ConcatenationContext(this, new ValueExpressionContext(this, _parentctx, _parentState)); localctx.left = _prevctx; this.pushNewRecursionContext(localctx, _startState, SqlBaseParser.RULE_valueExpression); - this.state = 1366; + this.state = 1510; if (!( this.precpred(this._ctx, 1))) { throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 1)"); } - this.state = 1367; + this.state = 1511; this.match(SqlBaseParser.CONCAT); - this.state = 1368; + this.state = 1512; localctx.right = this.valueExpression(2); break; case 4: localctx = new AtTimeZoneContext(this, new ValueExpressionContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, SqlBaseParser.RULE_valueExpression); - this.state = 1369; + this.state = 1513; if (!( this.precpred(this._ctx, 5))) { throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 5)"); } - this.state = 1370; + this.state = 1514; this.match(SqlBaseParser.AT); - this.state = 1371; + this.state = 1515; this.timeZoneSpecifier(); break; } } - this.state = 1376; + this.state = 1520; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input,180,this._ctx); + _alt = this._interp.adaptivePredict(this._input,193,this._ctx); } } catch( error) { @@ -5983,16 +6317,16 @@ export default class SqlBaseParser extends antlr4.Parser { var _la = 0; try { this.enterOuterAlt(localctx, 1); - this.state = 1616; + this.state = 1760; this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,209,this._ctx); + var la_ = this._interp.adaptivePredict(this._input,222,this._ctx); switch(la_) { case 1: localctx = new NullLiteralContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 1378; + this.state = 1522; this.match(SqlBaseParser.NULL); break; @@ -6000,7 +6334,7 @@ export default class SqlBaseParser extends antlr4.Parser { localctx = new IntervalLiteralContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 1379; + this.state = 1523; this.interval(); break; @@ -6008,9 +6342,9 @@ export default class SqlBaseParser extends antlr4.Parser { localctx = new TypeConstructorContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 1380; + this.state = 1524; this.identifier(); - this.state = 1381; + this.state = 1525; this.string(); break; @@ -6018,9 +6352,9 @@ export default class SqlBaseParser extends antlr4.Parser { localctx = new TypeConstructorContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 1383; + this.state = 1527; this.match(SqlBaseParser.DOUBLE_PRECISION); - this.state = 1384; + this.state = 1528; this.string(); break; @@ -6028,7 +6362,7 @@ export default class SqlBaseParser extends antlr4.Parser { localctx = new NumericLiteralContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 1385; + this.state = 1529; this.number(); break; @@ -6036,7 +6370,7 @@ export default class SqlBaseParser extends antlr4.Parser { localctx = new BooleanLiteralContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 1386; + this.state = 1530; this.booleanValue(); break; @@ -6044,7 +6378,7 @@ export default class SqlBaseParser extends antlr4.Parser { localctx = new StringLiteralContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 1387; + this.state = 1531; this.string(); break; @@ -6052,7 +6386,7 @@ export default class SqlBaseParser extends antlr4.Parser { localctx = new BinaryLiteralContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 1388; + this.state = 1532; this.match(SqlBaseParser.BINARY_LITERAL); break; @@ -6060,7 +6394,7 @@ export default class SqlBaseParser extends antlr4.Parser { localctx = new ParameterContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 1389; + this.state = 1533; this.match(SqlBaseParser.T__4); break; @@ -6068,17 +6402,17 @@ export default class SqlBaseParser extends antlr4.Parser { localctx = new PositionContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 1390; + this.state = 1534; this.match(SqlBaseParser.POSITION); - this.state = 1391; + this.state = 1535; this.match(SqlBaseParser.T__1); - this.state = 1392; + this.state = 1536; this.valueExpression(0); - this.state = 1393; + this.state = 1537; this.match(SqlBaseParser.IN); - this.state = 1394; + this.state = 1538; this.valueExpression(0); - this.state = 1395; + this.state = 1539; this.match(SqlBaseParser.T__2); break; @@ -6086,23 +6420,23 @@ export default class SqlBaseParser extends antlr4.Parser { localctx = new RowConstructorContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 1397; + this.state = 1541; this.match(SqlBaseParser.T__1); - this.state = 1398; + this.state = 1542; this.expression(); - this.state = 1401; + this.state = 1545; this._errHandler.sync(this); _la = this._input.LA(1); do { - this.state = 1399; + this.state = 1543; this.match(SqlBaseParser.T__3); - this.state = 1400; + this.state = 1544; this.expression(); - this.state = 1403; + this.state = 1547; this._errHandler.sync(this); _la = this._input.LA(1); } while(_la===4); - this.state = 1405; + this.state = 1549; this.match(SqlBaseParser.T__2); break; @@ -6110,25 +6444,25 @@ export default class SqlBaseParser extends antlr4.Parser { localctx = new RowConstructorContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 1407; + this.state = 1551; this.match(SqlBaseParser.ROW); - this.state = 1408; + this.state = 1552; this.match(SqlBaseParser.T__1); - this.state = 1409; + this.state = 1553; this.expression(); - this.state = 1414; + this.state = 1558; this._errHandler.sync(this); _la = this._input.LA(1); while(_la===4) { - this.state = 1410; + this.state = 1554; this.match(SqlBaseParser.T__3); - this.state = 1411; + this.state = 1555; this.expression(); - this.state = 1416; + this.state = 1560; this._errHandler.sync(this); _la = this._input.LA(1); } - this.state = 1417; + this.state = 1561; this.match(SqlBaseParser.T__2); break; @@ -6136,27 +6470,27 @@ export default class SqlBaseParser extends antlr4.Parser { localctx = new FunctionCallContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 1419; + this.state = 1563; this.qualifiedName(); - this.state = 1420; + this.state = 1564; this.match(SqlBaseParser.T__1); - this.state = 1421; + this.state = 1565; this.match(SqlBaseParser.ASTERISK); - this.state = 1422; + this.state = 1566; this.match(SqlBaseParser.T__2); - this.state = 1424; + this.state = 1568; this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,183,this._ctx); + var la_ = this._interp.adaptivePredict(this._input,196,this._ctx); if(la_===1) { - this.state = 1423; + this.state = 1567; this.filter(); } - this.state = 1427; + this.state = 1571; this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,184,this._ctx); + var la_ = this._interp.adaptivePredict(this._input,197,this._ctx); if(la_===1) { - this.state = 1426; + this.state = 1570; this.over(); } @@ -6166,85 +6500,85 @@ export default class SqlBaseParser extends antlr4.Parser { localctx = new FunctionCallContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 1429; + this.state = 1573; this.qualifiedName(); - this.state = 1430; + this.state = 1574; this.match(SqlBaseParser.T__1); - this.state = 1442; + this.state = 1586; this._errHandler.sync(this); _la = this._input.LA(1); - if((((_la) & ~0x1f) === 0 && ((1 << _la) & 4282080292) !== 0) || ((((_la - 32)) & ~0x1f) === 0 && ((1 << (_la - 32)) & 2699755399) !== 0) || ((((_la - 64)) & ~0x1f) === 0 && ((1 << (_la - 64)) & 2514219775) !== 0) || ((((_la - 97)) & ~0x1f) === 0 && ((1 << (_la - 97)) & 4292867547) !== 0) || ((((_la - 129)) & ~0x1f) === 0 && ((1 << (_la - 129)) & 4292803895) !== 0) || ((((_la - 162)) & ~0x1f) === 0 && ((1 << (_la - 162)) & 3741318135) !== 0) || ((((_la - 194)) & ~0x1f) === 0 && ((1 << (_la - 194)) & 126794175) !== 0) || ((((_la - 227)) & ~0x1f) === 0 && ((1 << (_la - 227)) & 327619) !== 0)) { - this.state = 1432; + if(((((_la - 2)) & ~0x1f) === 0 && ((1 << (_la - 2)) & 4288599817) !== 0) || ((((_la - 34)) & ~0x1f) === 0 && ((1 << (_la - 34)) & 3018522515) !== 0) || ((((_la - 68)) & ~0x1f) === 0 && ((1 << (_la - 68)) & 2933889021) !== 0) || ((((_la - 102)) & ~0x1f) === 0 && ((1 << (_la - 102)) & 4160708461) !== 0) || ((((_la - 134)) & ~0x1f) === 0 && ((1 << (_la - 134)) & 3753856511) !== 0) || ((((_la - 166)) & ~0x1f) === 0 && ((1 << (_la - 166)) & 4293910015) !== 0) || ((((_la - 198)) & ~0x1f) === 0 && ((1 << (_la - 198)) & 1977024379) !== 0) || ((((_la - 232)) & ~0x1f) === 0 && ((1 << (_la - 232)) & 335481871) !== 0)) { + this.state = 1576; this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,185,this._ctx); + var la_ = this._interp.adaptivePredict(this._input,198,this._ctx); if(la_===1) { - this.state = 1431; + this.state = 1575; this.setQuantifier(); } - this.state = 1434; + this.state = 1578; this.expression(); - this.state = 1439; + this.state = 1583; this._errHandler.sync(this); _la = this._input.LA(1); while(_la===4) { - this.state = 1435; + this.state = 1579; this.match(SqlBaseParser.T__3); - this.state = 1436; + this.state = 1580; this.expression(); - this.state = 1441; + this.state = 1585; this._errHandler.sync(this); _la = this._input.LA(1); } } - this.state = 1454; + this.state = 1598; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===136) { - this.state = 1444; + if(_la===147) { + this.state = 1588; this.match(SqlBaseParser.ORDER); - this.state = 1445; + this.state = 1589; this.match(SqlBaseParser.BY); - this.state = 1446; + this.state = 1590; this.sortItem(); - this.state = 1451; + this.state = 1595; this._errHandler.sync(this); _la = this._input.LA(1); while(_la===4) { - this.state = 1447; + this.state = 1591; this.match(SqlBaseParser.T__3); - this.state = 1448; + this.state = 1592; this.sortItem(); - this.state = 1453; + this.state = 1597; this._errHandler.sync(this); _la = this._input.LA(1); } } - this.state = 1456; + this.state = 1600; this.match(SqlBaseParser.T__2); - this.state = 1458; + this.state = 1602; this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,190,this._ctx); + var la_ = this._interp.adaptivePredict(this._input,203,this._ctx); if(la_===1) { - this.state = 1457; + this.state = 1601; this.filter(); } - this.state = 1464; + this.state = 1608; this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,192,this._ctx); + var la_ = this._interp.adaptivePredict(this._input,205,this._ctx); if(la_===1) { - this.state = 1461; + this.state = 1605; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===88 || _la===156) { - this.state = 1460; + if(_la===95 || _la===170) { + this.state = 1604; this.nullTreatment(); } - this.state = 1463; + this.state = 1607; this.over(); } @@ -6254,11 +6588,11 @@ export default class SqlBaseParser extends antlr4.Parser { localctx = new LambdaContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 1466; + this.state = 1610; this.identifier(); - this.state = 1467; + this.state = 1611; this.match(SqlBaseParser.T__5); - this.state = 1468; + this.state = 1612; this.expression(); break; @@ -6266,33 +6600,33 @@ export default class SqlBaseParser extends antlr4.Parser { localctx = new LambdaContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 1470; + this.state = 1614; this.match(SqlBaseParser.T__1); - this.state = 1479; + this.state = 1623; this._errHandler.sync(this); _la = this._input.LA(1); - if((((_la) & ~0x1f) === 0 && ((1 << _la) & 3879427072) !== 0) || ((((_la - 32)) & ~0x1f) === 0 && ((1 << (_la - 32)) & 548070023) !== 0) || ((((_la - 64)) & ~0x1f) === 0 && ((1 << (_la - 64)) & 2513695477) !== 0) || ((((_la - 97)) & ~0x1f) === 0 && ((1 << (_la - 97)) & 2413794779) !== 0) || ((((_la - 129)) & ~0x1f) === 0 && ((1 << (_la - 129)) & 4292803895) !== 0) || ((((_la - 162)) & ~0x1f) === 0 && ((1 << (_la - 162)) & 3741318135) !== 0) || ((((_la - 194)) & ~0x1f) === 0 && ((1 << (_la - 194)) & 126794171) !== 0) || ((((_la - 239)) & ~0x1f) === 0 && ((1 << (_la - 239)) & 15) !== 0)) { - this.state = 1471; + if((((_la) & ~0x1f) === 0 && ((1 << _la) & 3464190976) !== 0) || ((((_la - 32)) & ~0x1f) === 0 && ((1 << (_la - 32)) & 3417016911) !== 0) || ((((_la - 65)) & ~0x1f) === 0 && ((1 << (_la - 65)) & 1962720585) !== 0) || ((((_la - 97)) & ~0x1f) === 0 && ((1 << (_la - 97)) & 4281068965) !== 0) || ((((_la - 130)) & ~0x1f) === 0 && ((1 << (_la - 130)) & 4227128895) !== 0) || ((((_la - 162)) & ~0x1f) === 0 && ((1 << (_la - 162)) & 4278050813) !== 0) || ((((_la - 194)) & ~0x1f) === 0 && ((1 << (_la - 194)) & 1567553471) !== 0) || ((((_la - 226)) & ~0x1f) === 0 && ((1 << (_la - 226)) & 4026532807) !== 0)) { + this.state = 1615; this.identifier(); - this.state = 1476; + this.state = 1620; this._errHandler.sync(this); _la = this._input.LA(1); while(_la===4) { - this.state = 1472; + this.state = 1616; this.match(SqlBaseParser.T__3); - this.state = 1473; + this.state = 1617; this.identifier(); - this.state = 1478; + this.state = 1622; this._errHandler.sync(this); _la = this._input.LA(1); } } - this.state = 1481; + this.state = 1625; this.match(SqlBaseParser.T__2); - this.state = 1482; + this.state = 1626; this.match(SqlBaseParser.T__5); - this.state = 1483; + this.state = 1627; this.expression(); break; @@ -6300,11 +6634,11 @@ export default class SqlBaseParser extends antlr4.Parser { localctx = new SubqueryExpressionContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 1484; + this.state = 1628; this.match(SqlBaseParser.T__1); - this.state = 1485; + this.state = 1629; this.query(); - this.state = 1486; + this.state = 1630; this.match(SqlBaseParser.T__2); break; @@ -6312,13 +6646,13 @@ export default class SqlBaseParser extends antlr4.Parser { localctx = new ExistsContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 1488; + this.state = 1632; this.match(SqlBaseParser.EXISTS); - this.state = 1489; + this.state = 1633; this.match(SqlBaseParser.T__1); - this.state = 1490; + this.state = 1634; this.query(); - this.state = 1491; + this.state = 1635; this.match(SqlBaseParser.T__2); break; @@ -6326,31 +6660,31 @@ export default class SqlBaseParser extends antlr4.Parser { localctx = new SimpleCaseContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 1493; + this.state = 1637; this.match(SqlBaseParser.CASE); - this.state = 1494; + this.state = 1638; this.valueExpression(0); - this.state = 1496; + this.state = 1640; this._errHandler.sync(this); _la = this._input.LA(1); do { - this.state = 1495; + this.state = 1639; this.whenClause(); - this.state = 1498; + this.state = 1642; this._errHandler.sync(this); _la = this._input.LA(1); - } while(_la===214); - this.state = 1502; + } while(_la===229); + this.state = 1646; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===57) { - this.state = 1500; + if(_la===61) { + this.state = 1644; this.match(SqlBaseParser.ELSE); - this.state = 1501; + this.state = 1645; localctx.elseExpression = this.expression(); } - this.state = 1504; + this.state = 1648; this.match(SqlBaseParser.END); break; @@ -6358,29 +6692,29 @@ export default class SqlBaseParser extends antlr4.Parser { localctx = new SearchedCaseContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 1506; + this.state = 1650; this.match(SqlBaseParser.CASE); - this.state = 1508; + this.state = 1652; this._errHandler.sync(this); _la = this._input.LA(1); do { - this.state = 1507; + this.state = 1651; this.whenClause(); - this.state = 1510; + this.state = 1654; this._errHandler.sync(this); _la = this._input.LA(1); - } while(_la===214); - this.state = 1514; + } while(_la===229); + this.state = 1658; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===57) { - this.state = 1512; + if(_la===61) { + this.state = 1656; this.match(SqlBaseParser.ELSE); - this.state = 1513; + this.state = 1657; localctx.elseExpression = this.expression(); } - this.state = 1516; + this.state = 1660; this.match(SqlBaseParser.END); break; @@ -6388,17 +6722,17 @@ export default class SqlBaseParser extends antlr4.Parser { localctx = new CastContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 1518; + this.state = 1662; this.match(SqlBaseParser.CAST); - this.state = 1519; + this.state = 1663; this.match(SqlBaseParser.T__1); - this.state = 1520; + this.state = 1664; this.expression(); - this.state = 1521; + this.state = 1665; this.match(SqlBaseParser.AS); - this.state = 1522; + this.state = 1666; this.type(0); - this.state = 1523; + this.state = 1667; this.match(SqlBaseParser.T__2); break; @@ -6406,17 +6740,17 @@ export default class SqlBaseParser extends antlr4.Parser { localctx = new CastContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 1525; + this.state = 1669; this.match(SqlBaseParser.TRY_CAST); - this.state = 1526; + this.state = 1670; this.match(SqlBaseParser.T__1); - this.state = 1527; + this.state = 1671; this.expression(); - this.state = 1528; + this.state = 1672; this.match(SqlBaseParser.AS); - this.state = 1529; + this.state = 1673; this.type(0); - this.state = 1530; + this.state = 1674; this.match(SqlBaseParser.T__2); break; @@ -6424,31 +6758,31 @@ export default class SqlBaseParser extends antlr4.Parser { localctx = new ArrayConstructorContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 1532; + this.state = 1676; this.match(SqlBaseParser.ARRAY); - this.state = 1533; + this.state = 1677; this.match(SqlBaseParser.T__6); - this.state = 1542; + this.state = 1686; this._errHandler.sync(this); _la = this._input.LA(1); - if((((_la) & ~0x1f) === 0 && ((1 << _la) & 4282080292) !== 0) || ((((_la - 32)) & ~0x1f) === 0 && ((1 << (_la - 32)) & 2695561095) !== 0) || ((((_la - 64)) & ~0x1f) === 0 && ((1 << (_la - 64)) & 2514219775) !== 0) || ((((_la - 97)) & ~0x1f) === 0 && ((1 << (_la - 97)) & 4292867547) !== 0) || ((((_la - 129)) & ~0x1f) === 0 && ((1 << (_la - 129)) & 4292803895) !== 0) || ((((_la - 162)) & ~0x1f) === 0 && ((1 << (_la - 162)) & 3741318135) !== 0) || ((((_la - 194)) & ~0x1f) === 0 && ((1 << (_la - 194)) & 126794175) !== 0) || ((((_la - 227)) & ~0x1f) === 0 && ((1 << (_la - 227)) & 327619) !== 0)) { - this.state = 1534; + if(((((_la - 2)) & ~0x1f) === 0 && ((1 << (_la - 2)) & 4288599817) !== 0) || ((((_la - 34)) & ~0x1f) === 0 && ((1 << (_la - 34)) & 3001745299) !== 0) || ((((_la - 68)) & ~0x1f) === 0 && ((1 << (_la - 68)) & 2933889021) !== 0) || ((((_la - 102)) & ~0x1f) === 0 && ((1 << (_la - 102)) & 4160708461) !== 0) || ((((_la - 134)) & ~0x1f) === 0 && ((1 << (_la - 134)) & 3753856511) !== 0) || ((((_la - 166)) & ~0x1f) === 0 && ((1 << (_la - 166)) & 4293910015) !== 0) || ((((_la - 198)) & ~0x1f) === 0 && ((1 << (_la - 198)) & 1977024379) !== 0) || ((((_la - 232)) & ~0x1f) === 0 && ((1 << (_la - 232)) & 335481871) !== 0)) { + this.state = 1678; this.expression(); - this.state = 1539; + this.state = 1683; this._errHandler.sync(this); _la = this._input.LA(1); while(_la===4) { - this.state = 1535; + this.state = 1679; this.match(SqlBaseParser.T__3); - this.state = 1536; + this.state = 1680; this.expression(); - this.state = 1541; + this.state = 1685; this._errHandler.sync(this); _la = this._input.LA(1); } } - this.state = 1544; + this.state = 1688; this.match(SqlBaseParser.T__7); break; @@ -6456,7 +6790,7 @@ export default class SqlBaseParser extends antlr4.Parser { localctx = new ColumnReferenceContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 1545; + this.state = 1689; this.identifier(); break; @@ -6464,7 +6798,7 @@ export default class SqlBaseParser extends antlr4.Parser { localctx = new SpecialDateTimeFunctionContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 1546; + this.state = 1690; localctx.name = this.match(SqlBaseParser.CURRENT_DATE); break; @@ -6472,17 +6806,17 @@ export default class SqlBaseParser extends antlr4.Parser { localctx = new SpecialDateTimeFunctionContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 1547; + this.state = 1691; localctx.name = this.match(SqlBaseParser.CURRENT_TIME); - this.state = 1551; + this.state = 1695; this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,201,this._ctx); + var la_ = this._interp.adaptivePredict(this._input,214,this._ctx); if(la_===1) { - this.state = 1548; + this.state = 1692; this.match(SqlBaseParser.T__1); - this.state = 1549; + this.state = 1693; localctx.precision = this.match(SqlBaseParser.INTEGER_VALUE); - this.state = 1550; + this.state = 1694; this.match(SqlBaseParser.T__2); } @@ -6492,17 +6826,17 @@ export default class SqlBaseParser extends antlr4.Parser { localctx = new SpecialDateTimeFunctionContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 1553; + this.state = 1697; localctx.name = this.match(SqlBaseParser.CURRENT_TIMESTAMP); - this.state = 1557; + this.state = 1701; this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,202,this._ctx); + var la_ = this._interp.adaptivePredict(this._input,215,this._ctx); if(la_===1) { - this.state = 1554; + this.state = 1698; this.match(SqlBaseParser.T__1); - this.state = 1555; + this.state = 1699; localctx.precision = this.match(SqlBaseParser.INTEGER_VALUE); - this.state = 1556; + this.state = 1700; this.match(SqlBaseParser.T__2); } @@ -6512,17 +6846,17 @@ export default class SqlBaseParser extends antlr4.Parser { localctx = new SpecialDateTimeFunctionContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 1559; + this.state = 1703; localctx.name = this.match(SqlBaseParser.LOCALTIME); - this.state = 1563; + this.state = 1707; this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,203,this._ctx); + var la_ = this._interp.adaptivePredict(this._input,216,this._ctx); if(la_===1) { - this.state = 1560; + this.state = 1704; this.match(SqlBaseParser.T__1); - this.state = 1561; + this.state = 1705; localctx.precision = this.match(SqlBaseParser.INTEGER_VALUE); - this.state = 1562; + this.state = 1706; this.match(SqlBaseParser.T__2); } @@ -6532,17 +6866,17 @@ export default class SqlBaseParser extends antlr4.Parser { localctx = new SpecialDateTimeFunctionContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 1565; + this.state = 1709; localctx.name = this.match(SqlBaseParser.LOCALTIMESTAMP); - this.state = 1569; + this.state = 1713; this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,204,this._ctx); + var la_ = this._interp.adaptivePredict(this._input,217,this._ctx); if(la_===1) { - this.state = 1566; + this.state = 1710; this.match(SqlBaseParser.T__1); - this.state = 1567; + this.state = 1711; localctx.precision = this.match(SqlBaseParser.INTEGER_VALUE); - this.state = 1568; + this.state = 1712; this.match(SqlBaseParser.T__2); } @@ -6552,7 +6886,7 @@ export default class SqlBaseParser extends antlr4.Parser { localctx = new CurrentUserContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 1571; + this.state = 1715; localctx.name = this.match(SqlBaseParser.CURRENT_USER); break; @@ -6560,27 +6894,27 @@ export default class SqlBaseParser extends antlr4.Parser { localctx = new SubstringContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 1572; + this.state = 1716; this.match(SqlBaseParser.SUBSTRING); - this.state = 1573; + this.state = 1717; this.match(SqlBaseParser.T__1); - this.state = 1574; + this.state = 1718; this.valueExpression(0); - this.state = 1575; + this.state = 1719; this.match(SqlBaseParser.FROM); - this.state = 1576; + this.state = 1720; this.valueExpression(0); - this.state = 1579; + this.state = 1723; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===72) { - this.state = 1577; + if(_la===79) { + this.state = 1721; this.match(SqlBaseParser.FOR); - this.state = 1578; + this.state = 1722; this.valueExpression(0); } - this.state = 1581; + this.state = 1725; this.match(SqlBaseParser.T__2); break; @@ -6588,23 +6922,23 @@ export default class SqlBaseParser extends antlr4.Parser { localctx = new NormalizeContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 1583; + this.state = 1727; this.match(SqlBaseParser.NORMALIZE); - this.state = 1584; + this.state = 1728; this.match(SqlBaseParser.T__1); - this.state = 1585; + this.state = 1729; this.valueExpression(0); - this.state = 1588; + this.state = 1732; this._errHandler.sync(this); _la = this._input.LA(1); if(_la===4) { - this.state = 1586; + this.state = 1730; this.match(SqlBaseParser.T__3); - this.state = 1587; + this.state = 1731; this.normalForm(); } - this.state = 1590; + this.state = 1734; this.match(SqlBaseParser.T__2); break; @@ -6612,17 +6946,17 @@ export default class SqlBaseParser extends antlr4.Parser { localctx = new ExtractContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 1592; + this.state = 1736; this.match(SqlBaseParser.EXTRACT); - this.state = 1593; + this.state = 1737; this.match(SqlBaseParser.T__1); - this.state = 1594; + this.state = 1738; this.identifier(); - this.state = 1595; + this.state = 1739; this.match(SqlBaseParser.FROM); - this.state = 1596; + this.state = 1740; this.valueExpression(0); - this.state = 1597; + this.state = 1741; this.match(SqlBaseParser.T__2); break; @@ -6630,11 +6964,11 @@ export default class SqlBaseParser extends antlr4.Parser { localctx = new ParenthesizedExpressionContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 1599; + this.state = 1743; this.match(SqlBaseParser.T__1); - this.state = 1600; + this.state = 1744; this.expression(); - this.state = 1601; + this.state = 1745; this.match(SqlBaseParser.T__2); break; @@ -6642,62 +6976,62 @@ export default class SqlBaseParser extends antlr4.Parser { localctx = new GroupingOperationContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 1603; + this.state = 1747; this.match(SqlBaseParser.GROUPING); - this.state = 1604; + this.state = 1748; this.match(SqlBaseParser.T__1); - this.state = 1613; + this.state = 1757; this._errHandler.sync(this); _la = this._input.LA(1); - if((((_la) & ~0x1f) === 0 && ((1 << _la) & 3879427072) !== 0) || ((((_la - 32)) & ~0x1f) === 0 && ((1 << (_la - 32)) & 548070023) !== 0) || ((((_la - 64)) & ~0x1f) === 0 && ((1 << (_la - 64)) & 2513695477) !== 0) || ((((_la - 97)) & ~0x1f) === 0 && ((1 << (_la - 97)) & 2413794779) !== 0) || ((((_la - 129)) & ~0x1f) === 0 && ((1 << (_la - 129)) & 4292803895) !== 0) || ((((_la - 162)) & ~0x1f) === 0 && ((1 << (_la - 162)) & 3741318135) !== 0) || ((((_la - 194)) & ~0x1f) === 0 && ((1 << (_la - 194)) & 126794171) !== 0) || ((((_la - 239)) & ~0x1f) === 0 && ((1 << (_la - 239)) & 15) !== 0)) { - this.state = 1605; + if((((_la) & ~0x1f) === 0 && ((1 << _la) & 3464190976) !== 0) || ((((_la - 32)) & ~0x1f) === 0 && ((1 << (_la - 32)) & 3417016911) !== 0) || ((((_la - 65)) & ~0x1f) === 0 && ((1 << (_la - 65)) & 1962720585) !== 0) || ((((_la - 97)) & ~0x1f) === 0 && ((1 << (_la - 97)) & 4281068965) !== 0) || ((((_la - 130)) & ~0x1f) === 0 && ((1 << (_la - 130)) & 4227128895) !== 0) || ((((_la - 162)) & ~0x1f) === 0 && ((1 << (_la - 162)) & 4278050813) !== 0) || ((((_la - 194)) & ~0x1f) === 0 && ((1 << (_la - 194)) & 1567553471) !== 0) || ((((_la - 226)) & ~0x1f) === 0 && ((1 << (_la - 226)) & 4026532807) !== 0)) { + this.state = 1749; this.qualifiedName(); - this.state = 1610; + this.state = 1754; this._errHandler.sync(this); _la = this._input.LA(1); while(_la===4) { - this.state = 1606; + this.state = 1750; this.match(SqlBaseParser.T__3); - this.state = 1607; + this.state = 1751; this.qualifiedName(); - this.state = 1612; + this.state = 1756; this._errHandler.sync(this); _la = this._input.LA(1); } } - this.state = 1615; + this.state = 1759; this.match(SqlBaseParser.T__2); break; } this._ctx.stop = this._input.LT(-1); - this.state = 1628; + this.state = 1772; this._errHandler.sync(this); - var _alt = this._interp.adaptivePredict(this._input,211,this._ctx) + var _alt = this._interp.adaptivePredict(this._input,224,this._ctx) while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) { if(_alt===1) { if(this._parseListeners!==null) { this.triggerExitRuleEvent(); } _prevctx = localctx; - this.state = 1626; + this.state = 1770; this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,210,this._ctx); + var la_ = this._interp.adaptivePredict(this._input,223,this._ctx); switch(la_) { case 1: localctx = new SubscriptContext(this, new PrimaryExpressionContext(this, _parentctx, _parentState)); localctx.value = _prevctx; this.pushNewRecursionContext(localctx, _startState, SqlBaseParser.RULE_primaryExpression); - this.state = 1618; + this.state = 1762; if (!( this.precpred(this._ctx, 14))) { throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 14)"); } - this.state = 1619; + this.state = 1763; this.match(SqlBaseParser.T__6); - this.state = 1620; + this.state = 1764; localctx.index = this.valueExpression(0); - this.state = 1621; + this.state = 1765; this.match(SqlBaseParser.T__7); break; @@ -6705,21 +7039,21 @@ export default class SqlBaseParser extends antlr4.Parser { localctx = new DereferenceContext(this, new PrimaryExpressionContext(this, _parentctx, _parentState)); localctx.base = _prevctx; this.pushNewRecursionContext(localctx, _startState, SqlBaseParser.RULE_primaryExpression); - this.state = 1623; + this.state = 1767; if (!( this.precpred(this._ctx, 12))) { throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 12)"); } - this.state = 1624; + this.state = 1768; this.match(SqlBaseParser.T__0); - this.state = 1625; + this.state = 1769; localctx.fieldName = this.identifier(); break; } } - this.state = 1630; + this.state = 1774; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input,211,this._ctx); + _alt = this._interp.adaptivePredict(this._input,224,this._ctx); } } catch( error) { @@ -6742,27 +7076,27 @@ export default class SqlBaseParser extends antlr4.Parser { let localctx = new StringContext(this, this._ctx, this.state); this.enterRule(localctx, 94, SqlBaseParser.RULE_string); try { - this.state = 1637; + this.state = 1781; this._errHandler.sync(this); switch(this._input.LA(1)) { - case 233: + case 248: localctx = new BasicStringLiteralContext(this, localctx); this.enterOuterAlt(localctx, 1); - this.state = 1631; + this.state = 1775; this.match(SqlBaseParser.STRING); break; - case 234: + case 249: localctx = new UnicodeStringLiteralContext(this, localctx); this.enterOuterAlt(localctx, 2); - this.state = 1632; + this.state = 1776; this.match(SqlBaseParser.UNICODE_STRING); - this.state = 1635; + this.state = 1779; this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,212,this._ctx); + var la_ = this._interp.adaptivePredict(this._input,225,this._ctx); if(la_===1) { - this.state = 1633; + this.state = 1777; this.match(SqlBaseParser.UESCAPE); - this.state = 1634; + this.state = 1778; this.match(SqlBaseParser.STRING); } @@ -6790,21 +7124,21 @@ export default class SqlBaseParser extends antlr4.Parser { let localctx = new NullTreatmentContext(this, this._ctx, this.state); this.enterRule(localctx, 96, SqlBaseParser.RULE_nullTreatment); try { - this.state = 1643; + this.state = 1787; this._errHandler.sync(this); switch(this._input.LA(1)) { - case 88: + case 95: this.enterOuterAlt(localctx, 1); - this.state = 1639; + this.state = 1783; this.match(SqlBaseParser.IGNORE); - this.state = 1640; + this.state = 1784; this.match(SqlBaseParser.NULLS); break; - case 156: + case 170: this.enterOuterAlt(localctx, 2); - this.state = 1641; + this.state = 1785; this.match(SqlBaseParser.RESPECT); - this.state = 1642; + this.state = 1786; this.match(SqlBaseParser.NULLS); break; default: @@ -6830,29 +7164,29 @@ export default class SqlBaseParser extends antlr4.Parser { let localctx = new TimeZoneSpecifierContext(this, this._ctx, this.state); this.enterRule(localctx, 98, SqlBaseParser.RULE_timeZoneSpecifier); try { - this.state = 1651; + this.state = 1795; this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,215,this._ctx); + var la_ = this._interp.adaptivePredict(this._input,228,this._ctx); switch(la_) { case 1: localctx = new TimeZoneIntervalContext(this, localctx); this.enterOuterAlt(localctx, 1); - this.state = 1645; + this.state = 1789; this.match(SqlBaseParser.TIME); - this.state = 1646; + this.state = 1790; this.match(SqlBaseParser.ZONE); - this.state = 1647; + this.state = 1791; this.interval(); break; case 2: localctx = new TimeZoneStringContext(this, localctx); this.enterOuterAlt(localctx, 2); - this.state = 1648; + this.state = 1792; this.match(SqlBaseParser.TIME); - this.state = 1649; + this.state = 1793; this.match(SqlBaseParser.ZONE); - this.state = 1650; + this.state = 1794; this.string(); break; @@ -6879,9 +7213,9 @@ export default class SqlBaseParser extends antlr4.Parser { var _la = 0; try { this.enterOuterAlt(localctx, 1); - this.state = 1653; + this.state = 1797; _la = this._input.LA(1); - if(!(((((_la - 221)) & ~0x1f) === 0 && ((1 << (_la - 221)) & 63) !== 0))) { + if(!(((((_la - 236)) & ~0x1f) === 0 && ((1 << (_la - 236)) & 63) !== 0))) { this._errHandler.recoverInline(this); } else { @@ -6910,9 +7244,9 @@ export default class SqlBaseParser extends antlr4.Parser { var _la = 0; try { this.enterOuterAlt(localctx, 1); - this.state = 1655; + this.state = 1799; _la = this._input.LA(1); - if(!(_la===12 || _la===16 || _la===178)) { + if(!(_la===12 || _la===16 || _la===192)) { this._errHandler.recoverInline(this); } else { @@ -6941,9 +7275,9 @@ export default class SqlBaseParser extends antlr4.Parser { var _la = 0; try { this.enterOuterAlt(localctx, 1); - this.state = 1657; + this.state = 1801; _la = this._input.LA(1); - if(!(_la===67 || _la===196)) { + if(!(_la===74 || _la===210)) { this._errHandler.recoverInline(this); } else { @@ -6972,16 +7306,16 @@ export default class SqlBaseParser extends antlr4.Parser { var _la = 0; try { this.enterOuterAlt(localctx, 1); - this.state = 1659; + this.state = 1803; this.match(SqlBaseParser.INTERVAL); - this.state = 1661; + this.state = 1805; this._errHandler.sync(this); _la = this._input.LA(1); - if(_la===227 || _la===228) { - this.state = 1660; + if(_la===242 || _la===243) { + this.state = 1804; localctx.sign = this._input.LT(1); _la = this._input.LA(1); - if(!(_la===227 || _la===228)) { + if(!(_la===242 || _la===243)) { localctx.sign = this._errHandler.recoverInline(this); } else { @@ -6990,17 +7324,17 @@ export default class SqlBaseParser extends antlr4.Parser { } } - this.state = 1663; + this.state = 1807; this.string(); - this.state = 1664; + this.state = 1808; localctx.from = this.intervalField(); - this.state = 1667; + this.state = 1811; this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,217,this._ctx); + var la_ = this._interp.adaptivePredict(this._input,230,this._ctx); if(la_===1) { - this.state = 1665; + this.state = 1809; this.match(SqlBaseParser.TO); - this.state = 1666; + this.state = 1810; localctx.to = this.intervalField(); } @@ -7026,9 +7360,9 @@ export default class SqlBaseParser extends antlr4.Parser { var _la = 0; try { this.enterOuterAlt(localctx, 1); - this.state = 1669; + this.state = 1813; _la = this._input.LA(1); - if(!(_la===47 || ((((_la - 86)) & ~0x1f) === 0 && ((1 << (_la - 86)) & 1610612737) !== 0) || _la===170 || _la===219)) { + if(!(_la===49 || _la===93 || _la===126 || _la===127 || _la===184 || _la===234)) { this._errHandler.recoverInline(this); } else { @@ -7057,9 +7391,9 @@ export default class SqlBaseParser extends antlr4.Parser { var _la = 0; try { this.enterOuterAlt(localctx, 1); - this.state = 1671; + this.state = 1815; _la = this._input.LA(1); - if(!(((((_la - 119)) & ~0x1f) === 0 && ((1 << (_la - 119)) & 15) !== 0))) { + if(!(((((_la - 130)) & ~0x1f) === 0 && ((1 << (_la - 130)) & 15) !== 0))) { this._errHandler.recoverInline(this); } else { @@ -7088,29 +7422,29 @@ export default class SqlBaseParser extends antlr4.Parser { var _la = 0; try { this.enterOuterAlt(localctx, 1); - this.state = 1673; + this.state = 1817; this.match(SqlBaseParser.T__1); - this.state = 1682; + this.state = 1826; this._errHandler.sync(this); _la = this._input.LA(1); - if((((_la) & ~0x1f) === 0 && ((1 << _la) & 3879427072) !== 0) || ((((_la - 32)) & ~0x1f) === 0 && ((1 << (_la - 32)) & 548070023) !== 0) || ((((_la - 64)) & ~0x1f) === 0 && ((1 << (_la - 64)) & 2513695477) !== 0) || ((((_la - 97)) & ~0x1f) === 0 && ((1 << (_la - 97)) & 2413794779) !== 0) || ((((_la - 129)) & ~0x1f) === 0 && ((1 << (_la - 129)) & 4292803895) !== 0) || ((((_la - 162)) & ~0x1f) === 0 && ((1 << (_la - 162)) & 3741318135) !== 0) || ((((_la - 194)) & ~0x1f) === 0 && ((1 << (_la - 194)) & 126794171) !== 0) || ((((_la - 239)) & ~0x1f) === 0 && ((1 << (_la - 239)) & 127) !== 0)) { - this.state = 1674; + if(((((_la - 10)) & ~0x1f) === 0 && ((1 << (_la - 10)) & 2482216663) !== 0) || ((((_la - 43)) & ~0x1f) === 0 && ((1 << (_la - 43)) & 1381594481) !== 0) || ((((_la - 75)) & ~0x1f) === 0 && ((1 << (_la - 75)) & 1767718703) !== 0) || ((((_la - 107)) & ~0x1f) === 0 && ((1 << (_la - 107)) & 532663035) !== 0) || ((((_la - 139)) & ~0x1f) === 0 && ((1 << (_la - 139)) & 4278057583) !== 0) || ((((_la - 171)) & ~0x1f) === 0 && ((1 << (_la - 171)) & 3758063343) !== 0) || ((((_la - 203)) & ~0x1f) === 0 && ((1 << (_la - 203)) & 3819878267) !== 0) || ((((_la - 235)) & ~0x1f) === 0 && ((1 << (_la - 235)) & 66584577) !== 0)) { + this.state = 1818; this.type(0); - this.state = 1679; + this.state = 1823; this._errHandler.sync(this); _la = this._input.LA(1); while(_la===4) { - this.state = 1675; + this.state = 1819; this.match(SqlBaseParser.T__3); - this.state = 1676; + this.state = 1820; this.type(0); - this.state = 1681; + this.state = 1825; this._errHandler.sync(this); _la = this._input.LA(1); } } - this.state = 1684; + this.state = 1828; this.match(SqlBaseParser.T__2); } catch (re) { if(re instanceof antlr4.error.RecognitionException) { @@ -7140,108 +7474,108 @@ export default class SqlBaseParser extends antlr4.Parser { var _la = 0; try { this.enterOuterAlt(localctx, 1); - this.state = 1733; + this.state = 1877; this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,223,this._ctx); + var la_ = this._interp.adaptivePredict(this._input,236,this._ctx); switch(la_) { case 1: - this.state = 1687; + this.state = 1831; this.match(SqlBaseParser.ARRAY); - this.state = 1688; + this.state = 1832; this.match(SqlBaseParser.LT); - this.state = 1689; + this.state = 1833; this.type(0); - this.state = 1690; + this.state = 1834; this.match(SqlBaseParser.GT); break; case 2: - this.state = 1692; + this.state = 1836; this.match(SqlBaseParser.MAP); - this.state = 1693; + this.state = 1837; this.match(SqlBaseParser.LT); - this.state = 1694; + this.state = 1838; this.type(0); - this.state = 1695; + this.state = 1839; this.match(SqlBaseParser.T__3); - this.state = 1696; + this.state = 1840; this.type(0); - this.state = 1697; + this.state = 1841; this.match(SqlBaseParser.GT); break; case 3: - this.state = 1699; + this.state = 1843; this.match(SqlBaseParser.ROW); - this.state = 1700; + this.state = 1844; this.match(SqlBaseParser.T__1); - this.state = 1701; + this.state = 1845; this.identifier(); - this.state = 1702; + this.state = 1846; this.type(0); - this.state = 1709; + this.state = 1853; this._errHandler.sync(this); _la = this._input.LA(1); while(_la===4) { - this.state = 1703; + this.state = 1847; this.match(SqlBaseParser.T__3); - this.state = 1704; + this.state = 1848; this.identifier(); - this.state = 1705; + this.state = 1849; this.type(0); - this.state = 1711; + this.state = 1855; this._errHandler.sync(this); _la = this._input.LA(1); } - this.state = 1712; + this.state = 1856; this.match(SqlBaseParser.T__2); break; case 4: - this.state = 1714; + this.state = 1858; this.baseType(); - this.state = 1726; + this.state = 1870; this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,222,this._ctx); + var la_ = this._interp.adaptivePredict(this._input,235,this._ctx); if(la_===1) { - this.state = 1715; + this.state = 1859; this.match(SqlBaseParser.T__1); - this.state = 1716; + this.state = 1860; this.typeParameter(); - this.state = 1721; + this.state = 1865; this._errHandler.sync(this); _la = this._input.LA(1); while(_la===4) { - this.state = 1717; + this.state = 1861; this.match(SqlBaseParser.T__3); - this.state = 1718; + this.state = 1862; this.typeParameter(); - this.state = 1723; + this.state = 1867; this._errHandler.sync(this); _la = this._input.LA(1); } - this.state = 1724; + this.state = 1868; this.match(SqlBaseParser.T__2); } break; case 5: - this.state = 1728; + this.state = 1872; this.match(SqlBaseParser.INTERVAL); - this.state = 1729; + this.state = 1873; localctx.from = this.intervalField(); - this.state = 1730; + this.state = 1874; this.match(SqlBaseParser.TO); - this.state = 1731; + this.state = 1875; localctx.to = this.intervalField(); break; } this._ctx.stop = this._input.LT(-1); - this.state = 1739; + this.state = 1883; this._errHandler.sync(this); - var _alt = this._interp.adaptivePredict(this._input,224,this._ctx) + var _alt = this._interp.adaptivePredict(this._input,237,this._ctx) while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) { if(_alt===1) { if(this._parseListeners!==null) { @@ -7250,16 +7584,16 @@ export default class SqlBaseParser extends antlr4.Parser { _prevctx = localctx; localctx = new TypeContext(this, _parentctx, _parentState); this.pushNewRecursionContext(localctx, _startState, SqlBaseParser.RULE_type); - this.state = 1735; + this.state = 1879; if (!( this.precpred(this._ctx, 6))) { throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 6)"); } - this.state = 1736; + this.state = 1880; this.match(SqlBaseParser.ARRAY); } - this.state = 1741; + this.state = 1885; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input,224,this._ctx); + _alt = this._interp.adaptivePredict(this._input,237,this._ctx); } } catch( error) { @@ -7278,174 +7612,250 @@ export default class SqlBaseParser extends antlr4.Parser { - typeParameter() { - let localctx = new TypeParameterContext(this, this._ctx, this.state); - this.enterRule(localctx, 116, SqlBaseParser.RULE_typeParameter); + tableFunctionCall() { + let localctx = new TableFunctionCallContext(this, this._ctx, this.state); + this.enterRule(localctx, 116, SqlBaseParser.RULE_tableFunctionCall); + var _la = 0; try { - this.state = 1744; + this.enterOuterAlt(localctx, 1); + this.state = 1886; + this.qualifiedName(); + this.state = 1887; + this.match(SqlBaseParser.T__1); + this.state = 1896; this._errHandler.sync(this); - switch(this._input.LA(1)) { - case 236: - this.enterOuterAlt(localctx, 1); - this.state = 1742; - this.match(SqlBaseParser.INTEGER_VALUE); + var la_ = this._interp.adaptivePredict(this._input,239,this._ctx); + if(la_===1) { + this.state = 1888; + this.tableFunctionArgument(); + this.state = 1893; + this._errHandler.sync(this); + _la = this._input.LA(1); + while(_la===4) { + this.state = 1889; + this.match(SqlBaseParser.T__3); + this.state = 1890; + this.tableFunctionArgument(); + this.state = 1895; + this._errHandler.sync(this); + _la = this._input.LA(1); + } + + } + this.state = 1907; + this._errHandler.sync(this); + _la = this._input.LA(1); + if(_la===38) { + this.state = 1898; + this.match(SqlBaseParser.COPARTITION); + this.state = 1899; + this.copartitionTables(); + this.state = 1904; + this._errHandler.sync(this); + _la = this._input.LA(1); + while(_la===4) { + this.state = 1900; + this.match(SqlBaseParser.T__3); + this.state = 1901; + this.copartitionTables(); + this.state = 1906; + this._errHandler.sync(this); + _la = this._input.LA(1); + } + } + + this.state = 1909; + this.match(SqlBaseParser.T__2); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tableFunctionArgument() { + let localctx = new TableFunctionArgumentContext(this, this._ctx, this.state); + this.enterRule(localctx, 118, SqlBaseParser.RULE_tableFunctionArgument); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1914; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,242,this._ctx); + if(la_===1) { + this.state = 1911; + this.identifier(); + this.state = 1912; + this.match(SqlBaseParser.T__8); + + } + this.state = 1919; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,243,this._ctx); + switch(la_) { + case 1: + this.state = 1916; + this.tableArgument(); break; - case 10: - case 11: - case 12: - case 14: - case 16: - case 17: - case 19: - case 20: - case 21: - case 24: - case 25: - case 26: - case 29: - case 30: - case 31: - case 32: - case 33: - case 34: - case 39: - case 41: - case 45: - case 46: - case 47: - case 49: - case 51: - case 53: - case 55: - case 61: - case 64: - case 66: - case 68: - case 69: - case 70: - case 71: - case 73: - case 76: - case 77: - case 78: - case 79: - case 80: - case 81: - case 84: - case 86: - case 87: - case 88: - case 90: - case 92: - case 95: - case 97: - case 98: - case 100: - case 101: - case 103: - case 104: - case 105: - case 107: - case 109: - case 112: - case 113: - case 114: - case 115: - case 116: - case 117: - case 119: - case 120: - case 121: - case 122: - case 123: - case 124: - case 128: - case 129: - case 130: - case 131: - case 133: - case 134: - case 137: - case 139: - case 140: - case 141: - case 142: - case 143: - case 144: - case 146: - case 147: - case 148: - case 149: - case 151: - case 152: - case 153: - case 154: - case 155: - case 156: - case 157: - case 158: - case 159: - case 160: - case 162: - case 163: - case 164: - case 166: - case 167: - case 168: - case 169: - case 170: - case 171: - case 173: - case 174: - case 175: - case 176: - case 177: - case 178: - case 179: - case 180: - case 181: - case 182: - case 183: - case 184: - case 185: - case 187: - case 188: - case 189: - case 190: - case 192: - case 193: - case 194: - case 195: - case 197: - case 198: - case 199: - case 201: - case 202: - case 205: - case 206: - case 207: - case 209: - case 211: - case 212: - case 213: - case 217: - case 218: - case 219: - case 220: - case 239: - case 240: - case 241: - case 242: - case 243: - case 244: - case 245: - this.enterOuterAlt(localctx, 2); - this.state = 1743; - this.type(0); + + case 2: + this.state = 1917; + this.descriptorArgument(); + break; + + case 3: + this.state = 1918; + this.expression(); break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tableArgument() { + let localctx = new TableArgumentContext(this, this._ctx, this.state); + this.enterRule(localctx, 120, SqlBaseParser.RULE_tableArgument); + var _la = 0; + try { + this.enterOuterAlt(localctx, 1); + this.state = 1921; + this.tableArgumentRelation(); + this.state = 1939; + this._errHandler.sync(this); + _la = this._input.LA(1); + if(_la===152) { + this.state = 1922; + this.match(SqlBaseParser.PARTITION); + this.state = 1923; + this.match(SqlBaseParser.BY); + this.state = 1937; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,246,this._ctx); + switch(la_) { + case 1: + this.state = 1924; + this.match(SqlBaseParser.T__1); + this.state = 1933; + this._errHandler.sync(this); + _la = this._input.LA(1); + if(((((_la - 2)) & ~0x1f) === 0 && ((1 << (_la - 2)) & 4288599817) !== 0) || ((((_la - 34)) & ~0x1f) === 0 && ((1 << (_la - 34)) & 3001745299) !== 0) || ((((_la - 68)) & ~0x1f) === 0 && ((1 << (_la - 68)) & 2933889021) !== 0) || ((((_la - 102)) & ~0x1f) === 0 && ((1 << (_la - 102)) & 4160708461) !== 0) || ((((_la - 134)) & ~0x1f) === 0 && ((1 << (_la - 134)) & 3753856511) !== 0) || ((((_la - 166)) & ~0x1f) === 0 && ((1 << (_la - 166)) & 4293910015) !== 0) || ((((_la - 198)) & ~0x1f) === 0 && ((1 << (_la - 198)) & 1977024379) !== 0) || ((((_la - 232)) & ~0x1f) === 0 && ((1 << (_la - 232)) & 335481871) !== 0)) { + this.state = 1925; + this.expression(); + this.state = 1930; + this._errHandler.sync(this); + _la = this._input.LA(1); + while(_la===4) { + this.state = 1926; + this.match(SqlBaseParser.T__3); + this.state = 1927; + this.expression(); + this.state = 1932; + this._errHandler.sync(this); + _la = this._input.LA(1); + } + } + + this.state = 1935; + this.match(SqlBaseParser.T__2); + break; + + case 2: + this.state = 1936; + this.expression(); + break; + + } + } + + this.state = 1947; + this._errHandler.sync(this); + switch (this._input.LA(1)) { + case 160: + this.state = 1941; + this.match(SqlBaseParser.PRUNE); + this.state = 1942; + this.match(SqlBaseParser.WHEN); + this.state = 1943; + this.match(SqlBaseParser.EMPTY); + break; + case 110: + this.state = 1944; + this.match(SqlBaseParser.KEEP); + this.state = 1945; + this.match(SqlBaseParser.WHEN); + this.state = 1946; + this.match(SqlBaseParser.EMPTY); + break; + case 3: + case 4: + case 38: + case 147: + break; default: - throw new antlr4.error.NoViableAltException(this); + break; + } + this.state = 1965; + this._errHandler.sync(this); + _la = this._input.LA(1); + if(_la===147) { + this.state = 1949; + this.match(SqlBaseParser.ORDER); + this.state = 1950; + this.match(SqlBaseParser.BY); + this.state = 1963; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,250,this._ctx); + switch(la_) { + case 1: + this.state = 1951; + this.match(SqlBaseParser.T__1); + this.state = 1952; + this.sortItem(); + this.state = 1957; + this._errHandler.sync(this); + _la = this._input.LA(1); + while(_la===4) { + this.state = 1953; + this.match(SqlBaseParser.T__3); + this.state = 1954; + this.sortItem(); + this.state = 1959; + this._errHandler.sync(this); + _la = this._input.LA(1); + } + this.state = 1960; + this.match(SqlBaseParser.T__2); + break; + + case 2: + this.state = 1962; + this.sortItem(); + break; + + } } + } catch (re) { if(re instanceof antlr4.error.RecognitionException) { localctx.exception = re; @@ -7462,140 +7872,372 @@ export default class SqlBaseParser extends antlr4.Parser { - baseType() { - let localctx = new BaseTypeContext(this, this._ctx, this.state); - this.enterRule(localctx, 118, SqlBaseParser.RULE_baseType); + tableArgumentRelation() { + let localctx = new TableArgumentRelationContext(this, this._ctx, this.state); + this.enterRule(localctx, 122, SqlBaseParser.RULE_tableArgumentRelation); + var _la = 0; try { - this.state = 1750; + this.state = 1993; this._errHandler.sync(this); - switch(this._input.LA(1)) { - case 243: + var la_ = this._interp.adaptivePredict(this._input,258,this._ctx); + switch(la_) { + case 1: + localctx = new TableArgumentTableContext(this, localctx); this.enterOuterAlt(localctx, 1); - this.state = 1746; - this.match(SqlBaseParser.TIME_WITH_TIME_ZONE); + this.state = 1967; + this.match(SqlBaseParser.TABLE); + this.state = 1968; + this.match(SqlBaseParser.T__1); + this.state = 1969; + this.qualifiedName(); + this.state = 1970; + this.match(SqlBaseParser.T__2); + this.state = 1978; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,254,this._ctx); + if(la_===1) { + this.state = 1972; + this._errHandler.sync(this); + _la = this._input.LA(1); + if(_la===18) { + this.state = 1971; + this.match(SqlBaseParser.AS); + } + + this.state = 1974; + this.identifier(); + this.state = 1976; + this._errHandler.sync(this); + _la = this._input.LA(1); + if(_la===2) { + this.state = 1975; + this.columnAliases(); + } + + + } break; - case 244: + + case 2: + localctx = new TableArgumentQueryContext(this, localctx); this.enterOuterAlt(localctx, 2); - this.state = 1747; - this.match(SqlBaseParser.TIMESTAMP_WITH_TIME_ZONE); + this.state = 1980; + this.match(SqlBaseParser.TABLE); + this.state = 1981; + this.match(SqlBaseParser.T__1); + this.state = 1982; + this.query(); + this.state = 1983; + this.match(SqlBaseParser.T__2); + this.state = 1991; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,257,this._ctx); + if(la_===1) { + this.state = 1985; + this._errHandler.sync(this); + _la = this._input.LA(1); + if(_la===18) { + this.state = 1984; + this.match(SqlBaseParser.AS); + } + + this.state = 1987; + this.identifier(); + this.state = 1989; + this._errHandler.sync(this); + _la = this._input.LA(1); + if(_la===2) { + this.state = 1988; + this.columnAliases(); + } + + + } break; - case 245: - this.enterOuterAlt(localctx, 3); - this.state = 1748; - this.match(SqlBaseParser.DOUBLE_PRECISION); + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + descriptorArgument() { + let localctx = new DescriptorArgumentContext(this, this._ctx, this.state); + this.enterRule(localctx, 124, SqlBaseParser.RULE_descriptorArgument); + var _la = 0; + try { + this.state = 2013; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 55: + this.enterOuterAlt(localctx, 1); + this.state = 1995; + this.match(SqlBaseParser.DESCRIPTOR); + this.state = 1996; + this.match(SqlBaseParser.T__1); + this.state = 1997; + this.descriptorField(); + this.state = 2002; + this._errHandler.sync(this); + _la = this._input.LA(1); + while(_la===4) { + this.state = 1998; + this.match(SqlBaseParser.T__3); + this.state = 1999; + this.descriptorField(); + this.state = 2004; + this._errHandler.sync(this); + _la = this._input.LA(1); + } + this.state = 2005; + this.match(SqlBaseParser.T__2); break; - case 10: - case 11: - case 12: - case 14: - case 16: - case 17: - case 19: - case 20: - case 21: - case 24: - case 25: - case 26: case 29: - case 30: - case 31: - case 32: - case 33: - case 34: - case 39: - case 41: - case 45: - case 46: - case 47: - case 49: - case 51: - case 53: - case 55: - case 61: - case 64: - case 66: - case 68: - case 69: - case 70: - case 71: - case 73: - case 76: - case 77: - case 78: - case 79: - case 80: - case 81: + this.enterOuterAlt(localctx, 2); + this.state = 2007; + this.match(SqlBaseParser.CAST); + this.state = 2008; + this.match(SqlBaseParser.T__1); + this.state = 2009; + this.match(SqlBaseParser.NULL); + this.state = 2010; + this.match(SqlBaseParser.AS); + this.state = 2011; + this.match(SqlBaseParser.DESCRIPTOR); + this.state = 2012; + this.match(SqlBaseParser.T__2); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + descriptorField() { + let localctx = new DescriptorFieldContext(this, this._ctx, this.state); + this.enterRule(localctx, 126, SqlBaseParser.RULE_descriptorField); + var _la = 0; + try { + this.enterOuterAlt(localctx, 1); + this.state = 2015; + this.identifier(); + this.state = 2017; + this._errHandler.sync(this); + _la = this._input.LA(1); + if(((((_la - 10)) & ~0x1f) === 0 && ((1 << (_la - 10)) & 2482216663) !== 0) || ((((_la - 43)) & ~0x1f) === 0 && ((1 << (_la - 43)) & 1381594481) !== 0) || ((((_la - 75)) & ~0x1f) === 0 && ((1 << (_la - 75)) & 1767718703) !== 0) || ((((_la - 107)) & ~0x1f) === 0 && ((1 << (_la - 107)) & 532663035) !== 0) || ((((_la - 139)) & ~0x1f) === 0 && ((1 << (_la - 139)) & 4278057583) !== 0) || ((((_la - 171)) & ~0x1f) === 0 && ((1 << (_la - 171)) & 3758063343) !== 0) || ((((_la - 203)) & ~0x1f) === 0 && ((1 << (_la - 203)) & 3819878267) !== 0) || ((((_la - 235)) & ~0x1f) === 0 && ((1 << (_la - 235)) & 66584577) !== 0)) { + this.state = 2016; + this.type(0); + } + + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + copartitionTables() { + let localctx = new CopartitionTablesContext(this, this._ctx, this.state); + this.enterRule(localctx, 128, SqlBaseParser.RULE_copartitionTables); + var _la = 0; + try { + this.enterOuterAlt(localctx, 1); + this.state = 2019; + this.match(SqlBaseParser.T__1); + this.state = 2020; + this.qualifiedName(); + this.state = 2021; + this.match(SqlBaseParser.T__3); + this.state = 2022; + this.qualifiedName(); + this.state = 2027; + this._errHandler.sync(this); + _la = this._input.LA(1); + while(_la===4) { + this.state = 2023; + this.match(SqlBaseParser.T__3); + this.state = 2024; + this.qualifiedName(); + this.state = 2029; + this._errHandler.sync(this); + _la = this._input.LA(1); + } + this.state = 2030; + this.match(SqlBaseParser.T__2); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + typeParameter() { + let localctx = new TypeParameterContext(this, this._ctx, this.state); + this.enterRule(localctx, 130, SqlBaseParser.RULE_typeParameter); + try { + this.state = 2034; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 251: + this.enterOuterAlt(localctx, 1); + this.state = 2032; + this.match(SqlBaseParser.INTEGER_VALUE); + break; + case 10: + case 11: + case 12: + case 14: + case 16: + case 17: + case 19: + case 20: + case 21: + case 22: + case 25: + case 26: + case 27: + case 30: + case 31: + case 32: + case 33: + case 34: + case 35: + case 38: + case 41: + case 43: + case 47: + case 48: + case 49: + case 51: + case 53: + case 55: + case 56: + case 57: + case 59: + case 62: + case 63: + case 65: + case 68: + case 71: + case 73: + case 75: + case 76: + case 77: + case 78: + case 80: + case 83: case 84: + case 85: case 86: case 87: case 88: - case 90: - case 92: + case 91: + case 93: + case 94: case 95: case 97: - case 98: - case 100: - case 101: - case 103: + case 99: + case 102: case 104: case 105: case 107: - case 109: + case 108: + case 110: + case 111: case 112: case 113: case 114: - case 115: case 116: - case 117: - case 119: - case 120: + case 118: case 121: case 122: case 123: case 124: + case 125: + case 126: + case 127: case 128: - case 129: case 130: case 131: + case 132: case 133: case 134: - case 137: + case 135: case 139: case 140: case 141: case 142: - case 143: case 144: - case 146: - case 147: + case 145: case 148: - case 149: + case 150: case 151: case 152: case 153: case 154: case 155: - case 156: case 157: case 158: case 159: case 160: + case 161: case 162: - case 163: case 164: + case 165: case 166: case 167: case 168: case 169: case 170: case 171: + case 172: case 173: case 174: - case 175: case 176: case 177: case 178: - case 179: case 180: case 181: case 182: @@ -7606,33 +8248,50 @@ export default class SqlBaseParser extends antlr4.Parser { case 188: case 189: case 190: + case 191: case 192: case 193: case 194: case 195: + case 196: case 197: case 198: case 199: case 201: case 202: - case 205: + case 203: + case 204: case 206: case 207: + case 208: case 209: case 211: case 212: case 213: - case 217: + case 215: + case 216: case 218: - case 219: case 220: - case 239: - case 240: - case 241: - case 242: - this.enterOuterAlt(localctx, 4); - this.state = 1749; - this.qualifiedName(); + case 221: + case 222: + case 224: + case 226: + case 227: + case 228: + case 232: + case 233: + case 234: + case 235: + case 254: + case 255: + case 256: + case 257: + case 258: + case 259: + case 260: + this.enterOuterAlt(localctx, 2); + this.state = 2033; + this.type(0); break; default: throw new antlr4.error.NoViableAltException(this); @@ -7653,136 +8312,196 @@ export default class SqlBaseParser extends antlr4.Parser { - whenClause() { - let localctx = new WhenClauseContext(this, this._ctx, this.state); - this.enterRule(localctx, 120, SqlBaseParser.RULE_whenClause); - try { - this.enterOuterAlt(localctx, 1); - this.state = 1752; - this.match(SqlBaseParser.WHEN); - this.state = 1753; - localctx.condition = this.expression(); - this.state = 1754; - this.match(SqlBaseParser.THEN); - this.state = 1755; - localctx.result = this.expression(); - } catch (re) { - if(re instanceof antlr4.error.RecognitionException) { - localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } else { - throw re; - } - } finally { - this.exitRule(); - } - return localctx; - } - - - - filter() { - let localctx = new FilterContext(this, this._ctx, this.state); - this.enterRule(localctx, 122, SqlBaseParser.RULE_filter); - try { - this.enterOuterAlt(localctx, 1); - this.state = 1757; - this.match(SqlBaseParser.FILTER); - this.state = 1758; - this.match(SqlBaseParser.T__1); - this.state = 1759; - this.match(SqlBaseParser.WHERE); - this.state = 1760; - this.booleanExpression(0); - this.state = 1761; - this.match(SqlBaseParser.T__2); - } catch (re) { - if(re instanceof antlr4.error.RecognitionException) { - localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } else { - throw re; - } - } finally { - this.exitRule(); - } - return localctx; - } - - - - over() { - let localctx = new OverContext(this, this._ctx, this.state); - this.enterRule(localctx, 124, SqlBaseParser.RULE_over); - var _la = 0; + baseType() { + let localctx = new BaseTypeContext(this, this._ctx, this.state); + this.enterRule(localctx, 132, SqlBaseParser.RULE_baseType); try { - this.enterOuterAlt(localctx, 1); - this.state = 1763; - this.match(SqlBaseParser.OVER); - this.state = 1764; - this.match(SqlBaseParser.T__1); - this.state = 1775; - this._errHandler.sync(this); - _la = this._input.LA(1); - if(_la===141) { - this.state = 1765; - this.match(SqlBaseParser.PARTITION); - this.state = 1766; - this.match(SqlBaseParser.BY); - this.state = 1767; - localctx._expression = this.expression(); - localctx.partition.push(localctx._expression); - this.state = 1772; - this._errHandler.sync(this); - _la = this._input.LA(1); - while(_la===4) { - this.state = 1768; - this.match(SqlBaseParser.T__3); - this.state = 1769; - localctx._expression = this.expression(); - localctx.partition.push(localctx._expression); - this.state = 1774; - this._errHandler.sync(this); - _la = this._input.LA(1); - } - } - - this.state = 1787; + this.state = 2040; this._errHandler.sync(this); - _la = this._input.LA(1); - if(_la===136) { - this.state = 1777; - this.match(SqlBaseParser.ORDER); - this.state = 1778; - this.match(SqlBaseParser.BY); - this.state = 1779; - this.sortItem(); - this.state = 1784; - this._errHandler.sync(this); - _la = this._input.LA(1); - while(_la===4) { - this.state = 1780; - this.match(SqlBaseParser.T__3); - this.state = 1781; - this.sortItem(); - this.state = 1786; - this._errHandler.sync(this); - _la = this._input.LA(1); - } - } - - this.state = 1790; - this._errHandler.sync(this); - _la = this._input.LA(1); - if(_la===84 || _la===148 || _la===167) { - this.state = 1789; - this.windowFrame(); + switch(this._input.LA(1)) { + case 258: + this.enterOuterAlt(localctx, 1); + this.state = 2036; + this.match(SqlBaseParser.TIME_WITH_TIME_ZONE); + break; + case 259: + this.enterOuterAlt(localctx, 2); + this.state = 2037; + this.match(SqlBaseParser.TIMESTAMP_WITH_TIME_ZONE); + break; + case 260: + this.enterOuterAlt(localctx, 3); + this.state = 2038; + this.match(SqlBaseParser.DOUBLE_PRECISION); + break; + case 10: + case 11: + case 12: + case 14: + case 16: + case 17: + case 19: + case 20: + case 21: + case 22: + case 25: + case 26: + case 27: + case 30: + case 31: + case 32: + case 33: + case 34: + case 35: + case 38: + case 41: + case 43: + case 47: + case 48: + case 49: + case 51: + case 53: + case 55: + case 56: + case 57: + case 59: + case 62: + case 63: + case 65: + case 68: + case 71: + case 73: + case 75: + case 76: + case 77: + case 78: + case 80: + case 83: + case 84: + case 85: + case 86: + case 87: + case 88: + case 91: + case 93: + case 94: + case 95: + case 97: + case 99: + case 102: + case 104: + case 105: + case 107: + case 108: + case 110: + case 111: + case 112: + case 113: + case 114: + case 116: + case 118: + case 121: + case 122: + case 123: + case 124: + case 125: + case 126: + case 127: + case 128: + case 130: + case 131: + case 132: + case 133: + case 134: + case 135: + case 139: + case 140: + case 141: + case 142: + case 144: + case 145: + case 148: + case 150: + case 151: + case 152: + case 153: + case 154: + case 155: + case 157: + case 158: + case 159: + case 160: + case 161: + case 162: + case 164: + case 165: + case 166: + case 167: + case 168: + case 169: + case 170: + case 171: + case 172: + case 173: + case 174: + case 176: + case 177: + case 178: + case 180: + case 181: + case 182: + case 183: + case 184: + case 185: + case 187: + case 188: + case 189: + case 190: + case 191: + case 192: + case 193: + case 194: + case 195: + case 196: + case 197: + case 198: + case 199: + case 201: + case 202: + case 203: + case 204: + case 206: + case 207: + case 208: + case 209: + case 211: + case 212: + case 213: + case 215: + case 216: + case 218: + case 220: + case 221: + case 222: + case 224: + case 226: + case 227: + case 228: + case 232: + case 233: + case 234: + case 235: + case 254: + case 255: + case 256: + case 257: + this.enterOuterAlt(localctx, 4); + this.state = 2039; + this.qualifiedName(); + break; + default: + throw new antlr4.error.NoViableAltException(this); } - - this.state = 1792; - this.match(SqlBaseParser.T__2); } catch (re) { if(re instanceof antlr4.error.RecognitionException) { localctx.exception = re; @@ -7799,81 +8518,50 @@ export default class SqlBaseParser extends antlr4.Parser { - windowFrame() { - let localctx = new WindowFrameContext(this, this._ctx, this.state); - this.enterRule(localctx, 126, SqlBaseParser.RULE_windowFrame); + whenClause() { + let localctx = new WhenClauseContext(this, this._ctx, this.state); + this.enterRule(localctx, 134, SqlBaseParser.RULE_whenClause); try { - this.state = 1818; - this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,232,this._ctx); - switch(la_) { - case 1: - this.enterOuterAlt(localctx, 1); - this.state = 1794; - localctx.frameType = this.match(SqlBaseParser.RANGE); - this.state = 1795; - localctx.start = this.frameBound(); - break; - - case 2: - this.enterOuterAlt(localctx, 2); - this.state = 1796; - localctx.frameType = this.match(SqlBaseParser.ROWS); - this.state = 1797; - localctx.start = this.frameBound(); - break; - - case 3: - this.enterOuterAlt(localctx, 3); - this.state = 1798; - localctx.frameType = this.match(SqlBaseParser.GROUPS); - this.state = 1799; - localctx.start = this.frameBound(); - break; - - case 4: - this.enterOuterAlt(localctx, 4); - this.state = 1800; - localctx.frameType = this.match(SqlBaseParser.RANGE); - this.state = 1801; - this.match(SqlBaseParser.BETWEEN); - this.state = 1802; - localctx.start = this.frameBound(); - this.state = 1803; - this.match(SqlBaseParser.AND); - this.state = 1804; - localctx.end = this.frameBound(); - break; + this.enterOuterAlt(localctx, 1); + this.state = 2042; + this.match(SqlBaseParser.WHEN); + this.state = 2043; + localctx.condition = this.expression(); + this.state = 2044; + this.match(SqlBaseParser.THEN); + this.state = 2045; + localctx.result = this.expression(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } - case 5: - this.enterOuterAlt(localctx, 5); - this.state = 1806; - localctx.frameType = this.match(SqlBaseParser.ROWS); - this.state = 1807; - this.match(SqlBaseParser.BETWEEN); - this.state = 1808; - localctx.start = this.frameBound(); - this.state = 1809; - this.match(SqlBaseParser.AND); - this.state = 1810; - localctx.end = this.frameBound(); - break; - case 6: - this.enterOuterAlt(localctx, 6); - this.state = 1812; - localctx.frameType = this.match(SqlBaseParser.GROUPS); - this.state = 1813; - this.match(SqlBaseParser.BETWEEN); - this.state = 1814; - localctx.start = this.frameBound(); - this.state = 1815; - this.match(SqlBaseParser.AND); - this.state = 1816; - localctx.end = this.frameBound(); - break; - } + filter() { + let localctx = new FilterContext(this, this._ctx, this.state); + this.enterRule(localctx, 136, SqlBaseParser.RULE_filter); + try { + this.enterOuterAlt(localctx, 1); + this.state = 2047; + this.match(SqlBaseParser.FILTER); + this.state = 2048; + this.match(SqlBaseParser.T__1); + this.state = 2049; + this.match(SqlBaseParser.WHERE); + this.state = 2050; + this.booleanExpression(0); + this.state = 2051; + this.match(SqlBaseParser.T__2); } catch (re) { if(re instanceof antlr4.error.RecognitionException) { localctx.exception = re; @@ -7890,51 +8578,358 @@ export default class SqlBaseParser extends antlr4.Parser { - frameBound() { - let localctx = new FrameBoundContext(this, this._ctx, this.state); - this.enterRule(localctx, 128, SqlBaseParser.RULE_frameBound); + mergeCase() { + let localctx = new MergeCaseContext(this, this._ctx, this.state); + this.enterRule(localctx, 138, SqlBaseParser.RULE_mergeCase); var _la = 0; try { - this.state = 1829; + this.state = 2101; this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,233,this._ctx); + var la_ = this._interp.adaptivePredict(this._input,269,this._ctx); switch(la_) { case 1: - localctx = new UnboundedFrameContext(this, localctx); + localctx = new MergeUpdateContext(this, localctx); this.enterOuterAlt(localctx, 1); - this.state = 1820; - this.match(SqlBaseParser.UNBOUNDED); - this.state = 1821; - localctx.boundType = this.match(SqlBaseParser.PRECEDING); - break; - - case 2: - localctx = new UnboundedFrameContext(this, localctx); - this.enterOuterAlt(localctx, 2); - this.state = 1822; - this.match(SqlBaseParser.UNBOUNDED); - this.state = 1823; + this.state = 2053; + this.match(SqlBaseParser.WHEN); + this.state = 2054; + this.match(SqlBaseParser.MATCHED); + this.state = 2055; + this.match(SqlBaseParser.THEN); + this.state = 2056; + this.match(SqlBaseParser.UPDATE); + this.state = 2057; + this.match(SqlBaseParser.SET); + this.state = 2058; + localctx._identifier = this.identifier(); + localctx.targetColumns.push(localctx._identifier); + this.state = 2059; + this.match(SqlBaseParser.EQ); + this.state = 2060; + localctx._expression = this.expression(); + localctx.values.push(localctx._expression); + this.state = 2068; + this._errHandler.sync(this); + _la = this._input.LA(1); + while(_la===4) { + this.state = 2061; + this.match(SqlBaseParser.T__3); + this.state = 2062; + localctx._identifier = this.identifier(); + localctx.targetColumns.push(localctx._identifier); + this.state = 2063; + this.match(SqlBaseParser.EQ); + this.state = 2064; + localctx._expression = this.expression(); + localctx.values.push(localctx._expression); + this.state = 2070; + this._errHandler.sync(this); + _la = this._input.LA(1); + } + break; + + case 2: + localctx = new MergeInsertContext(this, localctx); + this.enterOuterAlt(localctx, 2); + this.state = 2071; + this.match(SqlBaseParser.WHEN); + this.state = 2072; + this.match(SqlBaseParser.NOT); + this.state = 2073; + this.match(SqlBaseParser.MATCHED); + this.state = 2074; + this.match(SqlBaseParser.THEN); + this.state = 2075; + this.match(SqlBaseParser.INSERT); + this.state = 2087; + this._errHandler.sync(this); + _la = this._input.LA(1); + if(_la===2) { + this.state = 2076; + this.match(SqlBaseParser.T__1); + this.state = 2077; + localctx._identifier = this.identifier(); + localctx.columns.push(localctx._identifier); + this.state = 2082; + this._errHandler.sync(this); + _la = this._input.LA(1); + while(_la===4) { + this.state = 2078; + this.match(SqlBaseParser.T__3); + this.state = 2079; + localctx._identifier = this.identifier(); + localctx.columns.push(localctx._identifier); + this.state = 2084; + this._errHandler.sync(this); + _la = this._input.LA(1); + } + this.state = 2085; + this.match(SqlBaseParser.T__2); + } + + this.state = 2089; + this.match(SqlBaseParser.VALUES); + this.state = 2090; + this.match(SqlBaseParser.T__1); + this.state = 2091; + localctx._expression = this.expression(); + localctx.values.push(localctx._expression); + this.state = 2096; + this._errHandler.sync(this); + _la = this._input.LA(1); + while(_la===4) { + this.state = 2092; + this.match(SqlBaseParser.T__3); + this.state = 2093; + localctx._expression = this.expression(); + localctx.values.push(localctx._expression); + this.state = 2098; + this._errHandler.sync(this); + _la = this._input.LA(1); + } + this.state = 2099; + this.match(SqlBaseParser.T__2); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + over() { + let localctx = new OverContext(this, this._ctx, this.state); + this.enterRule(localctx, 140, SqlBaseParser.RULE_over); + var _la = 0; + try { + this.enterOuterAlt(localctx, 1); + this.state = 2103; + this.match(SqlBaseParser.OVER); + this.state = 2104; + this.match(SqlBaseParser.T__1); + this.state = 2115; + this._errHandler.sync(this); + _la = this._input.LA(1); + if(_la===152) { + this.state = 2105; + this.match(SqlBaseParser.PARTITION); + this.state = 2106; + this.match(SqlBaseParser.BY); + this.state = 2107; + localctx._expression = this.expression(); + localctx.partition.push(localctx._expression); + this.state = 2112; + this._errHandler.sync(this); + _la = this._input.LA(1); + while(_la===4) { + this.state = 2108; + this.match(SqlBaseParser.T__3); + this.state = 2109; + localctx._expression = this.expression(); + localctx.partition.push(localctx._expression); + this.state = 2114; + this._errHandler.sync(this); + _la = this._input.LA(1); + } + } + + this.state = 2127; + this._errHandler.sync(this); + _la = this._input.LA(1); + if(_la===147) { + this.state = 2117; + this.match(SqlBaseParser.ORDER); + this.state = 2118; + this.match(SqlBaseParser.BY); + this.state = 2119; + this.sortItem(); + this.state = 2124; + this._errHandler.sync(this); + _la = this._input.LA(1); + while(_la===4) { + this.state = 2120; + this.match(SqlBaseParser.T__3); + this.state = 2121; + this.sortItem(); + this.state = 2126; + this._errHandler.sync(this); + _la = this._input.LA(1); + } + } + + this.state = 2130; + this._errHandler.sync(this); + _la = this._input.LA(1); + if(_la===91 || _la===161 || _la===181) { + this.state = 2129; + this.windowFrame(); + } + + this.state = 2132; + this.match(SqlBaseParser.T__2); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + windowFrame() { + let localctx = new WindowFrameContext(this, this._ctx, this.state); + this.enterRule(localctx, 142, SqlBaseParser.RULE_windowFrame); + try { + this.state = 2158; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,275,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 2134; + localctx.frameType = this.match(SqlBaseParser.RANGE); + this.state = 2135; + localctx.start = this.frameBound(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 2136; + localctx.frameType = this.match(SqlBaseParser.ROWS); + this.state = 2137; + localctx.start = this.frameBound(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 2138; + localctx.frameType = this.match(SqlBaseParser.GROUPS); + this.state = 2139; + localctx.start = this.frameBound(); + break; + + case 4: + this.enterOuterAlt(localctx, 4); + this.state = 2140; + localctx.frameType = this.match(SqlBaseParser.RANGE); + this.state = 2141; + this.match(SqlBaseParser.BETWEEN); + this.state = 2142; + localctx.start = this.frameBound(); + this.state = 2143; + this.match(SqlBaseParser.AND); + this.state = 2144; + localctx.end = this.frameBound(); + break; + + case 5: + this.enterOuterAlt(localctx, 5); + this.state = 2146; + localctx.frameType = this.match(SqlBaseParser.ROWS); + this.state = 2147; + this.match(SqlBaseParser.BETWEEN); + this.state = 2148; + localctx.start = this.frameBound(); + this.state = 2149; + this.match(SqlBaseParser.AND); + this.state = 2150; + localctx.end = this.frameBound(); + break; + + case 6: + this.enterOuterAlt(localctx, 6); + this.state = 2152; + localctx.frameType = this.match(SqlBaseParser.GROUPS); + this.state = 2153; + this.match(SqlBaseParser.BETWEEN); + this.state = 2154; + localctx.start = this.frameBound(); + this.state = 2155; + this.match(SqlBaseParser.AND); + this.state = 2156; + localctx.end = this.frameBound(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + frameBound() { + let localctx = new FrameBoundContext(this, this._ctx, this.state); + this.enterRule(localctx, 144, SqlBaseParser.RULE_frameBound); + var _la = 0; + try { + this.state = 2169; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,276,this._ctx); + switch(la_) { + case 1: + localctx = new UnboundedFrameContext(this, localctx); + this.enterOuterAlt(localctx, 1); + this.state = 2160; + this.match(SqlBaseParser.UNBOUNDED); + this.state = 2161; + localctx.boundType = this.match(SqlBaseParser.PRECEDING); + break; + + case 2: + localctx = new UnboundedFrameContext(this, localctx); + this.enterOuterAlt(localctx, 2); + this.state = 2162; + this.match(SqlBaseParser.UNBOUNDED); + this.state = 2163; localctx.boundType = this.match(SqlBaseParser.FOLLOWING); break; case 3: localctx = new CurrentRowBoundContext(this, localctx); this.enterOuterAlt(localctx, 3); - this.state = 1824; + this.state = 2164; this.match(SqlBaseParser.CURRENT); - this.state = 1825; + this.state = 2165; this.match(SqlBaseParser.ROW); break; case 4: localctx = new BoundedFrameContext(this, localctx); this.enterOuterAlt(localctx, 4); - this.state = 1826; + this.state = 2166; this.expression(); - this.state = 1827; + this.state = 2167; localctx.boundType = this._input.LT(1); _la = this._input.LA(1); - if(!(_la===71 || _la===144)) { + if(!(_la===78 || _la===155)) { localctx.boundType = this._errHandler.recoverInline(this); } else { @@ -7962,14 +8957,14 @@ export default class SqlBaseParser extends antlr4.Parser { updateAssignment() { let localctx = new UpdateAssignmentContext(this, this._ctx, this.state); - this.enterRule(localctx, 130, SqlBaseParser.RULE_updateAssignment); + this.enterRule(localctx, 146, SqlBaseParser.RULE_updateAssignment); try { this.enterOuterAlt(localctx, 1); - this.state = 1831; + this.state = 2171; this.identifier(); - this.state = 1832; + this.state = 2172; this.match(SqlBaseParser.EQ); - this.state = 1833; + this.state = 2173; this.expression(); } catch (re) { if(re instanceof antlr4.error.RecognitionException) { @@ -7989,21 +8984,21 @@ export default class SqlBaseParser extends antlr4.Parser { explainOption() { let localctx = new ExplainOptionContext(this, this._ctx, this.state); - this.enterRule(localctx, 132, SqlBaseParser.RULE_explainOption); + this.enterRule(localctx, 148, SqlBaseParser.RULE_explainOption); var _la = 0; try { - this.state = 1839; + this.state = 2179; this._errHandler.sync(this); switch(this._input.LA(1)) { - case 73: + case 80: localctx = new ExplainFormatContext(this, localctx); this.enterOuterAlt(localctx, 1); - this.state = 1835; + this.state = 2175; this.match(SqlBaseParser.FORMAT); - this.state = 1836; + this.state = 2176; localctx.value = this._input.LT(1); _la = this._input.LA(1); - if(!(_la===81 || _la===101 || _la===190)) { + if(!(_la===88 || _la===108 || _la===204)) { localctx.value = this._errHandler.recoverInline(this); } else { @@ -8011,15 +9006,15 @@ export default class SqlBaseParser extends antlr4.Parser { this.consume(); } break; - case 199: + case 213: localctx = new ExplainTypeContext(this, localctx); this.enterOuterAlt(localctx, 2); - this.state = 1837; + this.state = 2177; this.match(SqlBaseParser.TYPE); - this.state = 1838; + this.state = 2178; localctx.value = this._input.LT(1); _la = this._input.LA(1); - if(!(_la===55 || _la===98 || _la===112 || _la===209)) { + if(!(_la===59 || _la===105 || _la===121 || _la===224)) { localctx.value = this._errHandler.recoverInline(this); } else { @@ -8048,31 +9043,31 @@ export default class SqlBaseParser extends antlr4.Parser { transactionMode() { let localctx = new TransactionModeContext(this, this._ctx, this.state); - this.enterRule(localctx, 134, SqlBaseParser.RULE_transactionMode); + this.enterRule(localctx, 150, SqlBaseParser.RULE_transactionMode); var _la = 0; try { - this.state = 1846; + this.state = 2186; this._errHandler.sync(this); switch(this._input.LA(1)) { - case 100: + case 107: localctx = new IsolationLevelContext(this, localctx); this.enterOuterAlt(localctx, 1); - this.state = 1841; + this.state = 2181; this.match(SqlBaseParser.ISOLATION); - this.state = 1842; + this.state = 2182; this.match(SqlBaseParser.LEVEL); - this.state = 1843; + this.state = 2183; this.levelOfIsolation(); break; - case 149: + case 162: localctx = new TransactionAccessModeContext(this, localctx); this.enterOuterAlt(localctx, 2); - this.state = 1844; + this.state = 2184; this.match(SqlBaseParser.READ); - this.state = 1845; + this.state = 2185; localctx.accessMode = this._input.LT(1); _la = this._input.LA(1); - if(!(_la===133 || _la===218)) { + if(!(_la===144 || _la===233)) { localctx.accessMode = this._errHandler.recoverInline(this); } else { @@ -8101,43 +9096,43 @@ export default class SqlBaseParser extends antlr4.Parser { levelOfIsolation() { let localctx = new LevelOfIsolationContext(this, this._ctx, this.state); - this.enterRule(localctx, 136, SqlBaseParser.RULE_levelOfIsolation); + this.enterRule(localctx, 152, SqlBaseParser.RULE_levelOfIsolation); try { - this.state = 1855; + this.state = 2195; this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,236,this._ctx); + var la_ = this._interp.adaptivePredict(this._input,279,this._ctx); switch(la_) { case 1: localctx = new ReadUncommittedContext(this, localctx); this.enterOuterAlt(localctx, 1); - this.state = 1848; + this.state = 2188; this.match(SqlBaseParser.READ); - this.state = 1849; + this.state = 2189; this.match(SqlBaseParser.UNCOMMITTED); break; case 2: localctx = new ReadCommittedContext(this, localctx); this.enterOuterAlt(localctx, 2); - this.state = 1850; + this.state = 2190; this.match(SqlBaseParser.READ); - this.state = 1851; + this.state = 2191; this.match(SqlBaseParser.COMMITTED); break; case 3: localctx = new RepeatableReadContext(this, localctx); this.enterOuterAlt(localctx, 3); - this.state = 1852; + this.state = 2192; this.match(SqlBaseParser.REPEATABLE); - this.state = 1853; + this.state = 2193; this.match(SqlBaseParser.READ); break; case 4: localctx = new SerializableContext(this, localctx); this.enterOuterAlt(localctx, 4); - this.state = 1854; + this.state = 2194; this.match(SqlBaseParser.SERIALIZABLE); break; @@ -8160,27 +9155,27 @@ export default class SqlBaseParser extends antlr4.Parser { callArgument() { let localctx = new CallArgumentContext(this, this._ctx, this.state); - this.enterRule(localctx, 138, SqlBaseParser.RULE_callArgument); + this.enterRule(localctx, 154, SqlBaseParser.RULE_callArgument); try { - this.state = 1862; + this.state = 2202; this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,237,this._ctx); + var la_ = this._interp.adaptivePredict(this._input,280,this._ctx); switch(la_) { case 1: localctx = new PositionalArgumentContext(this, localctx); this.enterOuterAlt(localctx, 1); - this.state = 1857; + this.state = 2197; this.expression(); break; case 2: localctx = new NamedArgumentContext(this, localctx); this.enterOuterAlt(localctx, 2); - this.state = 1858; + this.state = 2198; this.identifier(); - this.state = 1859; + this.state = 2199; this.match(SqlBaseParser.T__8); - this.state = 1860; + this.state = 2200; this.expression(); break; @@ -8203,24 +9198,24 @@ export default class SqlBaseParser extends antlr4.Parser { privilege() { let localctx = new PrivilegeContext(this, this._ctx, this.state); - this.enterRule(localctx, 140, SqlBaseParser.RULE_privilege); + this.enterRule(localctx, 156, SqlBaseParser.RULE_privilege); try { - this.state = 1868; + this.state = 2208; this._errHandler.sync(this); switch(this._input.LA(1)) { - case 172: + case 186: this.enterOuterAlt(localctx, 1); - this.state = 1864; + this.state = 2204; this.match(SqlBaseParser.SELECT); break; - case 50: + case 52: this.enterOuterAlt(localctx, 2); - this.state = 1865; + this.state = 2205; this.match(SqlBaseParser.DELETE); break; - case 93: + case 100: this.enterOuterAlt(localctx, 3); - this.state = 1866; + this.state = 2206; this.match(SqlBaseParser.INSERT); break; case 10: @@ -8232,109 +9227,110 @@ export default class SqlBaseParser extends antlr4.Parser { case 19: case 20: case 21: - case 24: + case 22: case 25: case 26: - case 29: + case 27: case 30: case 31: case 32: case 33: case 34: - case 39: + case 35: + case 38: case 41: - case 45: - case 46: + case 43: case 47: + case 48: case 49: case 51: case 53: case 55: - case 61: - case 64: - case 66: + case 56: + case 57: + case 59: + case 62: + case 63: + case 65: case 68: - case 69: - case 70: case 71: case 73: + case 75: case 76: case 77: case 78: - case 79: case 80: - case 81: + case 83: case 84: + case 85: case 86: case 87: case 88: - case 90: - case 92: + case 91: + case 93: + case 94: case 95: case 97: - case 98: - case 100: - case 101: - case 103: + case 99: + case 102: case 104: case 105: case 107: - case 109: + case 108: + case 110: + case 111: case 112: case 113: case 114: - case 115: case 116: - case 117: - case 119: - case 120: + case 118: case 121: case 122: case 123: case 124: + case 125: + case 126: + case 127: case 128: - case 129: case 130: case 131: + case 132: case 133: case 134: - case 137: + case 135: case 139: case 140: case 141: case 142: - case 143: case 144: - case 146: - case 147: + case 145: case 148: - case 149: + case 150: case 151: case 152: case 153: case 154: case 155: - case 156: case 157: case 158: case 159: case 160: + case 161: case 162: - case 163: case 164: + case 165: case 166: case 167: case 168: case 169: case 170: case 171: + case 172: case 173: case 174: - case 175: case 176: case 177: case 178: - case 179: case 180: case 181: case 182: @@ -8345,32 +9341,46 @@ export default class SqlBaseParser extends antlr4.Parser { case 188: case 189: case 190: + case 191: case 192: case 193: case 194: case 195: + case 196: case 197: case 198: case 199: case 201: case 202: - case 205: + case 203: + case 204: case 206: case 207: + case 208: case 209: case 211: case 212: case 213: - case 217: + case 215: + case 216: case 218: - case 219: case 220: - case 239: - case 240: - case 241: - case 242: + case 221: + case 222: + case 224: + case 226: + case 227: + case 228: + case 232: + case 233: + case 234: + case 235: + case 254: + case 255: + case 256: + case 257: this.enterOuterAlt(localctx, 4); - this.state = 1867; + this.state = 2207; this.identifier(); break; default: @@ -8394,24 +9404,24 @@ export default class SqlBaseParser extends antlr4.Parser { qualifiedName() { let localctx = new QualifiedNameContext(this, this._ctx, this.state); - this.enterRule(localctx, 142, SqlBaseParser.RULE_qualifiedName); + this.enterRule(localctx, 158, SqlBaseParser.RULE_qualifiedName); try { this.enterOuterAlt(localctx, 1); - this.state = 1870; + this.state = 2210; this.identifier(); - this.state = 1875; + this.state = 2215; this._errHandler.sync(this); - var _alt = this._interp.adaptivePredict(this._input,239,this._ctx) + var _alt = this._interp.adaptivePredict(this._input,282,this._ctx) while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) { if(_alt===1) { - this.state = 1871; + this.state = 2211; this.match(SqlBaseParser.T__0); - this.state = 1872; + this.state = 2212; this.identifier(); } - this.state = 1877; + this.state = 2217; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input,239,this._ctx); + _alt = this._interp.adaptivePredict(this._input,282,this._ctx); } } catch (re) { @@ -8432,28 +9442,26 @@ export default class SqlBaseParser extends antlr4.Parser { tableVersionExpression() { let localctx = new TableVersionExpressionContext(this, this._ctx, this.state); - this.enterRule(localctx, 144, SqlBaseParser.RULE_tableVersionExpression); + this.enterRule(localctx, 160, SqlBaseParser.RULE_tableVersionExpression); var _la = 0; try { localctx = new TableVersionContext(this, localctx); this.enterOuterAlt(localctx, 1); - this.state = 1878; + this.state = 2218; this.match(SqlBaseParser.FOR); - this.state = 1879; + this.state = 2219; localctx.tableVersionType = this._input.LT(1); _la = this._input.LA(1); - if(!(((((_la - 184)) & ~0x1f) === 0 && ((1 << (_la - 184)) & 268435971) !== 0))) { + if(!(((((_la - 198)) & ~0x1f) === 0 && ((1 << (_la - 198)) & 536871427) !== 0))) { localctx.tableVersionType = this._errHandler.recoverInline(this); } else { this._errHandler.reportMatch(this); this.consume(); } - this.state = 1880; - this.match(SqlBaseParser.AS); - this.state = 1881; - this.match(SqlBaseParser.OF); - this.state = 1882; + this.state = 2220; + this.tableVersionState(); + this.state = 2221; this.valueExpression(0); } catch (re) { if(re instanceof antlr4.error.RecognitionException) { @@ -8471,32 +9479,72 @@ export default class SqlBaseParser extends antlr4.Parser { + tableVersionState() { + let localctx = new TableVersionStateContext(this, this._ctx, this.state); + this.enterRule(localctx, 162, SqlBaseParser.RULE_tableVersionState); + try { + this.state = 2226; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 18: + localctx = new TableversionasofContext(this, localctx); + this.enterOuterAlt(localctx, 1); + this.state = 2223; + this.match(SqlBaseParser.AS); + this.state = 2224; + this.match(SqlBaseParser.OF); + break; + case 21: + localctx = new TableversionbeforeContext(this, localctx); + this.enterOuterAlt(localctx, 2); + this.state = 2225; + this.match(SqlBaseParser.BEFORE); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + grantor() { let localctx = new GrantorContext(this, this._ctx, this.state); - this.enterRule(localctx, 146, SqlBaseParser.RULE_grantor); + this.enterRule(localctx, 164, SqlBaseParser.RULE_grantor); try { - this.state = 1887; + this.state = 2231; this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,240,this._ctx); + var la_ = this._interp.adaptivePredict(this._input,284,this._ctx); switch(la_) { case 1: localctx = new CurrentUserGrantorContext(this, localctx); this.enterOuterAlt(localctx, 1); - this.state = 1884; + this.state = 2228; this.match(SqlBaseParser.CURRENT_USER); break; case 2: localctx = new CurrentRoleGrantorContext(this, localctx); this.enterOuterAlt(localctx, 2); - this.state = 1885; + this.state = 2229; this.match(SqlBaseParser.CURRENT_ROLE); break; case 3: localctx = new SpecifiedPrincipalContext(this, localctx); this.enterOuterAlt(localctx, 3); - this.state = 1886; + this.state = 2230; this.principal(); break; @@ -8519,34 +9567,34 @@ export default class SqlBaseParser extends antlr4.Parser { principal() { let localctx = new PrincipalContext(this, this._ctx, this.state); - this.enterRule(localctx, 148, SqlBaseParser.RULE_principal); + this.enterRule(localctx, 166, SqlBaseParser.RULE_principal); try { - this.state = 1894; + this.state = 2238; this._errHandler.sync(this); - var la_ = this._interp.adaptivePredict(this._input,241,this._ctx); + var la_ = this._interp.adaptivePredict(this._input,285,this._ctx); switch(la_) { case 1: localctx = new UserPrincipalContext(this, localctx); this.enterOuterAlt(localctx, 1); - this.state = 1889; + this.state = 2233; this.match(SqlBaseParser.USER); - this.state = 1890; + this.state = 2234; this.identifier(); break; case 2: localctx = new RolePrincipalContext(this, localctx); this.enterOuterAlt(localctx, 2); - this.state = 1891; + this.state = 2235; this.match(SqlBaseParser.ROLE); - this.state = 1892; + this.state = 2236; this.identifier(); break; case 3: localctx = new UnspecifiedPrincipalContext(this, localctx); this.enterOuterAlt(localctx, 3); - this.state = 1893; + this.state = 2237; this.identifier(); break; @@ -8569,21 +9617,21 @@ export default class SqlBaseParser extends antlr4.Parser { roles() { let localctx = new RolesContext(this, this._ctx, this.state); - this.enterRule(localctx, 150, SqlBaseParser.RULE_roles); + this.enterRule(localctx, 168, SqlBaseParser.RULE_roles); var _la = 0; try { this.enterOuterAlt(localctx, 1); - this.state = 1896; + this.state = 2240; this.identifier(); - this.state = 1901; + this.state = 2245; this._errHandler.sync(this); _la = this._input.LA(1); while(_la===4) { - this.state = 1897; + this.state = 2241; this.match(SqlBaseParser.T__3); - this.state = 1898; + this.state = 2242; this.identifier(); - this.state = 1903; + this.state = 2247; this._errHandler.sync(this); _la = this._input.LA(1); } @@ -8605,21 +9653,21 @@ export default class SqlBaseParser extends antlr4.Parser { identifier() { let localctx = new IdentifierContext(this, this._ctx, this.state); - this.enterRule(localctx, 152, SqlBaseParser.RULE_identifier); + this.enterRule(localctx, 170, SqlBaseParser.RULE_identifier); try { - this.state = 1909; + this.state = 2253; this._errHandler.sync(this); switch(this._input.LA(1)) { - case 239: + case 254: localctx = new UnquotedIdentifierContext(this, localctx); this.enterOuterAlt(localctx, 1); - this.state = 1904; + this.state = 2248; this.match(SqlBaseParser.IDENTIFIER); break; - case 241: + case 256: localctx = new QuotedIdentifierContext(this, localctx); this.enterOuterAlt(localctx, 2); - this.state = 1905; + this.state = 2249; this.match(SqlBaseParser.QUOTED_IDENTIFIER); break; case 10: @@ -8631,109 +9679,110 @@ export default class SqlBaseParser extends antlr4.Parser { case 19: case 20: case 21: - case 24: + case 22: case 25: case 26: - case 29: + case 27: case 30: case 31: case 32: case 33: case 34: - case 39: + case 35: + case 38: case 41: - case 45: - case 46: + case 43: case 47: + case 48: case 49: case 51: case 53: case 55: - case 61: - case 64: - case 66: + case 56: + case 57: + case 59: + case 62: + case 63: + case 65: case 68: - case 69: - case 70: case 71: case 73: + case 75: case 76: case 77: case 78: - case 79: case 80: - case 81: + case 83: case 84: + case 85: case 86: case 87: case 88: - case 90: - case 92: + case 91: + case 93: + case 94: case 95: case 97: - case 98: - case 100: - case 101: - case 103: + case 99: + case 102: case 104: case 105: case 107: - case 109: + case 108: + case 110: + case 111: case 112: case 113: case 114: - case 115: case 116: - case 117: - case 119: - case 120: + case 118: case 121: case 122: case 123: case 124: + case 125: + case 126: + case 127: case 128: - case 129: case 130: case 131: + case 132: case 133: case 134: - case 137: + case 135: case 139: case 140: case 141: case 142: - case 143: case 144: - case 146: - case 147: + case 145: case 148: - case 149: + case 150: case 151: case 152: case 153: case 154: case 155: - case 156: case 157: case 158: case 159: case 160: + case 161: case 162: - case 163: case 164: + case 165: case 166: case 167: case 168: case 169: case 170: case 171: + case 172: case 173: case 174: - case 175: case 176: case 177: case 178: - case 179: case 180: case 181: case 182: @@ -8744,41 +9793,55 @@ export default class SqlBaseParser extends antlr4.Parser { case 188: case 189: case 190: + case 191: case 192: case 193: case 194: case 195: + case 196: case 197: case 198: case 199: case 201: case 202: - case 205: + case 203: + case 204: case 206: case 207: + case 208: case 209: case 211: case 212: case 213: - case 217: + case 215: + case 216: case 218: - case 219: case 220: + case 221: + case 222: + case 224: + case 226: + case 227: + case 228: + case 232: + case 233: + case 234: + case 235: localctx = new UnquotedIdentifierContext(this, localctx); this.enterOuterAlt(localctx, 3); - this.state = 1906; + this.state = 2250; this.nonReserved(); break; - case 242: + case 257: localctx = new BackQuotedIdentifierContext(this, localctx); this.enterOuterAlt(localctx, 4); - this.state = 1907; + this.state = 2251; this.match(SqlBaseParser.BACKQUOTED_IDENTIFIER); break; - case 240: + case 255: localctx = new DigitIdentifierContext(this, localctx); this.enterOuterAlt(localctx, 5); - this.state = 1908; + this.state = 2252; this.match(SqlBaseParser.DIGIT_IDENTIFIER); break; default: @@ -8802,27 +9865,27 @@ export default class SqlBaseParser extends antlr4.Parser { number() { let localctx = new NumberContext(this, this._ctx, this.state); - this.enterRule(localctx, 154, SqlBaseParser.RULE_number); + this.enterRule(localctx, 172, SqlBaseParser.RULE_number); try { - this.state = 1914; + this.state = 2258; this._errHandler.sync(this); switch(this._input.LA(1)) { - case 237: + case 252: localctx = new DecimalLiteralContext(this, localctx); this.enterOuterAlt(localctx, 1); - this.state = 1911; + this.state = 2255; this.match(SqlBaseParser.DECIMAL_VALUE); break; - case 238: + case 253: localctx = new DoubleLiteralContext(this, localctx); this.enterOuterAlt(localctx, 2); - this.state = 1912; + this.state = 2256; this.match(SqlBaseParser.DOUBLE_VALUE); break; - case 236: + case 251: localctx = new IntegerLiteralContext(this, localctx); this.enterOuterAlt(localctx, 3); - this.state = 1913; + this.state = 2257; this.match(SqlBaseParser.INTEGER_VALUE); break; default: @@ -8844,20 +9907,26 @@ export default class SqlBaseParser extends antlr4.Parser { - nonReserved() { - let localctx = new NonReservedContext(this, this._ctx, this.state); - this.enterRule(localctx, 156, SqlBaseParser.RULE_nonReserved); - var _la = 0; + constraintSpecification() { + let localctx = new ConstraintSpecificationContext(this, this._ctx, this.state); + this.enterRule(localctx, 174, SqlBaseParser.RULE_constraintSpecification); try { - this.enterOuterAlt(localctx, 1); - this.state = 1916; - _la = this._input.LA(1); - if(!((((_la) & ~0x1f) === 0 && ((1 << _la) & 3879427072) !== 0) || ((((_la - 32)) & ~0x1f) === 0 && ((1 << (_la - 32)) & 548070023) !== 0) || ((((_la - 64)) & ~0x1f) === 0 && ((1 << (_la - 64)) & 2513695477) !== 0) || ((((_la - 97)) & ~0x1f) === 0 && ((1 << (_la - 97)) & 2413794779) !== 0) || ((((_la - 129)) & ~0x1f) === 0 && ((1 << (_la - 129)) & 4292803895) !== 0) || ((((_la - 162)) & ~0x1f) === 0 && ((1 << (_la - 162)) & 3741318135) !== 0) || ((((_la - 194)) & ~0x1f) === 0 && ((1 << (_la - 194)) & 126794171) !== 0))) { - this._errHandler.recoverInline(this); - } - else { - this._errHandler.reportMatch(this); - this.consume(); + this.state = 2262; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 36: + this.enterOuterAlt(localctx, 1); + this.state = 2260; + this.namedConstraintSpecification(); + break; + case 157: + case 218: + this.enterOuterAlt(localctx, 2); + this.state = 2261; + this.unnamedConstraintSpecification(); + break; + default: + throw new antlr4.error.NoViableAltException(this); } } catch (re) { if(re instanceof antlr4.error.RecognitionException) { @@ -8874,588 +9943,2161 @@ export default class SqlBaseParser extends antlr4.Parser { } -} - -SqlBaseParser.EOF = antlr4.Token.EOF; -SqlBaseParser.T__0 = 1; -SqlBaseParser.T__1 = 2; -SqlBaseParser.T__2 = 3; -SqlBaseParser.T__3 = 4; -SqlBaseParser.T__4 = 5; -SqlBaseParser.T__5 = 6; -SqlBaseParser.T__6 = 7; -SqlBaseParser.T__7 = 8; -SqlBaseParser.T__8 = 9; -SqlBaseParser.ADD = 10; -SqlBaseParser.ADMIN = 11; -SqlBaseParser.ALL = 12; -SqlBaseParser.ALTER = 13; -SqlBaseParser.ANALYZE = 14; -SqlBaseParser.AND = 15; -SqlBaseParser.ANY = 16; -SqlBaseParser.ARRAY = 17; -SqlBaseParser.AS = 18; -SqlBaseParser.ASC = 19; -SqlBaseParser.AT = 20; -SqlBaseParser.BERNOULLI = 21; -SqlBaseParser.BETWEEN = 22; -SqlBaseParser.BY = 23; -SqlBaseParser.CALL = 24; -SqlBaseParser.CALLED = 25; -SqlBaseParser.CASCADE = 26; -SqlBaseParser.CASE = 27; -SqlBaseParser.CAST = 28; -SqlBaseParser.CATALOGS = 29; -SqlBaseParser.COLUMN = 30; -SqlBaseParser.COLUMNS = 31; -SqlBaseParser.COMMENT = 32; -SqlBaseParser.COMMIT = 33; -SqlBaseParser.COMMITTED = 34; -SqlBaseParser.CONSTRAINT = 35; -SqlBaseParser.CREATE = 36; -SqlBaseParser.CROSS = 37; -SqlBaseParser.CUBE = 38; -SqlBaseParser.CURRENT = 39; -SqlBaseParser.CURRENT_DATE = 40; -SqlBaseParser.CURRENT_ROLE = 41; -SqlBaseParser.CURRENT_TIME = 42; -SqlBaseParser.CURRENT_TIMESTAMP = 43; -SqlBaseParser.CURRENT_USER = 44; -SqlBaseParser.DATA = 45; -SqlBaseParser.DATE = 46; -SqlBaseParser.DAY = 47; -SqlBaseParser.DEALLOCATE = 48; -SqlBaseParser.DEFINER = 49; -SqlBaseParser.DELETE = 50; -SqlBaseParser.DESC = 51; -SqlBaseParser.DESCRIBE = 52; -SqlBaseParser.DETERMINISTIC = 53; -SqlBaseParser.DISTINCT = 54; -SqlBaseParser.DISTRIBUTED = 55; -SqlBaseParser.DROP = 56; -SqlBaseParser.ELSE = 57; -SqlBaseParser.END = 58; -SqlBaseParser.ESCAPE = 59; -SqlBaseParser.EXCEPT = 60; -SqlBaseParser.EXCLUDING = 61; -SqlBaseParser.EXECUTE = 62; -SqlBaseParser.EXISTS = 63; -SqlBaseParser.EXPLAIN = 64; -SqlBaseParser.EXTRACT = 65; -SqlBaseParser.EXTERNAL = 66; -SqlBaseParser.FALSE = 67; -SqlBaseParser.FETCH = 68; -SqlBaseParser.FILTER = 69; -SqlBaseParser.FIRST = 70; -SqlBaseParser.FOLLOWING = 71; -SqlBaseParser.FOR = 72; -SqlBaseParser.FORMAT = 73; -SqlBaseParser.FROM = 74; -SqlBaseParser.FULL = 75; -SqlBaseParser.FUNCTION = 76; -SqlBaseParser.FUNCTIONS = 77; -SqlBaseParser.GRANT = 78; -SqlBaseParser.GRANTED = 79; -SqlBaseParser.GRANTS = 80; -SqlBaseParser.GRAPHVIZ = 81; -SqlBaseParser.GROUP = 82; -SqlBaseParser.GROUPING = 83; -SqlBaseParser.GROUPS = 84; -SqlBaseParser.HAVING = 85; -SqlBaseParser.HOUR = 86; -SqlBaseParser.IF = 87; -SqlBaseParser.IGNORE = 88; -SqlBaseParser.IN = 89; -SqlBaseParser.INCLUDING = 90; -SqlBaseParser.INNER = 91; -SqlBaseParser.INPUT = 92; -SqlBaseParser.INSERT = 93; -SqlBaseParser.INTERSECT = 94; -SqlBaseParser.INTERVAL = 95; -SqlBaseParser.INTO = 96; -SqlBaseParser.INVOKER = 97; -SqlBaseParser.IO = 98; -SqlBaseParser.IS = 99; -SqlBaseParser.ISOLATION = 100; -SqlBaseParser.JSON = 101; -SqlBaseParser.JOIN = 102; -SqlBaseParser.LANGUAGE = 103; -SqlBaseParser.LAST = 104; -SqlBaseParser.LATERAL = 105; -SqlBaseParser.LEFT = 106; -SqlBaseParser.LEVEL = 107; -SqlBaseParser.LIKE = 108; -SqlBaseParser.LIMIT = 109; -SqlBaseParser.LOCALTIME = 110; -SqlBaseParser.LOCALTIMESTAMP = 111; -SqlBaseParser.LOGICAL = 112; -SqlBaseParser.MAP = 113; -SqlBaseParser.MATERIALIZED = 114; -SqlBaseParser.MINUTE = 115; -SqlBaseParser.MONTH = 116; -SqlBaseParser.NAME = 117; -SqlBaseParser.NATURAL = 118; -SqlBaseParser.NFC = 119; -SqlBaseParser.NFD = 120; -SqlBaseParser.NFKC = 121; -SqlBaseParser.NFKD = 122; -SqlBaseParser.NO = 123; -SqlBaseParser.NONE = 124; -SqlBaseParser.NORMALIZE = 125; -SqlBaseParser.NOT = 126; -SqlBaseParser.NULL = 127; -SqlBaseParser.NULLIF = 128; -SqlBaseParser.NULLS = 129; -SqlBaseParser.OF = 130; -SqlBaseParser.OFFSET = 131; -SqlBaseParser.ON = 132; -SqlBaseParser.ONLY = 133; -SqlBaseParser.OPTION = 134; -SqlBaseParser.OR = 135; -SqlBaseParser.ORDER = 136; -SqlBaseParser.ORDINALITY = 137; -SqlBaseParser.OUTER = 138; -SqlBaseParser.OUTPUT = 139; -SqlBaseParser.OVER = 140; -SqlBaseParser.PARTITION = 141; -SqlBaseParser.PARTITIONS = 142; -SqlBaseParser.POSITION = 143; -SqlBaseParser.PRECEDING = 144; -SqlBaseParser.PREPARE = 145; -SqlBaseParser.PRIVILEGES = 146; -SqlBaseParser.PROPERTIES = 147; -SqlBaseParser.RANGE = 148; -SqlBaseParser.READ = 149; -SqlBaseParser.RECURSIVE = 150; -SqlBaseParser.REFRESH = 151; -SqlBaseParser.RENAME = 152; -SqlBaseParser.REPEATABLE = 153; -SqlBaseParser.REPLACE = 154; -SqlBaseParser.RESET = 155; -SqlBaseParser.RESPECT = 156; -SqlBaseParser.RESTRICT = 157; -SqlBaseParser.RETURN = 158; -SqlBaseParser.RETURNS = 159; -SqlBaseParser.REVOKE = 160; -SqlBaseParser.RIGHT = 161; -SqlBaseParser.ROLE = 162; -SqlBaseParser.ROLES = 163; -SqlBaseParser.ROLLBACK = 164; -SqlBaseParser.ROLLUP = 165; -SqlBaseParser.ROW = 166; -SqlBaseParser.ROWS = 167; -SqlBaseParser.SCHEMA = 168; -SqlBaseParser.SCHEMAS = 169; -SqlBaseParser.SECOND = 170; -SqlBaseParser.SECURITY = 171; -SqlBaseParser.SELECT = 172; -SqlBaseParser.SERIALIZABLE = 173; -SqlBaseParser.SESSION = 174; -SqlBaseParser.SET = 175; -SqlBaseParser.SETS = 176; -SqlBaseParser.SHOW = 177; -SqlBaseParser.SOME = 178; -SqlBaseParser.SQL = 179; -SqlBaseParser.START = 180; -SqlBaseParser.STATS = 181; -SqlBaseParser.SUBSTRING = 182; -SqlBaseParser.SYSTEM = 183; -SqlBaseParser.SYSTEM_TIME = 184; -SqlBaseParser.SYSTEM_VERSION = 185; -SqlBaseParser.TABLE = 186; -SqlBaseParser.TABLES = 187; -SqlBaseParser.TABLESAMPLE = 188; -SqlBaseParser.TEMPORARY = 189; -SqlBaseParser.TEXT = 190; -SqlBaseParser.THEN = 191; -SqlBaseParser.TIME = 192; -SqlBaseParser.TIMESTAMP = 193; -SqlBaseParser.TO = 194; -SqlBaseParser.TRANSACTION = 195; -SqlBaseParser.TRUE = 196; -SqlBaseParser.TRUNCATE = 197; -SqlBaseParser.TRY_CAST = 198; -SqlBaseParser.TYPE = 199; -SqlBaseParser.UESCAPE = 200; -SqlBaseParser.UNBOUNDED = 201; -SqlBaseParser.UNCOMMITTED = 202; -SqlBaseParser.UNION = 203; -SqlBaseParser.UNNEST = 204; -SqlBaseParser.UPDATE = 205; -SqlBaseParser.USE = 206; -SqlBaseParser.USER = 207; -SqlBaseParser.USING = 208; -SqlBaseParser.VALIDATE = 209; -SqlBaseParser.VALUES = 210; -SqlBaseParser.VERBOSE = 211; -SqlBaseParser.VERSION = 212; -SqlBaseParser.VIEW = 213; -SqlBaseParser.WHEN = 214; -SqlBaseParser.WHERE = 215; -SqlBaseParser.WITH = 216; -SqlBaseParser.WORK = 217; -SqlBaseParser.WRITE = 218; -SqlBaseParser.YEAR = 219; -SqlBaseParser.ZONE = 220; -SqlBaseParser.EQ = 221; -SqlBaseParser.NEQ = 222; -SqlBaseParser.LT = 223; -SqlBaseParser.LTE = 224; -SqlBaseParser.GT = 225; -SqlBaseParser.GTE = 226; -SqlBaseParser.PLUS = 227; -SqlBaseParser.MINUS = 228; -SqlBaseParser.ASTERISK = 229; -SqlBaseParser.SLASH = 230; -SqlBaseParser.PERCENT = 231; -SqlBaseParser.CONCAT = 232; -SqlBaseParser.STRING = 233; -SqlBaseParser.UNICODE_STRING = 234; -SqlBaseParser.BINARY_LITERAL = 235; -SqlBaseParser.INTEGER_VALUE = 236; -SqlBaseParser.DECIMAL_VALUE = 237; -SqlBaseParser.DOUBLE_VALUE = 238; -SqlBaseParser.IDENTIFIER = 239; -SqlBaseParser.DIGIT_IDENTIFIER = 240; -SqlBaseParser.QUOTED_IDENTIFIER = 241; -SqlBaseParser.BACKQUOTED_IDENTIFIER = 242; -SqlBaseParser.TIME_WITH_TIME_ZONE = 243; -SqlBaseParser.TIMESTAMP_WITH_TIME_ZONE = 244; -SqlBaseParser.DOUBLE_PRECISION = 245; -SqlBaseParser.SIMPLE_COMMENT = 246; -SqlBaseParser.BRACKETED_COMMENT = 247; -SqlBaseParser.WS = 248; -SqlBaseParser.UNRECOGNIZED = 249; -SqlBaseParser.DELIMITER = 250; -SqlBaseParser.RULE_singleStatement = 0; -SqlBaseParser.RULE_standaloneExpression = 1; -SqlBaseParser.RULE_standaloneRoutineBody = 2; -SqlBaseParser.RULE_statement = 3; -SqlBaseParser.RULE_query = 4; -SqlBaseParser.RULE_with = 5; -SqlBaseParser.RULE_tableElement = 6; -SqlBaseParser.RULE_columnDefinition = 7; -SqlBaseParser.RULE_likeClause = 8; -SqlBaseParser.RULE_properties = 9; -SqlBaseParser.RULE_property = 10; -SqlBaseParser.RULE_sqlParameterDeclaration = 11; -SqlBaseParser.RULE_routineCharacteristics = 12; -SqlBaseParser.RULE_routineCharacteristic = 13; -SqlBaseParser.RULE_alterRoutineCharacteristics = 14; -SqlBaseParser.RULE_alterRoutineCharacteristic = 15; -SqlBaseParser.RULE_routineBody = 16; -SqlBaseParser.RULE_returnStatement = 17; -SqlBaseParser.RULE_externalBodyReference = 18; -SqlBaseParser.RULE_language = 19; -SqlBaseParser.RULE_determinism = 20; -SqlBaseParser.RULE_nullCallClause = 21; -SqlBaseParser.RULE_externalRoutineName = 22; -SqlBaseParser.RULE_queryNoWith = 23; -SqlBaseParser.RULE_queryTerm = 24; -SqlBaseParser.RULE_queryPrimary = 25; -SqlBaseParser.RULE_sortItem = 26; -SqlBaseParser.RULE_querySpecification = 27; -SqlBaseParser.RULE_groupBy = 28; -SqlBaseParser.RULE_groupingElement = 29; -SqlBaseParser.RULE_groupingSet = 30; -SqlBaseParser.RULE_namedQuery = 31; -SqlBaseParser.RULE_setQuantifier = 32; -SqlBaseParser.RULE_selectItem = 33; -SqlBaseParser.RULE_relation = 34; -SqlBaseParser.RULE_joinType = 35; -SqlBaseParser.RULE_joinCriteria = 36; -SqlBaseParser.RULE_sampledRelation = 37; -SqlBaseParser.RULE_sampleType = 38; -SqlBaseParser.RULE_aliasedRelation = 39; -SqlBaseParser.RULE_columnAliases = 40; -SqlBaseParser.RULE_relationPrimary = 41; -SqlBaseParser.RULE_expression = 42; -SqlBaseParser.RULE_booleanExpression = 43; -SqlBaseParser.RULE_predicate = 44; -SqlBaseParser.RULE_valueExpression = 45; -SqlBaseParser.RULE_primaryExpression = 46; -SqlBaseParser.RULE_string = 47; -SqlBaseParser.RULE_nullTreatment = 48; -SqlBaseParser.RULE_timeZoneSpecifier = 49; -SqlBaseParser.RULE_comparisonOperator = 50; -SqlBaseParser.RULE_comparisonQuantifier = 51; -SqlBaseParser.RULE_booleanValue = 52; -SqlBaseParser.RULE_interval = 53; -SqlBaseParser.RULE_intervalField = 54; -SqlBaseParser.RULE_normalForm = 55; -SqlBaseParser.RULE_types = 56; -SqlBaseParser.RULE_type = 57; -SqlBaseParser.RULE_typeParameter = 58; -SqlBaseParser.RULE_baseType = 59; -SqlBaseParser.RULE_whenClause = 60; -SqlBaseParser.RULE_filter = 61; -SqlBaseParser.RULE_over = 62; -SqlBaseParser.RULE_windowFrame = 63; -SqlBaseParser.RULE_frameBound = 64; -SqlBaseParser.RULE_updateAssignment = 65; -SqlBaseParser.RULE_explainOption = 66; -SqlBaseParser.RULE_transactionMode = 67; -SqlBaseParser.RULE_levelOfIsolation = 68; -SqlBaseParser.RULE_callArgument = 69; -SqlBaseParser.RULE_privilege = 70; -SqlBaseParser.RULE_qualifiedName = 71; -SqlBaseParser.RULE_tableVersionExpression = 72; -SqlBaseParser.RULE_grantor = 73; -SqlBaseParser.RULE_principal = 74; -SqlBaseParser.RULE_roles = 75; -SqlBaseParser.RULE_identifier = 76; -SqlBaseParser.RULE_number = 77; -SqlBaseParser.RULE_nonReserved = 78; + namedConstraintSpecification() { + let localctx = new NamedConstraintSpecificationContext(this, this._ctx, this.state); + this.enterRule(localctx, 176, SqlBaseParser.RULE_namedConstraintSpecification); + try { + this.enterOuterAlt(localctx, 1); + this.state = 2264; + this.match(SqlBaseParser.CONSTRAINT); + this.state = 2265; + localctx.name = this.identifier(); + this.state = 2266; + this.unnamedConstraintSpecification(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } -class SingleStatementContext extends antlr4.ParserRuleContext { - constructor(parser, parent, invokingState) { - if(parent===undefined) { - parent = null; - } - if(invokingState===undefined || invokingState===null) { - invokingState = -1; - } - super(parent, invokingState); - this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_singleStatement; - } - statement() { + unnamedConstraintSpecification() { + let localctx = new UnnamedConstraintSpecificationContext(this, this._ctx, this.state); + this.enterRule(localctx, 178, SqlBaseParser.RULE_unnamedConstraintSpecification); + try { + this.enterOuterAlt(localctx, 1); + this.state = 2268; + this.constraintType(); + this.state = 2269; + this.columnAliases(); + this.state = 2271; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,290,this._ctx); + if(la_===1) { + this.state = 2270; + this.constraintQualifiers(); + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + constraintType() { + let localctx = new ConstraintTypeContext(this, this._ctx, this.state); + this.enterRule(localctx, 180, SqlBaseParser.RULE_constraintType); + try { + this.state = 2276; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 218: + this.enterOuterAlt(localctx, 1); + this.state = 2273; + this.match(SqlBaseParser.UNIQUE); + break; + case 157: + this.enterOuterAlt(localctx, 2); + this.state = 2274; + this.match(SqlBaseParser.PRIMARY); + this.state = 2275; + this.match(SqlBaseParser.KEY); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + constraintQualifiers() { + let localctx = new ConstraintQualifiersContext(this, this._ctx, this.state); + this.enterRule(localctx, 182, SqlBaseParser.RULE_constraintQualifiers); + var _la = 0; + try { + this.enterOuterAlt(localctx, 1); + this.state = 2281; + this._errHandler.sync(this); + _la = this._input.LA(1); + while(((((_la - 57)) & ~0x1f) === 0 && ((1 << (_la - 57)) & 321) !== 0) || _la===137 || _la===165) { + this.state = 2278; + this.constraintQualifier(); + this.state = 2283; + this._errHandler.sync(this); + _la = this._input.LA(1); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + constraintQualifier() { + let localctx = new ConstraintQualifierContext(this, this._ctx, this.state); + this.enterRule(localctx, 184, SqlBaseParser.RULE_constraintQualifier); + try { + this.state = 2287; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,293,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 2284; + this.constraintEnabled(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 2285; + this.constraintRely(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 2286; + this.constraintEnforced(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + constraintRely() { + let localctx = new ConstraintRelyContext(this, this._ctx, this.state); + this.enterRule(localctx, 186, SqlBaseParser.RULE_constraintRely); + try { + this.state = 2292; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 165: + this.enterOuterAlt(localctx, 1); + this.state = 2289; + this.match(SqlBaseParser.RELY); + break; + case 137: + this.enterOuterAlt(localctx, 2); + this.state = 2290; + this.match(SqlBaseParser.NOT); + this.state = 2291; + this.match(SqlBaseParser.RELY); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + constraintEnabled() { + let localctx = new ConstraintEnabledContext(this, this._ctx, this.state); + this.enterRule(localctx, 188, SqlBaseParser.RULE_constraintEnabled); + var _la = 0; + try { + this.enterOuterAlt(localctx, 1); + this.state = 2294; + _la = this._input.LA(1); + if(!(_la===57 || _la===63)) { + this._errHandler.recoverInline(this); + } + else { + this._errHandler.reportMatch(this); + this.consume(); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + constraintEnforced() { + let localctx = new ConstraintEnforcedContext(this, this._ctx, this.state); + this.enterRule(localctx, 190, SqlBaseParser.RULE_constraintEnforced); + try { + this.state = 2299; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 65: + this.enterOuterAlt(localctx, 1); + this.state = 2296; + this.match(SqlBaseParser.ENFORCED); + break; + case 137: + this.enterOuterAlt(localctx, 2); + this.state = 2297; + this.match(SqlBaseParser.NOT); + this.state = 2298; + this.match(SqlBaseParser.ENFORCED); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + nonReserved() { + let localctx = new NonReservedContext(this, this._ctx, this.state); + this.enterRule(localctx, 192, SqlBaseParser.RULE_nonReserved); + var _la = 0; + try { + this.enterOuterAlt(localctx, 1); + this.state = 2301; + _la = this._input.LA(1); + if(!((((_la) & ~0x1f) === 0 && ((1 << _la) & 3464190976) !== 0) || ((((_la - 32)) & ~0x1f) === 0 && ((1 << (_la - 32)) & 3417016911) !== 0) || ((((_la - 65)) & ~0x1f) === 0 && ((1 << (_la - 65)) & 1962720585) !== 0) || ((((_la - 97)) & ~0x1f) === 0 && ((1 << (_la - 97)) & 4281068965) !== 0) || ((((_la - 130)) & ~0x1f) === 0 && ((1 << (_la - 130)) & 4227128895) !== 0) || ((((_la - 162)) & ~0x1f) === 0 && ((1 << (_la - 162)) & 4278050813) !== 0) || ((((_la - 194)) & ~0x1f) === 0 && ((1 << (_la - 194)) & 1567553471) !== 0) || ((((_la - 226)) & ~0x1f) === 0 && ((1 << (_la - 226)) & 967) !== 0))) { + this._errHandler.recoverInline(this); + } + else { + this._errHandler.reportMatch(this); + this.consume(); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + +} + +SqlBaseParser.EOF = antlr4.Token.EOF; +SqlBaseParser.T__0 = 1; +SqlBaseParser.T__1 = 2; +SqlBaseParser.T__2 = 3; +SqlBaseParser.T__3 = 4; +SqlBaseParser.T__4 = 5; +SqlBaseParser.T__5 = 6; +SqlBaseParser.T__6 = 7; +SqlBaseParser.T__7 = 8; +SqlBaseParser.T__8 = 9; +SqlBaseParser.ADD = 10; +SqlBaseParser.ADMIN = 11; +SqlBaseParser.ALL = 12; +SqlBaseParser.ALTER = 13; +SqlBaseParser.ANALYZE = 14; +SqlBaseParser.AND = 15; +SqlBaseParser.ANY = 16; +SqlBaseParser.ARRAY = 17; +SqlBaseParser.AS = 18; +SqlBaseParser.ASC = 19; +SqlBaseParser.AT = 20; +SqlBaseParser.BEFORE = 21; +SqlBaseParser.BERNOULLI = 22; +SqlBaseParser.BETWEEN = 23; +SqlBaseParser.BY = 24; +SqlBaseParser.CALL = 25; +SqlBaseParser.CALLED = 26; +SqlBaseParser.CASCADE = 27; +SqlBaseParser.CASE = 28; +SqlBaseParser.CAST = 29; +SqlBaseParser.CATALOGS = 30; +SqlBaseParser.COLUMN = 31; +SqlBaseParser.COLUMNS = 32; +SqlBaseParser.COMMENT = 33; +SqlBaseParser.COMMIT = 34; +SqlBaseParser.COMMITTED = 35; +SqlBaseParser.CONSTRAINT = 36; +SqlBaseParser.CREATE = 37; +SqlBaseParser.COPARTITION = 38; +SqlBaseParser.CROSS = 39; +SqlBaseParser.CUBE = 40; +SqlBaseParser.CURRENT = 41; +SqlBaseParser.CURRENT_DATE = 42; +SqlBaseParser.CURRENT_ROLE = 43; +SqlBaseParser.CURRENT_TIME = 44; +SqlBaseParser.CURRENT_TIMESTAMP = 45; +SqlBaseParser.CURRENT_USER = 46; +SqlBaseParser.DATA = 47; +SqlBaseParser.DATE = 48; +SqlBaseParser.DAY = 49; +SqlBaseParser.DEALLOCATE = 50; +SqlBaseParser.DEFINER = 51; +SqlBaseParser.DELETE = 52; +SqlBaseParser.DESC = 53; +SqlBaseParser.DESCRIBE = 54; +SqlBaseParser.DESCRIPTOR = 55; +SqlBaseParser.DETERMINISTIC = 56; +SqlBaseParser.DISABLED = 57; +SqlBaseParser.DISTINCT = 58; +SqlBaseParser.DISTRIBUTED = 59; +SqlBaseParser.DROP = 60; +SqlBaseParser.ELSE = 61; +SqlBaseParser.EMPTY = 62; +SqlBaseParser.ENABLED = 63; +SqlBaseParser.END = 64; +SqlBaseParser.ENFORCED = 65; +SqlBaseParser.ESCAPE = 66; +SqlBaseParser.EXCEPT = 67; +SqlBaseParser.EXCLUDING = 68; +SqlBaseParser.EXECUTE = 69; +SqlBaseParser.EXISTS = 70; +SqlBaseParser.EXPLAIN = 71; +SqlBaseParser.EXTRACT = 72; +SqlBaseParser.EXTERNAL = 73; +SqlBaseParser.FALSE = 74; +SqlBaseParser.FETCH = 75; +SqlBaseParser.FILTER = 76; +SqlBaseParser.FIRST = 77; +SqlBaseParser.FOLLOWING = 78; +SqlBaseParser.FOR = 79; +SqlBaseParser.FORMAT = 80; +SqlBaseParser.FROM = 81; +SqlBaseParser.FULL = 82; +SqlBaseParser.FUNCTION = 83; +SqlBaseParser.FUNCTIONS = 84; +SqlBaseParser.GRANT = 85; +SqlBaseParser.GRANTED = 86; +SqlBaseParser.GRANTS = 87; +SqlBaseParser.GRAPHVIZ = 88; +SqlBaseParser.GROUP = 89; +SqlBaseParser.GROUPING = 90; +SqlBaseParser.GROUPS = 91; +SqlBaseParser.HAVING = 92; +SqlBaseParser.HOUR = 93; +SqlBaseParser.IF = 94; +SqlBaseParser.IGNORE = 95; +SqlBaseParser.IN = 96; +SqlBaseParser.INCLUDING = 97; +SqlBaseParser.INNER = 98; +SqlBaseParser.INPUT = 99; +SqlBaseParser.INSERT = 100; +SqlBaseParser.INTERSECT = 101; +SqlBaseParser.INTERVAL = 102; +SqlBaseParser.INTO = 103; +SqlBaseParser.INVOKER = 104; +SqlBaseParser.IO = 105; +SqlBaseParser.IS = 106; +SqlBaseParser.ISOLATION = 107; +SqlBaseParser.JSON = 108; +SqlBaseParser.JOIN = 109; +SqlBaseParser.KEEP = 110; +SqlBaseParser.KEY = 111; +SqlBaseParser.LANGUAGE = 112; +SqlBaseParser.LAST = 113; +SqlBaseParser.LATERAL = 114; +SqlBaseParser.LEFT = 115; +SqlBaseParser.LEVEL = 116; +SqlBaseParser.LIKE = 117; +SqlBaseParser.LIMIT = 118; +SqlBaseParser.LOCALTIME = 119; +SqlBaseParser.LOCALTIMESTAMP = 120; +SqlBaseParser.LOGICAL = 121; +SqlBaseParser.MAP = 122; +SqlBaseParser.MATCHED = 123; +SqlBaseParser.MATERIALIZED = 124; +SqlBaseParser.MERGE = 125; +SqlBaseParser.MINUTE = 126; +SqlBaseParser.MONTH = 127; +SqlBaseParser.NAME = 128; +SqlBaseParser.NATURAL = 129; +SqlBaseParser.NFC = 130; +SqlBaseParser.NFD = 131; +SqlBaseParser.NFKC = 132; +SqlBaseParser.NFKD = 133; +SqlBaseParser.NO = 134; +SqlBaseParser.NONE = 135; +SqlBaseParser.NORMALIZE = 136; +SqlBaseParser.NOT = 137; +SqlBaseParser.NULL = 138; +SqlBaseParser.NULLIF = 139; +SqlBaseParser.NULLS = 140; +SqlBaseParser.OF = 141; +SqlBaseParser.OFFSET = 142; +SqlBaseParser.ON = 143; +SqlBaseParser.ONLY = 144; +SqlBaseParser.OPTION = 145; +SqlBaseParser.OR = 146; +SqlBaseParser.ORDER = 147; +SqlBaseParser.ORDINALITY = 148; +SqlBaseParser.OUTER = 149; +SqlBaseParser.OUTPUT = 150; +SqlBaseParser.OVER = 151; +SqlBaseParser.PARTITION = 152; +SqlBaseParser.PARTITIONS = 153; +SqlBaseParser.POSITION = 154; +SqlBaseParser.PRECEDING = 155; +SqlBaseParser.PREPARE = 156; +SqlBaseParser.PRIMARY = 157; +SqlBaseParser.PRIVILEGES = 158; +SqlBaseParser.PROPERTIES = 159; +SqlBaseParser.PRUNE = 160; +SqlBaseParser.RANGE = 161; +SqlBaseParser.READ = 162; +SqlBaseParser.RECURSIVE = 163; +SqlBaseParser.REFRESH = 164; +SqlBaseParser.RELY = 165; +SqlBaseParser.RENAME = 166; +SqlBaseParser.REPEATABLE = 167; +SqlBaseParser.REPLACE = 168; +SqlBaseParser.RESET = 169; +SqlBaseParser.RESPECT = 170; +SqlBaseParser.RESTRICT = 171; +SqlBaseParser.RETURN = 172; +SqlBaseParser.RETURNS = 173; +SqlBaseParser.REVOKE = 174; +SqlBaseParser.RIGHT = 175; +SqlBaseParser.ROLE = 176; +SqlBaseParser.ROLES = 177; +SqlBaseParser.ROLLBACK = 178; +SqlBaseParser.ROLLUP = 179; +SqlBaseParser.ROW = 180; +SqlBaseParser.ROWS = 181; +SqlBaseParser.SCHEMA = 182; +SqlBaseParser.SCHEMAS = 183; +SqlBaseParser.SECOND = 184; +SqlBaseParser.SECURITY = 185; +SqlBaseParser.SELECT = 186; +SqlBaseParser.SERIALIZABLE = 187; +SqlBaseParser.SESSION = 188; +SqlBaseParser.SET = 189; +SqlBaseParser.SETS = 190; +SqlBaseParser.SHOW = 191; +SqlBaseParser.SOME = 192; +SqlBaseParser.SQL = 193; +SqlBaseParser.START = 194; +SqlBaseParser.STATS = 195; +SqlBaseParser.SUBSTRING = 196; +SqlBaseParser.SYSTEM = 197; +SqlBaseParser.SYSTEM_TIME = 198; +SqlBaseParser.SYSTEM_VERSION = 199; +SqlBaseParser.TABLE = 200; +SqlBaseParser.TABLES = 201; +SqlBaseParser.TABLESAMPLE = 202; +SqlBaseParser.TEMPORARY = 203; +SqlBaseParser.TEXT = 204; +SqlBaseParser.THEN = 205; +SqlBaseParser.TIME = 206; +SqlBaseParser.TIMESTAMP = 207; +SqlBaseParser.TO = 208; +SqlBaseParser.TRANSACTION = 209; +SqlBaseParser.TRUE = 210; +SqlBaseParser.TRUNCATE = 211; +SqlBaseParser.TRY_CAST = 212; +SqlBaseParser.TYPE = 213; +SqlBaseParser.UESCAPE = 214; +SqlBaseParser.UNBOUNDED = 215; +SqlBaseParser.UNCOMMITTED = 216; +SqlBaseParser.UNION = 217; +SqlBaseParser.UNIQUE = 218; +SqlBaseParser.UNNEST = 219; +SqlBaseParser.UPDATE = 220; +SqlBaseParser.USE = 221; +SqlBaseParser.USER = 222; +SqlBaseParser.USING = 223; +SqlBaseParser.VALIDATE = 224; +SqlBaseParser.VALUES = 225; +SqlBaseParser.VERBOSE = 226; +SqlBaseParser.VERSION = 227; +SqlBaseParser.VIEW = 228; +SqlBaseParser.WHEN = 229; +SqlBaseParser.WHERE = 230; +SqlBaseParser.WITH = 231; +SqlBaseParser.WORK = 232; +SqlBaseParser.WRITE = 233; +SqlBaseParser.YEAR = 234; +SqlBaseParser.ZONE = 235; +SqlBaseParser.EQ = 236; +SqlBaseParser.NEQ = 237; +SqlBaseParser.LT = 238; +SqlBaseParser.LTE = 239; +SqlBaseParser.GT = 240; +SqlBaseParser.GTE = 241; +SqlBaseParser.PLUS = 242; +SqlBaseParser.MINUS = 243; +SqlBaseParser.ASTERISK = 244; +SqlBaseParser.SLASH = 245; +SqlBaseParser.PERCENT = 246; +SqlBaseParser.CONCAT = 247; +SqlBaseParser.STRING = 248; +SqlBaseParser.UNICODE_STRING = 249; +SqlBaseParser.BINARY_LITERAL = 250; +SqlBaseParser.INTEGER_VALUE = 251; +SqlBaseParser.DECIMAL_VALUE = 252; +SqlBaseParser.DOUBLE_VALUE = 253; +SqlBaseParser.IDENTIFIER = 254; +SqlBaseParser.DIGIT_IDENTIFIER = 255; +SqlBaseParser.QUOTED_IDENTIFIER = 256; +SqlBaseParser.BACKQUOTED_IDENTIFIER = 257; +SqlBaseParser.TIME_WITH_TIME_ZONE = 258; +SqlBaseParser.TIMESTAMP_WITH_TIME_ZONE = 259; +SqlBaseParser.DOUBLE_PRECISION = 260; +SqlBaseParser.SIMPLE_COMMENT = 261; +SqlBaseParser.BRACKETED_COMMENT = 262; +SqlBaseParser.WS = 263; +SqlBaseParser.UNRECOGNIZED = 264; +SqlBaseParser.DELIMITER = 265; + +SqlBaseParser.RULE_singleStatement = 0; +SqlBaseParser.RULE_standaloneExpression = 1; +SqlBaseParser.RULE_standaloneRoutineBody = 2; +SqlBaseParser.RULE_statement = 3; +SqlBaseParser.RULE_query = 4; +SqlBaseParser.RULE_with = 5; +SqlBaseParser.RULE_tableElement = 6; +SqlBaseParser.RULE_columnDefinition = 7; +SqlBaseParser.RULE_likeClause = 8; +SqlBaseParser.RULE_properties = 9; +SqlBaseParser.RULE_property = 10; +SqlBaseParser.RULE_sqlParameterDeclaration = 11; +SqlBaseParser.RULE_routineCharacteristics = 12; +SqlBaseParser.RULE_routineCharacteristic = 13; +SqlBaseParser.RULE_alterRoutineCharacteristics = 14; +SqlBaseParser.RULE_alterRoutineCharacteristic = 15; +SqlBaseParser.RULE_routineBody = 16; +SqlBaseParser.RULE_returnStatement = 17; +SqlBaseParser.RULE_externalBodyReference = 18; +SqlBaseParser.RULE_language = 19; +SqlBaseParser.RULE_determinism = 20; +SqlBaseParser.RULE_nullCallClause = 21; +SqlBaseParser.RULE_externalRoutineName = 22; +SqlBaseParser.RULE_queryNoWith = 23; +SqlBaseParser.RULE_queryTerm = 24; +SqlBaseParser.RULE_queryPrimary = 25; +SqlBaseParser.RULE_sortItem = 26; +SqlBaseParser.RULE_querySpecification = 27; +SqlBaseParser.RULE_groupBy = 28; +SqlBaseParser.RULE_groupingElement = 29; +SqlBaseParser.RULE_groupingSet = 30; +SqlBaseParser.RULE_namedQuery = 31; +SqlBaseParser.RULE_setQuantifier = 32; +SqlBaseParser.RULE_selectItem = 33; +SqlBaseParser.RULE_relation = 34; +SqlBaseParser.RULE_joinType = 35; +SqlBaseParser.RULE_joinCriteria = 36; +SqlBaseParser.RULE_sampledRelation = 37; +SqlBaseParser.RULE_sampleType = 38; +SqlBaseParser.RULE_aliasedRelation = 39; +SqlBaseParser.RULE_columnAliases = 40; +SqlBaseParser.RULE_relationPrimary = 41; +SqlBaseParser.RULE_expression = 42; +SqlBaseParser.RULE_booleanExpression = 43; +SqlBaseParser.RULE_predicate = 44; +SqlBaseParser.RULE_valueExpression = 45; +SqlBaseParser.RULE_primaryExpression = 46; +SqlBaseParser.RULE_string = 47; +SqlBaseParser.RULE_nullTreatment = 48; +SqlBaseParser.RULE_timeZoneSpecifier = 49; +SqlBaseParser.RULE_comparisonOperator = 50; +SqlBaseParser.RULE_comparisonQuantifier = 51; +SqlBaseParser.RULE_booleanValue = 52; +SqlBaseParser.RULE_interval = 53; +SqlBaseParser.RULE_intervalField = 54; +SqlBaseParser.RULE_normalForm = 55; +SqlBaseParser.RULE_types = 56; +SqlBaseParser.RULE_type = 57; +SqlBaseParser.RULE_tableFunctionCall = 58; +SqlBaseParser.RULE_tableFunctionArgument = 59; +SqlBaseParser.RULE_tableArgument = 60; +SqlBaseParser.RULE_tableArgumentRelation = 61; +SqlBaseParser.RULE_descriptorArgument = 62; +SqlBaseParser.RULE_descriptorField = 63; +SqlBaseParser.RULE_copartitionTables = 64; +SqlBaseParser.RULE_typeParameter = 65; +SqlBaseParser.RULE_baseType = 66; +SqlBaseParser.RULE_whenClause = 67; +SqlBaseParser.RULE_filter = 68; +SqlBaseParser.RULE_mergeCase = 69; +SqlBaseParser.RULE_over = 70; +SqlBaseParser.RULE_windowFrame = 71; +SqlBaseParser.RULE_frameBound = 72; +SqlBaseParser.RULE_updateAssignment = 73; +SqlBaseParser.RULE_explainOption = 74; +SqlBaseParser.RULE_transactionMode = 75; +SqlBaseParser.RULE_levelOfIsolation = 76; +SqlBaseParser.RULE_callArgument = 77; +SqlBaseParser.RULE_privilege = 78; +SqlBaseParser.RULE_qualifiedName = 79; +SqlBaseParser.RULE_tableVersionExpression = 80; +SqlBaseParser.RULE_tableVersionState = 81; +SqlBaseParser.RULE_grantor = 82; +SqlBaseParser.RULE_principal = 83; +SqlBaseParser.RULE_roles = 84; +SqlBaseParser.RULE_identifier = 85; +SqlBaseParser.RULE_number = 86; +SqlBaseParser.RULE_constraintSpecification = 87; +SqlBaseParser.RULE_namedConstraintSpecification = 88; +SqlBaseParser.RULE_unnamedConstraintSpecification = 89; +SqlBaseParser.RULE_constraintType = 90; +SqlBaseParser.RULE_constraintQualifiers = 91; +SqlBaseParser.RULE_constraintQualifier = 92; +SqlBaseParser.RULE_constraintRely = 93; +SqlBaseParser.RULE_constraintEnabled = 94; +SqlBaseParser.RULE_constraintEnforced = 95; +SqlBaseParser.RULE_nonReserved = 96; + +class SingleStatementContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = SqlBaseParser.RULE_singleStatement; + } + + statement() { + return this.getTypedRuleContext(StatementContext,0); + }; + + EOF() { + return this.getToken(SqlBaseParser.EOF, 0); + }; + + enterRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.enterSingleStatement(this); + } + } + + exitRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.exitSingleStatement(this); + } + } + + +} + + + +class StandaloneExpressionContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = SqlBaseParser.RULE_standaloneExpression; + } + + expression() { + return this.getTypedRuleContext(ExpressionContext,0); + }; + + EOF() { + return this.getToken(SqlBaseParser.EOF, 0); + }; + + enterRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.enterStandaloneExpression(this); + } + } + + exitRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.exitStandaloneExpression(this); + } + } + + +} + + + +class StandaloneRoutineBodyContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = SqlBaseParser.RULE_standaloneRoutineBody; + } + + routineBody() { + return this.getTypedRuleContext(RoutineBodyContext,0); + }; + + EOF() { + return this.getToken(SqlBaseParser.EOF, 0); + }; + + enterRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.enterStandaloneRoutineBody(this); + } + } + + exitRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.exitStandaloneRoutineBody(this); + } + } + + +} + + + +class StatementContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = SqlBaseParser.RULE_statement; + } + + + + copyFrom(ctx) { + super.copyFrom(ctx); + } + +} + + +class ExplainContext extends StatementContext { + + constructor(parser, ctx) { + super(parser); + super.copyFrom(ctx); + } + + EXPLAIN() { + return this.getToken(SqlBaseParser.EXPLAIN, 0); + }; + + statement() { + return this.getTypedRuleContext(StatementContext,0); + }; + + ANALYZE() { + return this.getToken(SqlBaseParser.ANALYZE, 0); + }; + + VERBOSE() { + return this.getToken(SqlBaseParser.VERBOSE, 0); + }; + + explainOption = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(ExplainOptionContext); + } else { + return this.getTypedRuleContext(ExplainOptionContext,i); + } + }; + + enterRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.enterExplain(this); + } + } + + exitRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.exitExplain(this); + } + } + + +} + +SqlBaseParser.ExplainContext = ExplainContext; + +class PrepareContext extends StatementContext { + + constructor(parser, ctx) { + super(parser); + super.copyFrom(ctx); + } + + PREPARE() { + return this.getToken(SqlBaseParser.PREPARE, 0); + }; + + identifier() { + return this.getTypedRuleContext(IdentifierContext,0); + }; + + FROM() { + return this.getToken(SqlBaseParser.FROM, 0); + }; + + statement() { return this.getTypedRuleContext(StatementContext,0); }; - EOF() { - return this.getToken(SqlBaseParser.EOF, 0); + enterRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.enterPrepare(this); + } + } + + exitRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.exitPrepare(this); + } + } + + +} + +SqlBaseParser.PrepareContext = PrepareContext; + +class DropMaterializedViewContext extends StatementContext { + + constructor(parser, ctx) { + super(parser); + super.copyFrom(ctx); + } + + DROP() { + return this.getToken(SqlBaseParser.DROP, 0); + }; + + MATERIALIZED() { + return this.getToken(SqlBaseParser.MATERIALIZED, 0); + }; + + VIEW() { + return this.getToken(SqlBaseParser.VIEW, 0); + }; + + qualifiedName() { + return this.getTypedRuleContext(QualifiedNameContext,0); + }; + + IF() { + return this.getToken(SqlBaseParser.IF, 0); + }; + + EXISTS() { + return this.getToken(SqlBaseParser.EXISTS, 0); + }; + + enterRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.enterDropMaterializedView(this); + } + } + + exitRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.exitDropMaterializedView(this); + } + } + + +} + +SqlBaseParser.DropMaterializedViewContext = DropMaterializedViewContext; + +class UseContext extends StatementContext { + + constructor(parser, ctx) { + super(parser); + this.schema = null;; + this.catalog = null;; + super.copyFrom(ctx); + } + + USE() { + return this.getToken(SqlBaseParser.USE, 0); + }; + + identifier = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(IdentifierContext); + } else { + return this.getTypedRuleContext(IdentifierContext,i); + } + }; + + enterRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.enterUse(this); + } + } + + exitRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.exitUse(this); + } + } + + +} + +SqlBaseParser.UseContext = UseContext; + +class AddConstraintContext extends StatementContext { + + constructor(parser, ctx) { + super(parser); + this.tableName = null;; + super.copyFrom(ctx); + } + + ALTER() { + return this.getToken(SqlBaseParser.ALTER, 0); + }; + + TABLE() { + return this.getToken(SqlBaseParser.TABLE, 0); + }; + + ADD() { + return this.getToken(SqlBaseParser.ADD, 0); + }; + + constraintSpecification() { + return this.getTypedRuleContext(ConstraintSpecificationContext,0); + }; + + qualifiedName() { + return this.getTypedRuleContext(QualifiedNameContext,0); + }; + + IF() { + return this.getToken(SqlBaseParser.IF, 0); + }; + + EXISTS() { + return this.getToken(SqlBaseParser.EXISTS, 0); + }; + + enterRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.enterAddConstraint(this); + } + } + + exitRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.exitAddConstraint(this); + } + } + + +} + +SqlBaseParser.AddConstraintContext = AddConstraintContext; + +class DeallocateContext extends StatementContext { + + constructor(parser, ctx) { + super(parser); + super.copyFrom(ctx); + } + + DEALLOCATE() { + return this.getToken(SqlBaseParser.DEALLOCATE, 0); + }; + + PREPARE() { + return this.getToken(SqlBaseParser.PREPARE, 0); + }; + + identifier() { + return this.getTypedRuleContext(IdentifierContext,0); + }; + + enterRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.enterDeallocate(this); + } + } + + exitRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.exitDeallocate(this); + } + } + + +} + +SqlBaseParser.DeallocateContext = DeallocateContext; + +class RenameTableContext extends StatementContext { + + constructor(parser, ctx) { + super(parser); + this.from = null;; + this.to = null;; + super.copyFrom(ctx); + } + + ALTER() { + return this.getToken(SqlBaseParser.ALTER, 0); + }; + + TABLE() { + return this.getToken(SqlBaseParser.TABLE, 0); + }; + + RENAME() { + return this.getToken(SqlBaseParser.RENAME, 0); + }; + + TO() { + return this.getToken(SqlBaseParser.TO, 0); + }; + + qualifiedName = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(QualifiedNameContext); + } else { + return this.getTypedRuleContext(QualifiedNameContext,i); + } + }; + + IF() { + return this.getToken(SqlBaseParser.IF, 0); + }; + + EXISTS() { + return this.getToken(SqlBaseParser.EXISTS, 0); + }; + + enterRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.enterRenameTable(this); + } + } + + exitRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.exitRenameTable(this); + } + } + + +} + +SqlBaseParser.RenameTableContext = RenameTableContext; + +class CommitContext extends StatementContext { + + constructor(parser, ctx) { + super(parser); + super.copyFrom(ctx); + } + + COMMIT() { + return this.getToken(SqlBaseParser.COMMIT, 0); + }; + + WORK() { + return this.getToken(SqlBaseParser.WORK, 0); + }; + + enterRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.enterCommit(this); + } + } + + exitRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.exitCommit(this); + } + } + + +} + +SqlBaseParser.CommitContext = CommitContext; + +class CreateRoleContext extends StatementContext { + + constructor(parser, ctx) { + super(parser); + this.name = null;; + super.copyFrom(ctx); + } + + CREATE() { + return this.getToken(SqlBaseParser.CREATE, 0); + }; + + ROLE() { + return this.getToken(SqlBaseParser.ROLE, 0); + }; + + identifier() { + return this.getTypedRuleContext(IdentifierContext,0); + }; + + WITH() { + return this.getToken(SqlBaseParser.WITH, 0); + }; + + ADMIN() { + return this.getToken(SqlBaseParser.ADMIN, 0); + }; + + grantor() { + return this.getTypedRuleContext(GrantorContext,0); + }; + + enterRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.enterCreateRole(this); + } + } + + exitRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.exitCreateRole(this); + } + } + + +} + +SqlBaseParser.CreateRoleContext = CreateRoleContext; + +class ShowCreateFunctionContext extends StatementContext { + + constructor(parser, ctx) { + super(parser); + super.copyFrom(ctx); + } + + SHOW() { + return this.getToken(SqlBaseParser.SHOW, 0); + }; + + CREATE() { + return this.getToken(SqlBaseParser.CREATE, 0); + }; + + FUNCTION() { + return this.getToken(SqlBaseParser.FUNCTION, 0); + }; + + qualifiedName() { + return this.getTypedRuleContext(QualifiedNameContext,0); + }; + + types() { + return this.getTypedRuleContext(TypesContext,0); + }; + + enterRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.enterShowCreateFunction(this); + } + } + + exitRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.exitShowCreateFunction(this); + } + } + + +} + +SqlBaseParser.ShowCreateFunctionContext = ShowCreateFunctionContext; + +class DropColumnContext extends StatementContext { + + constructor(parser, ctx) { + super(parser); + this.tableName = null;; + this.column = null;; + super.copyFrom(ctx); + } + + ALTER() { + return this.getToken(SqlBaseParser.ALTER, 0); + }; + + TABLE() { + return this.getToken(SqlBaseParser.TABLE, 0); + }; + + DROP() { + return this.getToken(SqlBaseParser.DROP, 0); + }; + + COLUMN() { + return this.getToken(SqlBaseParser.COLUMN, 0); + }; + + qualifiedName = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(QualifiedNameContext); + } else { + return this.getTypedRuleContext(QualifiedNameContext,i); + } + }; + + IF = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTokens(SqlBaseParser.IF); + } else { + return this.getToken(SqlBaseParser.IF, i); + } + }; + + + EXISTS = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTokens(SqlBaseParser.EXISTS); + } else { + return this.getToken(SqlBaseParser.EXISTS, i); + } + }; + + + enterRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.enterDropColumn(this); + } + } + + exitRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.exitDropColumn(this); + } + } + + +} + +SqlBaseParser.DropColumnContext = DropColumnContext; + +class DropViewContext extends StatementContext { + + constructor(parser, ctx) { + super(parser); + super.copyFrom(ctx); + } + + DROP() { + return this.getToken(SqlBaseParser.DROP, 0); + }; + + VIEW() { + return this.getToken(SqlBaseParser.VIEW, 0); + }; + + qualifiedName() { + return this.getTypedRuleContext(QualifiedNameContext,0); + }; + + IF() { + return this.getToken(SqlBaseParser.IF, 0); + }; + + EXISTS() { + return this.getToken(SqlBaseParser.EXISTS, 0); + }; + + enterRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.enterDropView(this); + } + } + + exitRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.exitDropView(this); + } + } + + +} + +SqlBaseParser.DropViewContext = DropViewContext; + +class ShowTablesContext extends StatementContext { + + constructor(parser, ctx) { + super(parser); + this.pattern = null;; + this.escape = null;; + super.copyFrom(ctx); + } + + SHOW() { + return this.getToken(SqlBaseParser.SHOW, 0); + }; + + TABLES() { + return this.getToken(SqlBaseParser.TABLES, 0); + }; + + qualifiedName() { + return this.getTypedRuleContext(QualifiedNameContext,0); + }; + + LIKE() { + return this.getToken(SqlBaseParser.LIKE, 0); + }; + + FROM() { + return this.getToken(SqlBaseParser.FROM, 0); + }; + + IN() { + return this.getToken(SqlBaseParser.IN, 0); + }; + + string = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(StringContext); + } else { + return this.getTypedRuleContext(StringContext,i); + } + }; + + ESCAPE() { + return this.getToken(SqlBaseParser.ESCAPE, 0); + }; + + enterRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.enterShowTables(this); + } + } + + exitRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.exitShowTables(this); + } + } + + +} + +SqlBaseParser.ShowTablesContext = ShowTablesContext; + +class ShowCatalogsContext extends StatementContext { + + constructor(parser, ctx) { + super(parser); + this.pattern = null;; + this.escape = null;; + super.copyFrom(ctx); + } + + SHOW() { + return this.getToken(SqlBaseParser.SHOW, 0); + }; + + CATALOGS() { + return this.getToken(SqlBaseParser.CATALOGS, 0); + }; + + LIKE() { + return this.getToken(SqlBaseParser.LIKE, 0); + }; + + string = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(StringContext); + } else { + return this.getTypedRuleContext(StringContext,i); + } + }; + + ESCAPE() { + return this.getToken(SqlBaseParser.ESCAPE, 0); + }; + + enterRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.enterShowCatalogs(this); + } + } + + exitRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.exitShowCatalogs(this); + } + } + + +} + +SqlBaseParser.ShowCatalogsContext = ShowCatalogsContext; + +class ShowRolesContext extends StatementContext { + + constructor(parser, ctx) { + super(parser); + super.copyFrom(ctx); + } + + SHOW() { + return this.getToken(SqlBaseParser.SHOW, 0); + }; + + ROLES() { + return this.getToken(SqlBaseParser.ROLES, 0); + }; + + CURRENT() { + return this.getToken(SqlBaseParser.CURRENT, 0); + }; + + identifier() { + return this.getTypedRuleContext(IdentifierContext,0); + }; + + FROM() { + return this.getToken(SqlBaseParser.FROM, 0); + }; + + IN() { + return this.getToken(SqlBaseParser.IN, 0); + }; + + enterRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.enterShowRoles(this); + } + } + + exitRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.exitShowRoles(this); + } + } + + +} + +SqlBaseParser.ShowRolesContext = ShowRolesContext; + +class RenameColumnContext extends StatementContext { + + constructor(parser, ctx) { + super(parser); + this.tableName = null;; + this.from = null;; + this.to = null;; + super.copyFrom(ctx); + } + + ALTER() { + return this.getToken(SqlBaseParser.ALTER, 0); + }; + + TABLE() { + return this.getToken(SqlBaseParser.TABLE, 0); + }; + + RENAME() { + return this.getToken(SqlBaseParser.RENAME, 0); + }; + + COLUMN() { + return this.getToken(SqlBaseParser.COLUMN, 0); + }; + + TO() { + return this.getToken(SqlBaseParser.TO, 0); + }; + + qualifiedName() { + return this.getTypedRuleContext(QualifiedNameContext,0); + }; + + identifier = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(IdentifierContext); + } else { + return this.getTypedRuleContext(IdentifierContext,i); + } + }; + + IF = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTokens(SqlBaseParser.IF); + } else { + return this.getToken(SqlBaseParser.IF, i); + } + }; + + + EXISTS = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTokens(SqlBaseParser.EXISTS); + } else { + return this.getToken(SqlBaseParser.EXISTS, i); + } + }; + + + enterRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.enterRenameColumn(this); + } + } + + exitRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.exitRenameColumn(this); + } + } + + +} + +SqlBaseParser.RenameColumnContext = RenameColumnContext; + +class RevokeRolesContext extends StatementContext { + + constructor(parser, ctx) { + super(parser); + super.copyFrom(ctx); + } + + REVOKE() { + return this.getToken(SqlBaseParser.REVOKE, 0); + }; + + roles() { + return this.getTypedRuleContext(RolesContext,0); + }; + + FROM() { + return this.getToken(SqlBaseParser.FROM, 0); + }; + + principal = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(PrincipalContext); + } else { + return this.getTypedRuleContext(PrincipalContext,i); + } + }; + + ADMIN() { + return this.getToken(SqlBaseParser.ADMIN, 0); + }; + + OPTION() { + return this.getToken(SqlBaseParser.OPTION, 0); + }; + + FOR() { + return this.getToken(SqlBaseParser.FOR, 0); + }; + + GRANTED() { + return this.getToken(SqlBaseParser.GRANTED, 0); + }; + + BY() { + return this.getToken(SqlBaseParser.BY, 0); + }; + + grantor() { + return this.getTypedRuleContext(GrantorContext,0); + }; + + enterRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.enterRevokeRoles(this); + } + } + + exitRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.exitRevokeRoles(this); + } + } + + +} + +SqlBaseParser.RevokeRolesContext = RevokeRolesContext; + +class ShowCreateTableContext extends StatementContext { + + constructor(parser, ctx) { + super(parser); + super.copyFrom(ctx); + } + + SHOW() { + return this.getToken(SqlBaseParser.SHOW, 0); + }; + + CREATE() { + return this.getToken(SqlBaseParser.CREATE, 0); + }; + + TABLE() { + return this.getToken(SqlBaseParser.TABLE, 0); + }; + + qualifiedName() { + return this.getTypedRuleContext(QualifiedNameContext,0); + }; + + enterRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.enterShowCreateTable(this); + } + } + + exitRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.exitShowCreateTable(this); + } + } + + +} + +SqlBaseParser.ShowCreateTableContext = ShowCreateTableContext; + +class ShowColumnsContext extends StatementContext { + + constructor(parser, ctx) { + super(parser); + super.copyFrom(ctx); + } + + SHOW() { + return this.getToken(SqlBaseParser.SHOW, 0); + }; + + COLUMNS() { + return this.getToken(SqlBaseParser.COLUMNS, 0); + }; + + qualifiedName() { + return this.getTypedRuleContext(QualifiedNameContext,0); + }; + + FROM() { + return this.getToken(SqlBaseParser.FROM, 0); + }; + + IN() { + return this.getToken(SqlBaseParser.IN, 0); + }; + + DESCRIBE() { + return this.getToken(SqlBaseParser.DESCRIBE, 0); + }; + + DESC() { + return this.getToken(SqlBaseParser.DESC, 0); + }; + + enterRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.enterShowColumns(this); + } + } + + exitRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.exitShowColumns(this); + } + } + + +} + +SqlBaseParser.ShowColumnsContext = ShowColumnsContext; + +class ShowRoleGrantsContext extends StatementContext { + + constructor(parser, ctx) { + super(parser); + super.copyFrom(ctx); + } + + SHOW() { + return this.getToken(SqlBaseParser.SHOW, 0); + }; + + ROLE() { + return this.getToken(SqlBaseParser.ROLE, 0); + }; + + GRANTS() { + return this.getToken(SqlBaseParser.GRANTS, 0); + }; + + identifier() { + return this.getTypedRuleContext(IdentifierContext,0); + }; + + FROM() { + return this.getToken(SqlBaseParser.FROM, 0); + }; + + IN() { + return this.getToken(SqlBaseParser.IN, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterSingleStatement(this); + listener.enterShowRoleGrants(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitSingleStatement(this); + listener.exitShowRoleGrants(this); } } } +SqlBaseParser.ShowRoleGrantsContext = ShowRoleGrantsContext; +class AddColumnContext extends StatementContext { -class StandaloneExpressionContext extends antlr4.ParserRuleContext { - - constructor(parser, parent, invokingState) { - if(parent===undefined) { - parent = null; - } - if(invokingState===undefined || invokingState===null) { - invokingState = -1; - } - super(parent, invokingState); - this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_standaloneExpression; + constructor(parser, ctx) { + super(parser); + this.tableName = null;; + this.column = null;; + super.copyFrom(ctx); } - expression() { - return this.getTypedRuleContext(ExpressionContext,0); + ALTER() { + return this.getToken(SqlBaseParser.ALTER, 0); }; - EOF() { - return this.getToken(SqlBaseParser.EOF, 0); + TABLE() { + return this.getToken(SqlBaseParser.TABLE, 0); + }; + + ADD() { + return this.getToken(SqlBaseParser.ADD, 0); + }; + + COLUMN() { + return this.getToken(SqlBaseParser.COLUMN, 0); + }; + + qualifiedName() { + return this.getTypedRuleContext(QualifiedNameContext,0); + }; + + columnDefinition() { + return this.getTypedRuleContext(ColumnDefinitionContext,0); + }; + + IF = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTokens(SqlBaseParser.IF); + } else { + return this.getToken(SqlBaseParser.IF, i); + } + }; + + + EXISTS = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTokens(SqlBaseParser.EXISTS); + } else { + return this.getToken(SqlBaseParser.EXISTS, i); + } + }; + + + NOT() { + return this.getToken(SqlBaseParser.NOT, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterStandaloneExpression(this); + listener.enterAddColumn(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitStandaloneExpression(this); + listener.exitAddColumn(this); } } } +SqlBaseParser.AddColumnContext = AddColumnContext; +class ResetSessionContext extends StatementContext { -class StandaloneRoutineBodyContext extends antlr4.ParserRuleContext { - - constructor(parser, parent, invokingState) { - if(parent===undefined) { - parent = null; - } - if(invokingState===undefined || invokingState===null) { - invokingState = -1; - } - super(parent, invokingState); - this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_standaloneRoutineBody; + constructor(parser, ctx) { + super(parser); + super.copyFrom(ctx); } - routineBody() { - return this.getTypedRuleContext(RoutineBodyContext,0); + RESET() { + return this.getToken(SqlBaseParser.RESET, 0); }; - EOF() { - return this.getToken(SqlBaseParser.EOF, 0); + SESSION() { + return this.getToken(SqlBaseParser.SESSION, 0); + }; + + qualifiedName() { + return this.getTypedRuleContext(QualifiedNameContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterStandaloneRoutineBody(this); + listener.enterResetSession(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitStandaloneRoutineBody(this); + listener.exitResetSession(this); } } } +SqlBaseParser.ResetSessionContext = ResetSessionContext; +class DropConstraintContext extends StatementContext { -class StatementContext extends antlr4.ParserRuleContext { - - constructor(parser, parent, invokingState) { - if(parent===undefined) { - parent = null; - } - if(invokingState===undefined || invokingState===null) { - invokingState = -1; - } - super(parent, invokingState); - this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_statement; + constructor(parser, ctx) { + super(parser); + this.tableName = null;; + this.name = null;; + super.copyFrom(ctx); } + ALTER() { + return this.getToken(SqlBaseParser.ALTER, 0); + }; - - copyFrom(ctx) { - super.copyFrom(ctx); + TABLE() { + return this.getToken(SqlBaseParser.TABLE, 0); + }; + + DROP() { + return this.getToken(SqlBaseParser.DROP, 0); + }; + + CONSTRAINT() { + return this.getToken(SqlBaseParser.CONSTRAINT, 0); + }; + + qualifiedName() { + return this.getTypedRuleContext(QualifiedNameContext,0); + }; + + identifier() { + return this.getTypedRuleContext(IdentifierContext,0); + }; + + IF = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTokens(SqlBaseParser.IF); + } else { + return this.getToken(SqlBaseParser.IF, i); + } + }; + + + EXISTS = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTokens(SqlBaseParser.EXISTS); + } else { + return this.getToken(SqlBaseParser.EXISTS, i); + } + }; + + + enterRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.enterDropConstraint(this); + } + } + + exitRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.exitDropConstraint(this); } + } + } +SqlBaseParser.DropConstraintContext = DropConstraintContext; -class ExplainContext extends StatementContext { +class InsertIntoContext extends StatementContext { constructor(parser, ctx) { super(parser); super.copyFrom(ctx); } - EXPLAIN() { - return this.getToken(SqlBaseParser.EXPLAIN, 0); + INSERT() { + return this.getToken(SqlBaseParser.INSERT, 0); }; - statement() { - return this.getTypedRuleContext(StatementContext,0); + INTO() { + return this.getToken(SqlBaseParser.INTO, 0); }; - ANALYZE() { - return this.getToken(SqlBaseParser.ANALYZE, 0); + qualifiedName() { + return this.getTypedRuleContext(QualifiedNameContext,0); }; - VERBOSE() { - return this.getToken(SqlBaseParser.VERBOSE, 0); + query() { + return this.getTypedRuleContext(QueryContext,0); }; - explainOption = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTypedRuleContexts(ExplainOptionContext); - } else { - return this.getTypedRuleContext(ExplainOptionContext,i); - } + columnAliases() { + return this.getTypedRuleContext(ColumnAliasesContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterExplain(this); + listener.enterInsertInto(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitExplain(this); + listener.exitInsertInto(this); } } } -SqlBaseParser.ExplainContext = ExplainContext; +SqlBaseParser.InsertIntoContext = InsertIntoContext; -class PrepareContext extends StatementContext { +class ShowSessionContext extends StatementContext { constructor(parser, ctx) { super(parser); + this.pattern = null;; + this.escape = null;; super.copyFrom(ctx); } - PREPARE() { - return this.getToken(SqlBaseParser.PREPARE, 0); + SHOW() { + return this.getToken(SqlBaseParser.SHOW, 0); }; - identifier() { - return this.getTypedRuleContext(IdentifierContext,0); + SESSION() { + return this.getToken(SqlBaseParser.SESSION, 0); }; - FROM() { - return this.getToken(SqlBaseParser.FROM, 0); + LIKE() { + return this.getToken(SqlBaseParser.LIKE, 0); + }; + + string = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(StringContext); + } else { + return this.getTypedRuleContext(StringContext,i); + } }; - statement() { - return this.getTypedRuleContext(StatementContext,0); + ESCAPE() { + return this.getToken(SqlBaseParser.ESCAPE, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterPrepare(this); + listener.enterShowSession(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitPrepare(this); + listener.exitShowSession(this); } } } -SqlBaseParser.PrepareContext = PrepareContext; +SqlBaseParser.ShowSessionContext = ShowSessionContext; -class DropMaterializedViewContext extends StatementContext { +class CreateSchemaContext extends StatementContext { constructor(parser, ctx) { super(parser); super.copyFrom(ctx); } - DROP() { - return this.getToken(SqlBaseParser.DROP, 0); - }; - - MATERIALIZED() { - return this.getToken(SqlBaseParser.MATERIALIZED, 0); + CREATE() { + return this.getToken(SqlBaseParser.CREATE, 0); }; - VIEW() { - return this.getToken(SqlBaseParser.VIEW, 0); + SCHEMA() { + return this.getToken(SqlBaseParser.SCHEMA, 0); }; qualifiedName() { @@ -9466,81 +12108,111 @@ class DropMaterializedViewContext extends StatementContext { return this.getToken(SqlBaseParser.IF, 0); }; + NOT() { + return this.getToken(SqlBaseParser.NOT, 0); + }; + EXISTS() { return this.getToken(SqlBaseParser.EXISTS, 0); }; + WITH() { + return this.getToken(SqlBaseParser.WITH, 0); + }; + + properties() { + return this.getTypedRuleContext(PropertiesContext,0); + }; + enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterDropMaterializedView(this); + listener.enterCreateSchema(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitDropMaterializedView(this); + listener.exitCreateSchema(this); } } } -SqlBaseParser.DropMaterializedViewContext = DropMaterializedViewContext; +SqlBaseParser.CreateSchemaContext = CreateSchemaContext; -class UseContext extends StatementContext { +class ExecuteContext extends StatementContext { constructor(parser, ctx) { super(parser); - this.schema = null;; - this.catalog = null;; super.copyFrom(ctx); } - USE() { - return this.getToken(SqlBaseParser.USE, 0); + EXECUTE() { + return this.getToken(SqlBaseParser.EXECUTE, 0); }; - identifier = function(i) { + identifier() { + return this.getTypedRuleContext(IdentifierContext,0); + }; + + USING() { + return this.getToken(SqlBaseParser.USING, 0); + }; + + expression = function(i) { if(i===undefined) { i = null; } if(i===null) { - return this.getTypedRuleContexts(IdentifierContext); + return this.getTypedRuleContexts(ExpressionContext); } else { - return this.getTypedRuleContext(IdentifierContext,i); + return this.getTypedRuleContext(ExpressionContext,i); } }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterUse(this); + listener.enterExecute(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitUse(this); + listener.exitExecute(this); } } } -SqlBaseParser.UseContext = UseContext; +SqlBaseParser.ExecuteContext = ExecuteContext; -class DeallocateContext extends StatementContext { +class RenameSchemaContext extends StatementContext { constructor(parser, ctx) { super(parser); super.copyFrom(ctx); } - DEALLOCATE() { - return this.getToken(SqlBaseParser.DEALLOCATE, 0); + ALTER() { + return this.getToken(SqlBaseParser.ALTER, 0); }; - PREPARE() { - return this.getToken(SqlBaseParser.PREPARE, 0); + SCHEMA() { + return this.getToken(SqlBaseParser.SCHEMA, 0); + }; + + qualifiedName() { + return this.getTypedRuleContext(QualifiedNameContext,0); + }; + + RENAME() { + return this.getToken(SqlBaseParser.RENAME, 0); + }; + + TO() { + return this.getToken(SqlBaseParser.TO, 0); }; identifier() { @@ -9549,174 +12221,152 @@ class DeallocateContext extends StatementContext { enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterDeallocate(this); + listener.enterRenameSchema(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitDeallocate(this); + listener.exitRenameSchema(this); } } } -SqlBaseParser.DeallocateContext = DeallocateContext; +SqlBaseParser.RenameSchemaContext = RenameSchemaContext; -class RenameTableContext extends StatementContext { +class DropRoleContext extends StatementContext { constructor(parser, ctx) { super(parser); - this.from = null;; - this.to = null;; + this.name = null;; super.copyFrom(ctx); } - ALTER() { - return this.getToken(SqlBaseParser.ALTER, 0); - }; - - TABLE() { - return this.getToken(SqlBaseParser.TABLE, 0); - }; - - RENAME() { - return this.getToken(SqlBaseParser.RENAME, 0); - }; - - TO() { - return this.getToken(SqlBaseParser.TO, 0); - }; - - qualifiedName = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTypedRuleContexts(QualifiedNameContext); - } else { - return this.getTypedRuleContext(QualifiedNameContext,i); - } + DROP() { + return this.getToken(SqlBaseParser.DROP, 0); }; - IF() { - return this.getToken(SqlBaseParser.IF, 0); + ROLE() { + return this.getToken(SqlBaseParser.ROLE, 0); }; - EXISTS() { - return this.getToken(SqlBaseParser.EXISTS, 0); + identifier() { + return this.getTypedRuleContext(IdentifierContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterRenameTable(this); + listener.enterDropRole(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitRenameTable(this); + listener.exitDropRole(this); } } } -SqlBaseParser.RenameTableContext = RenameTableContext; +SqlBaseParser.DropRoleContext = DropRoleContext; -class CommitContext extends StatementContext { +class AnalyzeContext extends StatementContext { constructor(parser, ctx) { super(parser); super.copyFrom(ctx); } - COMMIT() { - return this.getToken(SqlBaseParser.COMMIT, 0); + ANALYZE() { + return this.getToken(SqlBaseParser.ANALYZE, 0); }; - WORK() { - return this.getToken(SqlBaseParser.WORK, 0); + qualifiedName() { + return this.getTypedRuleContext(QualifiedNameContext,0); + }; + + WITH() { + return this.getToken(SqlBaseParser.WITH, 0); + }; + + properties() { + return this.getTypedRuleContext(PropertiesContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterCommit(this); + listener.enterAnalyze(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitCommit(this); + listener.exitAnalyze(this); } } } -SqlBaseParser.CommitContext = CommitContext; +SqlBaseParser.AnalyzeContext = AnalyzeContext; -class CreateRoleContext extends StatementContext { +class SetRoleContext extends StatementContext { constructor(parser, ctx) { super(parser); - this.name = null;; + this.role = null;; super.copyFrom(ctx); } - CREATE() { - return this.getToken(SqlBaseParser.CREATE, 0); + SET() { + return this.getToken(SqlBaseParser.SET, 0); }; ROLE() { return this.getToken(SqlBaseParser.ROLE, 0); }; - identifier() { - return this.getTypedRuleContext(IdentifierContext,0); - }; - - WITH() { - return this.getToken(SqlBaseParser.WITH, 0); + ALL() { + return this.getToken(SqlBaseParser.ALL, 0); }; - ADMIN() { - return this.getToken(SqlBaseParser.ADMIN, 0); + NONE() { + return this.getToken(SqlBaseParser.NONE, 0); }; - grantor() { - return this.getTypedRuleContext(GrantorContext,0); + identifier() { + return this.getTypedRuleContext(IdentifierContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterCreateRole(this); + listener.enterSetRole(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitCreateRole(this); + listener.exitSetRole(this); } } } -SqlBaseParser.CreateRoleContext = CreateRoleContext; +SqlBaseParser.SetRoleContext = SetRoleContext; -class ShowCreateFunctionContext extends StatementContext { +class CreateFunctionContext extends StatementContext { constructor(parser, ctx) { super(parser); + this.functionName = null;; + this.returnType = null;; super.copyFrom(ctx); } - SHOW() { - return this.getToken(SqlBaseParser.SHOW, 0); - }; - CREATE() { return this.getToken(SqlBaseParser.CREATE, 0); }; @@ -9725,223 +12375,174 @@ class ShowCreateFunctionContext extends StatementContext { return this.getToken(SqlBaseParser.FUNCTION, 0); }; - qualifiedName() { - return this.getTypedRuleContext(QualifiedNameContext,0); + RETURNS() { + return this.getToken(SqlBaseParser.RETURNS, 0); }; - types() { - return this.getTypedRuleContext(TypesContext,0); + routineCharacteristics() { + return this.getTypedRuleContext(RoutineCharacteristicsContext,0); }; - enterRule(listener) { - if(listener instanceof SqlBaseListener ) { - listener.enterShowCreateFunction(this); - } - } - - exitRule(listener) { - if(listener instanceof SqlBaseListener ) { - listener.exitShowCreateFunction(this); - } - } - - -} - -SqlBaseParser.ShowCreateFunctionContext = ShowCreateFunctionContext; - -class DropColumnContext extends StatementContext { + routineBody() { + return this.getTypedRuleContext(RoutineBodyContext,0); + }; - constructor(parser, ctx) { - super(parser); - this.tableName = null;; - this.column = null;; - super.copyFrom(ctx); - } + qualifiedName() { + return this.getTypedRuleContext(QualifiedNameContext,0); + }; - ALTER() { - return this.getToken(SqlBaseParser.ALTER, 0); + type() { + return this.getTypedRuleContext(TypeContext,0); }; - TABLE() { - return this.getToken(SqlBaseParser.TABLE, 0); + OR() { + return this.getToken(SqlBaseParser.OR, 0); }; - DROP() { - return this.getToken(SqlBaseParser.DROP, 0); + REPLACE() { + return this.getToken(SqlBaseParser.REPLACE, 0); }; - COLUMN() { - return this.getToken(SqlBaseParser.COLUMN, 0); + TEMPORARY() { + return this.getToken(SqlBaseParser.TEMPORARY, 0); }; - qualifiedName = function(i) { + sqlParameterDeclaration = function(i) { if(i===undefined) { i = null; } if(i===null) { - return this.getTypedRuleContexts(QualifiedNameContext); + return this.getTypedRuleContexts(SqlParameterDeclarationContext); } else { - return this.getTypedRuleContext(QualifiedNameContext,i); + return this.getTypedRuleContext(SqlParameterDeclarationContext,i); } }; - IF = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTokens(SqlBaseParser.IF); - } else { - return this.getToken(SqlBaseParser.IF, i); - } + COMMENT() { + return this.getToken(SqlBaseParser.COMMENT, 0); }; - - EXISTS = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTokens(SqlBaseParser.EXISTS); - } else { - return this.getToken(SqlBaseParser.EXISTS, i); - } + string() { + return this.getTypedRuleContext(StringContext,0); }; - enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterDropColumn(this); + listener.enterCreateFunction(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitDropColumn(this); + listener.exitCreateFunction(this); } } } -SqlBaseParser.DropColumnContext = DropColumnContext; +SqlBaseParser.CreateFunctionContext = CreateFunctionContext; -class DropViewContext extends StatementContext { +class ShowGrantsContext extends StatementContext { constructor(parser, ctx) { super(parser); super.copyFrom(ctx); } - DROP() { - return this.getToken(SqlBaseParser.DROP, 0); + SHOW() { + return this.getToken(SqlBaseParser.SHOW, 0); }; - VIEW() { - return this.getToken(SqlBaseParser.VIEW, 0); + GRANTS() { + return this.getToken(SqlBaseParser.GRANTS, 0); }; - qualifiedName() { - return this.getTypedRuleContext(QualifiedNameContext,0); + ON() { + return this.getToken(SqlBaseParser.ON, 0); }; - IF() { - return this.getToken(SqlBaseParser.IF, 0); + qualifiedName() { + return this.getTypedRuleContext(QualifiedNameContext,0); }; - EXISTS() { - return this.getToken(SqlBaseParser.EXISTS, 0); + TABLE() { + return this.getToken(SqlBaseParser.TABLE, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterDropView(this); + listener.enterShowGrants(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitDropView(this); + listener.exitShowGrants(this); } } } -SqlBaseParser.DropViewContext = DropViewContext; +SqlBaseParser.ShowGrantsContext = ShowGrantsContext; -class ShowTablesContext extends StatementContext { +class DropSchemaContext extends StatementContext { constructor(parser, ctx) { super(parser); - this.pattern = null;; - this.escape = null;; super.copyFrom(ctx); } - SHOW() { - return this.getToken(SqlBaseParser.SHOW, 0); + DROP() { + return this.getToken(SqlBaseParser.DROP, 0); }; - TABLES() { - return this.getToken(SqlBaseParser.TABLES, 0); + SCHEMA() { + return this.getToken(SqlBaseParser.SCHEMA, 0); }; qualifiedName() { return this.getTypedRuleContext(QualifiedNameContext,0); }; - LIKE() { - return this.getToken(SqlBaseParser.LIKE, 0); - }; - - FROM() { - return this.getToken(SqlBaseParser.FROM, 0); + IF() { + return this.getToken(SqlBaseParser.IF, 0); }; - IN() { - return this.getToken(SqlBaseParser.IN, 0); + EXISTS() { + return this.getToken(SqlBaseParser.EXISTS, 0); }; - string = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTypedRuleContexts(StringContext); - } else { - return this.getTypedRuleContext(StringContext,i); - } + CASCADE() { + return this.getToken(SqlBaseParser.CASCADE, 0); }; - ESCAPE() { - return this.getToken(SqlBaseParser.ESCAPE, 0); + RESTRICT() { + return this.getToken(SqlBaseParser.RESTRICT, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterShowTables(this); + listener.enterDropSchema(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitShowTables(this); + listener.exitDropSchema(this); } } } -SqlBaseParser.ShowTablesContext = ShowTablesContext; +SqlBaseParser.DropSchemaContext = DropSchemaContext; -class ShowCatalogsContext extends StatementContext { +class ShowCreateViewContext extends StatementContext { constructor(parser, ctx) { super(parser); - this.pattern = null;; - this.escape = null;; super.copyFrom(ctx); } @@ -9949,252 +12550,246 @@ class ShowCatalogsContext extends StatementContext { return this.getToken(SqlBaseParser.SHOW, 0); }; - CATALOGS() { - return this.getToken(SqlBaseParser.CATALOGS, 0); - }; - - LIKE() { - return this.getToken(SqlBaseParser.LIKE, 0); + CREATE() { + return this.getToken(SqlBaseParser.CREATE, 0); }; - string = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTypedRuleContexts(StringContext); - } else { - return this.getTypedRuleContext(StringContext,i); - } + VIEW() { + return this.getToken(SqlBaseParser.VIEW, 0); }; - ESCAPE() { - return this.getToken(SqlBaseParser.ESCAPE, 0); + qualifiedName() { + return this.getTypedRuleContext(QualifiedNameContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterShowCatalogs(this); + listener.enterShowCreateView(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitShowCatalogs(this); + listener.exitShowCreateView(this); } } } -SqlBaseParser.ShowCatalogsContext = ShowCatalogsContext; +SqlBaseParser.ShowCreateViewContext = ShowCreateViewContext; -class ShowRolesContext extends StatementContext { +class CreateTableContext extends StatementContext { constructor(parser, ctx) { super(parser); super.copyFrom(ctx); } - SHOW() { - return this.getToken(SqlBaseParser.SHOW, 0); + CREATE() { + return this.getToken(SqlBaseParser.CREATE, 0); }; - ROLES() { - return this.getToken(SqlBaseParser.ROLES, 0); + TABLE() { + return this.getToken(SqlBaseParser.TABLE, 0); }; - CURRENT() { - return this.getToken(SqlBaseParser.CURRENT, 0); + qualifiedName() { + return this.getTypedRuleContext(QualifiedNameContext,0); }; - identifier() { - return this.getTypedRuleContext(IdentifierContext,0); + tableElement = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(TableElementContext); + } else { + return this.getTypedRuleContext(TableElementContext,i); + } }; - FROM() { - return this.getToken(SqlBaseParser.FROM, 0); + IF() { + return this.getToken(SqlBaseParser.IF, 0); }; - IN() { - return this.getToken(SqlBaseParser.IN, 0); + NOT() { + return this.getToken(SqlBaseParser.NOT, 0); + }; + + EXISTS() { + return this.getToken(SqlBaseParser.EXISTS, 0); + }; + + COMMENT() { + return this.getToken(SqlBaseParser.COMMENT, 0); + }; + + string() { + return this.getTypedRuleContext(StringContext,0); + }; + + WITH() { + return this.getToken(SqlBaseParser.WITH, 0); + }; + + properties() { + return this.getTypedRuleContext(PropertiesContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterShowRoles(this); + listener.enterCreateTable(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitShowRoles(this); + listener.exitCreateTable(this); } } } -SqlBaseParser.ShowRolesContext = ShowRolesContext; +SqlBaseParser.CreateTableContext = CreateTableContext; -class RenameColumnContext extends StatementContext { +class StartTransactionContext extends StatementContext { constructor(parser, ctx) { super(parser); - this.tableName = null;; - this.from = null;; - this.to = null;; super.copyFrom(ctx); } - ALTER() { - return this.getToken(SqlBaseParser.ALTER, 0); - }; - - TABLE() { - return this.getToken(SqlBaseParser.TABLE, 0); - }; - - RENAME() { - return this.getToken(SqlBaseParser.RENAME, 0); - }; - - COLUMN() { - return this.getToken(SqlBaseParser.COLUMN, 0); - }; - - TO() { - return this.getToken(SqlBaseParser.TO, 0); - }; - - qualifiedName() { - return this.getTypedRuleContext(QualifiedNameContext,0); - }; - - identifier = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTypedRuleContexts(IdentifierContext); - } else { - return this.getTypedRuleContext(IdentifierContext,i); - } - }; - - IF = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTokens(SqlBaseParser.IF); - } else { - return this.getToken(SqlBaseParser.IF, i); - } + START() { + return this.getToken(SqlBaseParser.START, 0); }; + TRANSACTION() { + return this.getToken(SqlBaseParser.TRANSACTION, 0); + }; - EXISTS = function(i) { - if(i===undefined) { - i = null; - } + transactionMode = function(i) { + if(i===undefined) { + i = null; + } if(i===null) { - return this.getTokens(SqlBaseParser.EXISTS); + return this.getTypedRuleContexts(TransactionModeContext); } else { - return this.getToken(SqlBaseParser.EXISTS, i); + return this.getTypedRuleContext(TransactionModeContext,i); } }; - enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterRenameColumn(this); + listener.enterStartTransaction(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitRenameColumn(this); + listener.exitStartTransaction(this); } } } -SqlBaseParser.RenameColumnContext = RenameColumnContext; +SqlBaseParser.StartTransactionContext = StartTransactionContext; -class RevokeRolesContext extends StatementContext { +class CreateTableAsSelectContext extends StatementContext { constructor(parser, ctx) { super(parser); super.copyFrom(ctx); } - REVOKE() { - return this.getToken(SqlBaseParser.REVOKE, 0); + CREATE() { + return this.getToken(SqlBaseParser.CREATE, 0); }; - roles() { - return this.getTypedRuleContext(RolesContext,0); + TABLE() { + return this.getToken(SqlBaseParser.TABLE, 0); }; - FROM() { - return this.getToken(SqlBaseParser.FROM, 0); + qualifiedName() { + return this.getTypedRuleContext(QualifiedNameContext,0); }; - principal = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTypedRuleContexts(PrincipalContext); - } else { - return this.getTypedRuleContext(PrincipalContext,i); - } + AS() { + return this.getToken(SqlBaseParser.AS, 0); }; - ADMIN() { - return this.getToken(SqlBaseParser.ADMIN, 0); + query() { + return this.getTypedRuleContext(QueryContext,0); }; - OPTION() { - return this.getToken(SqlBaseParser.OPTION, 0); + IF() { + return this.getToken(SqlBaseParser.IF, 0); }; - FOR() { - return this.getToken(SqlBaseParser.FOR, 0); + NOT() { + return this.getToken(SqlBaseParser.NOT, 0); }; - GRANTED() { - return this.getToken(SqlBaseParser.GRANTED, 0); + EXISTS() { + return this.getToken(SqlBaseParser.EXISTS, 0); }; - BY() { - return this.getToken(SqlBaseParser.BY, 0); + columnAliases() { + return this.getTypedRuleContext(ColumnAliasesContext,0); }; - grantor() { - return this.getTypedRuleContext(GrantorContext,0); + COMMENT() { + return this.getToken(SqlBaseParser.COMMENT, 0); + }; + + string() { + return this.getTypedRuleContext(StringContext,0); + }; + + WITH = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTokens(SqlBaseParser.WITH); + } else { + return this.getToken(SqlBaseParser.WITH, i); + } + }; + + + properties() { + return this.getTypedRuleContext(PropertiesContext,0); + }; + + DATA() { + return this.getToken(SqlBaseParser.DATA, 0); + }; + + NO() { + return this.getToken(SqlBaseParser.NO, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterRevokeRoles(this); + listener.enterCreateTableAsSelect(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitRevokeRoles(this); + listener.exitCreateTableAsSelect(this); } } } -SqlBaseParser.RevokeRolesContext = RevokeRolesContext; +SqlBaseParser.CreateTableAsSelectContext = CreateTableAsSelectContext; -class ShowCreateTableContext extends StatementContext { +class ShowStatsContext extends StatementContext { constructor(parser, ctx) { super(parser); @@ -10205,12 +12800,12 @@ class ShowCreateTableContext extends StatementContext { return this.getToken(SqlBaseParser.SHOW, 0); }; - CREATE() { - return this.getToken(SqlBaseParser.CREATE, 0); + STATS() { + return this.getToken(SqlBaseParser.STATS, 0); }; - TABLE() { - return this.getToken(SqlBaseParser.TABLE, 0); + FOR() { + return this.getToken(SqlBaseParser.FOR, 0); }; qualifiedName() { @@ -10219,22 +12814,22 @@ class ShowCreateTableContext extends StatementContext { enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterShowCreateTable(this); + listener.enterShowStats(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitShowCreateTable(this); + listener.exitShowStats(this); } } } -SqlBaseParser.ShowCreateTableContext = ShowCreateTableContext; +SqlBaseParser.ShowStatsContext = ShowStatsContext; -class ShowColumnsContext extends StatementContext { +class ShowCreateSchemaContext extends StatementContext { constructor(parser, ctx) { super(parser); @@ -10245,585 +12840,611 @@ class ShowColumnsContext extends StatementContext { return this.getToken(SqlBaseParser.SHOW, 0); }; - COLUMNS() { - return this.getToken(SqlBaseParser.COLUMNS, 0); - }; - - qualifiedName() { - return this.getTypedRuleContext(QualifiedNameContext,0); - }; - - FROM() { - return this.getToken(SqlBaseParser.FROM, 0); - }; - - IN() { - return this.getToken(SqlBaseParser.IN, 0); + CREATE() { + return this.getToken(SqlBaseParser.CREATE, 0); }; - DESCRIBE() { - return this.getToken(SqlBaseParser.DESCRIBE, 0); + SCHEMA() { + return this.getToken(SqlBaseParser.SCHEMA, 0); }; - DESC() { - return this.getToken(SqlBaseParser.DESC, 0); + qualifiedName() { + return this.getTypedRuleContext(QualifiedNameContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterShowColumns(this); + listener.enterShowCreateSchema(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitShowColumns(this); + listener.exitShowCreateSchema(this); } } } -SqlBaseParser.ShowColumnsContext = ShowColumnsContext; +SqlBaseParser.ShowCreateSchemaContext = ShowCreateSchemaContext; -class ShowRoleGrantsContext extends StatementContext { +class DropFunctionContext extends StatementContext { constructor(parser, ctx) { super(parser); super.copyFrom(ctx); } - SHOW() { - return this.getToken(SqlBaseParser.SHOW, 0); + DROP() { + return this.getToken(SqlBaseParser.DROP, 0); }; - ROLE() { - return this.getToken(SqlBaseParser.ROLE, 0); + FUNCTION() { + return this.getToken(SqlBaseParser.FUNCTION, 0); }; - GRANTS() { - return this.getToken(SqlBaseParser.GRANTS, 0); + qualifiedName() { + return this.getTypedRuleContext(QualifiedNameContext,0); }; - identifier() { - return this.getTypedRuleContext(IdentifierContext,0); + TEMPORARY() { + return this.getToken(SqlBaseParser.TEMPORARY, 0); }; - FROM() { - return this.getToken(SqlBaseParser.FROM, 0); + IF() { + return this.getToken(SqlBaseParser.IF, 0); }; - IN() { - return this.getToken(SqlBaseParser.IN, 0); + EXISTS() { + return this.getToken(SqlBaseParser.EXISTS, 0); + }; + + types() { + return this.getTypedRuleContext(TypesContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterShowRoleGrants(this); + listener.enterDropFunction(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitShowRoleGrants(this); + listener.exitDropFunction(this); } } } -SqlBaseParser.ShowRoleGrantsContext = ShowRoleGrantsContext; +SqlBaseParser.DropFunctionContext = DropFunctionContext; -class AddColumnContext extends StatementContext { +class RevokeContext extends StatementContext { constructor(parser, ctx) { super(parser); - this.tableName = null;; - this.column = null;; + this.grantee = null;; super.copyFrom(ctx); } - ALTER() { - return this.getToken(SqlBaseParser.ALTER, 0); - }; - - TABLE() { - return this.getToken(SqlBaseParser.TABLE, 0); - }; - - ADD() { - return this.getToken(SqlBaseParser.ADD, 0); + REVOKE() { + return this.getToken(SqlBaseParser.REVOKE, 0); }; - COLUMN() { - return this.getToken(SqlBaseParser.COLUMN, 0); + ON() { + return this.getToken(SqlBaseParser.ON, 0); }; qualifiedName() { return this.getTypedRuleContext(QualifiedNameContext,0); }; - columnDefinition() { - return this.getTypedRuleContext(ColumnDefinitionContext,0); + FROM() { + return this.getToken(SqlBaseParser.FROM, 0); }; - IF = function(i) { - if(i===undefined) { - i = null; - } + principal() { + return this.getTypedRuleContext(PrincipalContext,0); + }; + + privilege = function(i) { + if(i===undefined) { + i = null; + } if(i===null) { - return this.getTokens(SqlBaseParser.IF); + return this.getTypedRuleContexts(PrivilegeContext); } else { - return this.getToken(SqlBaseParser.IF, i); + return this.getTypedRuleContext(PrivilegeContext,i); } }; + ALL() { + return this.getToken(SqlBaseParser.ALL, 0); + }; - EXISTS = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTokens(SqlBaseParser.EXISTS); - } else { - return this.getToken(SqlBaseParser.EXISTS, i); - } + PRIVILEGES() { + return this.getToken(SqlBaseParser.PRIVILEGES, 0); }; + GRANT() { + return this.getToken(SqlBaseParser.GRANT, 0); + }; - NOT() { - return this.getToken(SqlBaseParser.NOT, 0); + OPTION() { + return this.getToken(SqlBaseParser.OPTION, 0); + }; + + FOR() { + return this.getToken(SqlBaseParser.FOR, 0); + }; + + TABLE() { + return this.getToken(SqlBaseParser.TABLE, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterAddColumn(this); + listener.enterRevoke(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitAddColumn(this); + listener.exitRevoke(this); } } } -SqlBaseParser.AddColumnContext = AddColumnContext; +SqlBaseParser.RevokeContext = RevokeContext; -class ResetSessionContext extends StatementContext { +class UpdateContext extends StatementContext { constructor(parser, ctx) { super(parser); + this.where = null;; super.copyFrom(ctx); } - RESET() { - return this.getToken(SqlBaseParser.RESET, 0); - }; - - SESSION() { - return this.getToken(SqlBaseParser.SESSION, 0); + UPDATE() { + return this.getToken(SqlBaseParser.UPDATE, 0); }; qualifiedName() { return this.getTypedRuleContext(QualifiedNameContext,0); }; + SET() { + return this.getToken(SqlBaseParser.SET, 0); + }; + + updateAssignment = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(UpdateAssignmentContext); + } else { + return this.getTypedRuleContext(UpdateAssignmentContext,i); + } + }; + + WHERE() { + return this.getToken(SqlBaseParser.WHERE, 0); + }; + + booleanExpression() { + return this.getTypedRuleContext(BooleanExpressionContext,0); + }; + enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterResetSession(this); + listener.enterUpdate(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitResetSession(this); + listener.exitUpdate(this); } } } -SqlBaseParser.ResetSessionContext = ResetSessionContext; +SqlBaseParser.UpdateContext = UpdateContext; -class InsertIntoContext extends StatementContext { +class CreateTypeContext extends StatementContext { constructor(parser, ctx) { super(parser); super.copyFrom(ctx); } - INSERT() { - return this.getToken(SqlBaseParser.INSERT, 0); + CREATE() { + return this.getToken(SqlBaseParser.CREATE, 0); }; - INTO() { - return this.getToken(SqlBaseParser.INTO, 0); + TYPE() { + return this.getToken(SqlBaseParser.TYPE, 0); }; qualifiedName() { return this.getTypedRuleContext(QualifiedNameContext,0); }; - query() { - return this.getTypedRuleContext(QueryContext,0); + AS() { + return this.getToken(SqlBaseParser.AS, 0); }; - columnAliases() { - return this.getTypedRuleContext(ColumnAliasesContext,0); + sqlParameterDeclaration = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(SqlParameterDeclarationContext); + } else { + return this.getTypedRuleContext(SqlParameterDeclarationContext,i); + } + }; + + type() { + return this.getTypedRuleContext(TypeContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterInsertInto(this); + listener.enterCreateType(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitInsertInto(this); + listener.exitCreateType(this); } } } -SqlBaseParser.InsertIntoContext = InsertIntoContext; +SqlBaseParser.CreateTypeContext = CreateTypeContext; -class ShowSessionContext extends StatementContext { +class DeleteContext extends StatementContext { constructor(parser, ctx) { super(parser); - this.pattern = null;; - this.escape = null;; super.copyFrom(ctx); } - SHOW() { - return this.getToken(SqlBaseParser.SHOW, 0); + DELETE() { + return this.getToken(SqlBaseParser.DELETE, 0); }; - SESSION() { - return this.getToken(SqlBaseParser.SESSION, 0); + FROM() { + return this.getToken(SqlBaseParser.FROM, 0); }; - LIKE() { - return this.getToken(SqlBaseParser.LIKE, 0); + qualifiedName() { + return this.getTypedRuleContext(QualifiedNameContext,0); }; - string = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTypedRuleContexts(StringContext); - } else { - return this.getTypedRuleContext(StringContext,i); - } + WHERE() { + return this.getToken(SqlBaseParser.WHERE, 0); }; - ESCAPE() { - return this.getToken(SqlBaseParser.ESCAPE, 0); + booleanExpression() { + return this.getTypedRuleContext(BooleanExpressionContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterShowSession(this); + listener.enterDelete(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitShowSession(this); + listener.exitDelete(this); } } } -SqlBaseParser.ShowSessionContext = ShowSessionContext; +SqlBaseParser.DeleteContext = DeleteContext; -class CreateSchemaContext extends StatementContext { +class MergeIntoContext extends StatementContext { constructor(parser, ctx) { super(parser); super.copyFrom(ctx); } - CREATE() { - return this.getToken(SqlBaseParser.CREATE, 0); + MERGE() { + return this.getToken(SqlBaseParser.MERGE, 0); }; - SCHEMA() { - return this.getToken(SqlBaseParser.SCHEMA, 0); + INTO() { + return this.getToken(SqlBaseParser.INTO, 0); }; qualifiedName() { return this.getTypedRuleContext(QualifiedNameContext,0); }; - IF() { - return this.getToken(SqlBaseParser.IF, 0); + USING() { + return this.getToken(SqlBaseParser.USING, 0); }; - NOT() { - return this.getToken(SqlBaseParser.NOT, 0); + relation() { + return this.getTypedRuleContext(RelationContext,0); }; - EXISTS() { - return this.getToken(SqlBaseParser.EXISTS, 0); + ON() { + return this.getToken(SqlBaseParser.ON, 0); }; - WITH() { - return this.getToken(SqlBaseParser.WITH, 0); + expression() { + return this.getTypedRuleContext(ExpressionContext,0); }; - properties() { - return this.getTypedRuleContext(PropertiesContext,0); + identifier() { + return this.getTypedRuleContext(IdentifierContext,0); + }; + + mergeCase = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(MergeCaseContext); + } else { + return this.getTypedRuleContext(MergeCaseContext,i); + } + }; + + AS() { + return this.getToken(SqlBaseParser.AS, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterCreateSchema(this); + listener.enterMergeInto(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitCreateSchema(this); + listener.exitMergeInto(this); } } } -SqlBaseParser.CreateSchemaContext = CreateSchemaContext; +SqlBaseParser.MergeIntoContext = MergeIntoContext; -class ExecuteContext extends StatementContext { +class DescribeInputContext extends StatementContext { constructor(parser, ctx) { super(parser); super.copyFrom(ctx); } - EXECUTE() { - return this.getToken(SqlBaseParser.EXECUTE, 0); - }; - - identifier() { - return this.getTypedRuleContext(IdentifierContext,0); + DESCRIBE() { + return this.getToken(SqlBaseParser.DESCRIBE, 0); }; - USING() { - return this.getToken(SqlBaseParser.USING, 0); + INPUT() { + return this.getToken(SqlBaseParser.INPUT, 0); }; - expression = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTypedRuleContexts(ExpressionContext); - } else { - return this.getTypedRuleContext(ExpressionContext,i); - } + identifier() { + return this.getTypedRuleContext(IdentifierContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterExecute(this); + listener.enterDescribeInput(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitExecute(this); + listener.exitDescribeInput(this); } } } -SqlBaseParser.ExecuteContext = ExecuteContext; +SqlBaseParser.DescribeInputContext = DescribeInputContext; -class RenameSchemaContext extends StatementContext { +class ShowStatsForQueryContext extends StatementContext { constructor(parser, ctx) { super(parser); super.copyFrom(ctx); } - ALTER() { - return this.getToken(SqlBaseParser.ALTER, 0); - }; - - SCHEMA() { - return this.getToken(SqlBaseParser.SCHEMA, 0); - }; - - qualifiedName() { - return this.getTypedRuleContext(QualifiedNameContext,0); + SHOW() { + return this.getToken(SqlBaseParser.SHOW, 0); }; - RENAME() { - return this.getToken(SqlBaseParser.RENAME, 0); + STATS() { + return this.getToken(SqlBaseParser.STATS, 0); }; - TO() { - return this.getToken(SqlBaseParser.TO, 0); + FOR() { + return this.getToken(SqlBaseParser.FOR, 0); }; - identifier() { - return this.getTypedRuleContext(IdentifierContext,0); + querySpecification() { + return this.getTypedRuleContext(QuerySpecificationContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterRenameSchema(this); + listener.enterShowStatsForQuery(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitRenameSchema(this); + listener.exitShowStatsForQuery(this); } } } -SqlBaseParser.RenameSchemaContext = RenameSchemaContext; +SqlBaseParser.ShowStatsForQueryContext = ShowStatsForQueryContext; -class DropRoleContext extends StatementContext { +class StatementDefaultContext extends StatementContext { constructor(parser, ctx) { super(parser); - this.name = null;; super.copyFrom(ctx); } - DROP() { - return this.getToken(SqlBaseParser.DROP, 0); - }; - - ROLE() { - return this.getToken(SqlBaseParser.ROLE, 0); - }; - - identifier() { - return this.getTypedRuleContext(IdentifierContext,0); + query() { + return this.getTypedRuleContext(QueryContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterDropRole(this); + listener.enterStatementDefault(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitDropRole(this); + listener.exitStatementDefault(this); } } } -SqlBaseParser.DropRoleContext = DropRoleContext; +SqlBaseParser.StatementDefaultContext = StatementDefaultContext; -class AnalyzeContext extends StatementContext { +class TruncateTableContext extends StatementContext { constructor(parser, ctx) { super(parser); super.copyFrom(ctx); } - ANALYZE() { - return this.getToken(SqlBaseParser.ANALYZE, 0); - }; - - qualifiedName() { - return this.getTypedRuleContext(QualifiedNameContext,0); + TRUNCATE() { + return this.getToken(SqlBaseParser.TRUNCATE, 0); }; - - WITH() { - return this.getToken(SqlBaseParser.WITH, 0); + + TABLE() { + return this.getToken(SqlBaseParser.TABLE, 0); }; - properties() { - return this.getTypedRuleContext(PropertiesContext,0); + qualifiedName() { + return this.getTypedRuleContext(QualifiedNameContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterAnalyze(this); + listener.enterTruncateTable(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitAnalyze(this); + listener.exitTruncateTable(this); } } } -SqlBaseParser.AnalyzeContext = AnalyzeContext; +SqlBaseParser.TruncateTableContext = TruncateTableContext; -class SetRoleContext extends StatementContext { +class AlterColumnSetNotNullContext extends StatementContext { constructor(parser, ctx) { super(parser); - this.role = null;; + this.tableName = null;; + this.column = null;; super.copyFrom(ctx); } + ALTER = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTokens(SqlBaseParser.ALTER); + } else { + return this.getToken(SqlBaseParser.ALTER, i); + } + }; + + + TABLE() { + return this.getToken(SqlBaseParser.TABLE, 0); + }; + SET() { return this.getToken(SqlBaseParser.SET, 0); }; - ROLE() { - return this.getToken(SqlBaseParser.ROLE, 0); + NOT() { + return this.getToken(SqlBaseParser.NOT, 0); }; - ALL() { - return this.getToken(SqlBaseParser.ALL, 0); + NULL() { + return this.getToken(SqlBaseParser.NULL, 0); }; - NONE() { - return this.getToken(SqlBaseParser.NONE, 0); + qualifiedName() { + return this.getTypedRuleContext(QualifiedNameContext,0); }; identifier() { return this.getTypedRuleContext(IdentifierContext,0); }; + IF() { + return this.getToken(SqlBaseParser.IF, 0); + }; + + EXISTS() { + return this.getToken(SqlBaseParser.EXISTS, 0); + }; + + COLUMN() { + return this.getToken(SqlBaseParser.COLUMN, 0); + }; + enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterSetRole(this); + listener.enterAlterColumnSetNotNull(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitSetRole(this); + listener.exitAlterColumnSetNotNull(this); } } } -SqlBaseParser.SetRoleContext = SetRoleContext; +SqlBaseParser.AlterColumnSetNotNullContext = AlterColumnSetNotNullContext; -class CreateFunctionContext extends StatementContext { +class CreateMaterializedViewContext extends StatementContext { constructor(parser, ctx) { super(parser); - this.functionName = null;; - this.returnType = null;; super.copyFrom(ctx); } @@ -10831,51 +13452,36 @@ class CreateFunctionContext extends StatementContext { return this.getToken(SqlBaseParser.CREATE, 0); }; - FUNCTION() { - return this.getToken(SqlBaseParser.FUNCTION, 0); - }; - - RETURNS() { - return this.getToken(SqlBaseParser.RETURNS, 0); - }; - - routineCharacteristics() { - return this.getTypedRuleContext(RoutineCharacteristicsContext,0); + MATERIALIZED() { + return this.getToken(SqlBaseParser.MATERIALIZED, 0); }; - routineBody() { - return this.getTypedRuleContext(RoutineBodyContext,0); + VIEW() { + return this.getToken(SqlBaseParser.VIEW, 0); }; qualifiedName() { return this.getTypedRuleContext(QualifiedNameContext,0); }; - type() { - return this.getTypedRuleContext(TypeContext,0); + AS() { + return this.getToken(SqlBaseParser.AS, 0); }; - OR() { - return this.getToken(SqlBaseParser.OR, 0); + query() { + return this.getTypedRuleContext(QueryContext,0); }; - REPLACE() { - return this.getToken(SqlBaseParser.REPLACE, 0); + IF() { + return this.getToken(SqlBaseParser.IF, 0); }; - TEMPORARY() { - return this.getToken(SqlBaseParser.TEMPORARY, 0); + NOT() { + return this.getToken(SqlBaseParser.NOT, 0); }; - sqlParameterDeclaration = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTypedRuleContexts(SqlParameterDeclarationContext); - } else { - return this.getTypedRuleContext(SqlParameterDeclarationContext,i); - } + EXISTS() { + return this.getToken(SqlBaseParser.EXISTS, 0); }; COMMENT() { @@ -10886,123 +13492,189 @@ class CreateFunctionContext extends StatementContext { return this.getTypedRuleContext(StringContext,0); }; + WITH() { + return this.getToken(SqlBaseParser.WITH, 0); + }; + + properties() { + return this.getTypedRuleContext(PropertiesContext,0); + }; + enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterCreateFunction(this); + listener.enterCreateMaterializedView(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitCreateFunction(this); + listener.exitCreateMaterializedView(this); } } } -SqlBaseParser.CreateFunctionContext = CreateFunctionContext; +SqlBaseParser.CreateMaterializedViewContext = CreateMaterializedViewContext; -class ShowGrantsContext extends StatementContext { +class AlterFunctionContext extends StatementContext { constructor(parser, ctx) { super(parser); super.copyFrom(ctx); } - SHOW() { - return this.getToken(SqlBaseParser.SHOW, 0); + ALTER() { + return this.getToken(SqlBaseParser.ALTER, 0); }; - GRANTS() { - return this.getToken(SqlBaseParser.GRANTS, 0); + FUNCTION() { + return this.getToken(SqlBaseParser.FUNCTION, 0); }; - ON() { - return this.getToken(SqlBaseParser.ON, 0); + qualifiedName() { + return this.getTypedRuleContext(QualifiedNameContext,0); + }; + + alterRoutineCharacteristics() { + return this.getTypedRuleContext(AlterRoutineCharacteristicsContext,0); + }; + + types() { + return this.getTypedRuleContext(TypesContext,0); + }; + + enterRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.enterAlterFunction(this); + } + } + + exitRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.exitAlterFunction(this); + } + } + + +} + +SqlBaseParser.AlterFunctionContext = AlterFunctionContext; + +class SetSessionContext extends StatementContext { + + constructor(parser, ctx) { + super(parser); + super.copyFrom(ctx); + } + + SET() { + return this.getToken(SqlBaseParser.SET, 0); + }; + + SESSION() { + return this.getToken(SqlBaseParser.SESSION, 0); }; qualifiedName() { return this.getTypedRuleContext(QualifiedNameContext,0); }; - TABLE() { - return this.getToken(SqlBaseParser.TABLE, 0); + EQ() { + return this.getToken(SqlBaseParser.EQ, 0); + }; + + expression() { + return this.getTypedRuleContext(ExpressionContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterShowGrants(this); + listener.enterSetSession(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitShowGrants(this); + listener.exitSetSession(this); } } } -SqlBaseParser.ShowGrantsContext = ShowGrantsContext; +SqlBaseParser.SetSessionContext = SetSessionContext; -class DropSchemaContext extends StatementContext { +class CreateViewContext extends StatementContext { constructor(parser, ctx) { super(parser); super.copyFrom(ctx); } - DROP() { - return this.getToken(SqlBaseParser.DROP, 0); + CREATE() { + return this.getToken(SqlBaseParser.CREATE, 0); }; - SCHEMA() { - return this.getToken(SqlBaseParser.SCHEMA, 0); + VIEW() { + return this.getToken(SqlBaseParser.VIEW, 0); }; qualifiedName() { return this.getTypedRuleContext(QualifiedNameContext,0); }; - IF() { - return this.getToken(SqlBaseParser.IF, 0); + AS() { + return this.getToken(SqlBaseParser.AS, 0); }; - EXISTS() { - return this.getToken(SqlBaseParser.EXISTS, 0); + query() { + return this.getTypedRuleContext(QueryContext,0); }; - CASCADE() { - return this.getToken(SqlBaseParser.CASCADE, 0); + OR() { + return this.getToken(SqlBaseParser.OR, 0); }; - RESTRICT() { - return this.getToken(SqlBaseParser.RESTRICT, 0); + REPLACE() { + return this.getToken(SqlBaseParser.REPLACE, 0); + }; + + SECURITY() { + return this.getToken(SqlBaseParser.SECURITY, 0); + }; + + DEFINER() { + return this.getToken(SqlBaseParser.DEFINER, 0); + }; + + INVOKER() { + return this.getToken(SqlBaseParser.INVOKER, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterDropSchema(this); + listener.enterCreateView(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitDropSchema(this); + listener.exitCreateView(this); } } } -SqlBaseParser.DropSchemaContext = DropSchemaContext; +SqlBaseParser.CreateViewContext = CreateViewContext; -class ShowCreateViewContext extends StatementContext { +class ShowSchemasContext extends StatementContext { constructor(parser, ctx) { super(parser); + this.pattern = null;; + this.escape = null;; super.copyFrom(ctx); } @@ -11010,44 +13682,67 @@ class ShowCreateViewContext extends StatementContext { return this.getToken(SqlBaseParser.SHOW, 0); }; - CREATE() { - return this.getToken(SqlBaseParser.CREATE, 0); + SCHEMAS() { + return this.getToken(SqlBaseParser.SCHEMAS, 0); }; - VIEW() { - return this.getToken(SqlBaseParser.VIEW, 0); + identifier() { + return this.getTypedRuleContext(IdentifierContext,0); + }; + + LIKE() { + return this.getToken(SqlBaseParser.LIKE, 0); + }; + + FROM() { + return this.getToken(SqlBaseParser.FROM, 0); + }; + + IN() { + return this.getToken(SqlBaseParser.IN, 0); + }; + + string = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(StringContext); + } else { + return this.getTypedRuleContext(StringContext,i); + } }; - qualifiedName() { - return this.getTypedRuleContext(QualifiedNameContext,0); + ESCAPE() { + return this.getToken(SqlBaseParser.ESCAPE, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterShowCreateView(this); + listener.enterShowSchemas(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitShowCreateView(this); + listener.exitShowSchemas(this); } } } -SqlBaseParser.ShowCreateViewContext = ShowCreateViewContext; +SqlBaseParser.ShowSchemasContext = ShowSchemasContext; -class CreateTableContext extends StatementContext { +class DropTableContext extends StatementContext { constructor(parser, ctx) { super(parser); super.copyFrom(ctx); } - CREATE() { - return this.getToken(SqlBaseParser.CREATE, 0); + DROP() { + return this.getToken(SqlBaseParser.DROP, 0); }; TABLE() { @@ -11058,370 +13753,313 @@ class CreateTableContext extends StatementContext { return this.getTypedRuleContext(QualifiedNameContext,0); }; - tableElement = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTypedRuleContexts(TableElementContext); - } else { - return this.getTypedRuleContext(TableElementContext,i); - } - }; - IF() { return this.getToken(SqlBaseParser.IF, 0); }; - NOT() { - return this.getToken(SqlBaseParser.NOT, 0); - }; - EXISTS() { return this.getToken(SqlBaseParser.EXISTS, 0); }; - COMMENT() { - return this.getToken(SqlBaseParser.COMMENT, 0); - }; - - string() { - return this.getTypedRuleContext(StringContext,0); - }; - - WITH() { - return this.getToken(SqlBaseParser.WITH, 0); - }; - - properties() { - return this.getTypedRuleContext(PropertiesContext,0); - }; - enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterCreateTable(this); + listener.enterDropTable(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitCreateTable(this); + listener.exitDropTable(this); } } } -SqlBaseParser.CreateTableContext = CreateTableContext; +SqlBaseParser.DropTableContext = DropTableContext; -class StartTransactionContext extends StatementContext { +class RollbackContext extends StatementContext { constructor(parser, ctx) { super(parser); super.copyFrom(ctx); } - START() { - return this.getToken(SqlBaseParser.START, 0); - }; - - TRANSACTION() { - return this.getToken(SqlBaseParser.TRANSACTION, 0); + ROLLBACK() { + return this.getToken(SqlBaseParser.ROLLBACK, 0); }; - transactionMode = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTypedRuleContexts(TransactionModeContext); - } else { - return this.getTypedRuleContext(TransactionModeContext,i); - } + WORK() { + return this.getToken(SqlBaseParser.WORK, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterStartTransaction(this); + listener.enterRollback(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitStartTransaction(this); + listener.exitRollback(this); } } } -SqlBaseParser.StartTransactionContext = StartTransactionContext; +SqlBaseParser.RollbackContext = RollbackContext; -class CreateTableAsSelectContext extends StatementContext { +class RenameViewContext extends StatementContext { constructor(parser, ctx) { super(parser); + this.from = null;; + this.to = null;; super.copyFrom(ctx); } - CREATE() { - return this.getToken(SqlBaseParser.CREATE, 0); + ALTER() { + return this.getToken(SqlBaseParser.ALTER, 0); }; - TABLE() { - return this.getToken(SqlBaseParser.TABLE, 0); + VIEW() { + return this.getToken(SqlBaseParser.VIEW, 0); }; - qualifiedName() { - return this.getTypedRuleContext(QualifiedNameContext,0); + RENAME() { + return this.getToken(SqlBaseParser.RENAME, 0); }; - AS() { - return this.getToken(SqlBaseParser.AS, 0); + TO() { + return this.getToken(SqlBaseParser.TO, 0); }; - query() { - return this.getTypedRuleContext(QueryContext,0); + qualifiedName = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(QualifiedNameContext); + } else { + return this.getTypedRuleContext(QualifiedNameContext,i); + } }; IF() { return this.getToken(SqlBaseParser.IF, 0); }; - NOT() { - return this.getToken(SqlBaseParser.NOT, 0); - }; - EXISTS() { return this.getToken(SqlBaseParser.EXISTS, 0); }; - columnAliases() { - return this.getTypedRuleContext(ColumnAliasesContext,0); - }; - - COMMENT() { - return this.getToken(SqlBaseParser.COMMENT, 0); - }; - - string() { - return this.getTypedRuleContext(StringContext,0); - }; - - WITH = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTokens(SqlBaseParser.WITH); - } else { - return this.getToken(SqlBaseParser.WITH, i); - } - }; - - - properties() { - return this.getTypedRuleContext(PropertiesContext,0); - }; - - DATA() { - return this.getToken(SqlBaseParser.DATA, 0); - }; - - NO() { - return this.getToken(SqlBaseParser.NO, 0); - }; - enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterCreateTableAsSelect(this); + listener.enterRenameView(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitCreateTableAsSelect(this); + listener.exitRenameView(this); } } } -SqlBaseParser.CreateTableAsSelectContext = CreateTableAsSelectContext; +SqlBaseParser.RenameViewContext = RenameViewContext; -class ShowStatsContext extends StatementContext { +class AlterColumnDropNotNullContext extends StatementContext { constructor(parser, ctx) { super(parser); + this.tableName = null;; + this.column = null;; super.copyFrom(ctx); } - SHOW() { - return this.getToken(SqlBaseParser.SHOW, 0); + ALTER = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTokens(SqlBaseParser.ALTER); + } else { + return this.getToken(SqlBaseParser.ALTER, i); + } }; - STATS() { - return this.getToken(SqlBaseParser.STATS, 0); + + TABLE() { + return this.getToken(SqlBaseParser.TABLE, 0); }; - FOR() { - return this.getToken(SqlBaseParser.FOR, 0); + DROP() { + return this.getToken(SqlBaseParser.DROP, 0); + }; + + NOT() { + return this.getToken(SqlBaseParser.NOT, 0); + }; + + NULL() { + return this.getToken(SqlBaseParser.NULL, 0); }; qualifiedName() { return this.getTypedRuleContext(QualifiedNameContext,0); }; + identifier() { + return this.getTypedRuleContext(IdentifierContext,0); + }; + + IF() { + return this.getToken(SqlBaseParser.IF, 0); + }; + + EXISTS() { + return this.getToken(SqlBaseParser.EXISTS, 0); + }; + + COLUMN() { + return this.getToken(SqlBaseParser.COLUMN, 0); + }; + enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterShowStats(this); + listener.enterAlterColumnDropNotNull(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitShowStats(this); + listener.exitAlterColumnDropNotNull(this); } } } -SqlBaseParser.ShowStatsContext = ShowStatsContext; +SqlBaseParser.AlterColumnDropNotNullContext = AlterColumnDropNotNullContext; -class DropFunctionContext extends StatementContext { +class GrantRolesContext extends StatementContext { constructor(parser, ctx) { super(parser); super.copyFrom(ctx); } - DROP() { - return this.getToken(SqlBaseParser.DROP, 0); + GRANT() { + return this.getToken(SqlBaseParser.GRANT, 0); }; - FUNCTION() { - return this.getToken(SqlBaseParser.FUNCTION, 0); + roles() { + return this.getTypedRuleContext(RolesContext,0); }; - qualifiedName() { - return this.getTypedRuleContext(QualifiedNameContext,0); + TO() { + return this.getToken(SqlBaseParser.TO, 0); }; - TEMPORARY() { - return this.getToken(SqlBaseParser.TEMPORARY, 0); + principal = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(PrincipalContext); + } else { + return this.getTypedRuleContext(PrincipalContext,i); + } }; - IF() { - return this.getToken(SqlBaseParser.IF, 0); + WITH() { + return this.getToken(SqlBaseParser.WITH, 0); }; - EXISTS() { - return this.getToken(SqlBaseParser.EXISTS, 0); + ADMIN() { + return this.getToken(SqlBaseParser.ADMIN, 0); }; - types() { - return this.getTypedRuleContext(TypesContext,0); + OPTION() { + return this.getToken(SqlBaseParser.OPTION, 0); + }; + + GRANTED() { + return this.getToken(SqlBaseParser.GRANTED, 0); + }; + + BY() { + return this.getToken(SqlBaseParser.BY, 0); + }; + + grantor() { + return this.getTypedRuleContext(GrantorContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterDropFunction(this); + listener.enterGrantRoles(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitDropFunction(this); + listener.exitGrantRoles(this); } } } -SqlBaseParser.DropFunctionContext = DropFunctionContext; +SqlBaseParser.GrantRolesContext = GrantRolesContext; -class RevokeContext extends StatementContext { +class CallContext extends StatementContext { constructor(parser, ctx) { super(parser); - this.grantee = null;; super.copyFrom(ctx); } - REVOKE() { - return this.getToken(SqlBaseParser.REVOKE, 0); - }; - - ON() { - return this.getToken(SqlBaseParser.ON, 0); + CALL() { + return this.getToken(SqlBaseParser.CALL, 0); }; qualifiedName() { return this.getTypedRuleContext(QualifiedNameContext,0); }; - FROM() { - return this.getToken(SqlBaseParser.FROM, 0); - }; - - principal() { - return this.getTypedRuleContext(PrincipalContext,0); - }; - - privilege = function(i) { + callArgument = function(i) { if(i===undefined) { i = null; } if(i===null) { - return this.getTypedRuleContexts(PrivilegeContext); + return this.getTypedRuleContexts(CallArgumentContext); } else { - return this.getTypedRuleContext(PrivilegeContext,i); + return this.getTypedRuleContext(CallArgumentContext,i); } }; - ALL() { - return this.getToken(SqlBaseParser.ALL, 0); - }; - - PRIVILEGES() { - return this.getToken(SqlBaseParser.PRIVILEGES, 0); - }; - - GRANT() { - return this.getToken(SqlBaseParser.GRANT, 0); - }; - - OPTION() { - return this.getToken(SqlBaseParser.OPTION, 0); - }; - - FOR() { - return this.getToken(SqlBaseParser.FOR, 0); - }; - - TABLE() { - return this.getToken(SqlBaseParser.TABLE, 0); - }; - enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterRevoke(this); + listener.enterCall(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitRevoke(this); + listener.exitCall(this); } } } -SqlBaseParser.RevokeContext = RevokeContext; +SqlBaseParser.CallContext = CallContext; -class UpdateContext extends StatementContext { +class RefreshMaterializedViewContext extends StatementContext { constructor(parser, ctx) { super(parser); @@ -11429,27 +14067,20 @@ class UpdateContext extends StatementContext { super.copyFrom(ctx); } - UPDATE() { - return this.getToken(SqlBaseParser.UPDATE, 0); + REFRESH() { + return this.getToken(SqlBaseParser.REFRESH, 0); }; - qualifiedName() { - return this.getTypedRuleContext(QualifiedNameContext,0); + MATERIALIZED() { + return this.getToken(SqlBaseParser.MATERIALIZED, 0); }; - SET() { - return this.getToken(SqlBaseParser.SET, 0); + VIEW() { + return this.getToken(SqlBaseParser.VIEW, 0); }; - updateAssignment = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTypedRuleContexts(UpdateAssignmentContext); - } else { - return this.getTypedRuleContext(UpdateAssignmentContext,i); - } + qualifiedName() { + return this.getTypedRuleContext(QualifiedNameContext,0); }; WHERE() { @@ -11462,121 +14093,119 @@ class UpdateContext extends StatementContext { enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterUpdate(this); + listener.enterRefreshMaterializedView(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitUpdate(this); + listener.exitRefreshMaterializedView(this); } } } -SqlBaseParser.UpdateContext = UpdateContext; +SqlBaseParser.RefreshMaterializedViewContext = RefreshMaterializedViewContext; -class CreateTypeContext extends StatementContext { +class ShowCreateMaterializedViewContext extends StatementContext { constructor(parser, ctx) { super(parser); super.copyFrom(ctx); } - CREATE() { - return this.getToken(SqlBaseParser.CREATE, 0); - }; - - TYPE() { - return this.getToken(SqlBaseParser.TYPE, 0); + SHOW() { + return this.getToken(SqlBaseParser.SHOW, 0); }; - qualifiedName() { - return this.getTypedRuleContext(QualifiedNameContext,0); + CREATE() { + return this.getToken(SqlBaseParser.CREATE, 0); }; - AS() { - return this.getToken(SqlBaseParser.AS, 0); + MATERIALIZED() { + return this.getToken(SqlBaseParser.MATERIALIZED, 0); }; - sqlParameterDeclaration = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTypedRuleContexts(SqlParameterDeclarationContext); - } else { - return this.getTypedRuleContext(SqlParameterDeclarationContext,i); - } + VIEW() { + return this.getToken(SqlBaseParser.VIEW, 0); }; - type() { - return this.getTypedRuleContext(TypeContext,0); + qualifiedName() { + return this.getTypedRuleContext(QualifiedNameContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterCreateType(this); + listener.enterShowCreateMaterializedView(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitCreateType(this); + listener.exitShowCreateMaterializedView(this); } } } -SqlBaseParser.CreateTypeContext = CreateTypeContext; +SqlBaseParser.ShowCreateMaterializedViewContext = ShowCreateMaterializedViewContext; -class DeleteContext extends StatementContext { +class ShowFunctionsContext extends StatementContext { constructor(parser, ctx) { super(parser); + this.pattern = null;; + this.escape = null;; super.copyFrom(ctx); } - DELETE() { - return this.getToken(SqlBaseParser.DELETE, 0); + SHOW() { + return this.getToken(SqlBaseParser.SHOW, 0); }; - FROM() { - return this.getToken(SqlBaseParser.FROM, 0); + FUNCTIONS() { + return this.getToken(SqlBaseParser.FUNCTIONS, 0); }; - qualifiedName() { - return this.getTypedRuleContext(QualifiedNameContext,0); + LIKE() { + return this.getToken(SqlBaseParser.LIKE, 0); }; - WHERE() { - return this.getToken(SqlBaseParser.WHERE, 0); + string = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(StringContext); + } else { + return this.getTypedRuleContext(StringContext,i); + } }; - booleanExpression() { - return this.getTypedRuleContext(BooleanExpressionContext,0); + ESCAPE() { + return this.getToken(SqlBaseParser.ESCAPE, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterDelete(this); + listener.enterShowFunctions(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitDelete(this); + listener.exitShowFunctions(this); } } } -SqlBaseParser.DeleteContext = DeleteContext; +SqlBaseParser.ShowFunctionsContext = ShowFunctionsContext; -class DescribeInputContext extends StatementContext { +class DescribeOutputContext extends StatementContext { constructor(parser, ctx) { super(parser); @@ -11587,8 +14216,8 @@ class DescribeInputContext extends StatementContext { return this.getToken(SqlBaseParser.DESCRIBE, 0); }; - INPUT() { - return this.getToken(SqlBaseParser.INPUT, 0); + OUTPUT() { + return this.getToken(SqlBaseParser.OUTPUT, 0); }; identifier() { @@ -11597,874 +14226,860 @@ class DescribeInputContext extends StatementContext { enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterDescribeInput(this); + listener.enterDescribeOutput(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitDescribeInput(this); + listener.exitDescribeOutput(this); } } } -SqlBaseParser.DescribeInputContext = DescribeInputContext; +SqlBaseParser.DescribeOutputContext = DescribeOutputContext; -class ShowStatsForQueryContext extends StatementContext { +class GrantContext extends StatementContext { constructor(parser, ctx) { super(parser); + this.grantee = null;; super.copyFrom(ctx); } - SHOW() { - return this.getToken(SqlBaseParser.SHOW, 0); + GRANT = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTokens(SqlBaseParser.GRANT); + } else { + return this.getToken(SqlBaseParser.GRANT, i); + } }; - STATS() { - return this.getToken(SqlBaseParser.STATS, 0); - }; - FOR() { - return this.getToken(SqlBaseParser.FOR, 0); + ON() { + return this.getToken(SqlBaseParser.ON, 0); }; - querySpecification() { - return this.getTypedRuleContext(QuerySpecificationContext,0); + qualifiedName() { + return this.getTypedRuleContext(QualifiedNameContext,0); }; - enterRule(listener) { - if(listener instanceof SqlBaseListener ) { - listener.enterShowStatsForQuery(this); - } - } + TO() { + return this.getToken(SqlBaseParser.TO, 0); + }; - exitRule(listener) { - if(listener instanceof SqlBaseListener ) { - listener.exitShowStatsForQuery(this); - } - } + principal() { + return this.getTypedRuleContext(PrincipalContext,0); + }; + privilege = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(PrivilegeContext); + } else { + return this.getTypedRuleContext(PrivilegeContext,i); + } + }; -} + ALL() { + return this.getToken(SqlBaseParser.ALL, 0); + }; -SqlBaseParser.ShowStatsForQueryContext = ShowStatsForQueryContext; + PRIVILEGES() { + return this.getToken(SqlBaseParser.PRIVILEGES, 0); + }; -class StatementDefaultContext extends StatementContext { + TABLE() { + return this.getToken(SqlBaseParser.TABLE, 0); + }; - constructor(parser, ctx) { - super(parser); - super.copyFrom(ctx); - } + WITH() { + return this.getToken(SqlBaseParser.WITH, 0); + }; - query() { - return this.getTypedRuleContext(QueryContext,0); + OPTION() { + return this.getToken(SqlBaseParser.OPTION, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterStatementDefault(this); + listener.enterGrant(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitStatementDefault(this); + listener.exitGrant(this); } } } -SqlBaseParser.StatementDefaultContext = StatementDefaultContext; +SqlBaseParser.GrantContext = GrantContext; -class TruncateTableContext extends StatementContext { +class SetTablePropertiesContext extends StatementContext { constructor(parser, ctx) { super(parser); + this.tableName = null;; super.copyFrom(ctx); } - TRUNCATE() { - return this.getToken(SqlBaseParser.TRUNCATE, 0); + ALTER() { + return this.getToken(SqlBaseParser.ALTER, 0); }; TABLE() { return this.getToken(SqlBaseParser.TABLE, 0); }; + SET() { + return this.getToken(SqlBaseParser.SET, 0); + }; + + PROPERTIES() { + return this.getToken(SqlBaseParser.PROPERTIES, 0); + }; + + properties() { + return this.getTypedRuleContext(PropertiesContext,0); + }; + qualifiedName() { return this.getTypedRuleContext(QualifiedNameContext,0); }; + IF() { + return this.getToken(SqlBaseParser.IF, 0); + }; + + EXISTS() { + return this.getToken(SqlBaseParser.EXISTS, 0); + }; + enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterTruncateTable(this); + listener.enterSetTableProperties(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitTruncateTable(this); + listener.exitSetTableProperties(this); } } } -SqlBaseParser.TruncateTableContext = TruncateTableContext; +SqlBaseParser.SetTablePropertiesContext = SetTablePropertiesContext; -class CreateMaterializedViewContext extends StatementContext { +class QueryContext extends antlr4.ParserRuleContext { - constructor(parser, ctx) { - super(parser); - super.copyFrom(ctx); + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = SqlBaseParser.RULE_query; } - CREATE() { - return this.getToken(SqlBaseParser.CREATE, 0); - }; - - MATERIALIZED() { - return this.getToken(SqlBaseParser.MATERIALIZED, 0); + queryNoWith() { + return this.getTypedRuleContext(QueryNoWithContext,0); }; - VIEW() { - return this.getToken(SqlBaseParser.VIEW, 0); + with_() { + return this.getTypedRuleContext(WithContext,0); }; - qualifiedName() { - return this.getTypedRuleContext(QualifiedNameContext,0); - }; + enterRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.enterQuery(this); + } + } - AS() { - return this.getToken(SqlBaseParser.AS, 0); - }; + exitRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.exitQuery(this); + } + } - query() { - return this.getTypedRuleContext(QueryContext,0); - }; - IF() { - return this.getToken(SqlBaseParser.IF, 0); - }; +} - NOT() { - return this.getToken(SqlBaseParser.NOT, 0); - }; - EXISTS() { - return this.getToken(SqlBaseParser.EXISTS, 0); - }; - COMMENT() { - return this.getToken(SqlBaseParser.COMMENT, 0); - }; +class WithContext extends antlr4.ParserRuleContext { - string() { - return this.getTypedRuleContext(StringContext,0); - }; + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = SqlBaseParser.RULE_with; + } WITH() { return this.getToken(SqlBaseParser.WITH, 0); }; - properties() { - return this.getTypedRuleContext(PropertiesContext,0); + namedQuery = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(NamedQueryContext); + } else { + return this.getTypedRuleContext(NamedQueryContext,i); + } + }; + + RECURSIVE() { + return this.getToken(SqlBaseParser.RECURSIVE, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterCreateMaterializedView(this); + listener.enterWith(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitCreateMaterializedView(this); + listener.exitWith(this); } } } -SqlBaseParser.CreateMaterializedViewContext = CreateMaterializedViewContext; - -class AlterFunctionContext extends StatementContext { - constructor(parser, ctx) { - super(parser); - super.copyFrom(ctx); - } - ALTER() { - return this.getToken(SqlBaseParser.ALTER, 0); - }; +class TableElementContext extends antlr4.ParserRuleContext { - FUNCTION() { - return this.getToken(SqlBaseParser.FUNCTION, 0); - }; + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = SqlBaseParser.RULE_tableElement; + } - qualifiedName() { - return this.getTypedRuleContext(QualifiedNameContext,0); + constraintSpecification() { + return this.getTypedRuleContext(ConstraintSpecificationContext,0); }; - alterRoutineCharacteristics() { - return this.getTypedRuleContext(AlterRoutineCharacteristicsContext,0); + columnDefinition() { + return this.getTypedRuleContext(ColumnDefinitionContext,0); }; - types() { - return this.getTypedRuleContext(TypesContext,0); + likeClause() { + return this.getTypedRuleContext(LikeClauseContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterAlterFunction(this); + listener.enterTableElement(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitAlterFunction(this); + listener.exitTableElement(this); } } } -SqlBaseParser.AlterFunctionContext = AlterFunctionContext; -class SetSessionContext extends StatementContext { - constructor(parser, ctx) { - super(parser); - super.copyFrom(ctx); +class ColumnDefinitionContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = SqlBaseParser.RULE_columnDefinition; } - SET() { - return this.getToken(SqlBaseParser.SET, 0); + identifier() { + return this.getTypedRuleContext(IdentifierContext,0); }; - SESSION() { - return this.getToken(SqlBaseParser.SESSION, 0); + type() { + return this.getTypedRuleContext(TypeContext,0); }; - qualifiedName() { - return this.getTypedRuleContext(QualifiedNameContext,0); + NOT() { + return this.getToken(SqlBaseParser.NOT, 0); }; - EQ() { - return this.getToken(SqlBaseParser.EQ, 0); + NULL() { + return this.getToken(SqlBaseParser.NULL, 0); }; - expression() { - return this.getTypedRuleContext(ExpressionContext,0); + COMMENT() { + return this.getToken(SqlBaseParser.COMMENT, 0); + }; + + string() { + return this.getTypedRuleContext(StringContext,0); + }; + + WITH() { + return this.getToken(SqlBaseParser.WITH, 0); + }; + + properties() { + return this.getTypedRuleContext(PropertiesContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterSetSession(this); + listener.enterColumnDefinition(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitSetSession(this); + listener.exitColumnDefinition(this); } } } -SqlBaseParser.SetSessionContext = SetSessionContext; - -class CreateViewContext extends StatementContext { - - constructor(parser, ctx) { - super(parser); - super.copyFrom(ctx); - } - - CREATE() { - return this.getToken(SqlBaseParser.CREATE, 0); - }; - VIEW() { - return this.getToken(SqlBaseParser.VIEW, 0); - }; - - qualifiedName() { - return this.getTypedRuleContext(QualifiedNameContext,0); - }; - AS() { - return this.getToken(SqlBaseParser.AS, 0); - }; +class LikeClauseContext extends antlr4.ParserRuleContext { - query() { - return this.getTypedRuleContext(QueryContext,0); - }; + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = SqlBaseParser.RULE_likeClause; + this.optionType = null; + } - OR() { - return this.getToken(SqlBaseParser.OR, 0); + LIKE() { + return this.getToken(SqlBaseParser.LIKE, 0); }; - REPLACE() { - return this.getToken(SqlBaseParser.REPLACE, 0); + qualifiedName() { + return this.getTypedRuleContext(QualifiedNameContext,0); }; - SECURITY() { - return this.getToken(SqlBaseParser.SECURITY, 0); + PROPERTIES() { + return this.getToken(SqlBaseParser.PROPERTIES, 0); }; - DEFINER() { - return this.getToken(SqlBaseParser.DEFINER, 0); + INCLUDING() { + return this.getToken(SqlBaseParser.INCLUDING, 0); }; - INVOKER() { - return this.getToken(SqlBaseParser.INVOKER, 0); + EXCLUDING() { + return this.getToken(SqlBaseParser.EXCLUDING, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterCreateView(this); + listener.enterLikeClause(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitCreateView(this); + listener.exitLikeClause(this); } } } -SqlBaseParser.CreateViewContext = CreateViewContext; - -class ShowSchemasContext extends StatementContext { - - constructor(parser, ctx) { - super(parser); - this.pattern = null;; - this.escape = null;; - super.copyFrom(ctx); - } - - SHOW() { - return this.getToken(SqlBaseParser.SHOW, 0); - }; - - SCHEMAS() { - return this.getToken(SqlBaseParser.SCHEMAS, 0); - }; - - identifier() { - return this.getTypedRuleContext(IdentifierContext,0); - }; - LIKE() { - return this.getToken(SqlBaseParser.LIKE, 0); - }; - FROM() { - return this.getToken(SqlBaseParser.FROM, 0); - }; +class PropertiesContext extends antlr4.ParserRuleContext { - IN() { - return this.getToken(SqlBaseParser.IN, 0); - }; + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = SqlBaseParser.RULE_properties; + } - string = function(i) { + property = function(i) { if(i===undefined) { i = null; } if(i===null) { - return this.getTypedRuleContexts(StringContext); + return this.getTypedRuleContexts(PropertyContext); } else { - return this.getTypedRuleContext(StringContext,i); + return this.getTypedRuleContext(PropertyContext,i); } }; - ESCAPE() { - return this.getToken(SqlBaseParser.ESCAPE, 0); - }; - enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterShowSchemas(this); + listener.enterProperties(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitShowSchemas(this); + listener.exitProperties(this); } } } -SqlBaseParser.ShowSchemasContext = ShowSchemasContext; - -class DropTableContext extends StatementContext { - constructor(parser, ctx) { - super(parser); - super.copyFrom(ctx); - } - DROP() { - return this.getToken(SqlBaseParser.DROP, 0); - }; +class PropertyContext extends antlr4.ParserRuleContext { - TABLE() { - return this.getToken(SqlBaseParser.TABLE, 0); - }; + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = SqlBaseParser.RULE_property; + } - qualifiedName() { - return this.getTypedRuleContext(QualifiedNameContext,0); + identifier() { + return this.getTypedRuleContext(IdentifierContext,0); }; - IF() { - return this.getToken(SqlBaseParser.IF, 0); + EQ() { + return this.getToken(SqlBaseParser.EQ, 0); }; - EXISTS() { - return this.getToken(SqlBaseParser.EXISTS, 0); + expression() { + return this.getTypedRuleContext(ExpressionContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterDropTable(this); + listener.enterProperty(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitDropTable(this); + listener.exitProperty(this); } } } -SqlBaseParser.DropTableContext = DropTableContext; -class RollbackContext extends StatementContext { - constructor(parser, ctx) { - super(parser); - super.copyFrom(ctx); +class SqlParameterDeclarationContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = SqlBaseParser.RULE_sqlParameterDeclaration; } - ROLLBACK() { - return this.getToken(SqlBaseParser.ROLLBACK, 0); + identifier() { + return this.getTypedRuleContext(IdentifierContext,0); }; - WORK() { - return this.getToken(SqlBaseParser.WORK, 0); + type() { + return this.getTypedRuleContext(TypeContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterRollback(this); + listener.enterSqlParameterDeclaration(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitRollback(this); + listener.exitSqlParameterDeclaration(this); } } } -SqlBaseParser.RollbackContext = RollbackContext; - -class GrantRolesContext extends StatementContext { - - constructor(parser, ctx) { - super(parser); - super.copyFrom(ctx); - } - GRANT() { - return this.getToken(SqlBaseParser.GRANT, 0); - }; - roles() { - return this.getTypedRuleContext(RolesContext,0); - }; +class RoutineCharacteristicsContext extends antlr4.ParserRuleContext { - TO() { - return this.getToken(SqlBaseParser.TO, 0); - }; + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = SqlBaseParser.RULE_routineCharacteristics; + } - principal = function(i) { + routineCharacteristic = function(i) { if(i===undefined) { i = null; } if(i===null) { - return this.getTypedRuleContexts(PrincipalContext); + return this.getTypedRuleContexts(RoutineCharacteristicContext); } else { - return this.getTypedRuleContext(PrincipalContext,i); + return this.getTypedRuleContext(RoutineCharacteristicContext,i); } }; - WITH() { - return this.getToken(SqlBaseParser.WITH, 0); - }; - - ADMIN() { - return this.getToken(SqlBaseParser.ADMIN, 0); - }; - - OPTION() { - return this.getToken(SqlBaseParser.OPTION, 0); - }; - - GRANTED() { - return this.getToken(SqlBaseParser.GRANTED, 0); - }; - - BY() { - return this.getToken(SqlBaseParser.BY, 0); - }; - - grantor() { - return this.getTypedRuleContext(GrantorContext,0); - }; - enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterGrantRoles(this); + listener.enterRoutineCharacteristics(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitGrantRoles(this); + listener.exitRoutineCharacteristics(this); } } } -SqlBaseParser.GrantRolesContext = GrantRolesContext; -class CallContext extends StatementContext { - constructor(parser, ctx) { - super(parser); - super.copyFrom(ctx); +class RoutineCharacteristicContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = SqlBaseParser.RULE_routineCharacteristic; } - CALL() { - return this.getToken(SqlBaseParser.CALL, 0); + LANGUAGE() { + return this.getToken(SqlBaseParser.LANGUAGE, 0); }; - qualifiedName() { - return this.getTypedRuleContext(QualifiedNameContext,0); + language() { + return this.getTypedRuleContext(LanguageContext,0); }; - callArgument = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTypedRuleContexts(CallArgumentContext); - } else { - return this.getTypedRuleContext(CallArgumentContext,i); - } + determinism() { + return this.getTypedRuleContext(DeterminismContext,0); + }; + + nullCallClause() { + return this.getTypedRuleContext(NullCallClauseContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterCall(this); + listener.enterRoutineCharacteristic(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitCall(this); + listener.exitRoutineCharacteristic(this); } } } -SqlBaseParser.CallContext = CallContext; - -class RefreshMaterializedViewContext extends StatementContext { - - constructor(parser, ctx) { - super(parser); - super.copyFrom(ctx); - } - - REFRESH() { - return this.getToken(SqlBaseParser.REFRESH, 0); - }; - - MATERIALIZED() { - return this.getToken(SqlBaseParser.MATERIALIZED, 0); - }; - VIEW() { - return this.getToken(SqlBaseParser.VIEW, 0); - }; - qualifiedName() { - return this.getTypedRuleContext(QualifiedNameContext,0); - }; +class AlterRoutineCharacteristicsContext extends antlr4.ParserRuleContext { - WHERE() { - return this.getToken(SqlBaseParser.WHERE, 0); - }; + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = SqlBaseParser.RULE_alterRoutineCharacteristics; + } - booleanExpression() { - return this.getTypedRuleContext(BooleanExpressionContext,0); + alterRoutineCharacteristic = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(AlterRoutineCharacteristicContext); + } else { + return this.getTypedRuleContext(AlterRoutineCharacteristicContext,i); + } }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterRefreshMaterializedView(this); + listener.enterAlterRoutineCharacteristics(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitRefreshMaterializedView(this); + listener.exitAlterRoutineCharacteristics(this); } } } -SqlBaseParser.RefreshMaterializedViewContext = RefreshMaterializedViewContext; - -class ShowCreateMaterializedViewContext extends StatementContext { - - constructor(parser, ctx) { - super(parser); - super.copyFrom(ctx); - } - - SHOW() { - return this.getToken(SqlBaseParser.SHOW, 0); - }; - CREATE() { - return this.getToken(SqlBaseParser.CREATE, 0); - }; - MATERIALIZED() { - return this.getToken(SqlBaseParser.MATERIALIZED, 0); - }; +class AlterRoutineCharacteristicContext extends antlr4.ParserRuleContext { - VIEW() { - return this.getToken(SqlBaseParser.VIEW, 0); - }; + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = SqlBaseParser.RULE_alterRoutineCharacteristic; + } - qualifiedName() { - return this.getTypedRuleContext(QualifiedNameContext,0); + nullCallClause() { + return this.getTypedRuleContext(NullCallClauseContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterShowCreateMaterializedView(this); + listener.enterAlterRoutineCharacteristic(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitShowCreateMaterializedView(this); + listener.exitAlterRoutineCharacteristic(this); } } } -SqlBaseParser.ShowCreateMaterializedViewContext = ShowCreateMaterializedViewContext; - -class ShowFunctionsContext extends StatementContext { - - constructor(parser, ctx) { - super(parser); - this.pattern = null;; - this.escape = null;; - super.copyFrom(ctx); - } - SHOW() { - return this.getToken(SqlBaseParser.SHOW, 0); - }; - FUNCTIONS() { - return this.getToken(SqlBaseParser.FUNCTIONS, 0); - }; +class RoutineBodyContext extends antlr4.ParserRuleContext { - LIKE() { - return this.getToken(SqlBaseParser.LIKE, 0); - }; + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = SqlBaseParser.RULE_routineBody; + } - string = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTypedRuleContexts(StringContext); - } else { - return this.getTypedRuleContext(StringContext,i); - } + returnStatement() { + return this.getTypedRuleContext(ReturnStatementContext,0); }; - ESCAPE() { - return this.getToken(SqlBaseParser.ESCAPE, 0); + externalBodyReference() { + return this.getTypedRuleContext(ExternalBodyReferenceContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterShowFunctions(this); + listener.enterRoutineBody(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitShowFunctions(this); + listener.exitRoutineBody(this); } } } -SqlBaseParser.ShowFunctionsContext = ShowFunctionsContext; -class DescribeOutputContext extends StatementContext { - constructor(parser, ctx) { - super(parser); - super.copyFrom(ctx); - } +class ReturnStatementContext extends antlr4.ParserRuleContext { - DESCRIBE() { - return this.getToken(SqlBaseParser.DESCRIBE, 0); - }; + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = SqlBaseParser.RULE_returnStatement; + } - OUTPUT() { - return this.getToken(SqlBaseParser.OUTPUT, 0); + RETURN() { + return this.getToken(SqlBaseParser.RETURN, 0); }; - identifier() { - return this.getTypedRuleContext(IdentifierContext,0); + expression() { + return this.getTypedRuleContext(ExpressionContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterDescribeOutput(this); + listener.enterReturnStatement(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitDescribeOutput(this); + listener.exitReturnStatement(this); } } } -SqlBaseParser.DescribeOutputContext = DescribeOutputContext; -class GrantContext extends StatementContext { - constructor(parser, ctx) { - super(parser); - this.grantee = null;; - super.copyFrom(ctx); +class ExternalBodyReferenceContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = SqlBaseParser.RULE_externalBodyReference; } - GRANT = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTokens(SqlBaseParser.GRANT); - } else { - return this.getToken(SqlBaseParser.GRANT, i); - } + EXTERNAL() { + return this.getToken(SqlBaseParser.EXTERNAL, 0); }; - - ON() { - return this.getToken(SqlBaseParser.ON, 0); + NAME() { + return this.getToken(SqlBaseParser.NAME, 0); }; - qualifiedName() { - return this.getTypedRuleContext(QualifiedNameContext,0); + externalRoutineName() { + return this.getTypedRuleContext(ExternalRoutineNameContext,0); }; - TO() { - return this.getToken(SqlBaseParser.TO, 0); - }; + enterRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.enterExternalBodyReference(this); + } + } - principal() { - return this.getTypedRuleContext(PrincipalContext,0); - }; + exitRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.exitExternalBodyReference(this); + } + } - privilege = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTypedRuleContexts(PrivilegeContext); - } else { - return this.getTypedRuleContext(PrivilegeContext,i); - } - }; - ALL() { - return this.getToken(SqlBaseParser.ALL, 0); - }; +} - PRIVILEGES() { - return this.getToken(SqlBaseParser.PRIVILEGES, 0); - }; - TABLE() { - return this.getToken(SqlBaseParser.TABLE, 0); - }; - WITH() { - return this.getToken(SqlBaseParser.WITH, 0); +class LanguageContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = SqlBaseParser.RULE_language; + } + + SQL() { + return this.getToken(SqlBaseParser.SQL, 0); }; - OPTION() { - return this.getToken(SqlBaseParser.OPTION, 0); + identifier() { + return this.getTypedRuleContext(IdentifierContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterGrant(this); + listener.enterLanguage(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitGrant(this); + listener.exitLanguage(this); } } } -SqlBaseParser.GrantContext = GrantContext; -class QueryContext extends antlr4.ParserRuleContext { + +class DeterminismContext extends antlr4.ParserRuleContext { constructor(parser, parent, invokingState) { if(parent===undefined) { @@ -12475,26 +15090,26 @@ class QueryContext extends antlr4.ParserRuleContext { } super(parent, invokingState); this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_query; + this.ruleIndex = SqlBaseParser.RULE_determinism; } - queryNoWith() { - return this.getTypedRuleContext(QueryNoWithContext,0); + DETERMINISTIC() { + return this.getToken(SqlBaseParser.DETERMINISTIC, 0); }; - with_() { - return this.getTypedRuleContext(WithContext,0); + NOT() { + return this.getToken(SqlBaseParser.NOT, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterQuery(this); + listener.enterDeterminism(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitQuery(this); + listener.exitDeterminism(this); } } @@ -12503,7 +15118,7 @@ class QueryContext extends antlr4.ParserRuleContext { -class WithContext extends antlr4.ParserRuleContext { +class NullCallClauseContext extends antlr4.ParserRuleContext { constructor(parser, parent, invokingState) { if(parent===undefined) { @@ -12514,37 +15129,46 @@ class WithContext extends antlr4.ParserRuleContext { } super(parent, invokingState); this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_with; + this.ruleIndex = SqlBaseParser.RULE_nullCallClause; } - WITH() { - return this.getToken(SqlBaseParser.WITH, 0); + RETURNS() { + return this.getToken(SqlBaseParser.RETURNS, 0); }; - namedQuery = function(i) { - if(i===undefined) { - i = null; - } + NULL = function(i) { + if(i===undefined) { + i = null; + } if(i===null) { - return this.getTypedRuleContexts(NamedQueryContext); + return this.getTokens(SqlBaseParser.NULL); } else { - return this.getTypedRuleContext(NamedQueryContext,i); + return this.getToken(SqlBaseParser.NULL, i); } }; - RECURSIVE() { - return this.getToken(SqlBaseParser.RECURSIVE, 0); + + ON() { + return this.getToken(SqlBaseParser.ON, 0); + }; + + INPUT() { + return this.getToken(SqlBaseParser.INPUT, 0); + }; + + CALLED() { + return this.getToken(SqlBaseParser.CALLED, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterWith(this); + listener.enterNullCallClause(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitWith(this); + listener.exitNullCallClause(this); } } @@ -12553,7 +15177,7 @@ class WithContext extends antlr4.ParserRuleContext { -class TableElementContext extends antlr4.ParserRuleContext { +class ExternalRoutineNameContext extends antlr4.ParserRuleContext { constructor(parser, parent, invokingState) { if(parent===undefined) { @@ -12564,26 +15188,22 @@ class TableElementContext extends antlr4.ParserRuleContext { } super(parent, invokingState); this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_tableElement; + this.ruleIndex = SqlBaseParser.RULE_externalRoutineName; } - columnDefinition() { - return this.getTypedRuleContext(ColumnDefinitionContext,0); - }; - - likeClause() { - return this.getTypedRuleContext(LikeClauseContext,0); + identifier() { + return this.getTypedRuleContext(IdentifierContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterTableElement(this); + listener.enterExternalRoutineName(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitTableElement(this); + listener.exitExternalRoutineName(this); } } @@ -12592,7 +15212,7 @@ class TableElementContext extends antlr4.ParserRuleContext { -class ColumnDefinitionContext extends antlr4.ParserRuleContext { +class QueryNoWithContext extends antlr4.ParserRuleContext { constructor(parser, parent, invokingState) { if(parent===undefined) { @@ -12603,50 +15223,96 @@ class ColumnDefinitionContext extends antlr4.ParserRuleContext { } super(parent, invokingState); this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_columnDefinition; + this.ruleIndex = SqlBaseParser.RULE_queryNoWith; + this.offset = null; + this.limit = null; + this.fetchFirstNRows = null; } - identifier() { - return this.getTypedRuleContext(IdentifierContext,0); + queryTerm() { + return this.getTypedRuleContext(QueryTermContext,0); }; - type() { - return this.getTypedRuleContext(TypeContext,0); + ORDER() { + return this.getToken(SqlBaseParser.ORDER, 0); }; - NOT() { - return this.getToken(SqlBaseParser.NOT, 0); + BY() { + return this.getToken(SqlBaseParser.BY, 0); }; - NULL() { - return this.getToken(SqlBaseParser.NULL, 0); + sortItem = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(SortItemContext); + } else { + return this.getTypedRuleContext(SortItemContext,i); + } }; - COMMENT() { - return this.getToken(SqlBaseParser.COMMENT, 0); + OFFSET() { + return this.getToken(SqlBaseParser.OFFSET, 0); }; - string() { - return this.getTypedRuleContext(StringContext,0); + INTEGER_VALUE = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTokens(SqlBaseParser.INTEGER_VALUE); + } else { + return this.getToken(SqlBaseParser.INTEGER_VALUE, i); + } }; - WITH() { - return this.getToken(SqlBaseParser.WITH, 0); + + LIMIT() { + return this.getToken(SqlBaseParser.LIMIT, 0); }; - properties() { - return this.getTypedRuleContext(PropertiesContext,0); + ROW() { + return this.getToken(SqlBaseParser.ROW, 0); + }; + + ROWS = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTokens(SqlBaseParser.ROWS); + } else { + return this.getToken(SqlBaseParser.ROWS, i); + } + }; + + + ALL() { + return this.getToken(SqlBaseParser.ALL, 0); + }; + + FETCH() { + return this.getToken(SqlBaseParser.FETCH, 0); + }; + + FIRST() { + return this.getToken(SqlBaseParser.FIRST, 0); + }; + + ONLY() { + return this.getToken(SqlBaseParser.ONLY, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterColumnDefinition(this); + listener.enterQueryNoWith(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitColumnDefinition(this); + listener.exitQueryNoWith(this); } } @@ -12655,7 +15321,7 @@ class ColumnDefinitionContext extends antlr4.ParserRuleContext { -class LikeClauseContext extends antlr4.ParserRuleContext { +class QueryTermContext extends antlr4.ParserRuleContext { constructor(parser, parent, invokingState) { if(parent===undefined) { @@ -12666,48 +15332,101 @@ class LikeClauseContext extends antlr4.ParserRuleContext { } super(parent, invokingState); this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_likeClause; - this.optionType = null; + this.ruleIndex = SqlBaseParser.RULE_queryTerm; } - LIKE() { - return this.getToken(SqlBaseParser.LIKE, 0); + + + copyFrom(ctx) { + super.copyFrom(ctx); + } + +} + + +class QueryTermDefaultContext extends QueryTermContext { + + constructor(parser, ctx) { + super(parser); + super.copyFrom(ctx); + } + + queryPrimary() { + return this.getTypedRuleContext(QueryPrimaryContext,0); }; - qualifiedName() { - return this.getTypedRuleContext(QualifiedNameContext,0); + enterRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.enterQueryTermDefault(this); + } + } + + exitRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.exitQueryTermDefault(this); + } + } + + +} + +SqlBaseParser.QueryTermDefaultContext = QueryTermDefaultContext; + +class SetOperationContext extends QueryTermContext { + + constructor(parser, ctx) { + super(parser); + this.left = null;; + this.operator = null;; + this.right = null;; + super.copyFrom(ctx); + } + + queryTerm = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(QueryTermContext); + } else { + return this.getTypedRuleContext(QueryTermContext,i); + } }; - PROPERTIES() { - return this.getToken(SqlBaseParser.PROPERTIES, 0); + INTERSECT() { + return this.getToken(SqlBaseParser.INTERSECT, 0); }; - INCLUDING() { - return this.getToken(SqlBaseParser.INCLUDING, 0); + setQuantifier() { + return this.getTypedRuleContext(SetQuantifierContext,0); + }; + + UNION() { + return this.getToken(SqlBaseParser.UNION, 0); }; - EXCLUDING() { - return this.getToken(SqlBaseParser.EXCLUDING, 0); + EXCEPT() { + return this.getToken(SqlBaseParser.EXCEPT, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterLikeClause(this); + listener.enterSetOperation(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitLikeClause(this); + listener.exitSetOperation(this); } } } +SqlBaseParser.SetOperationContext = SetOperationContext; - -class PropertiesContext extends antlr4.ParserRuleContext { +class QueryPrimaryContext extends antlr4.ParserRuleContext { constructor(parser, parent, invokingState) { if(parent===undefined) { @@ -12718,162 +15437,146 @@ class PropertiesContext extends antlr4.ParserRuleContext { } super(parent, invokingState); this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_properties; + this.ruleIndex = SqlBaseParser.RULE_queryPrimary; } - property = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTypedRuleContexts(PropertyContext); - } else { - return this.getTypedRuleContext(PropertyContext,i); - } + + + copyFrom(ctx) { + super.copyFrom(ctx); + } + +} + + +class SubqueryContext extends QueryPrimaryContext { + + constructor(parser, ctx) { + super(parser); + super.copyFrom(ctx); + } + + queryNoWith() { + return this.getTypedRuleContext(QueryNoWithContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterProperties(this); + listener.enterSubquery(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitProperties(this); + listener.exitSubquery(this); } } } +SqlBaseParser.SubqueryContext = SubqueryContext; +class QueryPrimaryDefaultContext extends QueryPrimaryContext { -class PropertyContext extends antlr4.ParserRuleContext { - - constructor(parser, parent, invokingState) { - if(parent===undefined) { - parent = null; - } - if(invokingState===undefined || invokingState===null) { - invokingState = -1; - } - super(parent, invokingState); - this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_property; + constructor(parser, ctx) { + super(parser); + super.copyFrom(ctx); } - identifier() { - return this.getTypedRuleContext(IdentifierContext,0); - }; - - EQ() { - return this.getToken(SqlBaseParser.EQ, 0); - }; - - expression() { - return this.getTypedRuleContext(ExpressionContext,0); + querySpecification() { + return this.getTypedRuleContext(QuerySpecificationContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterProperty(this); + listener.enterQueryPrimaryDefault(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitProperty(this); + listener.exitQueryPrimaryDefault(this); } } } +SqlBaseParser.QueryPrimaryDefaultContext = QueryPrimaryDefaultContext; +class TableContext extends QueryPrimaryContext { -class SqlParameterDeclarationContext extends antlr4.ParserRuleContext { - - constructor(parser, parent, invokingState) { - if(parent===undefined) { - parent = null; - } - if(invokingState===undefined || invokingState===null) { - invokingState = -1; - } - super(parent, invokingState); - this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_sqlParameterDeclaration; + constructor(parser, ctx) { + super(parser); + super.copyFrom(ctx); } - identifier() { - return this.getTypedRuleContext(IdentifierContext,0); + TABLE() { + return this.getToken(SqlBaseParser.TABLE, 0); }; - type() { - return this.getTypedRuleContext(TypeContext,0); + qualifiedName() { + return this.getTypedRuleContext(QualifiedNameContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterSqlParameterDeclaration(this); + listener.enterTable(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitSqlParameterDeclaration(this); + listener.exitTable(this); } } } +SqlBaseParser.TableContext = TableContext; +class InlineTableContext extends QueryPrimaryContext { -class RoutineCharacteristicsContext extends antlr4.ParserRuleContext { - - constructor(parser, parent, invokingState) { - if(parent===undefined) { - parent = null; - } - if(invokingState===undefined || invokingState===null) { - invokingState = -1; - } - super(parent, invokingState); - this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_routineCharacteristics; + constructor(parser, ctx) { + super(parser); + super.copyFrom(ctx); } - routineCharacteristic = function(i) { + VALUES() { + return this.getToken(SqlBaseParser.VALUES, 0); + }; + + expression = function(i) { if(i===undefined) { i = null; } if(i===null) { - return this.getTypedRuleContexts(RoutineCharacteristicContext); + return this.getTypedRuleContexts(ExpressionContext); } else { - return this.getTypedRuleContext(RoutineCharacteristicContext,i); + return this.getTypedRuleContext(ExpressionContext,i); } }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterRoutineCharacteristics(this); + listener.enterInlineTable(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitRoutineCharacteristics(this); + listener.exitInlineTable(this); } } } +SqlBaseParser.InlineTableContext = InlineTableContext; - -class RoutineCharacteristicContext extends antlr4.ParserRuleContext { +class SortItemContext extends antlr4.ParserRuleContext { constructor(parser, parent, invokingState) { if(parent===undefined) { @@ -12884,34 +15587,44 @@ class RoutineCharacteristicContext extends antlr4.ParserRuleContext { } super(parent, invokingState); this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_routineCharacteristic; + this.ruleIndex = SqlBaseParser.RULE_sortItem; + this.ordering = null; + this.nullOrdering = null; } - LANGUAGE() { - return this.getToken(SqlBaseParser.LANGUAGE, 0); + expression() { + return this.getTypedRuleContext(ExpressionContext,0); }; - language() { - return this.getTypedRuleContext(LanguageContext,0); + NULLS() { + return this.getToken(SqlBaseParser.NULLS, 0); }; - determinism() { - return this.getTypedRuleContext(DeterminismContext,0); + ASC() { + return this.getToken(SqlBaseParser.ASC, 0); }; - nullCallClause() { - return this.getTypedRuleContext(NullCallClauseContext,0); + DESC() { + return this.getToken(SqlBaseParser.DESC, 0); + }; + + FIRST() { + return this.getToken(SqlBaseParser.FIRST, 0); + }; + + LAST() { + return this.getToken(SqlBaseParser.LAST, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterRoutineCharacteristic(this); + listener.enterSortItem(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitRoutineCharacteristic(this); + listener.exitSortItem(this); } } @@ -12920,7 +15633,7 @@ class RoutineCharacteristicContext extends antlr4.ParserRuleContext { -class AlterRoutineCharacteristicsContext extends antlr4.ParserRuleContext { +class QuerySpecificationContext extends antlr4.ParserRuleContext { constructor(parser, parent, invokingState) { if(parent===undefined) { @@ -12931,64 +15644,85 @@ class AlterRoutineCharacteristicsContext extends antlr4.ParserRuleContext { } super(parent, invokingState); this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_alterRoutineCharacteristics; + this.ruleIndex = SqlBaseParser.RULE_querySpecification; + this.where = null; + this.having = null; } - alterRoutineCharacteristic = function(i) { + SELECT() { + return this.getToken(SqlBaseParser.SELECT, 0); + }; + + selectItem = function(i) { if(i===undefined) { i = null; } if(i===null) { - return this.getTypedRuleContexts(AlterRoutineCharacteristicContext); + return this.getTypedRuleContexts(SelectItemContext); } else { - return this.getTypedRuleContext(AlterRoutineCharacteristicContext,i); + return this.getTypedRuleContext(SelectItemContext,i); } }; - enterRule(listener) { - if(listener instanceof SqlBaseListener ) { - listener.enterAlterRoutineCharacteristics(this); - } - } + setQuantifier() { + return this.getTypedRuleContext(SetQuantifierContext,0); + }; - exitRule(listener) { - if(listener instanceof SqlBaseListener ) { - listener.exitAlterRoutineCharacteristics(this); - } - } + FROM() { + return this.getToken(SqlBaseParser.FROM, 0); + }; + relation = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(RelationContext); + } else { + return this.getTypedRuleContext(RelationContext,i); + } + }; -} + WHERE() { + return this.getToken(SqlBaseParser.WHERE, 0); + }; + GROUP() { + return this.getToken(SqlBaseParser.GROUP, 0); + }; + BY() { + return this.getToken(SqlBaseParser.BY, 0); + }; -class AlterRoutineCharacteristicContext extends antlr4.ParserRuleContext { + groupBy() { + return this.getTypedRuleContext(GroupByContext,0); + }; - constructor(parser, parent, invokingState) { - if(parent===undefined) { - parent = null; - } - if(invokingState===undefined || invokingState===null) { - invokingState = -1; - } - super(parent, invokingState); - this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_alterRoutineCharacteristic; - } + HAVING() { + return this.getToken(SqlBaseParser.HAVING, 0); + }; - nullCallClause() { - return this.getTypedRuleContext(NullCallClauseContext,0); + booleanExpression = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(BooleanExpressionContext); + } else { + return this.getTypedRuleContext(BooleanExpressionContext,i); + } }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterAlterRoutineCharacteristic(this); + listener.enterQuerySpecification(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitAlterRoutineCharacteristic(this); + listener.exitQuerySpecification(this); } } @@ -12997,7 +15731,7 @@ class AlterRoutineCharacteristicContext extends antlr4.ParserRuleContext { -class RoutineBodyContext extends antlr4.ParserRuleContext { +class GroupByContext extends antlr4.ParserRuleContext { constructor(parser, parent, invokingState) { if(parent===undefined) { @@ -13008,26 +15742,33 @@ class RoutineBodyContext extends antlr4.ParserRuleContext { } super(parent, invokingState); this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_routineBody; + this.ruleIndex = SqlBaseParser.RULE_groupBy; } - returnStatement() { - return this.getTypedRuleContext(ReturnStatementContext,0); + groupingElement = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(GroupingElementContext); + } else { + return this.getTypedRuleContext(GroupingElementContext,i); + } }; - externalBodyReference() { - return this.getTypedRuleContext(ExternalBodyReferenceContext,0); + setQuantifier() { + return this.getTypedRuleContext(SetQuantifierContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterRoutineBody(this); + listener.enterGroupBy(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitRoutineBody(this); + listener.exitGroupBy(this); } } @@ -13036,7 +15777,7 @@ class RoutineBodyContext extends antlr4.ParserRuleContext { -class ReturnStatementContext extends antlr4.ParserRuleContext { +class GroupingElementContext extends antlr4.ParserRuleContext { constructor(parser, parent, invokingState) { if(parent===undefined) { @@ -13047,215 +15788,168 @@ class ReturnStatementContext extends antlr4.ParserRuleContext { } super(parent, invokingState); this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_returnStatement; + this.ruleIndex = SqlBaseParser.RULE_groupingElement; } - RETURN() { - return this.getToken(SqlBaseParser.RETURN, 0); - }; - - expression() { - return this.getTypedRuleContext(ExpressionContext,0); - }; - - enterRule(listener) { - if(listener instanceof SqlBaseListener ) { - listener.enterReturnStatement(this); - } - } - exitRule(listener) { - if(listener instanceof SqlBaseListener ) { - listener.exitReturnStatement(this); + + copyFrom(ctx) { + super.copyFrom(ctx); } - } - } +class MultipleGroupingSetsContext extends GroupingElementContext { -class ExternalBodyReferenceContext extends antlr4.ParserRuleContext { - - constructor(parser, parent, invokingState) { - if(parent===undefined) { - parent = null; - } - if(invokingState===undefined || invokingState===null) { - invokingState = -1; - } - super(parent, invokingState); - this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_externalBodyReference; + constructor(parser, ctx) { + super(parser); + super.copyFrom(ctx); } - EXTERNAL() { - return this.getToken(SqlBaseParser.EXTERNAL, 0); + GROUPING() { + return this.getToken(SqlBaseParser.GROUPING, 0); }; - NAME() { - return this.getToken(SqlBaseParser.NAME, 0); + SETS() { + return this.getToken(SqlBaseParser.SETS, 0); }; - externalRoutineName() { - return this.getTypedRuleContext(ExternalRoutineNameContext,0); + groupingSet = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(GroupingSetContext); + } else { + return this.getTypedRuleContext(GroupingSetContext,i); + } }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterExternalBodyReference(this); + listener.enterMultipleGroupingSets(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitExternalBodyReference(this); + listener.exitMultipleGroupingSets(this); } } } +SqlBaseParser.MultipleGroupingSetsContext = MultipleGroupingSetsContext; +class SingleGroupingSetContext extends GroupingElementContext { -class LanguageContext extends antlr4.ParserRuleContext { - - constructor(parser, parent, invokingState) { - if(parent===undefined) { - parent = null; - } - if(invokingState===undefined || invokingState===null) { - invokingState = -1; - } - super(parent, invokingState); - this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_language; + constructor(parser, ctx) { + super(parser); + super.copyFrom(ctx); } - SQL() { - return this.getToken(SqlBaseParser.SQL, 0); - }; - - identifier() { - return this.getTypedRuleContext(IdentifierContext,0); + groupingSet() { + return this.getTypedRuleContext(GroupingSetContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterLanguage(this); + listener.enterSingleGroupingSet(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitLanguage(this); + listener.exitSingleGroupingSet(this); } } } +SqlBaseParser.SingleGroupingSetContext = SingleGroupingSetContext; +class CubeContext extends GroupingElementContext { -class DeterminismContext extends antlr4.ParserRuleContext { - - constructor(parser, parent, invokingState) { - if(parent===undefined) { - parent = null; - } - if(invokingState===undefined || invokingState===null) { - invokingState = -1; - } - super(parent, invokingState); - this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_determinism; + constructor(parser, ctx) { + super(parser); + super.copyFrom(ctx); } - DETERMINISTIC() { - return this.getToken(SqlBaseParser.DETERMINISTIC, 0); + CUBE() { + return this.getToken(SqlBaseParser.CUBE, 0); }; - NOT() { - return this.getToken(SqlBaseParser.NOT, 0); + expression = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(ExpressionContext); + } else { + return this.getTypedRuleContext(ExpressionContext,i); + } }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterDeterminism(this); + listener.enterCube(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitDeterminism(this); + listener.exitCube(this); } } } +SqlBaseParser.CubeContext = CubeContext; +class RollupContext extends GroupingElementContext { -class NullCallClauseContext extends antlr4.ParserRuleContext { - - constructor(parser, parent, invokingState) { - if(parent===undefined) { - parent = null; - } - if(invokingState===undefined || invokingState===null) { - invokingState = -1; - } - super(parent, invokingState); - this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_nullCallClause; + constructor(parser, ctx) { + super(parser); + super.copyFrom(ctx); } - RETURNS() { - return this.getToken(SqlBaseParser.RETURNS, 0); + ROLLUP() { + return this.getToken(SqlBaseParser.ROLLUP, 0); }; - NULL = function(i) { - if(i===undefined) { - i = null; - } + expression = function(i) { + if(i===undefined) { + i = null; + } if(i===null) { - return this.getTokens(SqlBaseParser.NULL); + return this.getTypedRuleContexts(ExpressionContext); } else { - return this.getToken(SqlBaseParser.NULL, i); + return this.getTypedRuleContext(ExpressionContext,i); } }; - - ON() { - return this.getToken(SqlBaseParser.ON, 0); - }; - - INPUT() { - return this.getToken(SqlBaseParser.INPUT, 0); - }; - - CALLED() { - return this.getToken(SqlBaseParser.CALLED, 0); - }; - enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterNullCallClause(this); + listener.enterRollup(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitNullCallClause(this); + listener.exitRollup(this); } } } +SqlBaseParser.RollupContext = RollupContext; - -class ExternalRoutineNameContext extends antlr4.ParserRuleContext { +class GroupingSetContext extends antlr4.ParserRuleContext { constructor(parser, parent, invokingState) { if(parent===undefined) { @@ -13266,22 +15960,29 @@ class ExternalRoutineNameContext extends antlr4.ParserRuleContext { } super(parent, invokingState); this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_externalRoutineName; + this.ruleIndex = SqlBaseParser.RULE_groupingSet; } - identifier() { - return this.getTypedRuleContext(IdentifierContext,0); + expression = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(ExpressionContext); + } else { + return this.getTypedRuleContext(ExpressionContext,i); + } }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterExternalRoutineName(this); + listener.enterGroupingSet(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitExternalRoutineName(this); + listener.exitGroupingSet(this); } } @@ -13290,7 +15991,7 @@ class ExternalRoutineNameContext extends antlr4.ParserRuleContext { -class QueryNoWithContext extends antlr4.ParserRuleContext { +class NamedQueryContext extends antlr4.ParserRuleContext { constructor(parser, parent, invokingState) { if(parent===undefined) { @@ -13301,96 +16002,74 @@ class QueryNoWithContext extends antlr4.ParserRuleContext { } super(parent, invokingState); this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_queryNoWith; - this.offset = null; - this.limit = null; - this.fetchFirstNRows = null; + this.ruleIndex = SqlBaseParser.RULE_namedQuery; + this.name = null; } - queryTerm() { - return this.getTypedRuleContext(QueryTermContext,0); - }; - - ORDER() { - return this.getToken(SqlBaseParser.ORDER, 0); + AS() { + return this.getToken(SqlBaseParser.AS, 0); }; - BY() { - return this.getToken(SqlBaseParser.BY, 0); + query() { + return this.getTypedRuleContext(QueryContext,0); }; - sortItem = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTypedRuleContexts(SortItemContext); - } else { - return this.getTypedRuleContext(SortItemContext,i); - } + identifier() { + return this.getTypedRuleContext(IdentifierContext,0); }; - OFFSET() { - return this.getToken(SqlBaseParser.OFFSET, 0); + columnAliases() { + return this.getTypedRuleContext(ColumnAliasesContext,0); }; - INTEGER_VALUE = function(i) { - if(i===undefined) { - i = null; + enterRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.enterNamedQuery(this); } - if(i===null) { - return this.getTokens(SqlBaseParser.INTEGER_VALUE); - } else { - return this.getToken(SqlBaseParser.INTEGER_VALUE, i); - } - }; + } + exitRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.exitNamedQuery(this); + } + } - LIMIT() { - return this.getToken(SqlBaseParser.LIMIT, 0); - }; - ROW() { - return this.getToken(SqlBaseParser.ROW, 0); - }; +} - ROWS = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTokens(SqlBaseParser.ROWS); - } else { - return this.getToken(SqlBaseParser.ROWS, i); - } - }; - ALL() { - return this.getToken(SqlBaseParser.ALL, 0); - }; +class SetQuantifierContext extends antlr4.ParserRuleContext { - FETCH() { - return this.getToken(SqlBaseParser.FETCH, 0); - }; + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = SqlBaseParser.RULE_setQuantifier; + } - FIRST() { - return this.getToken(SqlBaseParser.FIRST, 0); + DISTINCT() { + return this.getToken(SqlBaseParser.DISTINCT, 0); }; - ONLY() { - return this.getToken(SqlBaseParser.ONLY, 0); + ALL() { + return this.getToken(SqlBaseParser.ALL, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterQueryNoWith(this); + listener.enterSetQuantifier(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitQueryNoWith(this); + listener.exitSetQuantifier(this); } } @@ -13399,7 +16078,7 @@ class QueryNoWithContext extends antlr4.ParserRuleContext { -class QueryTermContext extends antlr4.ParserRuleContext { +class SelectItemContext extends antlr4.ParserRuleContext { constructor(parser, parent, invokingState) { if(parent===undefined) { @@ -13410,7 +16089,7 @@ class QueryTermContext extends antlr4.ParserRuleContext { } super(parent, invokingState); this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_queryTerm; + this.ruleIndex = SqlBaseParser.RULE_selectItem; } @@ -13422,89 +16101,75 @@ class QueryTermContext extends antlr4.ParserRuleContext { } -class QueryTermDefaultContext extends QueryTermContext { +class SelectAllContext extends SelectItemContext { constructor(parser, ctx) { super(parser); super.copyFrom(ctx); } - queryPrimary() { - return this.getTypedRuleContext(QueryPrimaryContext,0); + qualifiedName() { + return this.getTypedRuleContext(QualifiedNameContext,0); + }; + + ASTERISK() { + return this.getToken(SqlBaseParser.ASTERISK, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterQueryTermDefault(this); + listener.enterSelectAll(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitQueryTermDefault(this); + listener.exitSelectAll(this); } } } -SqlBaseParser.QueryTermDefaultContext = QueryTermDefaultContext; +SqlBaseParser.SelectAllContext = SelectAllContext; -class SetOperationContext extends QueryTermContext { +class SelectSingleContext extends SelectItemContext { constructor(parser, ctx) { super(parser); - this.left = null;; - this.operator = null;; - this.right = null;; super.copyFrom(ctx); } - queryTerm = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTypedRuleContexts(QueryTermContext); - } else { - return this.getTypedRuleContext(QueryTermContext,i); - } - }; - - INTERSECT() { - return this.getToken(SqlBaseParser.INTERSECT, 0); - }; - - setQuantifier() { - return this.getTypedRuleContext(SetQuantifierContext,0); + expression() { + return this.getTypedRuleContext(ExpressionContext,0); }; - UNION() { - return this.getToken(SqlBaseParser.UNION, 0); + identifier() { + return this.getTypedRuleContext(IdentifierContext,0); }; - EXCEPT() { - return this.getToken(SqlBaseParser.EXCEPT, 0); + AS() { + return this.getToken(SqlBaseParser.AS, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterSetOperation(this); + listener.enterSelectSingle(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitSetOperation(this); + listener.exitSelectSingle(this); } } } -SqlBaseParser.SetOperationContext = SetOperationContext; +SqlBaseParser.SelectSingleContext = SelectSingleContext; -class QueryPrimaryContext extends antlr4.ParserRuleContext { +class RelationContext extends antlr4.ParserRuleContext { constructor(parser, parent, invokingState) { if(parent===undefined) { @@ -13515,7 +16180,7 @@ class QueryPrimaryContext extends antlr4.ParserRuleContext { } super(parent, invokingState); this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_queryPrimary; + this.ruleIndex = SqlBaseParser.RULE_relation; } @@ -13527,134 +16192,202 @@ class QueryPrimaryContext extends antlr4.ParserRuleContext { } -class SubqueryContext extends QueryPrimaryContext { +class RelationDefaultContext extends RelationContext { constructor(parser, ctx) { super(parser); super.copyFrom(ctx); } - queryNoWith() { - return this.getTypedRuleContext(QueryNoWithContext,0); + sampledRelation() { + return this.getTypedRuleContext(SampledRelationContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterSubquery(this); + listener.enterRelationDefault(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitSubquery(this); + listener.exitRelationDefault(this); } } } -SqlBaseParser.SubqueryContext = SubqueryContext; +SqlBaseParser.RelationDefaultContext = RelationDefaultContext; -class QueryPrimaryDefaultContext extends QueryPrimaryContext { +class JoinRelationContext extends RelationContext { constructor(parser, ctx) { super(parser); + this.left = null;; + this.right = null;; + this.rightRelation = null;; super.copyFrom(ctx); } - querySpecification() { - return this.getTypedRuleContext(QuerySpecificationContext,0); + relation = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(RelationContext); + } else { + return this.getTypedRuleContext(RelationContext,i); + } + }; + + CROSS() { + return this.getToken(SqlBaseParser.CROSS, 0); + }; + + JOIN() { + return this.getToken(SqlBaseParser.JOIN, 0); + }; + + joinType() { + return this.getTypedRuleContext(JoinTypeContext,0); + }; + + joinCriteria() { + return this.getTypedRuleContext(JoinCriteriaContext,0); + }; + + NATURAL() { + return this.getToken(SqlBaseParser.NATURAL, 0); + }; + + sampledRelation() { + return this.getTypedRuleContext(SampledRelationContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterQueryPrimaryDefault(this); + listener.enterJoinRelation(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitQueryPrimaryDefault(this); + listener.exitJoinRelation(this); } } } -SqlBaseParser.QueryPrimaryDefaultContext = QueryPrimaryDefaultContext; +SqlBaseParser.JoinRelationContext = JoinRelationContext; -class TableContext extends QueryPrimaryContext { +class JoinTypeContext extends antlr4.ParserRuleContext { - constructor(parser, ctx) { - super(parser); - super.copyFrom(ctx); + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = SqlBaseParser.RULE_joinType; } - TABLE() { - return this.getToken(SqlBaseParser.TABLE, 0); + INNER() { + return this.getToken(SqlBaseParser.INNER, 0); }; - qualifiedName() { - return this.getTypedRuleContext(QualifiedNameContext,0); + LEFT() { + return this.getToken(SqlBaseParser.LEFT, 0); + }; + + OUTER() { + return this.getToken(SqlBaseParser.OUTER, 0); + }; + + RIGHT() { + return this.getToken(SqlBaseParser.RIGHT, 0); + }; + + FULL() { + return this.getToken(SqlBaseParser.FULL, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterTable(this); + listener.enterJoinType(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitTable(this); + listener.exitJoinType(this); } } } -SqlBaseParser.TableContext = TableContext; -class InlineTableContext extends QueryPrimaryContext { - constructor(parser, ctx) { - super(parser); - super.copyFrom(ctx); +class JoinCriteriaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = SqlBaseParser.RULE_joinCriteria; } - VALUES() { - return this.getToken(SqlBaseParser.VALUES, 0); + ON() { + return this.getToken(SqlBaseParser.ON, 0); + }; + + booleanExpression() { + return this.getTypedRuleContext(BooleanExpressionContext,0); + }; + + USING() { + return this.getToken(SqlBaseParser.USING, 0); }; - expression = function(i) { + identifier = function(i) { if(i===undefined) { i = null; } if(i===null) { - return this.getTypedRuleContexts(ExpressionContext); + return this.getTypedRuleContexts(IdentifierContext); } else { - return this.getTypedRuleContext(ExpressionContext,i); + return this.getTypedRuleContext(IdentifierContext,i); } }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterInlineTable(this); + listener.enterJoinCriteria(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitInlineTable(this); + listener.exitJoinCriteria(this); } } } -SqlBaseParser.InlineTableContext = InlineTableContext; -class SortItemContext extends antlr4.ParserRuleContext { + +class SampledRelationContext extends antlr4.ParserRuleContext { constructor(parser, parent, invokingState) { if(parent===undefined) { @@ -13665,44 +16398,35 @@ class SortItemContext extends antlr4.ParserRuleContext { } super(parent, invokingState); this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_sortItem; - this.ordering = null; - this.nullOrdering = null; + this.ruleIndex = SqlBaseParser.RULE_sampledRelation; + this.percentage = null; } - expression() { - return this.getTypedRuleContext(ExpressionContext,0); - }; - - NULLS() { - return this.getToken(SqlBaseParser.NULLS, 0); - }; - - ASC() { - return this.getToken(SqlBaseParser.ASC, 0); + aliasedRelation() { + return this.getTypedRuleContext(AliasedRelationContext,0); }; - DESC() { - return this.getToken(SqlBaseParser.DESC, 0); + TABLESAMPLE() { + return this.getToken(SqlBaseParser.TABLESAMPLE, 0); }; - FIRST() { - return this.getToken(SqlBaseParser.FIRST, 0); + sampleType() { + return this.getTypedRuleContext(SampleTypeContext,0); }; - LAST() { - return this.getToken(SqlBaseParser.LAST, 0); + expression() { + return this.getTypedRuleContext(ExpressionContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterSortItem(this); + listener.enterSampledRelation(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitSortItem(this); + listener.exitSampledRelation(this); } } @@ -13711,7 +16435,7 @@ class SortItemContext extends antlr4.ParserRuleContext { -class QuerySpecificationContext extends antlr4.ParserRuleContext { +class SampleTypeContext extends antlr4.ParserRuleContext { constructor(parser, parent, invokingState) { if(parent===undefined) { @@ -13722,85 +16446,73 @@ class QuerySpecificationContext extends antlr4.ParserRuleContext { } super(parent, invokingState); this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_querySpecification; - this.where = null; - this.having = null; + this.ruleIndex = SqlBaseParser.RULE_sampleType; } - SELECT() { - return this.getToken(SqlBaseParser.SELECT, 0); + BERNOULLI() { + return this.getToken(SqlBaseParser.BERNOULLI, 0); }; - selectItem = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTypedRuleContexts(SelectItemContext); - } else { - return this.getTypedRuleContext(SelectItemContext,i); - } + SYSTEM() { + return this.getToken(SqlBaseParser.SYSTEM, 0); }; - setQuantifier() { - return this.getTypedRuleContext(SetQuantifierContext,0); - }; + enterRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.enterSampleType(this); + } + } - FROM() { - return this.getToken(SqlBaseParser.FROM, 0); - }; + exitRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.exitSampleType(this); + } + } - relation = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTypedRuleContexts(RelationContext); - } else { - return this.getTypedRuleContext(RelationContext,i); - } - }; - WHERE() { - return this.getToken(SqlBaseParser.WHERE, 0); - }; +} - GROUP() { - return this.getToken(SqlBaseParser.GROUP, 0); - }; - BY() { - return this.getToken(SqlBaseParser.BY, 0); + +class AliasedRelationContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = SqlBaseParser.RULE_aliasedRelation; + } + + relationPrimary() { + return this.getTypedRuleContext(RelationPrimaryContext,0); }; - groupBy() { - return this.getTypedRuleContext(GroupByContext,0); + identifier() { + return this.getTypedRuleContext(IdentifierContext,0); }; - HAVING() { - return this.getToken(SqlBaseParser.HAVING, 0); + AS() { + return this.getToken(SqlBaseParser.AS, 0); }; - booleanExpression = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTypedRuleContexts(BooleanExpressionContext); - } else { - return this.getTypedRuleContext(BooleanExpressionContext,i); - } + columnAliases() { + return this.getTypedRuleContext(ColumnAliasesContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterQuerySpecification(this); + listener.enterAliasedRelation(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitQuerySpecification(this); + listener.exitAliasedRelation(this); } } @@ -13809,7 +16521,7 @@ class QuerySpecificationContext extends antlr4.ParserRuleContext { -class GroupByContext extends antlr4.ParserRuleContext { +class ColumnAliasesContext extends antlr4.ParserRuleContext { constructor(parser, parent, invokingState) { if(parent===undefined) { @@ -13820,33 +16532,29 @@ class GroupByContext extends antlr4.ParserRuleContext { } super(parent, invokingState); this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_groupBy; + this.ruleIndex = SqlBaseParser.RULE_columnAliases; } - groupingElement = function(i) { + identifier = function(i) { if(i===undefined) { i = null; } if(i===null) { - return this.getTypedRuleContexts(GroupingElementContext); + return this.getTypedRuleContexts(IdentifierContext); } else { - return this.getTypedRuleContext(GroupingElementContext,i); + return this.getTypedRuleContext(IdentifierContext,i); } }; - setQuantifier() { - return this.getTypedRuleContext(SetQuantifierContext,0); - }; - enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterGroupBy(this); + listener.enterColumnAliases(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitGroupBy(this); + listener.exitColumnAliases(this); } } @@ -13855,7 +16563,7 @@ class GroupByContext extends antlr4.ParserRuleContext { -class GroupingElementContext extends antlr4.ParserRuleContext { +class RelationPrimaryContext extends antlr4.ParserRuleContext { constructor(parser, parent, invokingState) { if(parent===undefined) { @@ -13866,7 +16574,7 @@ class GroupingElementContext extends antlr4.ParserRuleContext { } super(parent, invokingState); this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_groupingElement; + this.ruleIndex = SqlBaseParser.RULE_relationPrimary; } @@ -13878,156 +16586,206 @@ class GroupingElementContext extends antlr4.ParserRuleContext { } -class MultipleGroupingSetsContext extends GroupingElementContext { +class SubqueryRelationContext extends RelationPrimaryContext { constructor(parser, ctx) { super(parser); super.copyFrom(ctx); } - GROUPING() { - return this.getToken(SqlBaseParser.GROUPING, 0); + query() { + return this.getTypedRuleContext(QueryContext,0); }; - SETS() { - return this.getToken(SqlBaseParser.SETS, 0); + enterRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.enterSubqueryRelation(this); + } + } + + exitRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.exitSubqueryRelation(this); + } + } + + +} + +SqlBaseParser.SubqueryRelationContext = SubqueryRelationContext; + +class ParenthesizedRelationContext extends RelationPrimaryContext { + + constructor(parser, ctx) { + super(parser); + super.copyFrom(ctx); + } + + relation() { + return this.getTypedRuleContext(RelationContext,0); }; - groupingSet = function(i) { + enterRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.enterParenthesizedRelation(this); + } + } + + exitRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.exitParenthesizedRelation(this); + } + } + + +} + +SqlBaseParser.ParenthesizedRelationContext = ParenthesizedRelationContext; + +class UnnestContext extends RelationPrimaryContext { + + constructor(parser, ctx) { + super(parser); + super.copyFrom(ctx); + } + + UNNEST() { + return this.getToken(SqlBaseParser.UNNEST, 0); + }; + + expression = function(i) { if(i===undefined) { i = null; } if(i===null) { - return this.getTypedRuleContexts(GroupingSetContext); + return this.getTypedRuleContexts(ExpressionContext); } else { - return this.getTypedRuleContext(GroupingSetContext,i); + return this.getTypedRuleContext(ExpressionContext,i); } }; + WITH() { + return this.getToken(SqlBaseParser.WITH, 0); + }; + + ORDINALITY() { + return this.getToken(SqlBaseParser.ORDINALITY, 0); + }; + enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterMultipleGroupingSets(this); + listener.enterUnnest(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitMultipleGroupingSets(this); + listener.exitUnnest(this); } } } -SqlBaseParser.MultipleGroupingSetsContext = MultipleGroupingSetsContext; +SqlBaseParser.UnnestContext = UnnestContext; -class SingleGroupingSetContext extends GroupingElementContext { +class TableFunctionInvocationContext extends RelationPrimaryContext { constructor(parser, ctx) { super(parser); super.copyFrom(ctx); } - groupingSet() { - return this.getTypedRuleContext(GroupingSetContext,0); + TABLE() { + return this.getToken(SqlBaseParser.TABLE, 0); + }; + + tableFunctionCall() { + return this.getTypedRuleContext(TableFunctionCallContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterSingleGroupingSet(this); + listener.enterTableFunctionInvocation(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitSingleGroupingSet(this); + listener.exitTableFunctionInvocation(this); } } } -SqlBaseParser.SingleGroupingSetContext = SingleGroupingSetContext; +SqlBaseParser.TableFunctionInvocationContext = TableFunctionInvocationContext; -class CubeContext extends GroupingElementContext { +class LateralContext extends RelationPrimaryContext { constructor(parser, ctx) { super(parser); super.copyFrom(ctx); } - CUBE() { - return this.getToken(SqlBaseParser.CUBE, 0); + LATERAL() { + return this.getToken(SqlBaseParser.LATERAL, 0); }; - expression = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTypedRuleContexts(ExpressionContext); - } else { - return this.getTypedRuleContext(ExpressionContext,i); - } + query() { + return this.getTypedRuleContext(QueryContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterCube(this); + listener.enterLateral(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitCube(this); + listener.exitLateral(this); } } } -SqlBaseParser.CubeContext = CubeContext; +SqlBaseParser.LateralContext = LateralContext; -class RollupContext extends GroupingElementContext { +class TableNameContext extends RelationPrimaryContext { constructor(parser, ctx) { super(parser); super.copyFrom(ctx); } - ROLLUP() { - return this.getToken(SqlBaseParser.ROLLUP, 0); + qualifiedName() { + return this.getTypedRuleContext(QualifiedNameContext,0); }; - expression = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTypedRuleContexts(ExpressionContext); - } else { - return this.getTypedRuleContext(ExpressionContext,i); - } + tableVersionExpression() { + return this.getTypedRuleContext(TableVersionExpressionContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterRollup(this); + listener.enterTableName(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitRollup(this); + listener.exitTableName(this); } } } -SqlBaseParser.RollupContext = RollupContext; +SqlBaseParser.TableNameContext = TableNameContext; -class GroupingSetContext extends antlr4.ParserRuleContext { +class ExpressionContext extends antlr4.ParserRuleContext { constructor(parser, parent, invokingState) { if(parent===undefined) { @@ -14038,29 +16796,22 @@ class GroupingSetContext extends antlr4.ParserRuleContext { } super(parent, invokingState); this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_groupingSet; + this.ruleIndex = SqlBaseParser.RULE_expression; } - expression = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTypedRuleContexts(ExpressionContext); - } else { - return this.getTypedRuleContext(ExpressionContext,i); - } + booleanExpression() { + return this.getTypedRuleContext(BooleanExpressionContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterGroupingSet(this); + listener.enterExpression(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitGroupingSet(this); + listener.exitExpression(this); } } @@ -14069,7 +16820,7 @@ class GroupingSetContext extends antlr4.ParserRuleContext { -class NamedQueryContext extends antlr4.ParserRuleContext { +class BooleanExpressionContext extends antlr4.ParserRuleContext { constructor(parser, parent, invokingState) { if(parent===undefined) { @@ -14080,176 +16831,132 @@ class NamedQueryContext extends antlr4.ParserRuleContext { } super(parent, invokingState); this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_namedQuery; - this.name = null; + this.ruleIndex = SqlBaseParser.RULE_booleanExpression; } - AS() { - return this.getToken(SqlBaseParser.AS, 0); - }; - - query() { - return this.getTypedRuleContext(QueryContext,0); - }; - - identifier() { - return this.getTypedRuleContext(IdentifierContext,0); - }; - - columnAliases() { - return this.getTypedRuleContext(ColumnAliasesContext,0); - }; - - enterRule(listener) { - if(listener instanceof SqlBaseListener ) { - listener.enterNamedQuery(this); - } - } - exitRule(listener) { - if(listener instanceof SqlBaseListener ) { - listener.exitNamedQuery(this); + + copyFrom(ctx) { + super.copyFrom(ctx); } - } - } +class LogicalNotContext extends BooleanExpressionContext { -class SetQuantifierContext extends antlr4.ParserRuleContext { - - constructor(parser, parent, invokingState) { - if(parent===undefined) { - parent = null; - } - if(invokingState===undefined || invokingState===null) { - invokingState = -1; - } - super(parent, invokingState); - this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_setQuantifier; + constructor(parser, ctx) { + super(parser); + super.copyFrom(ctx); } - DISTINCT() { - return this.getToken(SqlBaseParser.DISTINCT, 0); + NOT() { + return this.getToken(SqlBaseParser.NOT, 0); }; - ALL() { - return this.getToken(SqlBaseParser.ALL, 0); + booleanExpression() { + return this.getTypedRuleContext(BooleanExpressionContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterSetQuantifier(this); + listener.enterLogicalNot(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitSetQuantifier(this); + listener.exitLogicalNot(this); } } } +SqlBaseParser.LogicalNotContext = LogicalNotContext; - -class SelectItemContext extends antlr4.ParserRuleContext { - - constructor(parser, parent, invokingState) { - if(parent===undefined) { - parent = null; - } - if(invokingState===undefined || invokingState===null) { - invokingState = -1; - } - super(parent, invokingState); - this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_selectItem; - } - - - - copyFrom(ctx) { - super.copyFrom(ctx); - } - -} - - -class SelectAllContext extends SelectItemContext { +class PredicatedContext extends BooleanExpressionContext { constructor(parser, ctx) { super(parser); + this._valueExpression = null;; super.copyFrom(ctx); } - qualifiedName() { - return this.getTypedRuleContext(QualifiedNameContext,0); + valueExpression() { + return this.getTypedRuleContext(ValueExpressionContext,0); }; - ASTERISK() { - return this.getToken(SqlBaseParser.ASTERISK, 0); + predicate() { + return this.getTypedRuleContext(PredicateContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterSelectAll(this); + listener.enterPredicated(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitSelectAll(this); + listener.exitPredicated(this); } } } -SqlBaseParser.SelectAllContext = SelectAllContext; +SqlBaseParser.PredicatedContext = PredicatedContext; -class SelectSingleContext extends SelectItemContext { +class LogicalBinaryContext extends BooleanExpressionContext { constructor(parser, ctx) { super(parser); + this.left = null;; + this.operator = null;; + this.right = null;; super.copyFrom(ctx); } - expression() { - return this.getTypedRuleContext(ExpressionContext,0); + booleanExpression = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(BooleanExpressionContext); + } else { + return this.getTypedRuleContext(BooleanExpressionContext,i); + } }; - identifier() { - return this.getTypedRuleContext(IdentifierContext,0); + AND() { + return this.getToken(SqlBaseParser.AND, 0); }; - AS() { - return this.getToken(SqlBaseParser.AS, 0); + OR() { + return this.getToken(SqlBaseParser.OR, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterSelectSingle(this); + listener.enterLogicalBinary(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitSelectSingle(this); + listener.exitLogicalBinary(this); } } } -SqlBaseParser.SelectSingleContext = SelectSingleContext; +SqlBaseParser.LogicalBinaryContext = LogicalBinaryContext; -class RelationContext extends antlr4.ParserRuleContext { +class PredicateContext extends antlr4.ParserRuleContext { - constructor(parser, parent, invokingState) { + constructor(parser, parent, invokingState, value) { if(parent===undefined) { parent = null; } @@ -14258,390 +16965,349 @@ class RelationContext extends antlr4.ParserRuleContext { } super(parent, invokingState); this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_relation; + this.ruleIndex = SqlBaseParser.RULE_predicate; + this.value = null + this.value = value || null; } copyFrom(ctx) { super.copyFrom(ctx); + this.value = ctx.value; } } -class RelationDefaultContext extends RelationContext { +class ComparisonContext extends PredicateContext { constructor(parser, ctx) { super(parser); + this.right = null;; super.copyFrom(ctx); } - sampledRelation() { - return this.getTypedRuleContext(SampledRelationContext,0); + comparisonOperator() { + return this.getTypedRuleContext(ComparisonOperatorContext,0); + }; + + valueExpression() { + return this.getTypedRuleContext(ValueExpressionContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterRelationDefault(this); + listener.enterComparison(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitRelationDefault(this); + listener.exitComparison(this); } } } -SqlBaseParser.RelationDefaultContext = RelationDefaultContext; +SqlBaseParser.ComparisonContext = ComparisonContext; -class JoinRelationContext extends RelationContext { +class LikeContext extends PredicateContext { constructor(parser, ctx) { super(parser); - this.left = null;; - this.right = null;; - this.rightRelation = null;; + this.pattern = null;; + this.escape = null;; super.copyFrom(ctx); } - relation = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTypedRuleContexts(RelationContext); - } else { - return this.getTypedRuleContext(RelationContext,i); - } - }; - - CROSS() { - return this.getToken(SqlBaseParser.CROSS, 0); - }; - - JOIN() { - return this.getToken(SqlBaseParser.JOIN, 0); - }; - - joinType() { - return this.getTypedRuleContext(JoinTypeContext,0); + LIKE() { + return this.getToken(SqlBaseParser.LIKE, 0); }; - joinCriteria() { - return this.getTypedRuleContext(JoinCriteriaContext,0); + valueExpression = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(ValueExpressionContext); + } else { + return this.getTypedRuleContext(ValueExpressionContext,i); + } }; - NATURAL() { - return this.getToken(SqlBaseParser.NATURAL, 0); + NOT() { + return this.getToken(SqlBaseParser.NOT, 0); }; - sampledRelation() { - return this.getTypedRuleContext(SampledRelationContext,0); + ESCAPE() { + return this.getToken(SqlBaseParser.ESCAPE, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterJoinRelation(this); + listener.enterLike(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitJoinRelation(this); + listener.exitLike(this); } } } -SqlBaseParser.JoinRelationContext = JoinRelationContext; +SqlBaseParser.LikeContext = LikeContext; -class JoinTypeContext extends antlr4.ParserRuleContext { +class InSubqueryContext extends PredicateContext { - constructor(parser, parent, invokingState) { - if(parent===undefined) { - parent = null; - } - if(invokingState===undefined || invokingState===null) { - invokingState = -1; - } - super(parent, invokingState); - this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_joinType; + constructor(parser, ctx) { + super(parser); + super.copyFrom(ctx); } - INNER() { - return this.getToken(SqlBaseParser.INNER, 0); - }; - - LEFT() { - return this.getToken(SqlBaseParser.LEFT, 0); - }; - - OUTER() { - return this.getToken(SqlBaseParser.OUTER, 0); + IN() { + return this.getToken(SqlBaseParser.IN, 0); }; - RIGHT() { - return this.getToken(SqlBaseParser.RIGHT, 0); + query() { + return this.getTypedRuleContext(QueryContext,0); }; - FULL() { - return this.getToken(SqlBaseParser.FULL, 0); + NOT() { + return this.getToken(SqlBaseParser.NOT, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterJoinType(this); + listener.enterInSubquery(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitJoinType(this); + listener.exitInSubquery(this); } } } +SqlBaseParser.InSubqueryContext = InSubqueryContext; +class DistinctFromContext extends PredicateContext { -class JoinCriteriaContext extends antlr4.ParserRuleContext { - - constructor(parser, parent, invokingState) { - if(parent===undefined) { - parent = null; - } - if(invokingState===undefined || invokingState===null) { - invokingState = -1; - } - super(parent, invokingState); - this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_joinCriteria; + constructor(parser, ctx) { + super(parser); + this.right = null;; + super.copyFrom(ctx); } - ON() { - return this.getToken(SqlBaseParser.ON, 0); + IS() { + return this.getToken(SqlBaseParser.IS, 0); }; - booleanExpression() { - return this.getTypedRuleContext(BooleanExpressionContext,0); + DISTINCT() { + return this.getToken(SqlBaseParser.DISTINCT, 0); }; - USING() { - return this.getToken(SqlBaseParser.USING, 0); + FROM() { + return this.getToken(SqlBaseParser.FROM, 0); }; - identifier = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTypedRuleContexts(IdentifierContext); - } else { - return this.getTypedRuleContext(IdentifierContext,i); - } + valueExpression() { + return this.getTypedRuleContext(ValueExpressionContext,0); + }; + + NOT() { + return this.getToken(SqlBaseParser.NOT, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterJoinCriteria(this); + listener.enterDistinctFrom(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitJoinCriteria(this); + listener.exitDistinctFrom(this); } } } +SqlBaseParser.DistinctFromContext = DistinctFromContext; +class InListContext extends PredicateContext { -class SampledRelationContext extends antlr4.ParserRuleContext { - - constructor(parser, parent, invokingState) { - if(parent===undefined) { - parent = null; - } - if(invokingState===undefined || invokingState===null) { - invokingState = -1; - } - super(parent, invokingState); - this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_sampledRelation; - this.percentage = null; + constructor(parser, ctx) { + super(parser); + super.copyFrom(ctx); } - aliasedRelation() { - return this.getTypedRuleContext(AliasedRelationContext,0); - }; - - TABLESAMPLE() { - return this.getToken(SqlBaseParser.TABLESAMPLE, 0); + IN() { + return this.getToken(SqlBaseParser.IN, 0); }; - sampleType() { - return this.getTypedRuleContext(SampleTypeContext,0); + expression = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(ExpressionContext); + } else { + return this.getTypedRuleContext(ExpressionContext,i); + } }; - expression() { - return this.getTypedRuleContext(ExpressionContext,0); + NOT() { + return this.getToken(SqlBaseParser.NOT, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterSampledRelation(this); + listener.enterInList(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitSampledRelation(this); + listener.exitInList(this); } } } +SqlBaseParser.InListContext = InListContext; +class NullPredicateContext extends PredicateContext { -class SampleTypeContext extends antlr4.ParserRuleContext { - - constructor(parser, parent, invokingState) { - if(parent===undefined) { - parent = null; - } - if(invokingState===undefined || invokingState===null) { - invokingState = -1; - } - super(parent, invokingState); - this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_sampleType; + constructor(parser, ctx) { + super(parser); + super.copyFrom(ctx); } - BERNOULLI() { - return this.getToken(SqlBaseParser.BERNOULLI, 0); + IS() { + return this.getToken(SqlBaseParser.IS, 0); }; - SYSTEM() { - return this.getToken(SqlBaseParser.SYSTEM, 0); + NULL() { + return this.getToken(SqlBaseParser.NULL, 0); + }; + + NOT() { + return this.getToken(SqlBaseParser.NOT, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterSampleType(this); + listener.enterNullPredicate(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitSampleType(this); + listener.exitNullPredicate(this); } } } +SqlBaseParser.NullPredicateContext = NullPredicateContext; +class BetweenContext extends PredicateContext { -class AliasedRelationContext extends antlr4.ParserRuleContext { - - constructor(parser, parent, invokingState) { - if(parent===undefined) { - parent = null; - } - if(invokingState===undefined || invokingState===null) { - invokingState = -1; - } - super(parent, invokingState); - this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_aliasedRelation; + constructor(parser, ctx) { + super(parser); + this.lower = null;; + this.upper = null;; + super.copyFrom(ctx); } - relationPrimary() { - return this.getTypedRuleContext(RelationPrimaryContext,0); + BETWEEN() { + return this.getToken(SqlBaseParser.BETWEEN, 0); }; - identifier() { - return this.getTypedRuleContext(IdentifierContext,0); + AND() { + return this.getToken(SqlBaseParser.AND, 0); }; - AS() { - return this.getToken(SqlBaseParser.AS, 0); + valueExpression = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(ValueExpressionContext); + } else { + return this.getTypedRuleContext(ValueExpressionContext,i); + } }; - columnAliases() { - return this.getTypedRuleContext(ColumnAliasesContext,0); + NOT() { + return this.getToken(SqlBaseParser.NOT, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterAliasedRelation(this); + listener.enterBetween(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitAliasedRelation(this); + listener.exitBetween(this); } } } +SqlBaseParser.BetweenContext = BetweenContext; +class QuantifiedComparisonContext extends PredicateContext { -class ColumnAliasesContext extends antlr4.ParserRuleContext { - - constructor(parser, parent, invokingState) { - if(parent===undefined) { - parent = null; - } - if(invokingState===undefined || invokingState===null) { - invokingState = -1; - } - super(parent, invokingState); - this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_columnAliases; + constructor(parser, ctx) { + super(parser); + super.copyFrom(ctx); } - identifier = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTypedRuleContexts(IdentifierContext); - } else { - return this.getTypedRuleContext(IdentifierContext,i); - } + comparisonOperator() { + return this.getTypedRuleContext(ComparisonOperatorContext,0); + }; + + comparisonQuantifier() { + return this.getTypedRuleContext(ComparisonQuantifierContext,0); + }; + + query() { + return this.getTypedRuleContext(QueryContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterColumnAliases(this); + listener.enterQuantifiedComparison(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitColumnAliases(this); + listener.exitQuantifiedComparison(this); } } } +SqlBaseParser.QuantifiedComparisonContext = QuantifiedComparisonContext; - -class RelationPrimaryContext extends antlr4.ParserRuleContext { +class ValueExpressionContext extends antlr4.ParserRuleContext { constructor(parser, parent, invokingState) { if(parent===undefined) { @@ -14652,7 +17318,7 @@ class RelationPrimaryContext extends antlr4.ParserRuleContext { } super(parent, invokingState); this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_relationPrimary; + this.ruleIndex = SqlBaseParser.RULE_valueExpression; } @@ -14664,174 +17330,207 @@ class RelationPrimaryContext extends antlr4.ParserRuleContext { } -class SubqueryRelationContext extends RelationPrimaryContext { +class ValueExpressionDefaultContext extends ValueExpressionContext { constructor(parser, ctx) { super(parser); super.copyFrom(ctx); } - query() { - return this.getTypedRuleContext(QueryContext,0); + primaryExpression() { + return this.getTypedRuleContext(PrimaryExpressionContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterSubqueryRelation(this); + listener.enterValueExpressionDefault(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitSubqueryRelation(this); + listener.exitValueExpressionDefault(this); } } } -SqlBaseParser.SubqueryRelationContext = SubqueryRelationContext; +SqlBaseParser.ValueExpressionDefaultContext = ValueExpressionDefaultContext; -class ParenthesizedRelationContext extends RelationPrimaryContext { +class ConcatenationContext extends ValueExpressionContext { constructor(parser, ctx) { super(parser); + this.left = null;; + this.right = null;; super.copyFrom(ctx); } - relation() { - return this.getTypedRuleContext(RelationContext,0); + CONCAT() { + return this.getToken(SqlBaseParser.CONCAT, 0); + }; + + valueExpression = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(ValueExpressionContext); + } else { + return this.getTypedRuleContext(ValueExpressionContext,i); + } }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterParenthesizedRelation(this); + listener.enterConcatenation(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitParenthesizedRelation(this); + listener.exitConcatenation(this); } } } -SqlBaseParser.ParenthesizedRelationContext = ParenthesizedRelationContext; +SqlBaseParser.ConcatenationContext = ConcatenationContext; -class UnnestContext extends RelationPrimaryContext { +class ArithmeticBinaryContext extends ValueExpressionContext { constructor(parser, ctx) { super(parser); + this.left = null;; + this.operator = null;; + this.right = null;; super.copyFrom(ctx); } - UNNEST() { - return this.getToken(SqlBaseParser.UNNEST, 0); - }; - - expression = function(i) { + valueExpression = function(i) { if(i===undefined) { i = null; } if(i===null) { - return this.getTypedRuleContexts(ExpressionContext); + return this.getTypedRuleContexts(ValueExpressionContext); } else { - return this.getTypedRuleContext(ExpressionContext,i); + return this.getTypedRuleContext(ValueExpressionContext,i); } }; - WITH() { - return this.getToken(SqlBaseParser.WITH, 0); + ASTERISK() { + return this.getToken(SqlBaseParser.ASTERISK, 0); }; - ORDINALITY() { - return this.getToken(SqlBaseParser.ORDINALITY, 0); + SLASH() { + return this.getToken(SqlBaseParser.SLASH, 0); + }; + + PERCENT() { + return this.getToken(SqlBaseParser.PERCENT, 0); + }; + + PLUS() { + return this.getToken(SqlBaseParser.PLUS, 0); + }; + + MINUS() { + return this.getToken(SqlBaseParser.MINUS, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterUnnest(this); + listener.enterArithmeticBinary(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitUnnest(this); + listener.exitArithmeticBinary(this); } } } -SqlBaseParser.UnnestContext = UnnestContext; +SqlBaseParser.ArithmeticBinaryContext = ArithmeticBinaryContext; -class LateralContext extends RelationPrimaryContext { +class ArithmeticUnaryContext extends ValueExpressionContext { constructor(parser, ctx) { super(parser); + this.operator = null;; super.copyFrom(ctx); } - LATERAL() { - return this.getToken(SqlBaseParser.LATERAL, 0); + valueExpression() { + return this.getTypedRuleContext(ValueExpressionContext,0); }; - query() { - return this.getTypedRuleContext(QueryContext,0); + MINUS() { + return this.getToken(SqlBaseParser.MINUS, 0); + }; + + PLUS() { + return this.getToken(SqlBaseParser.PLUS, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterLateral(this); + listener.enterArithmeticUnary(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitLateral(this); + listener.exitArithmeticUnary(this); } } } -SqlBaseParser.LateralContext = LateralContext; +SqlBaseParser.ArithmeticUnaryContext = ArithmeticUnaryContext; -class TableNameContext extends RelationPrimaryContext { +class AtTimeZoneContext extends ValueExpressionContext { constructor(parser, ctx) { super(parser); super.copyFrom(ctx); } - qualifiedName() { - return this.getTypedRuleContext(QualifiedNameContext,0); + valueExpression() { + return this.getTypedRuleContext(ValueExpressionContext,0); }; - tableVersionExpression() { - return this.getTypedRuleContext(TableVersionExpressionContext,0); + AT() { + return this.getToken(SqlBaseParser.AT, 0); + }; + + timeZoneSpecifier() { + return this.getTypedRuleContext(TimeZoneSpecifierContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterTableName(this); + listener.enterAtTimeZone(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitTableName(this); + listener.exitAtTimeZone(this); } } } -SqlBaseParser.TableNameContext = TableNameContext; +SqlBaseParser.AtTimeZoneContext = AtTimeZoneContext; -class ExpressionContext extends antlr4.ParserRuleContext { +class PrimaryExpressionContext extends antlr4.ParserRuleContext { constructor(parser, parent, invokingState) { if(parent===undefined) { @@ -14842,544 +17541,598 @@ class ExpressionContext extends antlr4.ParserRuleContext { } super(parent, invokingState); this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_expression; + this.ruleIndex = SqlBaseParser.RULE_primaryExpression; + } + + + + copyFrom(ctx) { + super.copyFrom(ctx); + } + +} + + +class DereferenceContext extends PrimaryExpressionContext { + + constructor(parser, ctx) { + super(parser); + this.base = null;; + this.fieldName = null;; + super.copyFrom(ctx); + } + + primaryExpression() { + return this.getTypedRuleContext(PrimaryExpressionContext,0); + }; + + identifier() { + return this.getTypedRuleContext(IdentifierContext,0); + }; + + enterRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.enterDereference(this); + } + } + + exitRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.exitDereference(this); + } + } + + +} + +SqlBaseParser.DereferenceContext = DereferenceContext; + +class TypeConstructorContext extends PrimaryExpressionContext { + + constructor(parser, ctx) { + super(parser); + super.copyFrom(ctx); + } + + identifier() { + return this.getTypedRuleContext(IdentifierContext,0); + }; + + string() { + return this.getTypedRuleContext(StringContext,0); + }; + + DOUBLE_PRECISION() { + return this.getToken(SqlBaseParser.DOUBLE_PRECISION, 0); + }; + + enterRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.enterTypeConstructor(this); + } + } + + exitRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.exitTypeConstructor(this); + } + } + + +} + +SqlBaseParser.TypeConstructorContext = TypeConstructorContext; + +class SpecialDateTimeFunctionContext extends PrimaryExpressionContext { + + constructor(parser, ctx) { + super(parser); + this.name = null;; + this.precision = null;; + super.copyFrom(ctx); } - booleanExpression() { - return this.getTypedRuleContext(BooleanExpressionContext,0); + CURRENT_DATE() { + return this.getToken(SqlBaseParser.CURRENT_DATE, 0); + }; + + CURRENT_TIME() { + return this.getToken(SqlBaseParser.CURRENT_TIME, 0); + }; + + INTEGER_VALUE() { + return this.getToken(SqlBaseParser.INTEGER_VALUE, 0); + }; + + CURRENT_TIMESTAMP() { + return this.getToken(SqlBaseParser.CURRENT_TIMESTAMP, 0); + }; + + LOCALTIME() { + return this.getToken(SqlBaseParser.LOCALTIME, 0); + }; + + LOCALTIMESTAMP() { + return this.getToken(SqlBaseParser.LOCALTIMESTAMP, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterExpression(this); + listener.enterSpecialDateTimeFunction(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitExpression(this); + listener.exitSpecialDateTimeFunction(this); } } } +SqlBaseParser.SpecialDateTimeFunctionContext = SpecialDateTimeFunctionContext; - -class BooleanExpressionContext extends antlr4.ParserRuleContext { - - constructor(parser, parent, invokingState) { - if(parent===undefined) { - parent = null; - } - if(invokingState===undefined || invokingState===null) { - invokingState = -1; - } - super(parent, invokingState); - this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_booleanExpression; - } - - - - copyFrom(ctx) { - super.copyFrom(ctx); - } - -} - - -class LogicalNotContext extends BooleanExpressionContext { +class SubstringContext extends PrimaryExpressionContext { constructor(parser, ctx) { super(parser); super.copyFrom(ctx); } - NOT() { - return this.getToken(SqlBaseParser.NOT, 0); + SUBSTRING() { + return this.getToken(SqlBaseParser.SUBSTRING, 0); }; - booleanExpression() { - return this.getTypedRuleContext(BooleanExpressionContext,0); + valueExpression = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(ValueExpressionContext); + } else { + return this.getTypedRuleContext(ValueExpressionContext,i); + } + }; + + FROM() { + return this.getToken(SqlBaseParser.FROM, 0); + }; + + FOR() { + return this.getToken(SqlBaseParser.FOR, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterLogicalNot(this); + listener.enterSubstring(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitLogicalNot(this); + listener.exitSubstring(this); } } } -SqlBaseParser.LogicalNotContext = LogicalNotContext; +SqlBaseParser.SubstringContext = SubstringContext; -class PredicatedContext extends BooleanExpressionContext { +class CastContext extends PrimaryExpressionContext { constructor(parser, ctx) { super(parser); - this._valueExpression = null;; super.copyFrom(ctx); } - valueExpression() { - return this.getTypedRuleContext(ValueExpressionContext,0); + CAST() { + return this.getToken(SqlBaseParser.CAST, 0); }; - predicate() { - return this.getTypedRuleContext(PredicateContext,0); + expression() { + return this.getTypedRuleContext(ExpressionContext,0); + }; + + AS() { + return this.getToken(SqlBaseParser.AS, 0); + }; + + type() { + return this.getTypedRuleContext(TypeContext,0); + }; + + TRY_CAST() { + return this.getToken(SqlBaseParser.TRY_CAST, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterPredicated(this); + listener.enterCast(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitPredicated(this); + listener.exitCast(this); } } } -SqlBaseParser.PredicatedContext = PredicatedContext; +SqlBaseParser.CastContext = CastContext; -class LogicalBinaryContext extends BooleanExpressionContext { +class LambdaContext extends PrimaryExpressionContext { constructor(parser, ctx) { super(parser); - this.left = null;; - this.operator = null;; - this.right = null;; super.copyFrom(ctx); } - booleanExpression = function(i) { + identifier = function(i) { if(i===undefined) { i = null; } if(i===null) { - return this.getTypedRuleContexts(BooleanExpressionContext); + return this.getTypedRuleContexts(IdentifierContext); } else { - return this.getTypedRuleContext(BooleanExpressionContext,i); + return this.getTypedRuleContext(IdentifierContext,i); } }; - AND() { - return this.getToken(SqlBaseParser.AND, 0); - }; - - OR() { - return this.getToken(SqlBaseParser.OR, 0); + expression() { + return this.getTypedRuleContext(ExpressionContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterLogicalBinary(this); + listener.enterLambda(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitLogicalBinary(this); + listener.exitLambda(this); } } } -SqlBaseParser.LogicalBinaryContext = LogicalBinaryContext; +SqlBaseParser.LambdaContext = LambdaContext; -class PredicateContext extends antlr4.ParserRuleContext { +class ParenthesizedExpressionContext extends PrimaryExpressionContext { - constructor(parser, parent, invokingState, value) { - if(parent===undefined) { - parent = null; - } - if(invokingState===undefined || invokingState===null) { - invokingState = -1; - } - super(parent, invokingState); - this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_predicate; - this.value = null - this.value = value || null; + constructor(parser, ctx) { + super(parser); + super.copyFrom(ctx); } + expression() { + return this.getTypedRuleContext(ExpressionContext,0); + }; - - copyFrom(ctx) { - super.copyFrom(ctx); - this.value = ctx.value; + enterRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.enterParenthesizedExpression(this); + } + } + + exitRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.exitParenthesizedExpression(this); } + } + } +SqlBaseParser.ParenthesizedExpressionContext = ParenthesizedExpressionContext; -class ComparisonContext extends PredicateContext { +class ParameterContext extends PrimaryExpressionContext { constructor(parser, ctx) { super(parser); - this.right = null;; super.copyFrom(ctx); } - comparisonOperator() { - return this.getTypedRuleContext(ComparisonOperatorContext,0); - }; - - valueExpression() { - return this.getTypedRuleContext(ValueExpressionContext,0); - }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterComparison(this); + listener.enterParameter(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitComparison(this); + listener.exitParameter(this); } } } -SqlBaseParser.ComparisonContext = ComparisonContext; +SqlBaseParser.ParameterContext = ParameterContext; -class LikeContext extends PredicateContext { +class NormalizeContext extends PrimaryExpressionContext { constructor(parser, ctx) { super(parser); - this.pattern = null;; - this.escape = null;; super.copyFrom(ctx); } - LIKE() { - return this.getToken(SqlBaseParser.LIKE, 0); - }; - - valueExpression = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTypedRuleContexts(ValueExpressionContext); - } else { - return this.getTypedRuleContext(ValueExpressionContext,i); - } + NORMALIZE() { + return this.getToken(SqlBaseParser.NORMALIZE, 0); }; - NOT() { - return this.getToken(SqlBaseParser.NOT, 0); + valueExpression() { + return this.getTypedRuleContext(ValueExpressionContext,0); }; - ESCAPE() { - return this.getToken(SqlBaseParser.ESCAPE, 0); + normalForm() { + return this.getTypedRuleContext(NormalFormContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterLike(this); + listener.enterNormalize(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitLike(this); + listener.exitNormalize(this); } } } -SqlBaseParser.LikeContext = LikeContext; +SqlBaseParser.NormalizeContext = NormalizeContext; -class InSubqueryContext extends PredicateContext { +class IntervalLiteralContext extends PrimaryExpressionContext { constructor(parser, ctx) { super(parser); super.copyFrom(ctx); } - IN() { - return this.getToken(SqlBaseParser.IN, 0); - }; - - query() { - return this.getTypedRuleContext(QueryContext,0); - }; - - NOT() { - return this.getToken(SqlBaseParser.NOT, 0); + interval() { + return this.getTypedRuleContext(IntervalContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterInSubquery(this); + listener.enterIntervalLiteral(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitInSubquery(this); + listener.exitIntervalLiteral(this); } } } -SqlBaseParser.InSubqueryContext = InSubqueryContext; +SqlBaseParser.IntervalLiteralContext = IntervalLiteralContext; -class DistinctFromContext extends PredicateContext { +class NumericLiteralContext extends PrimaryExpressionContext { constructor(parser, ctx) { super(parser); - this.right = null;; super.copyFrom(ctx); } - IS() { - return this.getToken(SqlBaseParser.IS, 0); + number() { + return this.getTypedRuleContext(NumberContext,0); }; - DISTINCT() { - return this.getToken(SqlBaseParser.DISTINCT, 0); - }; + enterRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.enterNumericLiteral(this); + } + } - FROM() { - return this.getToken(SqlBaseParser.FROM, 0); - }; + exitRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.exitNumericLiteral(this); + } + } + + +} + +SqlBaseParser.NumericLiteralContext = NumericLiteralContext; + +class BooleanLiteralContext extends PrimaryExpressionContext { - valueExpression() { - return this.getTypedRuleContext(ValueExpressionContext,0); - }; + constructor(parser, ctx) { + super(parser); + super.copyFrom(ctx); + } - NOT() { - return this.getToken(SqlBaseParser.NOT, 0); + booleanValue() { + return this.getTypedRuleContext(BooleanValueContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterDistinctFrom(this); + listener.enterBooleanLiteral(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitDistinctFrom(this); + listener.exitBooleanLiteral(this); } } } -SqlBaseParser.DistinctFromContext = DistinctFromContext; +SqlBaseParser.BooleanLiteralContext = BooleanLiteralContext; -class InListContext extends PredicateContext { +class SimpleCaseContext extends PrimaryExpressionContext { constructor(parser, ctx) { super(parser); + this.elseExpression = null;; super.copyFrom(ctx); } - IN() { - return this.getToken(SqlBaseParser.IN, 0); + CASE() { + return this.getToken(SqlBaseParser.CASE, 0); }; - expression = function(i) { + valueExpression() { + return this.getTypedRuleContext(ValueExpressionContext,0); + }; + + END() { + return this.getToken(SqlBaseParser.END, 0); + }; + + whenClause = function(i) { if(i===undefined) { i = null; } if(i===null) { - return this.getTypedRuleContexts(ExpressionContext); + return this.getTypedRuleContexts(WhenClauseContext); } else { - return this.getTypedRuleContext(ExpressionContext,i); + return this.getTypedRuleContext(WhenClauseContext,i); } }; - NOT() { - return this.getToken(SqlBaseParser.NOT, 0); + ELSE() { + return this.getToken(SqlBaseParser.ELSE, 0); + }; + + expression() { + return this.getTypedRuleContext(ExpressionContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterInList(this); + listener.enterSimpleCase(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitInList(this); + listener.exitSimpleCase(this); } } } -SqlBaseParser.InListContext = InListContext; +SqlBaseParser.SimpleCaseContext = SimpleCaseContext; -class NullPredicateContext extends PredicateContext { +class ColumnReferenceContext extends PrimaryExpressionContext { constructor(parser, ctx) { super(parser); super.copyFrom(ctx); } - IS() { - return this.getToken(SqlBaseParser.IS, 0); - }; - - NULL() { - return this.getToken(SqlBaseParser.NULL, 0); - }; - - NOT() { - return this.getToken(SqlBaseParser.NOT, 0); + identifier() { + return this.getTypedRuleContext(IdentifierContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterNullPredicate(this); + listener.enterColumnReference(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitNullPredicate(this); + listener.exitColumnReference(this); } } } -SqlBaseParser.NullPredicateContext = NullPredicateContext; +SqlBaseParser.ColumnReferenceContext = ColumnReferenceContext; -class BetweenContext extends PredicateContext { +class NullLiteralContext extends PrimaryExpressionContext { constructor(parser, ctx) { super(parser); - this.lower = null;; - this.upper = null;; super.copyFrom(ctx); } - BETWEEN() { - return this.getToken(SqlBaseParser.BETWEEN, 0); - }; - - AND() { - return this.getToken(SqlBaseParser.AND, 0); - }; - - valueExpression = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTypedRuleContexts(ValueExpressionContext); - } else { - return this.getTypedRuleContext(ValueExpressionContext,i); - } - }; - - NOT() { - return this.getToken(SqlBaseParser.NOT, 0); + NULL() { + return this.getToken(SqlBaseParser.NULL, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterBetween(this); + listener.enterNullLiteral(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitBetween(this); + listener.exitNullLiteral(this); } } } -SqlBaseParser.BetweenContext = BetweenContext; +SqlBaseParser.NullLiteralContext = NullLiteralContext; -class QuantifiedComparisonContext extends PredicateContext { +class RowConstructorContext extends PrimaryExpressionContext { constructor(parser, ctx) { super(parser); super.copyFrom(ctx); } - comparisonOperator() { - return this.getTypedRuleContext(ComparisonOperatorContext,0); - }; - - comparisonQuantifier() { - return this.getTypedRuleContext(ComparisonQuantifierContext,0); + expression = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(ExpressionContext); + } else { + return this.getTypedRuleContext(ExpressionContext,i); + } }; - query() { - return this.getTypedRuleContext(QueryContext,0); + ROW() { + return this.getToken(SqlBaseParser.ROW, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterQuantifiedComparison(this); + listener.enterRowConstructor(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitQuantifiedComparison(this); + listener.exitRowConstructor(this); } } } -SqlBaseParser.QuantifiedComparisonContext = QuantifiedComparisonContext; - -class ValueExpressionContext extends antlr4.ParserRuleContext { - - constructor(parser, parent, invokingState) { - if(parent===undefined) { - parent = null; - } - if(invokingState===undefined || invokingState===null) { - invokingState = -1; - } - super(parent, invokingState); - this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_valueExpression; - } - - - - copyFrom(ctx) { - super.copyFrom(ctx); - } - -} - +SqlBaseParser.RowConstructorContext = RowConstructorContext; -class ValueExpressionDefaultContext extends ValueExpressionContext { +class SubscriptContext extends PrimaryExpressionContext { constructor(parser, ctx) { super(parser); + this.value = null;; + this.index = null;; super.copyFrom(ctx); } @@ -15387,347 +18140,338 @@ class ValueExpressionDefaultContext extends ValueExpressionContext { return this.getTypedRuleContext(PrimaryExpressionContext,0); }; + valueExpression() { + return this.getTypedRuleContext(ValueExpressionContext,0); + }; + enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterValueExpressionDefault(this); + listener.enterSubscript(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitValueExpressionDefault(this); + listener.exitSubscript(this); } } } -SqlBaseParser.ValueExpressionDefaultContext = ValueExpressionDefaultContext; +SqlBaseParser.SubscriptContext = SubscriptContext; -class ConcatenationContext extends ValueExpressionContext { +class SubqueryExpressionContext extends PrimaryExpressionContext { constructor(parser, ctx) { super(parser); - this.left = null;; - this.right = null;; super.copyFrom(ctx); } - CONCAT() { - return this.getToken(SqlBaseParser.CONCAT, 0); - }; - - valueExpression = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTypedRuleContexts(ValueExpressionContext); - } else { - return this.getTypedRuleContext(ValueExpressionContext,i); - } + query() { + return this.getTypedRuleContext(QueryContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterConcatenation(this); + listener.enterSubqueryExpression(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitConcatenation(this); + listener.exitSubqueryExpression(this); } } } -SqlBaseParser.ConcatenationContext = ConcatenationContext; +SqlBaseParser.SubqueryExpressionContext = SubqueryExpressionContext; -class ArithmeticBinaryContext extends ValueExpressionContext { +class BinaryLiteralContext extends PrimaryExpressionContext { constructor(parser, ctx) { super(parser); - this.left = null;; - this.operator = null;; - this.right = null;; super.copyFrom(ctx); } - valueExpression = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTypedRuleContexts(ValueExpressionContext); - } else { - return this.getTypedRuleContext(ValueExpressionContext,i); - } - }; - - ASTERISK() { - return this.getToken(SqlBaseParser.ASTERISK, 0); - }; - - SLASH() { - return this.getToken(SqlBaseParser.SLASH, 0); - }; - - PERCENT() { - return this.getToken(SqlBaseParser.PERCENT, 0); - }; - - PLUS() { - return this.getToken(SqlBaseParser.PLUS, 0); - }; - - MINUS() { - return this.getToken(SqlBaseParser.MINUS, 0); + BINARY_LITERAL() { + return this.getToken(SqlBaseParser.BINARY_LITERAL, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterArithmeticBinary(this); + listener.enterBinaryLiteral(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitArithmeticBinary(this); + listener.exitBinaryLiteral(this); } } } -SqlBaseParser.ArithmeticBinaryContext = ArithmeticBinaryContext; +SqlBaseParser.BinaryLiteralContext = BinaryLiteralContext; -class ArithmeticUnaryContext extends ValueExpressionContext { +class CurrentUserContext extends PrimaryExpressionContext { constructor(parser, ctx) { super(parser); - this.operator = null;; + this.name = null;; super.copyFrom(ctx); } - valueExpression() { - return this.getTypedRuleContext(ValueExpressionContext,0); - }; - - MINUS() { - return this.getToken(SqlBaseParser.MINUS, 0); - }; - - PLUS() { - return this.getToken(SqlBaseParser.PLUS, 0); + CURRENT_USER() { + return this.getToken(SqlBaseParser.CURRENT_USER, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterArithmeticUnary(this); + listener.enterCurrentUser(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitArithmeticUnary(this); + listener.exitCurrentUser(this); } } } -SqlBaseParser.ArithmeticUnaryContext = ArithmeticUnaryContext; +SqlBaseParser.CurrentUserContext = CurrentUserContext; -class AtTimeZoneContext extends ValueExpressionContext { +class ExtractContext extends PrimaryExpressionContext { constructor(parser, ctx) { super(parser); super.copyFrom(ctx); } - valueExpression() { - return this.getTypedRuleContext(ValueExpressionContext,0); + EXTRACT() { + return this.getToken(SqlBaseParser.EXTRACT, 0); }; - AT() { - return this.getToken(SqlBaseParser.AT, 0); + identifier() { + return this.getTypedRuleContext(IdentifierContext,0); }; - timeZoneSpecifier() { - return this.getTypedRuleContext(TimeZoneSpecifierContext,0); + FROM() { + return this.getToken(SqlBaseParser.FROM, 0); + }; + + valueExpression() { + return this.getTypedRuleContext(ValueExpressionContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterAtTimeZone(this); + listener.enterExtract(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitAtTimeZone(this); + listener.exitExtract(this); } } } -SqlBaseParser.AtTimeZoneContext = AtTimeZoneContext; +SqlBaseParser.ExtractContext = ExtractContext; -class PrimaryExpressionContext extends antlr4.ParserRuleContext { +class StringLiteralContext extends PrimaryExpressionContext { - constructor(parser, parent, invokingState) { - if(parent===undefined) { - parent = null; - } - if(invokingState===undefined || invokingState===null) { - invokingState = -1; - } - super(parent, invokingState); - this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_primaryExpression; + constructor(parser, ctx) { + super(parser); + super.copyFrom(ctx); } + string() { + return this.getTypedRuleContext(StringContext,0); + }; - - copyFrom(ctx) { - super.copyFrom(ctx); + enterRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.enterStringLiteral(this); + } + } + + exitRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.exitStringLiteral(this); } + } + } +SqlBaseParser.StringLiteralContext = StringLiteralContext; -class DereferenceContext extends PrimaryExpressionContext { +class ArrayConstructorContext extends PrimaryExpressionContext { constructor(parser, ctx) { super(parser); - this.base = null;; - this.fieldName = null;; super.copyFrom(ctx); } - primaryExpression() { - return this.getTypedRuleContext(PrimaryExpressionContext,0); + ARRAY() { + return this.getToken(SqlBaseParser.ARRAY, 0); }; - identifier() { - return this.getTypedRuleContext(IdentifierContext,0); + expression = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(ExpressionContext); + } else { + return this.getTypedRuleContext(ExpressionContext,i); + } }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterDereference(this); + listener.enterArrayConstructor(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitDereference(this); + listener.exitArrayConstructor(this); } } } -SqlBaseParser.DereferenceContext = DereferenceContext; +SqlBaseParser.ArrayConstructorContext = ArrayConstructorContext; -class TypeConstructorContext extends PrimaryExpressionContext { +class FunctionCallContext extends PrimaryExpressionContext { constructor(parser, ctx) { super(parser); super.copyFrom(ctx); } - identifier() { - return this.getTypedRuleContext(IdentifierContext,0); + qualifiedName() { + return this.getTypedRuleContext(QualifiedNameContext,0); }; - string() { - return this.getTypedRuleContext(StringContext,0); + ASTERISK() { + return this.getToken(SqlBaseParser.ASTERISK, 0); }; - DOUBLE_PRECISION() { - return this.getToken(SqlBaseParser.DOUBLE_PRECISION, 0); + filter() { + return this.getTypedRuleContext(FilterContext,0); + }; + + over() { + return this.getTypedRuleContext(OverContext,0); + }; + + expression = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(ExpressionContext); + } else { + return this.getTypedRuleContext(ExpressionContext,i); + } + }; + + ORDER() { + return this.getToken(SqlBaseParser.ORDER, 0); + }; + + BY() { + return this.getToken(SqlBaseParser.BY, 0); + }; + + sortItem = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(SortItemContext); + } else { + return this.getTypedRuleContext(SortItemContext,i); + } + }; + + setQuantifier() { + return this.getTypedRuleContext(SetQuantifierContext,0); + }; + + nullTreatment() { + return this.getTypedRuleContext(NullTreatmentContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterTypeConstructor(this); + listener.enterFunctionCall(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitTypeConstructor(this); + listener.exitFunctionCall(this); } } } -SqlBaseParser.TypeConstructorContext = TypeConstructorContext; +SqlBaseParser.FunctionCallContext = FunctionCallContext; -class SpecialDateTimeFunctionContext extends PrimaryExpressionContext { +class ExistsContext extends PrimaryExpressionContext { constructor(parser, ctx) { super(parser); - this.name = null;; - this.precision = null;; super.copyFrom(ctx); } - CURRENT_DATE() { - return this.getToken(SqlBaseParser.CURRENT_DATE, 0); - }; - - CURRENT_TIME() { - return this.getToken(SqlBaseParser.CURRENT_TIME, 0); - }; - - INTEGER_VALUE() { - return this.getToken(SqlBaseParser.INTEGER_VALUE, 0); - }; - - CURRENT_TIMESTAMP() { - return this.getToken(SqlBaseParser.CURRENT_TIMESTAMP, 0); - }; - - LOCALTIME() { - return this.getToken(SqlBaseParser.LOCALTIME, 0); + EXISTS() { + return this.getToken(SqlBaseParser.EXISTS, 0); }; - LOCALTIMESTAMP() { - return this.getToken(SqlBaseParser.LOCALTIMESTAMP, 0); + query() { + return this.getTypedRuleContext(QueryContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterSpecialDateTimeFunction(this); + listener.enterExists(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitSpecialDateTimeFunction(this); + listener.exitExists(this); } } } -SqlBaseParser.SpecialDateTimeFunctionContext = SpecialDateTimeFunctionContext; +SqlBaseParser.ExistsContext = ExistsContext; -class SubstringContext extends PrimaryExpressionContext { +class PositionContext extends PrimaryExpressionContext { constructor(parser, ctx) { super(parser); super.copyFrom(ctx); } - SUBSTRING() { - return this.getToken(SqlBaseParser.SUBSTRING, 0); + POSITION() { + return this.getToken(SqlBaseParser.POSITION, 0); }; valueExpression = function(i) { @@ -15741,685 +18485,958 @@ class SubstringContext extends PrimaryExpressionContext { } }; - FROM() { - return this.getToken(SqlBaseParser.FROM, 0); - }; - - FOR() { - return this.getToken(SqlBaseParser.FOR, 0); + IN() { + return this.getToken(SqlBaseParser.IN, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterSubstring(this); + listener.enterPosition(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitSubstring(this); + listener.exitPosition(this); } } } -SqlBaseParser.SubstringContext = SubstringContext; +SqlBaseParser.PositionContext = PositionContext; -class CastContext extends PrimaryExpressionContext { +class SearchedCaseContext extends PrimaryExpressionContext { constructor(parser, ctx) { super(parser); + this.elseExpression = null;; super.copyFrom(ctx); } - CAST() { - return this.getToken(SqlBaseParser.CAST, 0); + CASE() { + return this.getToken(SqlBaseParser.CASE, 0); }; - expression() { - return this.getTypedRuleContext(ExpressionContext,0); + END() { + return this.getToken(SqlBaseParser.END, 0); }; - AS() { - return this.getToken(SqlBaseParser.AS, 0); + whenClause = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(WhenClauseContext); + } else { + return this.getTypedRuleContext(WhenClauseContext,i); + } }; - type() { - return this.getTypedRuleContext(TypeContext,0); + ELSE() { + return this.getToken(SqlBaseParser.ELSE, 0); }; - TRY_CAST() { - return this.getToken(SqlBaseParser.TRY_CAST, 0); + expression() { + return this.getTypedRuleContext(ExpressionContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterCast(this); + listener.enterSearchedCase(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitCast(this); + listener.exitSearchedCase(this); } } } -SqlBaseParser.CastContext = CastContext; +SqlBaseParser.SearchedCaseContext = SearchedCaseContext; -class LambdaContext extends PrimaryExpressionContext { +class GroupingOperationContext extends PrimaryExpressionContext { constructor(parser, ctx) { super(parser); super.copyFrom(ctx); } - identifier = function(i) { + GROUPING() { + return this.getToken(SqlBaseParser.GROUPING, 0); + }; + + qualifiedName = function(i) { if(i===undefined) { i = null; } if(i===null) { - return this.getTypedRuleContexts(IdentifierContext); + return this.getTypedRuleContexts(QualifiedNameContext); } else { - return this.getTypedRuleContext(IdentifierContext,i); + return this.getTypedRuleContext(QualifiedNameContext,i); } }; - expression() { - return this.getTypedRuleContext(ExpressionContext,0); - }; - enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterLambda(this); + listener.enterGroupingOperation(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitLambda(this); + listener.exitGroupingOperation(this); } } } -SqlBaseParser.LambdaContext = LambdaContext; +SqlBaseParser.GroupingOperationContext = GroupingOperationContext; -class ParenthesizedExpressionContext extends PrimaryExpressionContext { +class StringContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = SqlBaseParser.RULE_string; + } + + + + copyFrom(ctx) { + super.copyFrom(ctx); + } + +} + + +class UnicodeStringLiteralContext extends StringContext { constructor(parser, ctx) { super(parser); super.copyFrom(ctx); } - expression() { - return this.getTypedRuleContext(ExpressionContext,0); + UNICODE_STRING() { + return this.getToken(SqlBaseParser.UNICODE_STRING, 0); + }; + + UESCAPE() { + return this.getToken(SqlBaseParser.UESCAPE, 0); + }; + + STRING() { + return this.getToken(SqlBaseParser.STRING, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterParenthesizedExpression(this); + listener.enterUnicodeStringLiteral(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitParenthesizedExpression(this); + listener.exitUnicodeStringLiteral(this); } } } -SqlBaseParser.ParenthesizedExpressionContext = ParenthesizedExpressionContext; +SqlBaseParser.UnicodeStringLiteralContext = UnicodeStringLiteralContext; -class ParameterContext extends PrimaryExpressionContext { +class BasicStringLiteralContext extends StringContext { constructor(parser, ctx) { super(parser); super.copyFrom(ctx); } + STRING() { + return this.getToken(SqlBaseParser.STRING, 0); + }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterParameter(this); + listener.enterBasicStringLiteral(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitParameter(this); + listener.exitBasicStringLiteral(this); } } } -SqlBaseParser.ParameterContext = ParameterContext; +SqlBaseParser.BasicStringLiteralContext = BasicStringLiteralContext; -class NormalizeContext extends PrimaryExpressionContext { +class NullTreatmentContext extends antlr4.ParserRuleContext { - constructor(parser, ctx) { - super(parser); - super.copyFrom(ctx); + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = SqlBaseParser.RULE_nullTreatment; } - NORMALIZE() { - return this.getToken(SqlBaseParser.NORMALIZE, 0); + IGNORE() { + return this.getToken(SqlBaseParser.IGNORE, 0); }; - valueExpression() { - return this.getTypedRuleContext(ValueExpressionContext,0); + NULLS() { + return this.getToken(SqlBaseParser.NULLS, 0); }; - normalForm() { - return this.getTypedRuleContext(NormalFormContext,0); + RESPECT() { + return this.getToken(SqlBaseParser.RESPECT, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterNormalize(this); + listener.enterNullTreatment(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitNormalize(this); + listener.exitNullTreatment(this); } } } -SqlBaseParser.NormalizeContext = NormalizeContext; -class IntervalLiteralContext extends PrimaryExpressionContext { - constructor(parser, ctx) { - super(parser); - super.copyFrom(ctx); - } +class TimeZoneSpecifierContext extends antlr4.ParserRuleContext { - interval() { - return this.getTypedRuleContext(IntervalContext,0); - }; + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = SqlBaseParser.RULE_timeZoneSpecifier; + } - enterRule(listener) { - if(listener instanceof SqlBaseListener ) { - listener.enterIntervalLiteral(this); - } - } - exitRule(listener) { - if(listener instanceof SqlBaseListener ) { - listener.exitIntervalLiteral(this); + + copyFrom(ctx) { + super.copyFrom(ctx); } - } - } -SqlBaseParser.IntervalLiteralContext = IntervalLiteralContext; -class NumericLiteralContext extends PrimaryExpressionContext { +class TimeZoneIntervalContext extends TimeZoneSpecifierContext { constructor(parser, ctx) { super(parser); super.copyFrom(ctx); } - number() { - return this.getTypedRuleContext(NumberContext,0); + TIME() { + return this.getToken(SqlBaseParser.TIME, 0); + }; + + ZONE() { + return this.getToken(SqlBaseParser.ZONE, 0); + }; + + interval() { + return this.getTypedRuleContext(IntervalContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterNumericLiteral(this); + listener.enterTimeZoneInterval(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitNumericLiteral(this); + listener.exitTimeZoneInterval(this); } } } -SqlBaseParser.NumericLiteralContext = NumericLiteralContext; +SqlBaseParser.TimeZoneIntervalContext = TimeZoneIntervalContext; -class BooleanLiteralContext extends PrimaryExpressionContext { +class TimeZoneStringContext extends TimeZoneSpecifierContext { constructor(parser, ctx) { super(parser); super.copyFrom(ctx); } - booleanValue() { - return this.getTypedRuleContext(BooleanValueContext,0); + TIME() { + return this.getToken(SqlBaseParser.TIME, 0); + }; + + ZONE() { + return this.getToken(SqlBaseParser.ZONE, 0); + }; + + string() { + return this.getTypedRuleContext(StringContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterBooleanLiteral(this); + listener.enterTimeZoneString(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitBooleanLiteral(this); + listener.exitTimeZoneString(this); } } } -SqlBaseParser.BooleanLiteralContext = BooleanLiteralContext; +SqlBaseParser.TimeZoneStringContext = TimeZoneStringContext; -class SimpleCaseContext extends PrimaryExpressionContext { +class ComparisonOperatorContext extends antlr4.ParserRuleContext { - constructor(parser, ctx) { - super(parser); - this.elseExpression = null;; - super.copyFrom(ctx); + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = SqlBaseParser.RULE_comparisonOperator; } - CASE() { - return this.getToken(SqlBaseParser.CASE, 0); + EQ() { + return this.getToken(SqlBaseParser.EQ, 0); }; - valueExpression() { - return this.getTypedRuleContext(ValueExpressionContext,0); + NEQ() { + return this.getToken(SqlBaseParser.NEQ, 0); }; - END() { - return this.getToken(SqlBaseParser.END, 0); + LT() { + return this.getToken(SqlBaseParser.LT, 0); }; - whenClause = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTypedRuleContexts(WhenClauseContext); - } else { - return this.getTypedRuleContext(WhenClauseContext,i); - } + LTE() { + return this.getToken(SqlBaseParser.LTE, 0); }; - ELSE() { - return this.getToken(SqlBaseParser.ELSE, 0); + GT() { + return this.getToken(SqlBaseParser.GT, 0); }; - expression() { - return this.getTypedRuleContext(ExpressionContext,0); + GTE() { + return this.getToken(SqlBaseParser.GTE, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterSimpleCase(this); + listener.enterComparisonOperator(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitSimpleCase(this); + listener.exitComparisonOperator(this); } } } -SqlBaseParser.SimpleCaseContext = SimpleCaseContext; -class ColumnReferenceContext extends PrimaryExpressionContext { - constructor(parser, ctx) { - super(parser); - super.copyFrom(ctx); +class ComparisonQuantifierContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = SqlBaseParser.RULE_comparisonQuantifier; } - identifier() { - return this.getTypedRuleContext(IdentifierContext,0); + ALL() { + return this.getToken(SqlBaseParser.ALL, 0); + }; + + SOME() { + return this.getToken(SqlBaseParser.SOME, 0); + }; + + ANY() { + return this.getToken(SqlBaseParser.ANY, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterColumnReference(this); + listener.enterComparisonQuantifier(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitColumnReference(this); + listener.exitComparisonQuantifier(this); } } } -SqlBaseParser.ColumnReferenceContext = ColumnReferenceContext; -class NullLiteralContext extends PrimaryExpressionContext { - constructor(parser, ctx) { - super(parser); - super.copyFrom(ctx); +class BooleanValueContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = SqlBaseParser.RULE_booleanValue; } - NULL() { - return this.getToken(SqlBaseParser.NULL, 0); + TRUE() { + return this.getToken(SqlBaseParser.TRUE, 0); + }; + + FALSE() { + return this.getToken(SqlBaseParser.FALSE, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterNullLiteral(this); + listener.enterBooleanValue(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitNullLiteral(this); + listener.exitBooleanValue(this); } } } -SqlBaseParser.NullLiteralContext = NullLiteralContext; -class RowConstructorContext extends PrimaryExpressionContext { - constructor(parser, ctx) { - super(parser); - super.copyFrom(ctx); +class IntervalContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = SqlBaseParser.RULE_interval; + this.sign = null; + this.from = null; + this.to = null; } - expression = function(i) { + INTERVAL() { + return this.getToken(SqlBaseParser.INTERVAL, 0); + }; + + string() { + return this.getTypedRuleContext(StringContext,0); + }; + + intervalField = function(i) { if(i===undefined) { i = null; } if(i===null) { - return this.getTypedRuleContexts(ExpressionContext); + return this.getTypedRuleContexts(IntervalFieldContext); } else { - return this.getTypedRuleContext(ExpressionContext,i); + return this.getTypedRuleContext(IntervalFieldContext,i); } }; - ROW() { - return this.getToken(SqlBaseParser.ROW, 0); + TO() { + return this.getToken(SqlBaseParser.TO, 0); + }; + + PLUS() { + return this.getToken(SqlBaseParser.PLUS, 0); + }; + + MINUS() { + return this.getToken(SqlBaseParser.MINUS, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterRowConstructor(this); + listener.enterInterval(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitRowConstructor(this); + listener.exitInterval(this); } } } -SqlBaseParser.RowConstructorContext = RowConstructorContext; -class SubscriptContext extends PrimaryExpressionContext { - constructor(parser, ctx) { - super(parser); - this.value = null;; - this.index = null;; - super.copyFrom(ctx); +class IntervalFieldContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = SqlBaseParser.RULE_intervalField; } - primaryExpression() { - return this.getTypedRuleContext(PrimaryExpressionContext,0); + YEAR() { + return this.getToken(SqlBaseParser.YEAR, 0); }; - valueExpression() { - return this.getTypedRuleContext(ValueExpressionContext,0); + MONTH() { + return this.getToken(SqlBaseParser.MONTH, 0); + }; + + DAY() { + return this.getToken(SqlBaseParser.DAY, 0); + }; + + HOUR() { + return this.getToken(SqlBaseParser.HOUR, 0); + }; + + MINUTE() { + return this.getToken(SqlBaseParser.MINUTE, 0); + }; + + SECOND() { + return this.getToken(SqlBaseParser.SECOND, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterSubscript(this); + listener.enterIntervalField(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitSubscript(this); + listener.exitIntervalField(this); } } } -SqlBaseParser.SubscriptContext = SubscriptContext; -class SubqueryExpressionContext extends PrimaryExpressionContext { - constructor(parser, ctx) { - super(parser); - super.copyFrom(ctx); +class NormalFormContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = SqlBaseParser.RULE_normalForm; } - query() { - return this.getTypedRuleContext(QueryContext,0); + NFD() { + return this.getToken(SqlBaseParser.NFD, 0); + }; + + NFC() { + return this.getToken(SqlBaseParser.NFC, 0); + }; + + NFKD() { + return this.getToken(SqlBaseParser.NFKD, 0); + }; + + NFKC() { + return this.getToken(SqlBaseParser.NFKC, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterSubqueryExpression(this); + listener.enterNormalForm(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitSubqueryExpression(this); + listener.exitNormalForm(this); } } } -SqlBaseParser.SubqueryExpressionContext = SubqueryExpressionContext; -class BinaryLiteralContext extends PrimaryExpressionContext { - constructor(parser, ctx) { - super(parser); - super.copyFrom(ctx); +class TypesContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = SqlBaseParser.RULE_types; } - BINARY_LITERAL() { - return this.getToken(SqlBaseParser.BINARY_LITERAL, 0); + type = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(TypeContext); + } else { + return this.getTypedRuleContext(TypeContext,i); + } }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterBinaryLiteral(this); + listener.enterTypes(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitBinaryLiteral(this); + listener.exitTypes(this); } } } -SqlBaseParser.BinaryLiteralContext = BinaryLiteralContext; -class CurrentUserContext extends PrimaryExpressionContext { - constructor(parser, ctx) { - super(parser); - this.name = null;; - super.copyFrom(ctx); - } +class TypeContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = SqlBaseParser.RULE_type; + this.from = null; + this.to = null; + } + + ARRAY() { + return this.getToken(SqlBaseParser.ARRAY, 0); + }; + + LT() { + return this.getToken(SqlBaseParser.LT, 0); + }; + + type = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(TypeContext); + } else { + return this.getTypedRuleContext(TypeContext,i); + } + }; + + GT() { + return this.getToken(SqlBaseParser.GT, 0); + }; + + MAP() { + return this.getToken(SqlBaseParser.MAP, 0); + }; + + ROW() { + return this.getToken(SqlBaseParser.ROW, 0); + }; + + identifier = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(IdentifierContext); + } else { + return this.getTypedRuleContext(IdentifierContext,i); + } + }; + + baseType() { + return this.getTypedRuleContext(BaseTypeContext,0); + }; + + typeParameter = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(TypeParameterContext); + } else { + return this.getTypedRuleContext(TypeParameterContext,i); + } + }; + + INTERVAL() { + return this.getToken(SqlBaseParser.INTERVAL, 0); + }; + + TO() { + return this.getToken(SqlBaseParser.TO, 0); + }; - CURRENT_USER() { - return this.getToken(SqlBaseParser.CURRENT_USER, 0); + intervalField = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(IntervalFieldContext); + } else { + return this.getTypedRuleContext(IntervalFieldContext,i); + } }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterCurrentUser(this); + listener.enterType(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitCurrentUser(this); + listener.exitType(this); } } } -SqlBaseParser.CurrentUserContext = CurrentUserContext; -class ExtractContext extends PrimaryExpressionContext { - constructor(parser, ctx) { - super(parser); - super.copyFrom(ctx); +class TableFunctionCallContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = SqlBaseParser.RULE_tableFunctionCall; } - EXTRACT() { - return this.getToken(SqlBaseParser.EXTRACT, 0); + qualifiedName() { + return this.getTypedRuleContext(QualifiedNameContext,0); }; - identifier() { - return this.getTypedRuleContext(IdentifierContext,0); + tableFunctionArgument = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(TableFunctionArgumentContext); + } else { + return this.getTypedRuleContext(TableFunctionArgumentContext,i); + } }; - FROM() { - return this.getToken(SqlBaseParser.FROM, 0); + COPARTITION() { + return this.getToken(SqlBaseParser.COPARTITION, 0); }; - valueExpression() { - return this.getTypedRuleContext(ValueExpressionContext,0); + copartitionTables = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(CopartitionTablesContext); + } else { + return this.getTypedRuleContext(CopartitionTablesContext,i); + } }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterExtract(this); + listener.enterTableFunctionCall(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitExtract(this); + listener.exitTableFunctionCall(this); } } } -SqlBaseParser.ExtractContext = ExtractContext; -class StringLiteralContext extends PrimaryExpressionContext { - constructor(parser, ctx) { - super(parser); - super.copyFrom(ctx); +class TableFunctionArgumentContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = SqlBaseParser.RULE_tableFunctionArgument; } - string() { - return this.getTypedRuleContext(StringContext,0); + tableArgument() { + return this.getTypedRuleContext(TableArgumentContext,0); + }; + + descriptorArgument() { + return this.getTypedRuleContext(DescriptorArgumentContext,0); + }; + + expression() { + return this.getTypedRuleContext(ExpressionContext,0); + }; + + identifier() { + return this.getTypedRuleContext(IdentifierContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterStringLiteral(this); + listener.enterTableFunctionArgument(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitStringLiteral(this); + listener.exitTableFunctionArgument(this); } } } -SqlBaseParser.StringLiteralContext = StringLiteralContext; -class ArrayConstructorContext extends PrimaryExpressionContext { - constructor(parser, ctx) { - super(parser); - super.copyFrom(ctx); +class TableArgumentContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = SqlBaseParser.RULE_tableArgument; } - ARRAY() { - return this.getToken(SqlBaseParser.ARRAY, 0); + tableArgumentRelation() { + return this.getTypedRuleContext(TableArgumentRelationContext,0); }; - expression = function(i) { - if(i===undefined) { - i = null; - } + PARTITION() { + return this.getToken(SqlBaseParser.PARTITION, 0); + }; + + BY = function(i) { + if(i===undefined) { + i = null; + } if(i===null) { - return this.getTypedRuleContexts(ExpressionContext); + return this.getTokens(SqlBaseParser.BY); } else { - return this.getTypedRuleContext(ExpressionContext,i); + return this.getToken(SqlBaseParser.BY, i); } }; - enterRule(listener) { - if(listener instanceof SqlBaseListener ) { - listener.enterArrayConstructor(this); - } - } - - exitRule(listener) { - if(listener instanceof SqlBaseListener ) { - listener.exitArrayConstructor(this); - } - } - - -} - -SqlBaseParser.ArrayConstructorContext = ArrayConstructorContext; - -class FunctionCallContext extends PrimaryExpressionContext { - constructor(parser, ctx) { - super(parser); - super.copyFrom(ctx); - } + PRUNE() { + return this.getToken(SqlBaseParser.PRUNE, 0); + }; - qualifiedName() { - return this.getTypedRuleContext(QualifiedNameContext,0); + WHEN() { + return this.getToken(SqlBaseParser.WHEN, 0); }; - ASTERISK() { - return this.getToken(SqlBaseParser.ASTERISK, 0); + EMPTY() { + return this.getToken(SqlBaseParser.EMPTY, 0); }; - filter() { - return this.getTypedRuleContext(FilterContext,0); + KEEP() { + return this.getToken(SqlBaseParser.KEEP, 0); }; - over() { - return this.getTypedRuleContext(OverContext,0); + ORDER() { + return this.getToken(SqlBaseParser.ORDER, 0); }; expression = function(i) { @@ -16433,14 +19450,6 @@ class FunctionCallContext extends PrimaryExpressionContext { } }; - ORDER() { - return this.getToken(SqlBaseParser.ORDER, 0); - }; - - BY() { - return this.getToken(SqlBaseParser.BY, 0); - }; - sortItem = function(i) { if(i===undefined) { i = null; @@ -16452,169 +19461,245 @@ class FunctionCallContext extends PrimaryExpressionContext { } }; - setQuantifier() { - return this.getTypedRuleContext(SetQuantifierContext,0); - }; - - nullTreatment() { - return this.getTypedRuleContext(NullTreatmentContext,0); - }; - enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterFunctionCall(this); + listener.enterTableArgument(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitFunctionCall(this); + listener.exitTableArgument(this); } } } -SqlBaseParser.FunctionCallContext = FunctionCallContext; -class ExistsContext extends PrimaryExpressionContext { + +class TableArgumentRelationContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = SqlBaseParser.RULE_tableArgumentRelation; + } + + + + copyFrom(ctx) { + super.copyFrom(ctx); + } + +} + + +class TableArgumentQueryContext extends TableArgumentRelationContext { constructor(parser, ctx) { super(parser); super.copyFrom(ctx); } - EXISTS() { - return this.getToken(SqlBaseParser.EXISTS, 0); + TABLE() { + return this.getToken(SqlBaseParser.TABLE, 0); }; query() { return this.getTypedRuleContext(QueryContext,0); }; + identifier() { + return this.getTypedRuleContext(IdentifierContext,0); + }; + + AS() { + return this.getToken(SqlBaseParser.AS, 0); + }; + + columnAliases() { + return this.getTypedRuleContext(ColumnAliasesContext,0); + }; + enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterExists(this); + listener.enterTableArgumentQuery(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitExists(this); + listener.exitTableArgumentQuery(this); } } } -SqlBaseParser.ExistsContext = ExistsContext; +SqlBaseParser.TableArgumentQueryContext = TableArgumentQueryContext; -class PositionContext extends PrimaryExpressionContext { +class TableArgumentTableContext extends TableArgumentRelationContext { constructor(parser, ctx) { super(parser); super.copyFrom(ctx); } - POSITION() { - return this.getToken(SqlBaseParser.POSITION, 0); + TABLE() { + return this.getToken(SqlBaseParser.TABLE, 0); }; - valueExpression = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTypedRuleContexts(ValueExpressionContext); - } else { - return this.getTypedRuleContext(ValueExpressionContext,i); - } + qualifiedName() { + return this.getTypedRuleContext(QualifiedNameContext,0); }; - IN() { - return this.getToken(SqlBaseParser.IN, 0); + identifier() { + return this.getTypedRuleContext(IdentifierContext,0); + }; + + AS() { + return this.getToken(SqlBaseParser.AS, 0); + }; + + columnAliases() { + return this.getTypedRuleContext(ColumnAliasesContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterPosition(this); + listener.enterTableArgumentTable(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitPosition(this); + listener.exitTableArgumentTable(this); } } } -SqlBaseParser.PositionContext = PositionContext; +SqlBaseParser.TableArgumentTableContext = TableArgumentTableContext; -class SearchedCaseContext extends PrimaryExpressionContext { +class DescriptorArgumentContext extends antlr4.ParserRuleContext { - constructor(parser, ctx) { - super(parser); - this.elseExpression = null;; - super.copyFrom(ctx); + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = SqlBaseParser.RULE_descriptorArgument; } - CASE() { - return this.getToken(SqlBaseParser.CASE, 0); - }; - - END() { - return this.getToken(SqlBaseParser.END, 0); + DESCRIPTOR() { + return this.getToken(SqlBaseParser.DESCRIPTOR, 0); }; - whenClause = function(i) { + descriptorField = function(i) { if(i===undefined) { i = null; } if(i===null) { - return this.getTypedRuleContexts(WhenClauseContext); + return this.getTypedRuleContexts(DescriptorFieldContext); } else { - return this.getTypedRuleContext(WhenClauseContext,i); + return this.getTypedRuleContext(DescriptorFieldContext,i); } }; - ELSE() { - return this.getToken(SqlBaseParser.ELSE, 0); + CAST() { + return this.getToken(SqlBaseParser.CAST, 0); }; - expression() { - return this.getTypedRuleContext(ExpressionContext,0); + NULL() { + return this.getToken(SqlBaseParser.NULL, 0); + }; + + AS() { + return this.getToken(SqlBaseParser.AS, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterSearchedCase(this); + listener.enterDescriptorArgument(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitSearchedCase(this); + listener.exitDescriptorArgument(this); } } } -SqlBaseParser.SearchedCaseContext = SearchedCaseContext; -class GroupingOperationContext extends PrimaryExpressionContext { - constructor(parser, ctx) { - super(parser); - super.copyFrom(ctx); +class DescriptorFieldContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = SqlBaseParser.RULE_descriptorField; } - GROUPING() { - return this.getToken(SqlBaseParser.GROUPING, 0); + identifier() { + return this.getTypedRuleContext(IdentifierContext,0); + }; + + type() { + return this.getTypedRuleContext(TypeContext,0); }; + enterRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.enterDescriptorField(this); + } + } + + exitRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.exitDescriptorField(this); + } + } + + +} + + + +class CopartitionTablesContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = SqlBaseParser.RULE_copartitionTables; + } + qualifiedName = function(i) { if(i===undefined) { i = null; @@ -16628,22 +19713,22 @@ class GroupingOperationContext extends PrimaryExpressionContext { enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterGroupingOperation(this); + listener.enterCopartitionTables(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitGroupingOperation(this); + listener.exitCopartitionTables(this); } } } -SqlBaseParser.GroupingOperationContext = GroupingOperationContext; -class StringContext extends antlr4.ParserRuleContext { + +class TypeParameterContext extends antlr4.ParserRuleContext { constructor(parser, parent, invokingState) { if(parent===undefined) { @@ -16654,83 +19739,134 @@ class StringContext extends antlr4.ParserRuleContext { } super(parent, invokingState); this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_string; + this.ruleIndex = SqlBaseParser.RULE_typeParameter; } + INTEGER_VALUE() { + return this.getToken(SqlBaseParser.INTEGER_VALUE, 0); + }; - - copyFrom(ctx) { - super.copyFrom(ctx); + type() { + return this.getTypedRuleContext(TypeContext,0); + }; + + enterRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.enterTypeParameter(this); } + } + + exitRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.exitTypeParameter(this); + } + } + } -class UnicodeStringLiteralContext extends StringContext { - constructor(parser, ctx) { - super(parser); - super.copyFrom(ctx); +class BaseTypeContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = SqlBaseParser.RULE_baseType; } - UNICODE_STRING() { - return this.getToken(SqlBaseParser.UNICODE_STRING, 0); + TIME_WITH_TIME_ZONE() { + return this.getToken(SqlBaseParser.TIME_WITH_TIME_ZONE, 0); }; - UESCAPE() { - return this.getToken(SqlBaseParser.UESCAPE, 0); + TIMESTAMP_WITH_TIME_ZONE() { + return this.getToken(SqlBaseParser.TIMESTAMP_WITH_TIME_ZONE, 0); }; - STRING() { - return this.getToken(SqlBaseParser.STRING, 0); + DOUBLE_PRECISION() { + return this.getToken(SqlBaseParser.DOUBLE_PRECISION, 0); + }; + + qualifiedName() { + return this.getTypedRuleContext(QualifiedNameContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterUnicodeStringLiteral(this); + listener.enterBaseType(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitUnicodeStringLiteral(this); + listener.exitBaseType(this); } } } -SqlBaseParser.UnicodeStringLiteralContext = UnicodeStringLiteralContext; -class BasicStringLiteralContext extends StringContext { - constructor(parser, ctx) { - super(parser); - super.copyFrom(ctx); +class WhenClauseContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = SqlBaseParser.RULE_whenClause; + this.condition = null; + this.result = null; } - STRING() { - return this.getToken(SqlBaseParser.STRING, 0); + WHEN() { + return this.getToken(SqlBaseParser.WHEN, 0); + }; + + THEN() { + return this.getToken(SqlBaseParser.THEN, 0); + }; + + expression = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(ExpressionContext); + } else { + return this.getTypedRuleContext(ExpressionContext,i); + } }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterBasicStringLiteral(this); + listener.enterWhenClause(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitBasicStringLiteral(this); + listener.exitWhenClause(this); } } } -SqlBaseParser.BasicStringLiteralContext = BasicStringLiteralContext; -class NullTreatmentContext extends antlr4.ParserRuleContext { + +class FilterContext extends antlr4.ParserRuleContext { constructor(parser, parent, invokingState) { if(parent===undefined) { @@ -16741,30 +19877,30 @@ class NullTreatmentContext extends antlr4.ParserRuleContext { } super(parent, invokingState); this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_nullTreatment; + this.ruleIndex = SqlBaseParser.RULE_filter; } - IGNORE() { - return this.getToken(SqlBaseParser.IGNORE, 0); + FILTER() { + return this.getToken(SqlBaseParser.FILTER, 0); }; - NULLS() { - return this.getToken(SqlBaseParser.NULLS, 0); + WHERE() { + return this.getToken(SqlBaseParser.WHERE, 0); }; - RESPECT() { - return this.getToken(SqlBaseParser.RESPECT, 0); + booleanExpression() { + return this.getTypedRuleContext(BooleanExpressionContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterNullTreatment(this); + listener.enterFilter(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitNullTreatment(this); + listener.exitFilter(this); } } @@ -16773,7 +19909,7 @@ class NullTreatmentContext extends antlr4.ParserRuleContext { -class TimeZoneSpecifierContext extends antlr4.ParserRuleContext { +class MergeCaseContext extends antlr4.ParserRuleContext { constructor(parser, parent, invokingState) { if(parent===undefined) { @@ -16784,7 +19920,7 @@ class TimeZoneSpecifierContext extends antlr4.ParserRuleContext { } super(parent, invokingState); this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_timeZoneSpecifier; + this.ruleIndex = SqlBaseParser.RULE_mergeCase; } @@ -16796,134 +19932,163 @@ class TimeZoneSpecifierContext extends antlr4.ParserRuleContext { } -class TimeZoneIntervalContext extends TimeZoneSpecifierContext { +class MergeInsertContext extends MergeCaseContext { constructor(parser, ctx) { super(parser); + this._identifier = null;; + this.columns = [];; + this._expression = null;; + this.values = [];; super.copyFrom(ctx); } - TIME() { - return this.getToken(SqlBaseParser.TIME, 0); + WHEN() { + return this.getToken(SqlBaseParser.WHEN, 0); }; - ZONE() { - return this.getToken(SqlBaseParser.ZONE, 0); + NOT() { + return this.getToken(SqlBaseParser.NOT, 0); + }; + + MATCHED() { + return this.getToken(SqlBaseParser.MATCHED, 0); + }; + + THEN() { + return this.getToken(SqlBaseParser.THEN, 0); + }; + + INSERT() { + return this.getToken(SqlBaseParser.INSERT, 0); + }; + + VALUES() { + return this.getToken(SqlBaseParser.VALUES, 0); + }; + + expression = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(ExpressionContext); + } else { + return this.getTypedRuleContext(ExpressionContext,i); + } }; - interval() { - return this.getTypedRuleContext(IntervalContext,0); + identifier = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(IdentifierContext); + } else { + return this.getTypedRuleContext(IdentifierContext,i); + } }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterTimeZoneInterval(this); + listener.enterMergeInsert(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitTimeZoneInterval(this); + listener.exitMergeInsert(this); } } } -SqlBaseParser.TimeZoneIntervalContext = TimeZoneIntervalContext; +SqlBaseParser.MergeInsertContext = MergeInsertContext; -class TimeZoneStringContext extends TimeZoneSpecifierContext { +class MergeUpdateContext extends MergeCaseContext { constructor(parser, ctx) { super(parser); + this._identifier = null;; + this.targetColumns = [];; + this._expression = null;; + this.values = [];; super.copyFrom(ctx); } - TIME() { - return this.getToken(SqlBaseParser.TIME, 0); + WHEN() { + return this.getToken(SqlBaseParser.WHEN, 0); }; - ZONE() { - return this.getToken(SqlBaseParser.ZONE, 0); + MATCHED() { + return this.getToken(SqlBaseParser.MATCHED, 0); }; - string() { - return this.getTypedRuleContext(StringContext,0); + THEN() { + return this.getToken(SqlBaseParser.THEN, 0); }; - enterRule(listener) { - if(listener instanceof SqlBaseListener ) { - listener.enterTimeZoneString(this); - } - } - - exitRule(listener) { - if(listener instanceof SqlBaseListener ) { - listener.exitTimeZoneString(this); - } - } - - -} - -SqlBaseParser.TimeZoneStringContext = TimeZoneStringContext; - -class ComparisonOperatorContext extends antlr4.ParserRuleContext { - - constructor(parser, parent, invokingState) { - if(parent===undefined) { - parent = null; - } - if(invokingState===undefined || invokingState===null) { - invokingState = -1; - } - super(parent, invokingState); - this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_comparisonOperator; - } - - EQ() { - return this.getToken(SqlBaseParser.EQ, 0); + UPDATE() { + return this.getToken(SqlBaseParser.UPDATE, 0); }; - NEQ() { - return this.getToken(SqlBaseParser.NEQ, 0); + SET() { + return this.getToken(SqlBaseParser.SET, 0); }; - LT() { - return this.getToken(SqlBaseParser.LT, 0); + EQ = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTokens(SqlBaseParser.EQ); + } else { + return this.getToken(SqlBaseParser.EQ, i); + } }; - LTE() { - return this.getToken(SqlBaseParser.LTE, 0); - }; - GT() { - return this.getToken(SqlBaseParser.GT, 0); + identifier = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(IdentifierContext); + } else { + return this.getTypedRuleContext(IdentifierContext,i); + } }; - GTE() { - return this.getToken(SqlBaseParser.GTE, 0); + expression = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(ExpressionContext); + } else { + return this.getTypedRuleContext(ExpressionContext,i); + } }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterComparisonOperator(this); + listener.enterMergeUpdate(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitComparisonOperator(this); + listener.exitMergeUpdate(this); } } } +SqlBaseParser.MergeUpdateContext = MergeUpdateContext; - -class ComparisonQuantifierContext extends antlr4.ParserRuleContext { +class OverContext extends antlr4.ParserRuleContext { constructor(parser, parent, invokingState) { if(parent===undefined) { @@ -16934,69 +20099,70 @@ class ComparisonQuantifierContext extends antlr4.ParserRuleContext { } super(parent, invokingState); this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_comparisonQuantifier; + this.ruleIndex = SqlBaseParser.RULE_over; + this._expression = null; + this.partition = []; } - ALL() { - return this.getToken(SqlBaseParser.ALL, 0); - }; - - SOME() { - return this.getToken(SqlBaseParser.SOME, 0); + OVER() { + return this.getToken(SqlBaseParser.OVER, 0); }; - ANY() { - return this.getToken(SqlBaseParser.ANY, 0); + PARTITION() { + return this.getToken(SqlBaseParser.PARTITION, 0); }; - enterRule(listener) { - if(listener instanceof SqlBaseListener ) { - listener.enterComparisonQuantifier(this); - } - } - - exitRule(listener) { - if(listener instanceof SqlBaseListener ) { - listener.exitComparisonQuantifier(this); + BY = function(i) { + if(i===undefined) { + i = null; } - } - - -} - + if(i===null) { + return this.getTokens(SqlBaseParser.BY); + } else { + return this.getToken(SqlBaseParser.BY, i); + } + }; -class BooleanValueContext extends antlr4.ParserRuleContext { + ORDER() { + return this.getToken(SqlBaseParser.ORDER, 0); + }; - constructor(parser, parent, invokingState) { - if(parent===undefined) { - parent = null; - } - if(invokingState===undefined || invokingState===null) { - invokingState = -1; - } - super(parent, invokingState); - this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_booleanValue; - } + sortItem = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(SortItemContext); + } else { + return this.getTypedRuleContext(SortItemContext,i); + } + }; - TRUE() { - return this.getToken(SqlBaseParser.TRUE, 0); + windowFrame() { + return this.getTypedRuleContext(WindowFrameContext,0); }; - FALSE() { - return this.getToken(SqlBaseParser.FALSE, 0); + expression = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(ExpressionContext); + } else { + return this.getTypedRuleContext(ExpressionContext,i); + } }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterBooleanValue(this); + listener.enterOver(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitBooleanValue(this); + listener.exitOver(this); } } @@ -17005,7 +20171,7 @@ class BooleanValueContext extends antlr4.ParserRuleContext { -class IntervalContext extends antlr4.ParserRuleContext { +class WindowFrameContext extends antlr4.ParserRuleContext { constructor(parser, parent, invokingState) { if(parent===undefined) { @@ -17016,52 +20182,52 @@ class IntervalContext extends antlr4.ParserRuleContext { } super(parent, invokingState); this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_interval; - this.sign = null; - this.from = null; - this.to = null; + this.ruleIndex = SqlBaseParser.RULE_windowFrame; + this.frameType = null; + this.start = null; + this.end = null; } - INTERVAL() { - return this.getToken(SqlBaseParser.INTERVAL, 0); - }; - - string() { - return this.getTypedRuleContext(StringContext,0); + RANGE() { + return this.getToken(SqlBaseParser.RANGE, 0); }; - intervalField = function(i) { + frameBound = function(i) { if(i===undefined) { i = null; } if(i===null) { - return this.getTypedRuleContexts(IntervalFieldContext); + return this.getTypedRuleContexts(FrameBoundContext); } else { - return this.getTypedRuleContext(IntervalFieldContext,i); + return this.getTypedRuleContext(FrameBoundContext,i); } }; - TO() { - return this.getToken(SqlBaseParser.TO, 0); + ROWS() { + return this.getToken(SqlBaseParser.ROWS, 0); }; - PLUS() { - return this.getToken(SqlBaseParser.PLUS, 0); + GROUPS() { + return this.getToken(SqlBaseParser.GROUPS, 0); }; - MINUS() { - return this.getToken(SqlBaseParser.MINUS, 0); + BETWEEN() { + return this.getToken(SqlBaseParser.BETWEEN, 0); + }; + + AND() { + return this.getToken(SqlBaseParser.AND, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterInterval(this); + listener.enterWindowFrame(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitInterval(this); + listener.exitWindowFrame(this); } } @@ -17070,7 +20236,7 @@ class IntervalContext extends antlr4.ParserRuleContext { -class IntervalFieldContext extends antlr4.ParserRuleContext { +class FrameBoundContext extends antlr4.ParserRuleContext { constructor(parser, parent, invokingState) { if(parent===undefined) { @@ -17081,140 +20247,125 @@ class IntervalFieldContext extends antlr4.ParserRuleContext { } super(parent, invokingState); this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_intervalField; + this.ruleIndex = SqlBaseParser.RULE_frameBound; } - YEAR() { - return this.getToken(SqlBaseParser.YEAR, 0); - }; - MONTH() { - return this.getToken(SqlBaseParser.MONTH, 0); - }; + + copyFrom(ctx) { + super.copyFrom(ctx); + } - DAY() { - return this.getToken(SqlBaseParser.DAY, 0); - }; +} + + +class BoundedFrameContext extends FrameBoundContext { + + constructor(parser, ctx) { + super(parser); + this.boundType = null;; + super.copyFrom(ctx); + } - HOUR() { - return this.getToken(SqlBaseParser.HOUR, 0); + expression() { + return this.getTypedRuleContext(ExpressionContext,0); }; - MINUTE() { - return this.getToken(SqlBaseParser.MINUTE, 0); + PRECEDING() { + return this.getToken(SqlBaseParser.PRECEDING, 0); }; - SECOND() { - return this.getToken(SqlBaseParser.SECOND, 0); + FOLLOWING() { + return this.getToken(SqlBaseParser.FOLLOWING, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterIntervalField(this); + listener.enterBoundedFrame(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitIntervalField(this); + listener.exitBoundedFrame(this); } } } +SqlBaseParser.BoundedFrameContext = BoundedFrameContext; +class UnboundedFrameContext extends FrameBoundContext { -class NormalFormContext extends antlr4.ParserRuleContext { - - constructor(parser, parent, invokingState) { - if(parent===undefined) { - parent = null; - } - if(invokingState===undefined || invokingState===null) { - invokingState = -1; - } - super(parent, invokingState); - this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_normalForm; + constructor(parser, ctx) { + super(parser); + this.boundType = null;; + super.copyFrom(ctx); } - NFD() { - return this.getToken(SqlBaseParser.NFD, 0); - }; - - NFC() { - return this.getToken(SqlBaseParser.NFC, 0); + UNBOUNDED() { + return this.getToken(SqlBaseParser.UNBOUNDED, 0); }; - NFKD() { - return this.getToken(SqlBaseParser.NFKD, 0); + PRECEDING() { + return this.getToken(SqlBaseParser.PRECEDING, 0); }; - NFKC() { - return this.getToken(SqlBaseParser.NFKC, 0); + FOLLOWING() { + return this.getToken(SqlBaseParser.FOLLOWING, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterNormalForm(this); + listener.enterUnboundedFrame(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitNormalForm(this); + listener.exitUnboundedFrame(this); } } } +SqlBaseParser.UnboundedFrameContext = UnboundedFrameContext; +class CurrentRowBoundContext extends FrameBoundContext { -class TypesContext extends antlr4.ParserRuleContext { - - constructor(parser, parent, invokingState) { - if(parent===undefined) { - parent = null; - } - if(invokingState===undefined || invokingState===null) { - invokingState = -1; - } - super(parent, invokingState); - this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_types; + constructor(parser, ctx) { + super(parser); + super.copyFrom(ctx); } - type = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTypedRuleContexts(TypeContext); - } else { - return this.getTypedRuleContext(TypeContext,i); - } + CURRENT() { + return this.getToken(SqlBaseParser.CURRENT, 0); + }; + + ROW() { + return this.getToken(SqlBaseParser.ROW, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterTypes(this); + listener.enterCurrentRowBound(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitTypes(this); + listener.exitCurrentRowBound(this); } } } +SqlBaseParser.CurrentRowBoundContext = CurrentRowBoundContext; - -class TypeContext extends antlr4.ParserRuleContext { +class UpdateAssignmentContext extends antlr4.ParserRuleContext { constructor(parser, parent, invokingState) { if(parent===undefined) { @@ -17225,96 +20376,30 @@ class TypeContext extends antlr4.ParserRuleContext { } super(parent, invokingState); this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_type; - this.from = null; - this.to = null; + this.ruleIndex = SqlBaseParser.RULE_updateAssignment; } - ARRAY() { - return this.getToken(SqlBaseParser.ARRAY, 0); - }; - - LT() { - return this.getToken(SqlBaseParser.LT, 0); - }; - - type = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTypedRuleContexts(TypeContext); - } else { - return this.getTypedRuleContext(TypeContext,i); - } - }; - - GT() { - return this.getToken(SqlBaseParser.GT, 0); - }; - - MAP() { - return this.getToken(SqlBaseParser.MAP, 0); - }; - - ROW() { - return this.getToken(SqlBaseParser.ROW, 0); - }; - - identifier = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTypedRuleContexts(IdentifierContext); - } else { - return this.getTypedRuleContext(IdentifierContext,i); - } - }; - - baseType() { - return this.getTypedRuleContext(BaseTypeContext,0); - }; - - typeParameter = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTypedRuleContexts(TypeParameterContext); - } else { - return this.getTypedRuleContext(TypeParameterContext,i); - } - }; - - INTERVAL() { - return this.getToken(SqlBaseParser.INTERVAL, 0); + identifier() { + return this.getTypedRuleContext(IdentifierContext,0); }; - TO() { - return this.getToken(SqlBaseParser.TO, 0); + EQ() { + return this.getToken(SqlBaseParser.EQ, 0); }; - intervalField = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTypedRuleContexts(IntervalFieldContext); - } else { - return this.getTypedRuleContext(IntervalFieldContext,i); - } + expression() { + return this.getTypedRuleContext(ExpressionContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterType(this); + listener.enterUpdateAssignment(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitType(this); + listener.exitUpdateAssignment(this); } } @@ -17323,7 +20408,7 @@ class TypeContext extends antlr4.ParserRuleContext { -class TypeParameterContext extends antlr4.ParserRuleContext { +class ExplainOptionContext extends antlr4.ParserRuleContext { constructor(parser, parent, invokingState) { if(parent===undefined) { @@ -17334,82 +20419,105 @@ class TypeParameterContext extends antlr4.ParserRuleContext { } super(parent, invokingState); this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_typeParameter; + this.ruleIndex = SqlBaseParser.RULE_explainOption; } - INTEGER_VALUE() { - return this.getToken(SqlBaseParser.INTEGER_VALUE, 0); + + + copyFrom(ctx) { + super.copyFrom(ctx); + } + +} + + +class ExplainFormatContext extends ExplainOptionContext { + + constructor(parser, ctx) { + super(parser); + this.value = null;; + super.copyFrom(ctx); + } + + FORMAT() { + return this.getToken(SqlBaseParser.FORMAT, 0); }; - type() { - return this.getTypedRuleContext(TypeContext,0); + TEXT() { + return this.getToken(SqlBaseParser.TEXT, 0); + }; + + GRAPHVIZ() { + return this.getToken(SqlBaseParser.GRAPHVIZ, 0); + }; + + JSON() { + return this.getToken(SqlBaseParser.JSON, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterTypeParameter(this); + listener.enterExplainFormat(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitTypeParameter(this); + listener.exitExplainFormat(this); } } } +SqlBaseParser.ExplainFormatContext = ExplainFormatContext; +class ExplainTypeContext extends ExplainOptionContext { -class BaseTypeContext extends antlr4.ParserRuleContext { - - constructor(parser, parent, invokingState) { - if(parent===undefined) { - parent = null; - } - if(invokingState===undefined || invokingState===null) { - invokingState = -1; - } - super(parent, invokingState); - this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_baseType; + constructor(parser, ctx) { + super(parser); + this.value = null;; + super.copyFrom(ctx); } - TIME_WITH_TIME_ZONE() { - return this.getToken(SqlBaseParser.TIME_WITH_TIME_ZONE, 0); + TYPE() { + return this.getToken(SqlBaseParser.TYPE, 0); }; - TIMESTAMP_WITH_TIME_ZONE() { - return this.getToken(SqlBaseParser.TIMESTAMP_WITH_TIME_ZONE, 0); + LOGICAL() { + return this.getToken(SqlBaseParser.LOGICAL, 0); }; - DOUBLE_PRECISION() { - return this.getToken(SqlBaseParser.DOUBLE_PRECISION, 0); + DISTRIBUTED() { + return this.getToken(SqlBaseParser.DISTRIBUTED, 0); }; - qualifiedName() { - return this.getTypedRuleContext(QualifiedNameContext,0); + VALIDATE() { + return this.getToken(SqlBaseParser.VALIDATE, 0); + }; + + IO() { + return this.getToken(SqlBaseParser.IO, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterBaseType(this); + listener.enterExplainType(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitBaseType(this); + listener.exitExplainType(this); } } } +SqlBaseParser.ExplainTypeContext = ExplainTypeContext; - -class WhenClauseContext extends antlr4.ParserRuleContext { +class TransactionModeContext extends antlr4.ParserRuleContext { constructor(parser, parent, invokingState) { if(parent===undefined) { @@ -17420,91 +20528,92 @@ class WhenClauseContext extends antlr4.ParserRuleContext { } super(parent, invokingState); this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_whenClause; - this.condition = null; - this.result = null; + this.ruleIndex = SqlBaseParser.RULE_transactionMode; } - WHEN() { - return this.getToken(SqlBaseParser.WHEN, 0); + + + copyFrom(ctx) { + super.copyFrom(ctx); + } + +} + + +class TransactionAccessModeContext extends TransactionModeContext { + + constructor(parser, ctx) { + super(parser); + this.accessMode = null;; + super.copyFrom(ctx); + } + + READ() { + return this.getToken(SqlBaseParser.READ, 0); }; - THEN() { - return this.getToken(SqlBaseParser.THEN, 0); + ONLY() { + return this.getToken(SqlBaseParser.ONLY, 0); }; - expression = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTypedRuleContexts(ExpressionContext); - } else { - return this.getTypedRuleContext(ExpressionContext,i); - } + WRITE() { + return this.getToken(SqlBaseParser.WRITE, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterWhenClause(this); + listener.enterTransactionAccessMode(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitWhenClause(this); + listener.exitTransactionAccessMode(this); } } } +SqlBaseParser.TransactionAccessModeContext = TransactionAccessModeContext; +class IsolationLevelContext extends TransactionModeContext { -class FilterContext extends antlr4.ParserRuleContext { - - constructor(parser, parent, invokingState) { - if(parent===undefined) { - parent = null; - } - if(invokingState===undefined || invokingState===null) { - invokingState = -1; - } - super(parent, invokingState); - this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_filter; + constructor(parser, ctx) { + super(parser); + super.copyFrom(ctx); } - FILTER() { - return this.getToken(SqlBaseParser.FILTER, 0); + ISOLATION() { + return this.getToken(SqlBaseParser.ISOLATION, 0); }; - WHERE() { - return this.getToken(SqlBaseParser.WHERE, 0); + LEVEL() { + return this.getToken(SqlBaseParser.LEVEL, 0); }; - booleanExpression() { - return this.getTypedRuleContext(BooleanExpressionContext,0); + levelOfIsolation() { + return this.getTypedRuleContext(LevelOfIsolationContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterFilter(this); + listener.enterIsolationLevel(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitFilter(this); + listener.exitIsolationLevel(this); } } } +SqlBaseParser.IsolationLevelContext = IsolationLevelContext; - -class OverContext extends antlr4.ParserRuleContext { +class LevelOfIsolationContext extends antlr4.ParserRuleContext { constructor(parser, parent, invokingState) { if(parent===undefined) { @@ -17515,144 +20624,143 @@ class OverContext extends antlr4.ParserRuleContext { } super(parent, invokingState); this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_over; - this._expression = null; - this.partition = []; + this.ruleIndex = SqlBaseParser.RULE_levelOfIsolation; } - OVER() { - return this.getToken(SqlBaseParser.OVER, 0); + + + copyFrom(ctx) { + super.copyFrom(ctx); + } + +} + + +class ReadUncommittedContext extends LevelOfIsolationContext { + + constructor(parser, ctx) { + super(parser); + super.copyFrom(ctx); + } + + READ() { + return this.getToken(SqlBaseParser.READ, 0); }; - PARTITION() { - return this.getToken(SqlBaseParser.PARTITION, 0); + UNCOMMITTED() { + return this.getToken(SqlBaseParser.UNCOMMITTED, 0); }; - BY = function(i) { - if(i===undefined) { - i = null; + enterRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.enterReadUncommitted(this); } - if(i===null) { - return this.getTokens(SqlBaseParser.BY); - } else { - return this.getToken(SqlBaseParser.BY, i); - } - }; + } + exitRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.exitReadUncommitted(this); + } + } - ORDER() { - return this.getToken(SqlBaseParser.ORDER, 0); - }; - sortItem = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTypedRuleContexts(SortItemContext); - } else { - return this.getTypedRuleContext(SortItemContext,i); - } - }; +} - windowFrame() { - return this.getTypedRuleContext(WindowFrameContext,0); - }; +SqlBaseParser.ReadUncommittedContext = ReadUncommittedContext; - expression = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTypedRuleContexts(ExpressionContext); - } else { - return this.getTypedRuleContext(ExpressionContext,i); - } +class SerializableContext extends LevelOfIsolationContext { + + constructor(parser, ctx) { + super(parser); + super.copyFrom(ctx); + } + + SERIALIZABLE() { + return this.getToken(SqlBaseParser.SERIALIZABLE, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterOver(this); + listener.enterSerializable(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitOver(this); + listener.exitSerializable(this); } } } +SqlBaseParser.SerializableContext = SerializableContext; +class ReadCommittedContext extends LevelOfIsolationContext { -class WindowFrameContext extends antlr4.ParserRuleContext { - - constructor(parser, parent, invokingState) { - if(parent===undefined) { - parent = null; - } - if(invokingState===undefined || invokingState===null) { - invokingState = -1; - } - super(parent, invokingState); - this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_windowFrame; - this.frameType = null; - this.start = null; - this.end = null; + constructor(parser, ctx) { + super(parser); + super.copyFrom(ctx); } - RANGE() { - return this.getToken(SqlBaseParser.RANGE, 0); + READ() { + return this.getToken(SqlBaseParser.READ, 0); }; - frameBound = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTypedRuleContexts(FrameBoundContext); - } else { - return this.getTypedRuleContext(FrameBoundContext,i); - } + COMMITTED() { + return this.getToken(SqlBaseParser.COMMITTED, 0); }; - ROWS() { - return this.getToken(SqlBaseParser.ROWS, 0); - }; + enterRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.enterReadCommitted(this); + } + } - GROUPS() { - return this.getToken(SqlBaseParser.GROUPS, 0); - }; + exitRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.exitReadCommitted(this); + } + } - BETWEEN() { - return this.getToken(SqlBaseParser.BETWEEN, 0); + +} + +SqlBaseParser.ReadCommittedContext = ReadCommittedContext; + +class RepeatableReadContext extends LevelOfIsolationContext { + + constructor(parser, ctx) { + super(parser); + super.copyFrom(ctx); + } + + REPEATABLE() { + return this.getToken(SqlBaseParser.REPEATABLE, 0); }; - AND() { - return this.getToken(SqlBaseParser.AND, 0); + READ() { + return this.getToken(SqlBaseParser.READ, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterWindowFrame(this); + listener.enterRepeatableRead(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitWindowFrame(this); + listener.exitRepeatableRead(this); } } } +SqlBaseParser.RepeatableReadContext = RepeatableReadContext; - -class FrameBoundContext extends antlr4.ParserRuleContext { +class CallArgumentContext extends antlr4.ParserRuleContext { constructor(parser, parent, invokingState) { if(parent===undefined) { @@ -17663,7 +20771,7 @@ class FrameBoundContext extends antlr4.ParserRuleContext { } super(parent, invokingState); this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_frameBound; + this.ruleIndex = SqlBaseParser.RULE_callArgument; } @@ -17675,11 +20783,10 @@ class FrameBoundContext extends antlr4.ParserRuleContext { } -class BoundedFrameContext extends FrameBoundContext { +class PositionalArgumentContext extends CallArgumentContext { constructor(parser, ctx) { super(parser); - this.boundType = null;; super.copyFrom(ctx); } @@ -17687,101 +20794,103 @@ class BoundedFrameContext extends FrameBoundContext { return this.getTypedRuleContext(ExpressionContext,0); }; - PRECEDING() { - return this.getToken(SqlBaseParser.PRECEDING, 0); - }; - - FOLLOWING() { - return this.getToken(SqlBaseParser.FOLLOWING, 0); - }; - enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterBoundedFrame(this); + listener.enterPositionalArgument(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitBoundedFrame(this); + listener.exitPositionalArgument(this); } } } -SqlBaseParser.BoundedFrameContext = BoundedFrameContext; +SqlBaseParser.PositionalArgumentContext = PositionalArgumentContext; -class UnboundedFrameContext extends FrameBoundContext { +class NamedArgumentContext extends CallArgumentContext { constructor(parser, ctx) { super(parser); - this.boundType = null;; super.copyFrom(ctx); } - UNBOUNDED() { - return this.getToken(SqlBaseParser.UNBOUNDED, 0); - }; - - PRECEDING() { - return this.getToken(SqlBaseParser.PRECEDING, 0); + identifier() { + return this.getTypedRuleContext(IdentifierContext,0); }; - FOLLOWING() { - return this.getToken(SqlBaseParser.FOLLOWING, 0); + expression() { + return this.getTypedRuleContext(ExpressionContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterUnboundedFrame(this); + listener.enterNamedArgument(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitUnboundedFrame(this); + listener.exitNamedArgument(this); } } } -SqlBaseParser.UnboundedFrameContext = UnboundedFrameContext; +SqlBaseParser.NamedArgumentContext = NamedArgumentContext; -class CurrentRowBoundContext extends FrameBoundContext { +class PrivilegeContext extends antlr4.ParserRuleContext { - constructor(parser, ctx) { - super(parser); - super.copyFrom(ctx); + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = SqlBaseParser.RULE_privilege; } - CURRENT() { - return this.getToken(SqlBaseParser.CURRENT, 0); + SELECT() { + return this.getToken(SqlBaseParser.SELECT, 0); }; - ROW() { - return this.getToken(SqlBaseParser.ROW, 0); + DELETE() { + return this.getToken(SqlBaseParser.DELETE, 0); + }; + + INSERT() { + return this.getToken(SqlBaseParser.INSERT, 0); + }; + + identifier() { + return this.getTypedRuleContext(IdentifierContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterCurrentRowBound(this); + listener.enterPrivilege(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitCurrentRowBound(this); + listener.exitPrivilege(this); } } } -SqlBaseParser.CurrentRowBoundContext = CurrentRowBoundContext; -class UpdateAssignmentContext extends antlr4.ParserRuleContext { + +class QualifiedNameContext extends antlr4.ParserRuleContext { constructor(parser, parent, invokingState) { if(parent===undefined) { @@ -17792,30 +20901,29 @@ class UpdateAssignmentContext extends antlr4.ParserRuleContext { } super(parent, invokingState); this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_updateAssignment; + this.ruleIndex = SqlBaseParser.RULE_qualifiedName; } - identifier() { - return this.getTypedRuleContext(IdentifierContext,0); - }; - - EQ() { - return this.getToken(SqlBaseParser.EQ, 0); - }; - - expression() { - return this.getTypedRuleContext(ExpressionContext,0); + identifier = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(IdentifierContext); + } else { + return this.getTypedRuleContext(IdentifierContext,i); + } }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterUpdateAssignment(this); + listener.enterQualifiedName(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitUpdateAssignment(this); + listener.exitQualifiedName(this); } } @@ -17824,7 +20932,7 @@ class UpdateAssignmentContext extends antlr4.ParserRuleContext { -class ExplainOptionContext extends antlr4.ParserRuleContext { +class TableVersionExpressionContext extends antlr4.ParserRuleContext { constructor(parser, parent, invokingState) { if(parent===undefined) { @@ -17835,7 +20943,7 @@ class ExplainOptionContext extends antlr4.ParserRuleContext { } super(parent, invokingState); this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_explainOption; + this.ruleIndex = SqlBaseParser.RULE_tableVersionExpression; } @@ -17847,93 +20955,60 @@ class ExplainOptionContext extends antlr4.ParserRuleContext { } -class ExplainFormatContext extends ExplainOptionContext { +class TableVersionContext extends TableVersionExpressionContext { constructor(parser, ctx) { super(parser); - this.value = null;; + this.tableVersionType = null;; super.copyFrom(ctx); } - FORMAT() { - return this.getToken(SqlBaseParser.FORMAT, 0); - }; - - TEXT() { - return this.getToken(SqlBaseParser.TEXT, 0); - }; - - GRAPHVIZ() { - return this.getToken(SqlBaseParser.GRAPHVIZ, 0); + FOR() { + return this.getToken(SqlBaseParser.FOR, 0); }; - JSON() { - return this.getToken(SqlBaseParser.JSON, 0); + tableVersionState() { + return this.getTypedRuleContext(TableVersionStateContext,0); }; - enterRule(listener) { - if(listener instanceof SqlBaseListener ) { - listener.enterExplainFormat(this); - } - } - - exitRule(listener) { - if(listener instanceof SqlBaseListener ) { - listener.exitExplainFormat(this); - } - } - - -} - -SqlBaseParser.ExplainFormatContext = ExplainFormatContext; - -class ExplainTypeContext extends ExplainOptionContext { - - constructor(parser, ctx) { - super(parser); - this.value = null;; - super.copyFrom(ctx); - } - - TYPE() { - return this.getToken(SqlBaseParser.TYPE, 0); + valueExpression() { + return this.getTypedRuleContext(ValueExpressionContext,0); }; - LOGICAL() { - return this.getToken(SqlBaseParser.LOGICAL, 0); + SYSTEM_TIME() { + return this.getToken(SqlBaseParser.SYSTEM_TIME, 0); }; - DISTRIBUTED() { - return this.getToken(SqlBaseParser.DISTRIBUTED, 0); + SYSTEM_VERSION() { + return this.getToken(SqlBaseParser.SYSTEM_VERSION, 0); }; - VALIDATE() { - return this.getToken(SqlBaseParser.VALIDATE, 0); + TIMESTAMP() { + return this.getToken(SqlBaseParser.TIMESTAMP, 0); }; - IO() { - return this.getToken(SqlBaseParser.IO, 0); + VERSION() { + return this.getToken(SqlBaseParser.VERSION, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterExplainType(this); + listener.enterTableVersion(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitExplainType(this); + listener.exitTableVersion(this); } } } -SqlBaseParser.ExplainTypeContext = ExplainTypeContext; +SqlBaseParser.TableVersionContext = TableVersionContext; -class TransactionModeContext extends antlr4.ParserRuleContext { +class TableVersionStateContext extends antlr4.ParserRuleContext { constructor(parser, parent, invokingState) { if(parent===undefined) { @@ -17944,7 +21019,7 @@ class TransactionModeContext extends antlr4.ParserRuleContext { } super(parent, invokingState); this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_transactionMode; + this.ruleIndex = SqlBaseParser.RULE_tableVersionState; } @@ -17956,80 +21031,67 @@ class TransactionModeContext extends antlr4.ParserRuleContext { } -class TransactionAccessModeContext extends TransactionModeContext { +class TableversionbeforeContext extends TableVersionStateContext { constructor(parser, ctx) { super(parser); - this.accessMode = null;; super.copyFrom(ctx); } - READ() { - return this.getToken(SqlBaseParser.READ, 0); - }; - - ONLY() { - return this.getToken(SqlBaseParser.ONLY, 0); - }; - - WRITE() { - return this.getToken(SqlBaseParser.WRITE, 0); + BEFORE() { + return this.getToken(SqlBaseParser.BEFORE, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterTransactionAccessMode(this); + listener.enterTableversionbefore(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitTransactionAccessMode(this); + listener.exitTableversionbefore(this); } } } -SqlBaseParser.TransactionAccessModeContext = TransactionAccessModeContext; +SqlBaseParser.TableversionbeforeContext = TableversionbeforeContext; -class IsolationLevelContext extends TransactionModeContext { +class TableversionasofContext extends TableVersionStateContext { constructor(parser, ctx) { super(parser); super.copyFrom(ctx); } - ISOLATION() { - return this.getToken(SqlBaseParser.ISOLATION, 0); - }; - - LEVEL() { - return this.getToken(SqlBaseParser.LEVEL, 0); + AS() { + return this.getToken(SqlBaseParser.AS, 0); }; - levelOfIsolation() { - return this.getTypedRuleContext(LevelOfIsolationContext,0); + OF() { + return this.getToken(SqlBaseParser.OF, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterIsolationLevel(this); + listener.enterTableversionasof(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitIsolationLevel(this); + listener.exitTableversionasof(this); } } } -SqlBaseParser.IsolationLevelContext = IsolationLevelContext; +SqlBaseParser.TableversionasofContext = TableversionasofContext; -class LevelOfIsolationContext extends antlr4.ParserRuleContext { +class GrantorContext extends antlr4.ParserRuleContext { constructor(parser, parent, invokingState) { if(parent===undefined) { @@ -18040,7 +21102,7 @@ class LevelOfIsolationContext extends antlr4.ParserRuleContext { } super(parent, invokingState); this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_levelOfIsolation; + this.ruleIndex = SqlBaseParser.RULE_grantor; } @@ -18052,131 +21114,91 @@ class LevelOfIsolationContext extends antlr4.ParserRuleContext { } -class ReadUncommittedContext extends LevelOfIsolationContext { - - constructor(parser, ctx) { - super(parser); - super.copyFrom(ctx); - } - - READ() { - return this.getToken(SqlBaseParser.READ, 0); - }; - - UNCOMMITTED() { - return this.getToken(SqlBaseParser.UNCOMMITTED, 0); - }; - - enterRule(listener) { - if(listener instanceof SqlBaseListener ) { - listener.enterReadUncommitted(this); - } - } - - exitRule(listener) { - if(listener instanceof SqlBaseListener ) { - listener.exitReadUncommitted(this); - } - } - - -} - -SqlBaseParser.ReadUncommittedContext = ReadUncommittedContext; - -class SerializableContext extends LevelOfIsolationContext { +class CurrentUserGrantorContext extends GrantorContext { constructor(parser, ctx) { super(parser); super.copyFrom(ctx); } - SERIALIZABLE() { - return this.getToken(SqlBaseParser.SERIALIZABLE, 0); + CURRENT_USER() { + return this.getToken(SqlBaseParser.CURRENT_USER, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterSerializable(this); + listener.enterCurrentUserGrantor(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitSerializable(this); + listener.exitCurrentUserGrantor(this); } } } -SqlBaseParser.SerializableContext = SerializableContext; +SqlBaseParser.CurrentUserGrantorContext = CurrentUserGrantorContext; -class ReadCommittedContext extends LevelOfIsolationContext { +class SpecifiedPrincipalContext extends GrantorContext { constructor(parser, ctx) { super(parser); super.copyFrom(ctx); } - READ() { - return this.getToken(SqlBaseParser.READ, 0); - }; - - COMMITTED() { - return this.getToken(SqlBaseParser.COMMITTED, 0); + principal() { + return this.getTypedRuleContext(PrincipalContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterReadCommitted(this); + listener.enterSpecifiedPrincipal(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitReadCommitted(this); + listener.exitSpecifiedPrincipal(this); } } } -SqlBaseParser.ReadCommittedContext = ReadCommittedContext; +SqlBaseParser.SpecifiedPrincipalContext = SpecifiedPrincipalContext; -class RepeatableReadContext extends LevelOfIsolationContext { +class CurrentRoleGrantorContext extends GrantorContext { constructor(parser, ctx) { super(parser); super.copyFrom(ctx); } - REPEATABLE() { - return this.getToken(SqlBaseParser.REPEATABLE, 0); - }; - - READ() { - return this.getToken(SqlBaseParser.READ, 0); + CURRENT_ROLE() { + return this.getToken(SqlBaseParser.CURRENT_ROLE, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterRepeatableRead(this); + listener.enterCurrentRoleGrantor(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitRepeatableRead(this); + listener.exitCurrentRoleGrantor(this); } } } -SqlBaseParser.RepeatableReadContext = RepeatableReadContext; +SqlBaseParser.CurrentRoleGrantorContext = CurrentRoleGrantorContext; -class CallArgumentContext extends antlr4.ParserRuleContext { +class PrincipalContext extends antlr4.ParserRuleContext { constructor(parser, parent, invokingState) { if(parent===undefined) { @@ -18187,7 +21209,7 @@ class CallArgumentContext extends antlr4.ParserRuleContext { } super(parent, invokingState); this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_callArgument; + this.ruleIndex = SqlBaseParser.RULE_principal; } @@ -18199,90 +21221,75 @@ class CallArgumentContext extends antlr4.ParserRuleContext { } -class PositionalArgumentContext extends CallArgumentContext { +class UnspecifiedPrincipalContext extends PrincipalContext { constructor(parser, ctx) { super(parser); super.copyFrom(ctx); } - expression() { - return this.getTypedRuleContext(ExpressionContext,0); + identifier() { + return this.getTypedRuleContext(IdentifierContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterPositionalArgument(this); + listener.enterUnspecifiedPrincipal(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitPositionalArgument(this); + listener.exitUnspecifiedPrincipal(this); } } } -SqlBaseParser.PositionalArgumentContext = PositionalArgumentContext; +SqlBaseParser.UnspecifiedPrincipalContext = UnspecifiedPrincipalContext; -class NamedArgumentContext extends CallArgumentContext { +class UserPrincipalContext extends PrincipalContext { constructor(parser, ctx) { super(parser); super.copyFrom(ctx); } - identifier() { - return this.getTypedRuleContext(IdentifierContext,0); + USER() { + return this.getToken(SqlBaseParser.USER, 0); }; - expression() { - return this.getTypedRuleContext(ExpressionContext,0); + identifier() { + return this.getTypedRuleContext(IdentifierContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterNamedArgument(this); + listener.enterUserPrincipal(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitNamedArgument(this); + listener.exitUserPrincipal(this); } } } -SqlBaseParser.NamedArgumentContext = NamedArgumentContext; +SqlBaseParser.UserPrincipalContext = UserPrincipalContext; -class PrivilegeContext extends antlr4.ParserRuleContext { +class RolePrincipalContext extends PrincipalContext { - constructor(parser, parent, invokingState) { - if(parent===undefined) { - parent = null; - } - if(invokingState===undefined || invokingState===null) { - invokingState = -1; - } - super(parent, invokingState); - this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_privilege; + constructor(parser, ctx) { + super(parser); + super.copyFrom(ctx); } - SELECT() { - return this.getToken(SqlBaseParser.SELECT, 0); - }; - - DELETE() { - return this.getToken(SqlBaseParser.DELETE, 0); - }; - - INSERT() { - return this.getToken(SqlBaseParser.INSERT, 0); + ROLE() { + return this.getToken(SqlBaseParser.ROLE, 0); }; identifier() { @@ -18291,22 +21298,22 @@ class PrivilegeContext extends antlr4.ParserRuleContext { enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterPrivilege(this); + listener.enterRolePrincipal(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitPrivilege(this); + listener.exitRolePrincipal(this); } } } +SqlBaseParser.RolePrincipalContext = RolePrincipalContext; - -class QualifiedNameContext extends antlr4.ParserRuleContext { +class RolesContext extends antlr4.ParserRuleContext { constructor(parser, parent, invokingState) { if(parent===undefined) { @@ -18317,7 +21324,7 @@ class QualifiedNameContext extends antlr4.ParserRuleContext { } super(parent, invokingState); this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_qualifiedName; + this.ruleIndex = SqlBaseParser.RULE_roles; } identifier = function(i) { @@ -18333,13 +21340,13 @@ class QualifiedNameContext extends antlr4.ParserRuleContext { enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterQualifiedName(this); + listener.enterRoles(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitQualifiedName(this); + listener.exitRoles(this); } } @@ -18348,7 +21355,7 @@ class QualifiedNameContext extends antlr4.ParserRuleContext { -class TableVersionExpressionContext extends antlr4.ParserRuleContext { +class IdentifierContext extends antlr4.ParserRuleContext { constructor(parser, parent, invokingState) { if(parent===undefined) { @@ -18359,7 +21366,7 @@ class TableVersionExpressionContext extends antlr4.ParserRuleContext { } super(parent, invokingState); this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_tableVersionExpression; + this.ruleIndex = SqlBaseParser.RULE_identifier; } @@ -18371,171 +21378,123 @@ class TableVersionExpressionContext extends antlr4.ParserRuleContext { } -class TableVersionContext extends TableVersionExpressionContext { +class BackQuotedIdentifierContext extends IdentifierContext { constructor(parser, ctx) { super(parser); - this.tableVersionType = null;; super.copyFrom(ctx); } - FOR() { - return this.getToken(SqlBaseParser.FOR, 0); - }; - - AS() { - return this.getToken(SqlBaseParser.AS, 0); - }; - - OF() { - return this.getToken(SqlBaseParser.OF, 0); - }; - - valueExpression() { - return this.getTypedRuleContext(ValueExpressionContext,0); - }; - - SYSTEM_TIME() { - return this.getToken(SqlBaseParser.SYSTEM_TIME, 0); - }; - - SYSTEM_VERSION() { - return this.getToken(SqlBaseParser.SYSTEM_VERSION, 0); - }; - - TIMESTAMP() { - return this.getToken(SqlBaseParser.TIMESTAMP, 0); - }; - - VERSION() { - return this.getToken(SqlBaseParser.VERSION, 0); + BACKQUOTED_IDENTIFIER() { + return this.getToken(SqlBaseParser.BACKQUOTED_IDENTIFIER, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterTableVersion(this); + listener.enterBackQuotedIdentifier(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitTableVersion(this); + listener.exitBackQuotedIdentifier(this); } } } -SqlBaseParser.TableVersionContext = TableVersionContext; - -class GrantorContext extends antlr4.ParserRuleContext { - - constructor(parser, parent, invokingState) { - if(parent===undefined) { - parent = null; - } - if(invokingState===undefined || invokingState===null) { - invokingState = -1; - } - super(parent, invokingState); - this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_grantor; - } - - - - copyFrom(ctx) { - super.copyFrom(ctx); - } - -} - +SqlBaseParser.BackQuotedIdentifierContext = BackQuotedIdentifierContext; -class CurrentUserGrantorContext extends GrantorContext { +class QuotedIdentifierContext extends IdentifierContext { constructor(parser, ctx) { super(parser); super.copyFrom(ctx); } - CURRENT_USER() { - return this.getToken(SqlBaseParser.CURRENT_USER, 0); + QUOTED_IDENTIFIER() { + return this.getToken(SqlBaseParser.QUOTED_IDENTIFIER, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterCurrentUserGrantor(this); + listener.enterQuotedIdentifier(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitCurrentUserGrantor(this); + listener.exitQuotedIdentifier(this); } } } -SqlBaseParser.CurrentUserGrantorContext = CurrentUserGrantorContext; +SqlBaseParser.QuotedIdentifierContext = QuotedIdentifierContext; -class SpecifiedPrincipalContext extends GrantorContext { +class DigitIdentifierContext extends IdentifierContext { constructor(parser, ctx) { super(parser); super.copyFrom(ctx); } - principal() { - return this.getTypedRuleContext(PrincipalContext,0); + DIGIT_IDENTIFIER() { + return this.getToken(SqlBaseParser.DIGIT_IDENTIFIER, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterSpecifiedPrincipal(this); + listener.enterDigitIdentifier(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitSpecifiedPrincipal(this); + listener.exitDigitIdentifier(this); } } } -SqlBaseParser.SpecifiedPrincipalContext = SpecifiedPrincipalContext; +SqlBaseParser.DigitIdentifierContext = DigitIdentifierContext; -class CurrentRoleGrantorContext extends GrantorContext { +class UnquotedIdentifierContext extends IdentifierContext { constructor(parser, ctx) { super(parser); super.copyFrom(ctx); } - CURRENT_ROLE() { - return this.getToken(SqlBaseParser.CURRENT_ROLE, 0); + IDENTIFIER() { + return this.getToken(SqlBaseParser.IDENTIFIER, 0); + }; + + nonReserved() { + return this.getTypedRuleContext(NonReservedContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterCurrentRoleGrantor(this); + listener.enterUnquotedIdentifier(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitCurrentRoleGrantor(this); + listener.exitUnquotedIdentifier(this); } } } -SqlBaseParser.CurrentRoleGrantorContext = CurrentRoleGrantorContext; +SqlBaseParser.UnquotedIdentifierContext = UnquotedIdentifierContext; -class PrincipalContext extends antlr4.ParserRuleContext { +class NumberContext extends antlr4.ParserRuleContext { constructor(parser, parent, invokingState) { if(parent===undefined) { @@ -18546,7 +21505,7 @@ class PrincipalContext extends antlr4.ParserRuleContext { } super(parent, invokingState); this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_principal; + this.ruleIndex = SqlBaseParser.RULE_number; } @@ -18558,99 +21517,130 @@ class PrincipalContext extends antlr4.ParserRuleContext { } -class UnspecifiedPrincipalContext extends PrincipalContext { +class DecimalLiteralContext extends NumberContext { constructor(parser, ctx) { super(parser); super.copyFrom(ctx); } - identifier() { - return this.getTypedRuleContext(IdentifierContext,0); + DECIMAL_VALUE() { + return this.getToken(SqlBaseParser.DECIMAL_VALUE, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterUnspecifiedPrincipal(this); + listener.enterDecimalLiteral(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitUnspecifiedPrincipal(this); + listener.exitDecimalLiteral(this); + } + } + + +} + +SqlBaseParser.DecimalLiteralContext = DecimalLiteralContext; + +class DoubleLiteralContext extends NumberContext { + + constructor(parser, ctx) { + super(parser); + super.copyFrom(ctx); + } + + DOUBLE_VALUE() { + return this.getToken(SqlBaseParser.DOUBLE_VALUE, 0); + }; + + enterRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.enterDoubleLiteral(this); + } + } + + exitRule(listener) { + if(listener instanceof SqlBaseListener ) { + listener.exitDoubleLiteral(this); } } } -SqlBaseParser.UnspecifiedPrincipalContext = UnspecifiedPrincipalContext; +SqlBaseParser.DoubleLiteralContext = DoubleLiteralContext; -class UserPrincipalContext extends PrincipalContext { +class IntegerLiteralContext extends NumberContext { constructor(parser, ctx) { super(parser); super.copyFrom(ctx); } - USER() { - return this.getToken(SqlBaseParser.USER, 0); - }; - - identifier() { - return this.getTypedRuleContext(IdentifierContext,0); + INTEGER_VALUE() { + return this.getToken(SqlBaseParser.INTEGER_VALUE, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterUserPrincipal(this); + listener.enterIntegerLiteral(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitUserPrincipal(this); + listener.exitIntegerLiteral(this); } } } -SqlBaseParser.UserPrincipalContext = UserPrincipalContext; +SqlBaseParser.IntegerLiteralContext = IntegerLiteralContext; -class RolePrincipalContext extends PrincipalContext { +class ConstraintSpecificationContext extends antlr4.ParserRuleContext { - constructor(parser, ctx) { - super(parser); - super.copyFrom(ctx); + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = SqlBaseParser.RULE_constraintSpecification; } - ROLE() { - return this.getToken(SqlBaseParser.ROLE, 0); + namedConstraintSpecification() { + return this.getTypedRuleContext(NamedConstraintSpecificationContext,0); }; - identifier() { - return this.getTypedRuleContext(IdentifierContext,0); + unnamedConstraintSpecification() { + return this.getTypedRuleContext(UnnamedConstraintSpecificationContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterRolePrincipal(this); + listener.enterConstraintSpecification(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitRolePrincipal(this); + listener.exitConstraintSpecification(this); } } } -SqlBaseParser.RolePrincipalContext = RolePrincipalContext; -class RolesContext extends antlr4.ParserRuleContext { + +class NamedConstraintSpecificationContext extends antlr4.ParserRuleContext { constructor(parser, parent, invokingState) { if(parent===undefined) { @@ -18661,29 +21651,31 @@ class RolesContext extends antlr4.ParserRuleContext { } super(parent, invokingState); this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_roles; + this.ruleIndex = SqlBaseParser.RULE_namedConstraintSpecification; + this.name = null; } - identifier = function(i) { - if(i===undefined) { - i = null; - } - if(i===null) { - return this.getTypedRuleContexts(IdentifierContext); - } else { - return this.getTypedRuleContext(IdentifierContext,i); - } + CONSTRAINT() { + return this.getToken(SqlBaseParser.CONSTRAINT, 0); + }; + + unnamedConstraintSpecification() { + return this.getTypedRuleContext(UnnamedConstraintSpecificationContext,0); + }; + + identifier() { + return this.getTypedRuleContext(IdentifierContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterRoles(this); + listener.enterNamedConstraintSpecification(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitRoles(this); + listener.exitNamedConstraintSpecification(this); } } @@ -18692,7 +21684,7 @@ class RolesContext extends antlr4.ParserRuleContext { -class IdentifierContext extends antlr4.ParserRuleContext { +class UnnamedConstraintSpecificationContext extends antlr4.ParserRuleContext { constructor(parser, parent, invokingState) { if(parent===undefined) { @@ -18703,135 +21695,167 @@ class IdentifierContext extends antlr4.ParserRuleContext { } super(parent, invokingState); this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_identifier; + this.ruleIndex = SqlBaseParser.RULE_unnamedConstraintSpecification; } + constraintType() { + return this.getTypedRuleContext(ConstraintTypeContext,0); + }; - - copyFrom(ctx) { - super.copyFrom(ctx); - } - -} - - -class BackQuotedIdentifierContext extends IdentifierContext { - - constructor(parser, ctx) { - super(parser); - super.copyFrom(ctx); - } + columnAliases() { + return this.getTypedRuleContext(ColumnAliasesContext,0); + }; - BACKQUOTED_IDENTIFIER() { - return this.getToken(SqlBaseParser.BACKQUOTED_IDENTIFIER, 0); + constraintQualifiers() { + return this.getTypedRuleContext(ConstraintQualifiersContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterBackQuotedIdentifier(this); + listener.enterUnnamedConstraintSpecification(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitBackQuotedIdentifier(this); + listener.exitUnnamedConstraintSpecification(this); } } } -SqlBaseParser.BackQuotedIdentifierContext = BackQuotedIdentifierContext; -class QuotedIdentifierContext extends IdentifierContext { - constructor(parser, ctx) { - super(parser); - super.copyFrom(ctx); +class ConstraintTypeContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = SqlBaseParser.RULE_constraintType; } - QUOTED_IDENTIFIER() { - return this.getToken(SqlBaseParser.QUOTED_IDENTIFIER, 0); + UNIQUE() { + return this.getToken(SqlBaseParser.UNIQUE, 0); + }; + + PRIMARY() { + return this.getToken(SqlBaseParser.PRIMARY, 0); + }; + + KEY() { + return this.getToken(SqlBaseParser.KEY, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterQuotedIdentifier(this); + listener.enterConstraintType(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitQuotedIdentifier(this); + listener.exitConstraintType(this); } } } -SqlBaseParser.QuotedIdentifierContext = QuotedIdentifierContext; -class DigitIdentifierContext extends IdentifierContext { - constructor(parser, ctx) { - super(parser); - super.copyFrom(ctx); +class ConstraintQualifiersContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = SqlBaseParser.RULE_constraintQualifiers; } - DIGIT_IDENTIFIER() { - return this.getToken(SqlBaseParser.DIGIT_IDENTIFIER, 0); + constraintQualifier = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(ConstraintQualifierContext); + } else { + return this.getTypedRuleContext(ConstraintQualifierContext,i); + } }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterDigitIdentifier(this); + listener.enterConstraintQualifiers(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitDigitIdentifier(this); + listener.exitConstraintQualifiers(this); } } } -SqlBaseParser.DigitIdentifierContext = DigitIdentifierContext; -class UnquotedIdentifierContext extends IdentifierContext { - constructor(parser, ctx) { - super(parser); - super.copyFrom(ctx); +class ConstraintQualifierContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = SqlBaseParser.RULE_constraintQualifier; } - IDENTIFIER() { - return this.getToken(SqlBaseParser.IDENTIFIER, 0); + constraintEnabled() { + return this.getTypedRuleContext(ConstraintEnabledContext,0); }; - nonReserved() { - return this.getTypedRuleContext(NonReservedContext,0); + constraintRely() { + return this.getTypedRuleContext(ConstraintRelyContext,0); + }; + + constraintEnforced() { + return this.getTypedRuleContext(ConstraintEnforcedContext,0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterUnquotedIdentifier(this); + listener.enterConstraintQualifier(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitUnquotedIdentifier(this); + listener.exitConstraintQualifier(this); } } } -SqlBaseParser.UnquotedIdentifierContext = UnquotedIdentifierContext; -class NumberContext extends antlr4.ParserRuleContext { + +class ConstraintRelyContext extends antlr4.ParserRuleContext { constructor(parser, parent, invokingState) { if(parent===undefined) { @@ -18842,101 +21866,111 @@ class NumberContext extends antlr4.ParserRuleContext { } super(parent, invokingState); this.parser = parser; - this.ruleIndex = SqlBaseParser.RULE_number; + this.ruleIndex = SqlBaseParser.RULE_constraintRely; } + RELY() { + return this.getToken(SqlBaseParser.RELY, 0); + }; - - copyFrom(ctx) { - super.copyFrom(ctx); - } - -} - - -class DecimalLiteralContext extends NumberContext { - - constructor(parser, ctx) { - super(parser); - super.copyFrom(ctx); - } - - DECIMAL_VALUE() { - return this.getToken(SqlBaseParser.DECIMAL_VALUE, 0); + NOT() { + return this.getToken(SqlBaseParser.NOT, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterDecimalLiteral(this); + listener.enterConstraintRely(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitDecimalLiteral(this); + listener.exitConstraintRely(this); } } } -SqlBaseParser.DecimalLiteralContext = DecimalLiteralContext; -class DoubleLiteralContext extends NumberContext { - constructor(parser, ctx) { - super(parser); - super.copyFrom(ctx); +class ConstraintEnabledContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = SqlBaseParser.RULE_constraintEnabled; } - DOUBLE_VALUE() { - return this.getToken(SqlBaseParser.DOUBLE_VALUE, 0); + ENABLED() { + return this.getToken(SqlBaseParser.ENABLED, 0); + }; + + DISABLED() { + return this.getToken(SqlBaseParser.DISABLED, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterDoubleLiteral(this); + listener.enterConstraintEnabled(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitDoubleLiteral(this); + listener.exitConstraintEnabled(this); } } } -SqlBaseParser.DoubleLiteralContext = DoubleLiteralContext; -class IntegerLiteralContext extends NumberContext { - constructor(parser, ctx) { - super(parser); - super.copyFrom(ctx); +class ConstraintEnforcedContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = SqlBaseParser.RULE_constraintEnforced; } - INTEGER_VALUE() { - return this.getToken(SqlBaseParser.INTEGER_VALUE, 0); + ENFORCED() { + return this.getToken(SqlBaseParser.ENFORCED, 0); + }; + + NOT() { + return this.getToken(SqlBaseParser.NOT, 0); }; enterRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.enterIntegerLiteral(this); + listener.enterConstraintEnforced(this); } } exitRule(listener) { if(listener instanceof SqlBaseListener ) { - listener.exitIntegerLiteral(this); + listener.exitConstraintEnforced(this); } } } -SqlBaseParser.IntegerLiteralContext = IntegerLiteralContext; + class NonReservedContext extends antlr4.ParserRuleContext { @@ -18984,6 +22018,10 @@ class NonReservedContext extends antlr4.ParserRuleContext { return this.getToken(SqlBaseParser.AT, 0); }; + BEFORE() { + return this.getToken(SqlBaseParser.BEFORE, 0); + }; + BERNOULLI() { return this.getToken(SqlBaseParser.BERNOULLI, 0); }; @@ -19024,6 +22062,10 @@ class NonReservedContext extends antlr4.ParserRuleContext { return this.getToken(SqlBaseParser.COMMITTED, 0); }; + COPARTITION() { + return this.getToken(SqlBaseParser.COPARTITION, 0); + }; + CURRENT() { return this.getToken(SqlBaseParser.CURRENT, 0); }; @@ -19052,14 +22094,34 @@ class NonReservedContext extends antlr4.ParserRuleContext { return this.getToken(SqlBaseParser.DESC, 0); }; + DESCRIPTOR() { + return this.getToken(SqlBaseParser.DESCRIPTOR, 0); + }; + DETERMINISTIC() { return this.getToken(SqlBaseParser.DETERMINISTIC, 0); }; + DISABLED() { + return this.getToken(SqlBaseParser.DISABLED, 0); + }; + DISTRIBUTED() { return this.getToken(SqlBaseParser.DISTRIBUTED, 0); }; + EMPTY() { + return this.getToken(SqlBaseParser.EMPTY, 0); + }; + + ENABLED() { + return this.getToken(SqlBaseParser.ENABLED, 0); + }; + + ENFORCED() { + return this.getToken(SqlBaseParser.ENFORCED, 0); + }; + EXCLUDING() { return this.getToken(SqlBaseParser.EXCLUDING, 0); }; @@ -19160,6 +22222,14 @@ class NonReservedContext extends antlr4.ParserRuleContext { return this.getToken(SqlBaseParser.JSON, 0); }; + KEEP() { + return this.getToken(SqlBaseParser.KEEP, 0); + }; + + KEY() { + return this.getToken(SqlBaseParser.KEY, 0); + }; + LANGUAGE() { return this.getToken(SqlBaseParser.LANGUAGE, 0); }; @@ -19188,10 +22258,18 @@ class NonReservedContext extends antlr4.ParserRuleContext { return this.getToken(SqlBaseParser.MAP, 0); }; + MATCHED() { + return this.getToken(SqlBaseParser.MATCHED, 0); + }; + MATERIALIZED() { return this.getToken(SqlBaseParser.MATERIALIZED, 0); }; + MERGE() { + return this.getToken(SqlBaseParser.MERGE, 0); + }; + MINUTE() { return this.getToken(SqlBaseParser.MINUTE, 0); }; @@ -19280,6 +22358,10 @@ class NonReservedContext extends antlr4.ParserRuleContext { return this.getToken(SqlBaseParser.PRECEDING, 0); }; + PRIMARY() { + return this.getToken(SqlBaseParser.PRIMARY, 0); + }; + PRIVILEGES() { return this.getToken(SqlBaseParser.PRIVILEGES, 0); }; @@ -19288,6 +22370,10 @@ class NonReservedContext extends antlr4.ParserRuleContext { return this.getToken(SqlBaseParser.PROPERTIES, 0); }; + PRUNE() { + return this.getToken(SqlBaseParser.PRUNE, 0); + }; + RANGE() { return this.getToken(SqlBaseParser.RANGE, 0); }; @@ -19300,6 +22386,10 @@ class NonReservedContext extends antlr4.ParserRuleContext { return this.getToken(SqlBaseParser.REFRESH, 0); }; + RELY() { + return this.getToken(SqlBaseParser.RELY, 0); + }; + RENAME() { return this.getToken(SqlBaseParser.RENAME, 0); }; @@ -19476,6 +22566,10 @@ class NonReservedContext extends antlr4.ParserRuleContext { return this.getToken(SqlBaseParser.UNCOMMITTED, 0); }; + UNIQUE() { + return this.getToken(SqlBaseParser.UNIQUE, 0); + }; + UPDATE() { return this.getToken(SqlBaseParser.UPDATE, 0); }; @@ -19596,10 +22690,18 @@ SqlBaseParser.IntervalFieldContext = IntervalFieldContext; SqlBaseParser.NormalFormContext = NormalFormContext; SqlBaseParser.TypesContext = TypesContext; SqlBaseParser.TypeContext = TypeContext; +SqlBaseParser.TableFunctionCallContext = TableFunctionCallContext; +SqlBaseParser.TableFunctionArgumentContext = TableFunctionArgumentContext; +SqlBaseParser.TableArgumentContext = TableArgumentContext; +SqlBaseParser.TableArgumentRelationContext = TableArgumentRelationContext; +SqlBaseParser.DescriptorArgumentContext = DescriptorArgumentContext; +SqlBaseParser.DescriptorFieldContext = DescriptorFieldContext; +SqlBaseParser.CopartitionTablesContext = CopartitionTablesContext; SqlBaseParser.TypeParameterContext = TypeParameterContext; SqlBaseParser.BaseTypeContext = BaseTypeContext; SqlBaseParser.WhenClauseContext = WhenClauseContext; SqlBaseParser.FilterContext = FilterContext; +SqlBaseParser.MergeCaseContext = MergeCaseContext; SqlBaseParser.OverContext = OverContext; SqlBaseParser.WindowFrameContext = WindowFrameContext; SqlBaseParser.FrameBoundContext = FrameBoundContext; @@ -19611,9 +22713,19 @@ SqlBaseParser.CallArgumentContext = CallArgumentContext; SqlBaseParser.PrivilegeContext = PrivilegeContext; SqlBaseParser.QualifiedNameContext = QualifiedNameContext; SqlBaseParser.TableVersionExpressionContext = TableVersionExpressionContext; +SqlBaseParser.TableVersionStateContext = TableVersionStateContext; SqlBaseParser.GrantorContext = GrantorContext; SqlBaseParser.PrincipalContext = PrincipalContext; SqlBaseParser.RolesContext = RolesContext; SqlBaseParser.IdentifierContext = IdentifierContext; SqlBaseParser.NumberContext = NumberContext; +SqlBaseParser.ConstraintSpecificationContext = ConstraintSpecificationContext; +SqlBaseParser.NamedConstraintSpecificationContext = NamedConstraintSpecificationContext; +SqlBaseParser.UnnamedConstraintSpecificationContext = UnnamedConstraintSpecificationContext; +SqlBaseParser.ConstraintTypeContext = ConstraintTypeContext; +SqlBaseParser.ConstraintQualifiersContext = ConstraintQualifiersContext; +SqlBaseParser.ConstraintQualifierContext = ConstraintQualifierContext; +SqlBaseParser.ConstraintRelyContext = ConstraintRelyContext; +SqlBaseParser.ConstraintEnabledContext = ConstraintEnabledContext; +SqlBaseParser.ConstraintEnforcedContext = ConstraintEnforcedContext; SqlBaseParser.NonReservedContext = NonReservedContext;