diff --git a/contrib/zookeeper b/contrib/zookeeper index 5aa9e889fe9..438afae5af3 160000 --- a/contrib/zookeeper +++ b/contrib/zookeeper @@ -1 +1 @@ -Subproject commit 5aa9e889fe9e739af3c2a00222d9a3a0a57179dd +Subproject commit 438afae5af36c5be9c82d074f43a9bb19e0797c0 diff --git a/dbms/cmake/version.cmake b/dbms/cmake/version.cmake index 11c8ec6c9d7..eb14b0de818 100644 --- a/dbms/cmake/version.cmake +++ b/dbms/cmake/version.cmake @@ -1,6 +1,6 @@ # This strings autochanged from release_lib.sh: -set(VERSION_DESCRIBE v1.1.54352-testing) -set(VERSION_REVISION 54352) +set(VERSION_DESCRIBE v1.1.54355-testing) +set(VERSION_REVISION 54355) # end of autochange set (VERSION_MAJOR 1) diff --git a/dbms/src/AggregateFunctions/AggregateFunctionSequenceMatch.h b/dbms/src/AggregateFunctions/AggregateFunctionSequenceMatch.h index 297e74ae975..d8c1a323e05 100644 --- a/dbms/src/AggregateFunctions/AggregateFunctionSequenceMatch.h +++ b/dbms/src/AggregateFunctions/AggregateFunctionSequenceMatch.h @@ -164,8 +164,7 @@ public: { const auto cond_arg = arguments[i].get(); if (!typeid_cast(cond_arg)) - throw Exception{ - "Illegal type " + cond_arg->getName() + " of argument " + toString(i + 1) + + throw Exception{"Illegal type " + cond_arg->getName() + " of argument " + toString(i + 1) + " of aggregate function " + derived().getName() + ", must be UInt8", ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT}; } diff --git a/dbms/src/Common/ConfigProcessor/ConfigProcessor.cpp b/dbms/src/Common/ConfigProcessor/ConfigProcessor.cpp index aa51203dd9a..0b4572c4997 100644 --- a/dbms/src/Common/ConfigProcessor/ConfigProcessor.cpp +++ b/dbms/src/Common/ConfigProcessor/ConfigProcessor.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include @@ -356,7 +357,7 @@ void ConfigProcessor::doIncludesRecursive( ConfigProcessor::Files ConfigProcessor::getConfigMergeFiles(const std::string & config_path) { - Files res; + Files files; Poco::Path merge_dir_path(config_path); merge_dir_path.setExtension("d"); @@ -378,12 +379,14 @@ ConfigProcessor::Files ConfigProcessor::getConfigMergeFiles(const std::string & Poco::File & file = *it; if (file.isFile() && (endsWith(file.path(), ".xml") || endsWith(file.path(), ".conf"))) { - res.push_back(file.path()); + files.push_back(file.path()); } } } - return res; + std::sort(files.begin(), files.end()); + + return files; } XMLDocumentPtr ConfigProcessor::processConfig( diff --git a/dbms/src/Common/ConfigProcessor/ConfigProcessor.h b/dbms/src/Common/ConfigProcessor/ConfigProcessor.h index a5e58b21b24..a10f0ffe967 100644 --- a/dbms/src/Common/ConfigProcessor/ConfigProcessor.h +++ b/dbms/src/Common/ConfigProcessor/ConfigProcessor.h @@ -2,6 +2,7 @@ #include #include +#include #include #include @@ -87,7 +88,7 @@ public: void savePreprocessedConfig(const LoadedConfig & loaded_config); public: - using Files = std::list; + using Files = std::vector; static Files getConfigMergeFiles(const std::string & config_path); diff --git a/dbms/src/Common/ErrorCodes.cpp b/dbms/src/Common/ErrorCodes.cpp index 3f93313b730..632c754a8d1 100644 --- a/dbms/src/Common/ErrorCodes.cpp +++ b/dbms/src/Common/ErrorCodes.cpp @@ -367,6 +367,8 @@ namespace ErrorCodes extern const int CANNOT_ASSIGN_OPTIMIZE = 388; extern const int INSERT_WAS_DEDUPLICATED = 389; extern const int CANNOT_GET_CREATE_TABLE_QUERY = 390; + extern const int EXTERNAL_LIBRARY_ERROR = 391; + extern const int KEEPER_EXCEPTION = 999; extern const int POCO_EXCEPTION = 1000; diff --git a/dbms/src/Common/UInt128.h b/dbms/src/Common/UInt128.h index 7885b0db9b8..8bda6e2b204 100644 --- a/dbms/src/Common/UInt128.h +++ b/dbms/src/Common/UInt128.h @@ -40,9 +40,6 @@ struct UInt128 bool inline operator> (const UInt128 rhs) const { return tuple() > rhs.tuple(); } bool inline operator>= (const UInt128 rhs) const { return tuple() >= rhs.tuple(); } - /** Types who are stored at the moment in the database have no more than 64bits and can be handle - * inside an unique UInt64. - */ template bool inline operator== (const T rhs) const { return *this == UInt128(rhs); } template bool inline operator!= (const T rhs) const { return *this != UInt128(rhs); } template bool inline operator>= (const T rhs) const { return *this >= UInt128(rhs); } diff --git a/dbms/src/Core/Defines.h b/dbms/src/Core/Defines.h index d730fd1b14f..8b69d83d69e 100644 --- a/dbms/src/Core/Defines.h +++ b/dbms/src/Core/Defines.h @@ -59,7 +59,7 @@ #define DBMS_MIN_REVISION_WITH_SERVER_TIMEZONE 54058 #define DBMS_MIN_REVISION_WITH_QUOTA_KEY_IN_CLIENT_INFO 54060 #define DBMS_MIN_REVISION_WITH_TABLES_STATUS 54226 -#define DBMS_MIN_REVISION_WITH_TIME_ZONE_PARAMETER_IN_DATETIME_DATA_TYPE 54311 +#define DBMS_MIN_REVISION_WITH_TIME_ZONE_PARAMETER_IN_DATETIME_DATA_TYPE 54337 /// Version of ClickHouse TCP protocol. Set to git tag with latest protocol change. #define DBMS_TCP_PROTOCOL_VERSION 54226 diff --git a/dbms/src/Core/Field.h b/dbms/src/Core/Field.h index 9bb9cf6bb6e..f4c2f1ade86 100644 --- a/dbms/src/Core/Field.h +++ b/dbms/src/Core/Field.h @@ -29,6 +29,7 @@ STRONG_TYPEDEF(TupleBackend, Tuple); /// Array and Tuple are different types wit /** 32 is enough. Round number is used for alignment and for better arithmetic inside std::vector. + * NOTE: Actually, sizeof(std::string) is 32 when using libc++, so Field is 40 bytes. */ #define DBMS_MIN_FIELD_SIZE 32 diff --git a/dbms/src/Core/iostream_debug_helpers.cpp b/dbms/src/Core/iostream_debug_helpers.cpp index 4277126e7e2..57a3d215b69 100644 --- a/dbms/src/Core/iostream_debug_helpers.cpp +++ b/dbms/src/Core/iostream_debug_helpers.cpp @@ -18,7 +18,7 @@ namespace DB std::ostream & operator<<(std::ostream & stream, const IBlockInputStream & what) { - stream << "IBlockInputStream(id = " << what.getID() << ", name = " << what.getName() << ")"; + stream << "IBlockInputStream(name = " << what.getName() << ")"; //what.dumpTree(stream); // todo: set const return stream; } @@ -115,7 +115,6 @@ std::ostream & operator<<(std::ostream & stream, const Connection::Packet & what std::ostream & operator<<(std::ostream & stream, const SubqueryForSet & what) { stream << "SubqueryForSet(source = " << what.source - << ", source_sample = " << what.source_sample // TODO: << ", set = " << what.set << ", join = " << what.join << ", table = " << what.table << ")"; diff --git a/dbms/src/DataStreams/AddingConstColumnBlockInputStream.h b/dbms/src/DataStreams/AddingConstColumnBlockInputStream.h index e408e6b96d5..e22dd7f4310 100644 --- a/dbms/src/DataStreams/AddingConstColumnBlockInputStream.h +++ b/dbms/src/DataStreams/AddingConstColumnBlockInputStream.h @@ -24,11 +24,11 @@ public: String getName() const override { return "AddingConstColumn"; } - String getID() const override + Block getHeader() const override { - std::stringstream res; - res << "AddingConstColumn(" << children.back()->getID() << ")"; - return res.str(); + Block res = children.back()->getHeader(); + res.insert({data_type->createColumn(), data_type, column_name}); + return res; } protected: diff --git a/dbms/src/DataStreams/AggregatingBlockInputStream.cpp b/dbms/src/DataStreams/AggregatingBlockInputStream.cpp index b2cf9a7930a..8896c40e511 100644 --- a/dbms/src/DataStreams/AggregatingBlockInputStream.cpp +++ b/dbms/src/DataStreams/AggregatingBlockInputStream.cpp @@ -14,6 +14,11 @@ namespace ProfileEvents namespace DB { +Block AggregatingBlockInputStream::getHeader() const +{ + return aggregator.getHeader(final); +} + Block AggregatingBlockInputStream::readImpl() { @@ -42,7 +47,7 @@ Block AggregatingBlockInputStream::readImpl() if (!isCancelled()) { - /// Flush data in the RAM to disk also. It's easier. + /// Flush data in the RAM to disk also. It's easier than merging on-disk and RAM data. if (data_variants->size()) aggregator.writeToTemporaryFile(*data_variants); } @@ -63,9 +68,8 @@ Block AggregatingBlockInputStream::readImpl() } } - Block res; if (isCancelled() || !impl) - return res; + return {}; return impl->read(); } diff --git a/dbms/src/DataStreams/AggregatingBlockInputStream.h b/dbms/src/DataStreams/AggregatingBlockInputStream.h index ea93188afba..a28814dcab8 100644 --- a/dbms/src/DataStreams/AggregatingBlockInputStream.h +++ b/dbms/src/DataStreams/AggregatingBlockInputStream.h @@ -30,12 +30,7 @@ public: String getName() const override { return "Aggregating"; } - String getID() const override - { - std::stringstream res; - res << "Aggregating(" << children.back()->getID() << ", " << aggregator.getID() << ")"; - return res.str(); - } + Block getHeader() const override; protected: Block readImpl() override; diff --git a/dbms/src/DataStreams/AggregatingSortedBlockInputStream.h b/dbms/src/DataStreams/AggregatingSortedBlockInputStream.h index 60b6fba25f9..e428b3b7e20 100644 --- a/dbms/src/DataStreams/AggregatingSortedBlockInputStream.h +++ b/dbms/src/DataStreams/AggregatingSortedBlockInputStream.h @@ -28,26 +28,8 @@ public: String getName() const override { return "AggregatingSorted"; } - String getID() const override - { - std::stringstream res; - res << "AggregatingSorted(inputs"; - - for (size_t i = 0; i < children.size(); ++i) - res << ", " << children[i]->getID(); - - res << ", description"; - - for (size_t i = 0; i < description.size(); ++i) - res << ", " << description[i].getID(); - - res << ")"; - return res.str(); - } - bool isGroupedOutput() const override { return true; } bool isSortedOutput() const override { return true; } - const SortDescription & getSortDescription() const override { return description; } protected: /// Can return 1 more records than max_block_size. diff --git a/dbms/src/DataStreams/AsynchronousBlockInputStream.h b/dbms/src/DataStreams/AsynchronousBlockInputStream.h index e72b2f6489f..0a80628cf2a 100644 --- a/dbms/src/DataStreams/AsynchronousBlockInputStream.h +++ b/dbms/src/DataStreams/AsynchronousBlockInputStream.h @@ -35,13 +35,6 @@ public: String getName() const override { return "Asynchronous"; } - String getID() const override - { - std::stringstream res; - res << "Asynchronous(" << children.back()->getID() << ")"; - return res.str(); - } - void readPrefix() override { /// Do not call `readPrefix` on the child, so that the corresponding actions are performed in a separate thread. @@ -80,6 +73,9 @@ public: } + Block getHeader() const override { return children.at(0)->getHeader(); } + + ~AsynchronousBlockInputStream() override { if (started) diff --git a/dbms/src/DataStreams/BlockExtraInfoInputStream.h b/dbms/src/DataStreams/BlockExtraInfoInputStream.h index c1a6d77874b..6c6bd793f56 100644 --- a/dbms/src/DataStreams/BlockExtraInfoInputStream.h +++ b/dbms/src/DataStreams/BlockExtraInfoInputStream.h @@ -5,7 +5,7 @@ namespace DB { -/** Adds to one thread additional block information that is specified +/** Adds to one stream additional block information that is specified * as the constructor parameter. */ class BlockExtraInfoInputStream : public IProfilingBlockInputStream @@ -24,12 +24,7 @@ public: String getName() const override { return "BlockExtraInfoInput"; } - String getID() const override - { - std::stringstream res; - res << "BlockExtraInfoInput(" << children.back()->getID() << ")"; - return res.str(); - } + Block getHeader() const override { return children.back()->getHeader(); } protected: Block readImpl() override diff --git a/dbms/src/DataStreams/BlockIO.h b/dbms/src/DataStreams/BlockIO.h index 5ac609f8a6f..8cd19db9154 100644 --- a/dbms/src/DataStreams/BlockIO.h +++ b/dbms/src/DataStreams/BlockIO.h @@ -21,7 +21,6 @@ struct BlockIO BlockInputStreamPtr in; BlockOutputStreamPtr out; - Block in_sample; /// Example of a block to be read from `in`. Block out_sample; /// Example of a block to be written to `out`. /// Callbacks for query logging could be set here. @@ -51,7 +50,6 @@ struct BlockIO process_list_entry = rhs.process_list_entry; in = rhs.in; out = rhs.out; - in_sample = rhs.in_sample; out_sample = rhs.out_sample; finish_callback = rhs.finish_callback; diff --git a/dbms/src/DataStreams/BlockInputStreamFromRowInputStream.h b/dbms/src/DataStreams/BlockInputStreamFromRowInputStream.h index 0194bacba9e..0ab725be9a0 100644 --- a/dbms/src/DataStreams/BlockInputStreamFromRowInputStream.h +++ b/dbms/src/DataStreams/BlockInputStreamFromRowInputStream.h @@ -29,15 +29,10 @@ public: String getName() const override { return "BlockInputStreamFromRowInputStream"; } - String getID() const override - { - std::stringstream res; - res << this; - return res.str(); - } - RowInputStreamPtr & getRowInput() { return row_input; } + Block getHeader() const override { return sample; } + protected: Block readImpl() override; diff --git a/dbms/src/DataStreams/BlocksListBlockInputStream.h b/dbms/src/DataStreams/BlocksListBlockInputStream.h index b477e34d3ca..6c8852de4a3 100644 --- a/dbms/src/DataStreams/BlocksListBlockInputStream.h +++ b/dbms/src/DataStreams/BlocksListBlockInputStream.h @@ -22,13 +22,6 @@ public: String getName() const override { return "BlocksList"; } - String getID() const override - { - std::stringstream res; - res << this; - return res.str(); - } - protected: Block readImpl() override { diff --git a/dbms/src/DataStreams/CastTypeBlockInputStream.cpp b/dbms/src/DataStreams/CastTypeBlockInputStream.cpp index e792fc8afa4..9dbd0962c93 100644 --- a/dbms/src/DataStreams/CastTypeBlockInputStream.cpp +++ b/dbms/src/DataStreams/CastTypeBlockInputStream.cpp @@ -20,11 +20,6 @@ String CastTypeBlockInputStream::getName() const return "CastType"; } -String CastTypeBlockInputStream::getID() const -{ - return "CastType(" + children.back()->getID() + ")"; -} - Block CastTypeBlockInputStream::readImpl() { Block block = children.back()->read(); diff --git a/dbms/src/DataStreams/CastTypeBlockInputStream.h b/dbms/src/DataStreams/CastTypeBlockInputStream.h index 23815210d54..b92a7ffa31f 100644 --- a/dbms/src/DataStreams/CastTypeBlockInputStream.h +++ b/dbms/src/DataStreams/CastTypeBlockInputStream.h @@ -17,7 +17,7 @@ public: String getName() const override; - String getID() const override; + Block getHeader() const override { return ref_definition; } protected: Block readImpl() override; diff --git a/dbms/src/DataStreams/CollapsingFinalBlockInputStream.h b/dbms/src/DataStreams/CollapsingFinalBlockInputStream.h index 264b2083809..db06a2aa9d3 100644 --- a/dbms/src/DataStreams/CollapsingFinalBlockInputStream.h +++ b/dbms/src/DataStreams/CollapsingFinalBlockInputStream.h @@ -28,26 +28,11 @@ public: String getName() const override { return "CollapsingFinal"; } - String getID() const override - { - std::stringstream res; - res << "CollapsingFinal(inputs"; - - for (size_t i = 0; i < children.size(); ++i) - res << ", " << children[i]->getID(); - - res << ", description"; - - for (size_t i = 0; i < description.size(); ++i) - res << ", " << description[i].getID(); - - res << ", sign_column, " << sign_column_name << ")"; - return res.str(); - } - bool isSortedOutput() const override { return true; } const SortDescription & getSortDescription() const override { return description; } + Block getHeader() const override { return children.at(0)->getHeader(); } + protected: Block readImpl() override; diff --git a/dbms/src/DataStreams/CollapsingSortedBlockInputStream.h b/dbms/src/DataStreams/CollapsingSortedBlockInputStream.h index 9d9043b30c5..7280dda02b1 100644 --- a/dbms/src/DataStreams/CollapsingSortedBlockInputStream.h +++ b/dbms/src/DataStreams/CollapsingSortedBlockInputStream.h @@ -33,23 +33,6 @@ public: String getName() const override { return "CollapsingSorted"; } - String getID() const override - { - std::stringstream res; - res << "CollapsingSorted(inputs"; - - for (size_t i = 0; i < children.size(); ++i) - res << ", " << children[i]->getID(); - - res << ", description"; - - for (size_t i = 0; i < description.size(); ++i) - res << ", " << description[i].getID(); - - res << ", sign_column, " << sign_column << ")"; - return res.str(); - } - protected: /// Can return 1 more records than max_block_size. Block readImpl() override; diff --git a/dbms/src/DataStreams/ColumnGathererStream.cpp b/dbms/src/DataStreams/ColumnGathererStream.cpp index 81a9d3348b0..ba4107f7e8b 100644 --- a/dbms/src/DataStreams/ColumnGathererStream.cpp +++ b/dbms/src/DataStreams/ColumnGathererStream.cpp @@ -30,19 +30,6 @@ ColumnGathererStream::ColumnGathererStream( } -String ColumnGathererStream::getID() const -{ - std::stringstream res; - - res << getName() << "("; - for (size_t i = 0; i < children.size(); ++i) - res << (i == 0 ? "" : ", " ) << children[i]->getID(); - res << ")"; - - return res.str(); -} - - void ColumnGathererStream::init() { sources.reserve(children.size()); @@ -107,13 +94,13 @@ void ColumnGathererStream::fetchNewBlock(Source & source, size_t source_num) } catch (Exception & e) { - e.addMessage("Cannot fetch required block. Stream " + children[source_num]->getID() + ", part " + toString(source_num)); + e.addMessage("Cannot fetch required block. Stream " + children[source_num]->getName() + ", part " + toString(source_num)); throw; } if (0 == source.size) { - throw Exception("Fetched block is empty. Stream " + children[source_num]->getID() + ", part " + toString(source_num), + throw Exception("Fetched block is empty. Stream " + children[source_num]->getName() + ", part " + toString(source_num), ErrorCodes::RECEIVED_EMPTY_DATA); } } diff --git a/dbms/src/DataStreams/ColumnGathererStream.h b/dbms/src/DataStreams/ColumnGathererStream.h index 66ad2645e2f..101e8fdccf3 100644 --- a/dbms/src/DataStreams/ColumnGathererStream.h +++ b/dbms/src/DataStreams/ColumnGathererStream.h @@ -61,12 +61,12 @@ public: String getName() const override { return "ColumnGatherer"; } - String getID() const override; - Block readImpl() override; void readSuffixImpl() override; + Block getHeader() const override { return children.at(0)->getHeader(); } + /// for use in implementations of IColumn::gather() template void gather(Column & column_res); diff --git a/dbms/src/DataStreams/ConcatBlockInputStream.h b/dbms/src/DataStreams/ConcatBlockInputStream.h index e8da47a7c02..fafcbc6950c 100644 --- a/dbms/src/DataStreams/ConcatBlockInputStream.h +++ b/dbms/src/DataStreams/ConcatBlockInputStream.h @@ -22,24 +22,7 @@ public: String getName() const override { return "Concat"; } - String getID() const override - { - std::stringstream res; - res << "Concat("; - - Strings children_ids(children.size()); - for (size_t i = 0; i < children.size(); ++i) - children_ids[i] = children[i]->getID(); - - /// Let's assume that the order of concatenation of blocks does not matter. - std::sort(children_ids.begin(), children_ids.end()); - - for (size_t i = 0; i < children_ids.size(); ++i) - res << (i == 0 ? "" : ", ") << children_ids[i]; - - res << ")"; - return res.str(); - } + Block getHeader() const override { return children.at(0)->getHeader(); } protected: Block readImpl() override diff --git a/dbms/src/DataStreams/CreatingSetsBlockInputStream.h b/dbms/src/DataStreams/CreatingSetsBlockInputStream.h index 605caac90bc..85088d1d8fc 100644 --- a/dbms/src/DataStreams/CreatingSetsBlockInputStream.h +++ b/dbms/src/DataStreams/CreatingSetsBlockInputStream.h @@ -35,24 +35,7 @@ public: String getName() const override { return "CreatingSets"; } - String getID() const override - { - std::stringstream res; - res << "CreatingSets("; - - Strings children_ids(children.size()); - for (size_t i = 0; i < children.size(); ++i) - children_ids[i] = children[i]->getID(); - - /// Let's assume that the order of creating sets does not matter. - std::sort(children_ids.begin(), children_ids.end() - 1); - - for (size_t i = 0; i < children_ids.size(); ++i) - res << (i == 0 ? "" : ", ") << children_ids[i]; - - res << ")"; - return res.str(); - } + Block getHeader() const override { return children.back()->getHeader(); } /// Takes `totals` only from the main source, not from subquery sources. const Block & getTotals() override; diff --git a/dbms/src/DataStreams/DistinctBlockInputStream.cpp b/dbms/src/DataStreams/DistinctBlockInputStream.cpp index f10eda57e05..50949b2f0cc 100644 --- a/dbms/src/DataStreams/DistinctBlockInputStream.cpp +++ b/dbms/src/DataStreams/DistinctBlockInputStream.cpp @@ -18,13 +18,6 @@ DistinctBlockInputStream::DistinctBlockInputStream(const BlockInputStreamPtr & i children.push_back(input); } -String DistinctBlockInputStream::getID() const -{ - std::stringstream res; - res << "Distinct(" << children.back()->getID() << ")"; - return res.str(); -} - Block DistinctBlockInputStream::readImpl() { /// Execute until end of stream or until diff --git a/dbms/src/DataStreams/DistinctBlockInputStream.h b/dbms/src/DataStreams/DistinctBlockInputStream.h index d35c6ced3d3..60a92e0399a 100644 --- a/dbms/src/DataStreams/DistinctBlockInputStream.h +++ b/dbms/src/DataStreams/DistinctBlockInputStream.h @@ -22,7 +22,7 @@ public: String getName() const override { return "Distinct"; } - String getID() const override; + Block getHeader() const override { return children.at(0)->getHeader(); } protected: Block readImpl() override; diff --git a/dbms/src/DataStreams/DistinctSortedBlockInputStream.cpp b/dbms/src/DataStreams/DistinctSortedBlockInputStream.cpp index 59395d26b23..e9e5d69d047 100644 --- a/dbms/src/DataStreams/DistinctSortedBlockInputStream.cpp +++ b/dbms/src/DataStreams/DistinctSortedBlockInputStream.cpp @@ -19,13 +19,6 @@ DistinctSortedBlockInputStream::DistinctSortedBlockInputStream(const BlockInputS children.push_back(input); } -String DistinctSortedBlockInputStream::getID() const -{ - std::stringstream res; - res << "DistinctSorted(" << children.back()->getID() << ")"; - return res.str(); -} - Block DistinctSortedBlockInputStream::readImpl() { /// Execute until end of stream or until diff --git a/dbms/src/DataStreams/DistinctSortedBlockInputStream.h b/dbms/src/DataStreams/DistinctSortedBlockInputStream.h index 335e8406e70..33c6cef7774 100644 --- a/dbms/src/DataStreams/DistinctSortedBlockInputStream.h +++ b/dbms/src/DataStreams/DistinctSortedBlockInputStream.h @@ -25,7 +25,7 @@ public: String getName() const override { return "DistinctSorted"; } - String getID() const override; + Block getHeader() const override { return children.at(0)->getHeader(); } protected: Block readImpl() override; diff --git a/dbms/src/DataStreams/ExpressionBlockInputStream.cpp b/dbms/src/DataStreams/ExpressionBlockInputStream.cpp index 369150796f7..d274a456c22 100644 --- a/dbms/src/DataStreams/ExpressionBlockInputStream.cpp +++ b/dbms/src/DataStreams/ExpressionBlockInputStream.cpp @@ -13,13 +13,6 @@ ExpressionBlockInputStream::ExpressionBlockInputStream(const BlockInputStreamPtr String ExpressionBlockInputStream::getName() const { return "Expression"; } -String ExpressionBlockInputStream::getID() const -{ - std::stringstream res; - res << "Expression(" << children.back()->getID() << ", " << expression->getID() << ")"; - return res.str(); -} - const Block & ExpressionBlockInputStream::getTotals() { if (IProfilingBlockInputStream * child = dynamic_cast(&*children.back())) @@ -31,14 +24,19 @@ const Block & ExpressionBlockInputStream::getTotals() return totals; } +Block ExpressionBlockInputStream::getHeader() const +{ + Block res = children.back()->getHeader(); + expression->execute(res); + return res; +} + Block ExpressionBlockInputStream::readImpl() { Block res = children.back()->read(); if (!res) return res; - expression->execute(res); - return res; } diff --git a/dbms/src/DataStreams/ExpressionBlockInputStream.h b/dbms/src/DataStreams/ExpressionBlockInputStream.h index 11d498332a3..a509d1e606e 100644 --- a/dbms/src/DataStreams/ExpressionBlockInputStream.h +++ b/dbms/src/DataStreams/ExpressionBlockInputStream.h @@ -22,8 +22,8 @@ public: ExpressionBlockInputStream(const BlockInputStreamPtr & input, const ExpressionActionsPtr & expression_); String getName() const override; - String getID() const override; const Block & getTotals() override; + Block getHeader() const override; protected: Block readImpl() override; diff --git a/dbms/src/DataStreams/FilterBlockInputStream.cpp b/dbms/src/DataStreams/FilterBlockInputStream.cpp index e3430119a1b..2f6115863cf 100644 --- a/dbms/src/DataStreams/FilterBlockInputStream.cpp +++ b/dbms/src/DataStreams/FilterBlockInputStream.cpp @@ -23,24 +23,36 @@ FilterBlockInputStream::FilterBlockInputStream(const BlockInputStreamPtr & input children.push_back(input); } -FilterBlockInputStream::FilterBlockInputStream(const BlockInputStreamPtr & input, const ExpressionActionsPtr & expression_, const String & filter_column_name_) - : expression(expression_), filter_column(-1), filter_column_name(filter_column_name_) +FilterBlockInputStream::FilterBlockInputStream(const BlockInputStreamPtr & input, const ExpressionActionsPtr & expression_, const String & filter_column_name) + : expression(expression_) { children.push_back(input); + + /// Determine position of filter column. + header = input->getHeader(); + expression->execute(header); + + filter_column = header.getPositionByName(filter_column_name); + + /// Isn't the filter already constant? + ColumnPtr column = header.safeGetByPosition(filter_column).column; + + if (column) + constant_filter_description = ConstantFilterDescription(*column); + + if (!constant_filter_description.always_false + && !constant_filter_description.always_true) + { + /// Replace the filter column to a constant with value 1. + auto & header_filter_elem = header.getByPosition(filter_column); + header_filter_elem.column = header_filter_elem.type->createColumnConst(header.rows(), UInt64(1)); + } } String FilterBlockInputStream::getName() const { return "Filter"; } -String FilterBlockInputStream::getID() const -{ - std::stringstream res; - res << "Filter(" << children.back()->getID() << ", " << expression->getID() << ", " << filter_column << ", " << filter_column_name << ")"; - return res.str(); -} - - const Block & FilterBlockInputStream::getTotals() { if (IProfilingBlockInputStream * child = dynamic_cast(&*children.back())) @@ -53,37 +65,18 @@ const Block & FilterBlockInputStream::getTotals() } +Block FilterBlockInputStream::getHeader() const +{ + return header; +} + + Block FilterBlockInputStream::readImpl() { Block res; - if (is_first) - { - is_first = false; - - const Block & sample_block = expression->getSampleBlock(); - - /// Find the current position of the filter column in the block. - /** sample_block has the result structure of evaluating the expression. - * But this structure does not necessarily match expression->execute(res) below, - * because the expression can be applied to a block that also contains additional, - * columns unnecessary for this expression, but needed later, in the next stages of the query execution pipeline. - * There will be no such columns in sample_block. - * Therefore, the position of the filter column in it can be different. - */ - ssize_t filter_column_in_sample_block = filter_column; - if (filter_column_in_sample_block == -1) - filter_column_in_sample_block = sample_block.getPositionByName(filter_column_name); - - /// Let's check if the filter column is a constant containing 0 or 1. - ColumnPtr column = sample_block.safeGetByPosition(filter_column_in_sample_block).column; - - if (column) - constant_filter_description = ConstantFilterDescription(*column); - - if (constant_filter_description.always_false) - return res; - } + if (constant_filter_description.always_false) + return res; /// Until non-empty block after filtering or end of stream. while (1) @@ -97,10 +90,6 @@ Block FilterBlockInputStream::readImpl() if (constant_filter_description.always_true) return res; - /// Find the current position of the filter column in the block. - if (filter_column == -1) - filter_column = res.getPositionByName(filter_column_name); - size_t columns = res.columns(); ColumnPtr column = res.safeGetByPosition(filter_column).column; diff --git a/dbms/src/DataStreams/FilterBlockInputStream.h b/dbms/src/DataStreams/FilterBlockInputStream.h index 56a38b9e39a..c78e4c0919f 100644 --- a/dbms/src/DataStreams/FilterBlockInputStream.h +++ b/dbms/src/DataStreams/FilterBlockInputStream.h @@ -25,18 +25,16 @@ public: FilterBlockInputStream(const BlockInputStreamPtr & input, const ExpressionActionsPtr & expression_, const String & filter_column_name_); String getName() const override; - String getID() const override; const Block & getTotals() override; + Block getHeader() const override; protected: Block readImpl() override; private: ExpressionActionsPtr expression; + Block header; ssize_t filter_column; - String filter_column_name; - - bool is_first = true; ConstantFilterDescription constant_filter_description; }; diff --git a/dbms/src/DataStreams/FilterColumnsBlockInputStream.cpp b/dbms/src/DataStreams/FilterColumnsBlockInputStream.cpp index a8ee82945a7..fa7bb916fe7 100644 --- a/dbms/src/DataStreams/FilterColumnsBlockInputStream.cpp +++ b/dbms/src/DataStreams/FilterColumnsBlockInputStream.cpp @@ -3,16 +3,16 @@ namespace DB { -String FilterColumnsBlockInputStream::getID() const +Block FilterColumnsBlockInputStream::getHeader() const { - std::stringstream res; - res << "FilterColumnsBlockInputStream(" << children.back()->getID(); + Block block = children.back()->getHeader(); + Block filtered; for (const auto & it : columns_to_save) - res << ", " << it; + if (throw_if_column_not_found || block.has(it)) + filtered.insert(std::move(block.getByName(it))); - res << ")"; - return res.str(); + return filtered; } Block FilterColumnsBlockInputStream::readImpl() diff --git a/dbms/src/DataStreams/FilterColumnsBlockInputStream.h b/dbms/src/DataStreams/FilterColumnsBlockInputStream.h index 07a9f6bd093..b2ac83c8fdf 100644 --- a/dbms/src/DataStreams/FilterColumnsBlockInputStream.h +++ b/dbms/src/DataStreams/FilterColumnsBlockInputStream.h @@ -24,7 +24,7 @@ public: return "FilterColumnsBlockInputStream"; } - String getID() const override; + Block getHeader() const override; protected: Block readImpl() override; diff --git a/dbms/src/DataStreams/FormatFactory.cpp b/dbms/src/DataStreams/FormatFactory.cpp index c9954dd8352..d871a4b23a5 100644 --- a/dbms/src/DataStreams/FormatFactory.cpp +++ b/dbms/src/DataStreams/FormatFactory.cpp @@ -59,7 +59,7 @@ BlockInputStreamPtr FormatFactory::getInput(const String & name, ReadBuffer & bu if (name == "Native") { - return std::make_shared(buf); + return std::make_shared(buf, sample, 0); } else if (name == "RowBinary") { diff --git a/dbms/src/DataStreams/GraphiteRollupSortedBlockInputStream.h b/dbms/src/DataStreams/GraphiteRollupSortedBlockInputStream.h index c5e85bcf8ae..99d9466408d 100644 --- a/dbms/src/DataStreams/GraphiteRollupSortedBlockInputStream.h +++ b/dbms/src/DataStreams/GraphiteRollupSortedBlockInputStream.h @@ -135,23 +135,6 @@ public: String getName() const override { return "GraphiteRollupSorted"; } - String getID() const override - { - std::stringstream res; - res << "GraphiteRollupSorted(inputs"; - - for (size_t i = 0; i < children.size(); ++i) - res << ", " << children[i]->getID(); - - res << ", description"; - - for (size_t i = 0; i < description.size(); ++i) - res << ", " << description[i].getID(); - - res << ")"; - return res.str(); - } - ~GraphiteRollupSortedBlockInputStream() { if (aggregate_state_created) diff --git a/dbms/src/DataStreams/IBlockInputStream.cpp b/dbms/src/DataStreams/IBlockInputStream.cpp index 13a3c99d393..b4cc5444c87 100644 --- a/dbms/src/DataStreams/IBlockInputStream.cpp +++ b/dbms/src/DataStreams/IBlockInputStream.cpp @@ -64,6 +64,7 @@ void IBlockInputStream::dumpTree(std::ostream & ostr, size_t indent, size_t mult ostr << String(indent, ' ') << getName(); if (multiplier > 1) ostr << " × " << multiplier; + // ostr << ": " << getHeader().dumpStructure(); ostr << std::endl; ++indent; @@ -125,13 +126,5 @@ void IBlockInputStream::getLeavesImpl(BlockInputStreams & res, const BlockInputS (*it)->getLeavesImpl(res, *it); } -/// By default all instances is different streams -String IBlockInputStream::getID() const -{ - std::stringstream res; - res << getName() << "(" << this << ")"; - return res.str(); -}; - } diff --git a/dbms/src/DataStreams/IBlockInputStream.h b/dbms/src/DataStreams/IBlockInputStream.h index 8a874ea127b..77ee6b94157 100644 --- a/dbms/src/DataStreams/IBlockInputStream.h +++ b/dbms/src/DataStreams/IBlockInputStream.h @@ -48,6 +48,12 @@ class IBlockInputStream : private boost::noncopyable public: IBlockInputStream() {} + /** Get data structure of the stream in a form of "header" block (it is also called "sample block"). + * Header block contains column names, data types, columns of size 0. Constant columns must have corresponding values. + * It is guaranteed that method "read" returns blocks of exactly that structure. + */ + virtual Block getHeader() const = 0; + /** Read next block. * If there are no more blocks, return an empty block (for which operator `bool` returns false). * NOTE: Only one thread can read from one instance of IBlockInputStream simultaneously. @@ -76,14 +82,6 @@ public: */ virtual String getName() const = 0; - /** The unique identifier of the pipeline part of the query execution. - * Sources with the same identifier are considered identical - * (producing the same data), and can be replaced by one source - * if several queries are executed simultaneously. - * If the source can not be glued together with any other - return the object's address as an identifier. - */ - virtual String getID() const; - /// If this stream generates data in grouped by some keys, return true. virtual bool isGroupedOutput() const { return false; } /// If this stream generates data in order by some keys, return true. diff --git a/dbms/src/DataStreams/InputStreamFromASTInsertQuery.h b/dbms/src/DataStreams/InputStreamFromASTInsertQuery.h index 622ff46d424..dbcf3799e3e 100644 --- a/dbms/src/DataStreams/InputStreamFromASTInsertQuery.h +++ b/dbms/src/DataStreams/InputStreamFromASTInsertQuery.h @@ -1,20 +1,16 @@ #pragma once -#include -#include -#include +#include #include -#include #include +#include namespace DB { -namespace ErrorCodes -{ - extern const int LOGICAL_ERROR; -} +struct BlockIO; +class Context; /** Prepares an input stream which produce data containing in INSERT query * Head of inserting data could be stored in INSERT ast directly @@ -23,7 +19,6 @@ namespace ErrorCodes class InputStreamFromASTInsertQuery : public IProfilingBlockInputStream { public: - InputStreamFromASTInsertQuery(const ASTPtr & ast, ReadBuffer & input_buffer_tail_part, const BlockIO & streams, Context & context); Block readImpl() override { return res_stream->read(); } @@ -31,10 +26,10 @@ public: void readSuffixImpl() override { return res_stream->readSuffix(); } String getName() const override { return "InputStreamFromASTInsertQuery"; } - String getID() const override { return "InputStreamFromASTInsertQuery(" + toString(std::intptr_t(this)) + ")"; } + + Block getHeader() const override { return res_stream->getHeader(); } private: - std::unique_ptr input_buffer_ast_part; std::unique_ptr input_buffer_contacenated; diff --git a/dbms/src/DataStreams/LazyBlockInputStream.h b/dbms/src/DataStreams/LazyBlockInputStream.h index 8cf4f3a293d..6d05e570f53 100644 --- a/dbms/src/DataStreams/LazyBlockInputStream.h +++ b/dbms/src/DataStreams/LazyBlockInputStream.h @@ -15,14 +15,13 @@ class LazyBlockInputStream : public IProfilingBlockInputStream public: using Generator = std::function; - LazyBlockInputStream(Generator generator_) - : generator(std::move(generator_)) + LazyBlockInputStream(const Block & header_, Generator generator_) + : header(header_), generator(std::move(generator_)) { } - LazyBlockInputStream(const char * name_, Generator generator_) - : name(name_) - , generator(std::move(generator_)) + LazyBlockInputStream(const char * name_, const Block & header_, Generator generator_) + : name(name_), header(header_), generator(std::move(generator_)) { } @@ -34,6 +33,11 @@ public: IProfilingBlockInputStream::cancel(); } + Block getHeader() const override + { + return header; + } + protected: Block readImpl() override { @@ -89,6 +93,7 @@ protected: private: const char * name = "Lazy"; + Block header; Generator generator; BlockInputStreamPtr input; diff --git a/dbms/src/DataStreams/LimitBlockInputStream.h b/dbms/src/DataStreams/LimitBlockInputStream.h index 23bd5739aaf..9739665243f 100644 --- a/dbms/src/DataStreams/LimitBlockInputStream.h +++ b/dbms/src/DataStreams/LimitBlockInputStream.h @@ -21,12 +21,7 @@ public: String getName() const override { return "Limit"; } - String getID() const override - { - std::stringstream res; - res << "Limit(" << children.back()->getID() << ", " << limit << ", " << offset << ")"; - return res.str(); - } + Block getHeader() const override { return children.at(0)->getHeader(); } protected: Block readImpl() override; diff --git a/dbms/src/DataStreams/LimitByBlockInputStream.h b/dbms/src/DataStreams/LimitByBlockInputStream.h index 09eb357ca2e..88cf2ff1670 100644 --- a/dbms/src/DataStreams/LimitByBlockInputStream.h +++ b/dbms/src/DataStreams/LimitByBlockInputStream.h @@ -3,9 +3,9 @@ #include #include -#include #include + namespace DB { @@ -22,6 +22,8 @@ public: String getName() const override { return "LimitBy"; } + Block getHeader() const override { return children.at(0)->getHeader(); } + protected: Block readImpl() override; diff --git a/dbms/src/DataStreams/MaterializingBlockInputStream.cpp b/dbms/src/DataStreams/MaterializingBlockInputStream.cpp index b7ae5c6c000..e0f287d44fa 100644 --- a/dbms/src/DataStreams/MaterializingBlockInputStream.cpp +++ b/dbms/src/DataStreams/MaterializingBlockInputStream.cpp @@ -15,11 +15,9 @@ String MaterializingBlockInputStream::getName() const return "Materializing"; } -String MaterializingBlockInputStream::getID() const +Block MaterializingBlockInputStream::getHeader() const { - std::stringstream res; - res << "Materializing(" << children.back()->getID() << ")"; - return res.str(); + return materializeBlock(children.back()->getHeader()); } Block MaterializingBlockInputStream::readImpl() diff --git a/dbms/src/DataStreams/MaterializingBlockInputStream.h b/dbms/src/DataStreams/MaterializingBlockInputStream.h index feeca05298e..dfbad3b14b2 100644 --- a/dbms/src/DataStreams/MaterializingBlockInputStream.h +++ b/dbms/src/DataStreams/MaterializingBlockInputStream.h @@ -12,7 +12,7 @@ class MaterializingBlockInputStream : public IProfilingBlockInputStream public: MaterializingBlockInputStream(const BlockInputStreamPtr & input); String getName() const override; - String getID() const override; + Block getHeader() const override; protected: Block readImpl() override; diff --git a/dbms/src/DataStreams/MergeSortingBlockInputStream.cpp b/dbms/src/DataStreams/MergeSortingBlockInputStream.cpp index 6a5c5aba0f6..d5b48f0b803 100644 --- a/dbms/src/DataStreams/MergeSortingBlockInputStream.cpp +++ b/dbms/src/DataStreams/MergeSortingBlockInputStream.cpp @@ -155,7 +155,7 @@ Block MergeSortingBlockInputStream::readImpl() MergeSortingBlocksBlockInputStream::MergeSortingBlocksBlockInputStream( Blocks & blocks_, SortDescription & description_, size_t max_merged_block_size_, size_t limit_) - : blocks(blocks_), description(description_), max_merged_block_size(max_merged_block_size_), limit(limit_) + : blocks(blocks_), header(blocks.at(0).cloneEmpty()), description(description_), max_merged_block_size(max_merged_block_size_), limit(limit_) { Blocks nonempty_blocks; for (const auto & block : blocks) diff --git a/dbms/src/DataStreams/MergeSortingBlockInputStream.h b/dbms/src/DataStreams/MergeSortingBlockInputStream.h index 4a97d214a79..cb1101c0843 100644 --- a/dbms/src/DataStreams/MergeSortingBlockInputStream.h +++ b/dbms/src/DataStreams/MergeSortingBlockInputStream.h @@ -33,17 +33,19 @@ public: size_t max_merged_block_size_, size_t limit_ = 0); String getName() const override { return "MergeSortingBlocks"; } - String getID() const override { return getName(); } bool isGroupedOutput() const override { return true; } bool isSortedOutput() const override { return true; } const SortDescription & getSortDescription() const override { return description; } + Block getHeader() const override { return header; } + protected: Block readImpl() override; private: Blocks & blocks; + Block header; SortDescription description; size_t max_merged_block_size; size_t limit; @@ -80,22 +82,12 @@ public: String getName() const override { return "MergeSorting"; } - String getID() const override - { - std::stringstream res; - res << "MergeSorting(" << children.back()->getID(); - - for (size_t i = 0; i < description.size(); ++i) - res << ", " << description[i].getID(); - - res << ")"; - return res.str(); - } - bool isGroupedOutput() const override { return true; } bool isSortedOutput() const override { return true; } const SortDescription & getSortDescription() const override { return description; } + Block getHeader() const override { return children.at(0)->getHeader(); } + protected: Block readImpl() override; @@ -129,7 +121,7 @@ private: BlockInputStreamPtr block_in; TemporaryFileStream(const std::string & path) - : file_in(path), compressed_in(file_in), block_in(std::make_shared(compressed_in)) {} + : file_in(path), compressed_in(file_in), block_in(std::make_shared(compressed_in, 0)) {} }; std::vector> temporary_inputs; diff --git a/dbms/src/DataStreams/MergingAggregatedBlockInputStream.cpp b/dbms/src/DataStreams/MergingAggregatedBlockInputStream.cpp index 63b42c31980..5586033482d 100644 --- a/dbms/src/DataStreams/MergingAggregatedBlockInputStream.cpp +++ b/dbms/src/DataStreams/MergingAggregatedBlockInputStream.cpp @@ -6,6 +6,11 @@ namespace DB { +Block MergingAggregatedBlockInputStream::getHeader() const +{ + return aggregator.getHeader(final); +} + Block MergingAggregatedBlockInputStream::readImpl() { diff --git a/dbms/src/DataStreams/MergingAggregatedBlockInputStream.h b/dbms/src/DataStreams/MergingAggregatedBlockInputStream.h index f133524d0f1..b299aff0d1f 100644 --- a/dbms/src/DataStreams/MergingAggregatedBlockInputStream.h +++ b/dbms/src/DataStreams/MergingAggregatedBlockInputStream.h @@ -22,12 +22,7 @@ public: String getName() const override { return "MergingAggregated"; } - String getID() const override - { - std::stringstream res; - res << "MergingAggregated(" << children.back()->getID() << ", " << aggregator.getID() << ")"; - return res.str(); - } + Block getHeader() const override; protected: Block readImpl() override; diff --git a/dbms/src/DataStreams/MergingAggregatedMemoryEfficientBlockInputStream.cpp b/dbms/src/DataStreams/MergingAggregatedMemoryEfficientBlockInputStream.cpp index 10273caff24..56e816cb05a 100644 --- a/dbms/src/DataStreams/MergingAggregatedMemoryEfficientBlockInputStream.cpp +++ b/dbms/src/DataStreams/MergingAggregatedMemoryEfficientBlockInputStream.cpp @@ -90,14 +90,9 @@ MergingAggregatedMemoryEfficientBlockInputStream::MergingAggregatedMemoryEfficie } -String MergingAggregatedMemoryEfficientBlockInputStream::getID() const +Block MergingAggregatedMemoryEfficientBlockInputStream::getHeader() const { - std::stringstream res; - res << "MergingAggregatedMemoryEfficient(" << aggregator.getID(); - for (size_t i = 0, size = children.size(); i < size; ++i) - res << ", " << children.back()->getID(); - res << ")"; - return res.str(); + return aggregator.getHeader(final); } diff --git a/dbms/src/DataStreams/MergingAggregatedMemoryEfficientBlockInputStream.h b/dbms/src/DataStreams/MergingAggregatedMemoryEfficientBlockInputStream.h index f1300ee12af..f7b978e9c66 100644 --- a/dbms/src/DataStreams/MergingAggregatedMemoryEfficientBlockInputStream.h +++ b/dbms/src/DataStreams/MergingAggregatedMemoryEfficientBlockInputStream.h @@ -67,8 +67,6 @@ public: String getName() const override { return "MergingAggregatedMemoryEfficient"; } - String getID() const override; - /// Sends the request (initiates calculations) earlier than `read`. void readPrefix() override; @@ -80,6 +78,8 @@ public: */ void cancel() override; + Block getHeader() const override; + protected: Block readImpl() override; diff --git a/dbms/src/DataStreams/MergingSortedBlockInputStream.cpp b/dbms/src/DataStreams/MergingSortedBlockInputStream.cpp index 8ccabeb092b..aee5b34899f 100644 --- a/dbms/src/DataStreams/MergingSortedBlockInputStream.cpp +++ b/dbms/src/DataStreams/MergingSortedBlockInputStream.cpp @@ -24,28 +24,6 @@ MergingSortedBlockInputStream::MergingSortedBlockInputStream( children.insert(children.end(), inputs_.begin(), inputs_.end()); } -String MergingSortedBlockInputStream::getID() const -{ - std::stringstream res; - res << "MergingSorted("; - - Strings children_ids(children.size()); - for (size_t i = 0; i < children.size(); ++i) - children_ids[i] = children[i]->getID(); - - /// The order does not matter. - std::sort(children_ids.begin(), children_ids.end()); - - for (size_t i = 0; i < children_ids.size(); ++i) - res << (i == 0 ? "" : ", ") << children_ids[i]; - - for (size_t i = 0; i < description.size(); ++i) - res << ", " << description[i].getID(); - - res << ")"; - return res.str(); -} - void MergingSortedBlockInputStream::init(Block & header, MutableColumns & merged_columns) { /// Read the first blocks, initialize the queue. diff --git a/dbms/src/DataStreams/MergingSortedBlockInputStream.h b/dbms/src/DataStreams/MergingSortedBlockInputStream.h index 82eff68bae9..a8e0c4bf488 100644 --- a/dbms/src/DataStreams/MergingSortedBlockInputStream.h +++ b/dbms/src/DataStreams/MergingSortedBlockInputStream.h @@ -70,12 +70,12 @@ public: String getName() const override { return "MergingSorted"; } - String getID() const override; - bool isGroupedOutput() const override { return true; } bool isSortedOutput() const override { return true; } const SortDescription & getSortDescription() const override { return description; } + Block getHeader() const override { return children.at(0)->getHeader(); } + protected: struct RowRef { diff --git a/dbms/src/DataStreams/NativeBlockInputStream.cpp b/dbms/src/DataStreams/NativeBlockInputStream.cpp index 0571bc08359..1ec7c902065 100644 --- a/dbms/src/DataStreams/NativeBlockInputStream.cpp +++ b/dbms/src/DataStreams/NativeBlockInputStream.cpp @@ -19,23 +19,40 @@ namespace ErrorCodes extern const int INCORRECT_INDEX; extern const int LOGICAL_ERROR; extern const int CANNOT_READ_ALL_DATA; + extern const int NOT_IMPLEMENTED; } -NativeBlockInputStream::NativeBlockInputStream( - ReadBuffer & istr_, UInt64 server_revision_, - bool use_index_, + +NativeBlockInputStream::NativeBlockInputStream(ReadBuffer & istr_, UInt64 server_revision_) + : istr(istr_), server_revision(server_revision_) +{ +} + +NativeBlockInputStream::NativeBlockInputStream(ReadBuffer & istr_, const Block & header_, UInt64 server_revision_) + : istr(istr_), header(header_), server_revision(server_revision_) +{ +} + +NativeBlockInputStream::NativeBlockInputStream(ReadBuffer & istr_, UInt64 server_revision_, IndexForNativeFormat::Blocks::const_iterator index_block_it_, IndexForNativeFormat::Blocks::const_iterator index_block_end_) : istr(istr_), server_revision(server_revision_), - use_index(use_index_), index_block_it(index_block_it_), index_block_end(index_block_end_) + use_index(true), index_block_it(index_block_it_), index_block_end(index_block_end_) { - if (use_index) - { - istr_concrete = typeid_cast(&istr); - if (!istr_concrete) - throw Exception("When need to use index for NativeBlockInputStream, istr must be CompressedReadBufferFromFile.", ErrorCodes::LOGICAL_ERROR); + istr_concrete = typeid_cast(&istr); + if (!istr_concrete) + throw Exception("When need to use index for NativeBlockInputStream, istr must be CompressedReadBufferFromFile.", ErrorCodes::LOGICAL_ERROR); - index_column_it = index_block_it->columns.begin(); + if (index_block_it == index_block_end) + return; + + index_column_it = index_block_it->columns.begin(); + + /// Initialize header from the index. + for (const auto & column : index_block_it->columns) + { + auto type = DataTypeFactory::instance().get(column.type); + header.insert({ type->createColumn(), type, column.name }); } } @@ -50,6 +67,12 @@ void NativeBlockInputStream::readData(const IDataType & type, IColumn & column, } +Block NativeBlockInputStream::getHeader() const +{ + return header; +} + + Block NativeBlockInputStream::readImpl() { Block res; diff --git a/dbms/src/DataStreams/NativeBlockInputStream.h b/dbms/src/DataStreams/NativeBlockInputStream.h index b1df20a782a..14ce18347e3 100644 --- a/dbms/src/DataStreams/NativeBlockInputStream.h +++ b/dbms/src/DataStreams/NativeBlockInputStream.h @@ -60,35 +60,33 @@ struct IndexForNativeFormat class NativeBlockInputStream : public IProfilingBlockInputStream { public: - /** If a non-zero server_revision is specified, additional block information may be expected and read. - * - * `index` is not required parameter. If set, only parts of columns specified in the index will be read. - */ - NativeBlockInputStream( - ReadBuffer & istr_, UInt64 server_revision_ = 0, - bool use_index_ = false, - IndexForNativeFormat::Blocks::const_iterator index_block_it_ = IndexForNativeFormat::Blocks::const_iterator{}, - IndexForNativeFormat::Blocks::const_iterator index_block_end_ = IndexForNativeFormat::Blocks::const_iterator{}); + /// If a non-zero server_revision is specified, additional block information may be expected and read. + NativeBlockInputStream(ReadBuffer & istr_, UInt64 server_revision_); + + /// For cases when data structure (header) is known in advance. + /// NOTE We may use header for data validation and/or type conversions. It is not implemented. + NativeBlockInputStream(ReadBuffer & istr_, const Block & header_, UInt64 server_revision_); + + /// For cases when we have an index. It allows to skip columns. Only columns specified in the index will be read. + NativeBlockInputStream(ReadBuffer & istr_, UInt64 server_revision_, + IndexForNativeFormat::Blocks::const_iterator index_block_it_, + IndexForNativeFormat::Blocks::const_iterator index_block_end_); String getName() const override { return "Native"; } - String getID() const override - { - std::stringstream res; - res << this; - return res.str(); - } - static void readData(const IDataType & type, IColumn & column, ReadBuffer & istr, size_t rows, double avg_value_size_hint); + Block getHeader() const override; + protected: Block readImpl() override; private: ReadBuffer & istr; + Block header; UInt64 server_revision; - bool use_index; + bool use_index = false; IndexForNativeFormat::Blocks::const_iterator index_block_it; IndexForNativeFormat::Blocks::const_iterator index_block_end; IndexOfBlockForNativeFormat::Columns::const_iterator index_column_it; diff --git a/dbms/src/DataStreams/NullAndDoCopyBlockInputStream.h b/dbms/src/DataStreams/NullAndDoCopyBlockInputStream.h index cd7823f236d..d03996be53f 100644 --- a/dbms/src/DataStreams/NullAndDoCopyBlockInputStream.h +++ b/dbms/src/DataStreams/NullAndDoCopyBlockInputStream.h @@ -28,12 +28,7 @@ public: String getName() const override { return "NullAndDoCopy"; } - String getID() const override - { - std::stringstream res; - res << "copy from " << input->getID(); - return res.str(); - } + Block getHeader() const override { return {}; } protected: Block readImpl() override diff --git a/dbms/src/DataStreams/NullBlockInputStream.h b/dbms/src/DataStreams/NullBlockInputStream.h index fad7eb6629b..9272dddd15a 100644 --- a/dbms/src/DataStreams/NullBlockInputStream.h +++ b/dbms/src/DataStreams/NullBlockInputStream.h @@ -6,14 +6,19 @@ namespace DB { -/** Empty stream of blocks. +/** Empty stream of blocks of specified structure. */ class NullBlockInputStream : public IBlockInputStream { public: - Block read() override { return Block(); } + NullBlockInputStream(const Block & header) : header(header) {} + + Block read() override { return {}; } + Block getHeader() const override { return header; } String getName() const override { return "Null"; } +private: + Block header; }; } diff --git a/dbms/src/DataStreams/NullableAdapterBlockInputStream.cpp b/dbms/src/DataStreams/NullableAdapterBlockInputStream.cpp index 50285284f21..60fe4013595 100644 --- a/dbms/src/DataStreams/NullableAdapterBlockInputStream.cpp +++ b/dbms/src/DataStreams/NullableAdapterBlockInputStream.cpp @@ -17,18 +17,12 @@ namespace ErrorCodes NullableAdapterBlockInputStream::NullableAdapterBlockInputStream( const BlockInputStreamPtr & input, const Block & in_sample_, const Block & out_sample_) + : header(out_sample_) { buildActions(in_sample_, out_sample_); children.push_back(input); } -String NullableAdapterBlockInputStream::getID() const -{ - std::stringstream res; - res << "NullableAdapterBlockInputStream(" << children.back()->getID() << ")"; - return res.str(); -} - Block NullableAdapterBlockInputStream::readImpl() { Block block = children.back()->read(); diff --git a/dbms/src/DataStreams/NullableAdapterBlockInputStream.h b/dbms/src/DataStreams/NullableAdapterBlockInputStream.h index c8fd4c11292..47e064ecdf2 100644 --- a/dbms/src/DataStreams/NullableAdapterBlockInputStream.h +++ b/dbms/src/DataStreams/NullableAdapterBlockInputStream.h @@ -18,12 +18,11 @@ namespace DB class NullableAdapterBlockInputStream : public IProfilingBlockInputStream { public: - NullableAdapterBlockInputStream(const BlockInputStreamPtr & input, const Block & in_sample_, - const Block & out_sample_); + NullableAdapterBlockInputStream(const BlockInputStreamPtr & input, const Block & in_sample_, const Block & out_sample_); String getName() const override { return "NullableAdapterBlockInputStream"; } - String getID() const override; + Block getHeader() const override { return header; } protected: Block readImpl() override; @@ -52,6 +51,7 @@ private: void buildActions(const Block & in_sample, const Block & out_sample); private: + Block header; Actions actions; std::vector> rename; bool must_transform = false; diff --git a/dbms/src/DataStreams/OneBlockInputStream.h b/dbms/src/DataStreams/OneBlockInputStream.h index 1a7bbe7efb8..22480089f86 100644 --- a/dbms/src/DataStreams/OneBlockInputStream.h +++ b/dbms/src/DataStreams/OneBlockInputStream.h @@ -16,6 +16,14 @@ public: String getName() const override { return "One"; } + Block getHeader() const override + { + Block res; + for (const auto & elem : block) + res.insert({ elem.column->cloneEmpty(), elem.type, elem.name }); + return res; + } + protected: Block readImpl() override { diff --git a/dbms/src/DataStreams/OwningBlockInputStream.h b/dbms/src/DataStreams/OwningBlockInputStream.h index 1c1d1acf3bc..5bed4a9f9c3 100644 --- a/dbms/src/DataStreams/OwningBlockInputStream.h +++ b/dbms/src/DataStreams/OwningBlockInputStream.h @@ -20,13 +20,13 @@ public: children.push_back(stream); } + Block getHeader() const override { return children.at(0)->getHeader(); } + private: Block readImpl() override { return stream->read(); } String getName() const override { return "Owning"; } - String getID() const override { return "Owning(" + stream->getID() + ")"; } - protected: BlockInputStreamPtr stream; std::unique_ptr own; diff --git a/dbms/src/DataStreams/ParallelAggregatingBlockInputStream.cpp b/dbms/src/DataStreams/ParallelAggregatingBlockInputStream.cpp index 92bfe5e1f9e..8476f3020af 100644 --- a/dbms/src/DataStreams/ParallelAggregatingBlockInputStream.cpp +++ b/dbms/src/DataStreams/ParallelAggregatingBlockInputStream.cpp @@ -29,23 +29,9 @@ ParallelAggregatingBlockInputStream::ParallelAggregatingBlockInputStream( } -String ParallelAggregatingBlockInputStream::getID() const +Block ParallelAggregatingBlockInputStream::getHeader() const { - std::stringstream res; - res << "ParallelAggregating("; - - Strings children_ids(children.size()); - for (size_t i = 0; i < children.size(); ++i) - children_ids[i] = children[i]->getID(); - - /// Order does not matter. - std::sort(children_ids.begin(), children_ids.end()); - - for (size_t i = 0; i < children_ids.size(); ++i) - res << (i == 0 ? "" : ", ") << children_ids[i]; - - res << ", " << aggregator.getID() << ")"; - return res.str(); + return aggregator.getHeader(final); } @@ -122,8 +108,7 @@ void ParallelAggregatingBlockInputStream::Handler::onBlock(Block & block, size_t { parent.aggregator.executeOnBlock(block, *parent.many_data[thread_num], parent.threads_data[thread_num].key_columns, parent.threads_data[thread_num].aggregate_columns, - parent.threads_data[thread_num].key_sizes, parent.threads_data[thread_num].key, - parent.no_more_keys); + parent.threads_data[thread_num].key, parent.no_more_keys); parent.threads_data[thread_num].src_rows += block.rows(); parent.threads_data[thread_num].src_bytes += block.bytes(); @@ -212,6 +197,13 @@ void ParallelAggregatingBlockInputStream::execute() << "Total aggregated. " << total_src_rows << " rows (from " << total_src_bytes / 1048576.0 << " MiB)" << " in " << elapsed_seconds << " sec." << " (" << total_src_rows / elapsed_seconds << " rows/sec., " << total_src_bytes / elapsed_seconds / 1048576.0 << " MiB/sec.)"); + + /// If there was no data, and we aggregate without keys, we must return single row with the result of empty aggregation. + /// To do this, we pass a block with zero rows to aggregate. + if (total_src_rows == 0 && params.keys_size == 0 && !params.empty_result_for_aggregation_by_empty_set) + aggregator.executeOnBlock(children.at(0)->getHeader(), *many_data[0], + threads_data[0].key_columns, threads_data[0].aggregate_columns, + threads_data[0].key, no_more_keys); } } diff --git a/dbms/src/DataStreams/ParallelAggregatingBlockInputStream.h b/dbms/src/DataStreams/ParallelAggregatingBlockInputStream.h index 71a13e94ac4..a0dbb8a948b 100644 --- a/dbms/src/DataStreams/ParallelAggregatingBlockInputStream.h +++ b/dbms/src/DataStreams/ParallelAggregatingBlockInputStream.h @@ -27,10 +27,10 @@ public: String getName() const override { return "ParallelAggregating"; } - String getID() const override; - void cancel() override; + Block getHeader() const override; + protected: /// Do nothing that preparation to execution of the query be done in parallel, in ParallelInputsProcessor. void readPrefix() override @@ -83,14 +83,12 @@ private: StringRefs key; ColumnRawPtrs key_columns; Aggregator::AggregateColumns aggregate_columns; - Sizes key_sizes; ThreadData(size_t keys_size, size_t aggregates_size) { key.resize(keys_size); key_columns.resize(keys_size); aggregate_columns.resize(aggregates_size); - key_sizes.resize(keys_size); } }; diff --git a/dbms/src/DataStreams/PartialSortingBlockInputStream.h b/dbms/src/DataStreams/PartialSortingBlockInputStream.h index f46fa8e5ca5..5b5001ce313 100644 --- a/dbms/src/DataStreams/PartialSortingBlockInputStream.h +++ b/dbms/src/DataStreams/PartialSortingBlockInputStream.h @@ -23,22 +23,12 @@ public: String getName() const override { return "PartialSorting"; } - String getID() const override - { - std::stringstream res; - res << "PartialSorting(" << children.back()->getID(); - - for (size_t i = 0; i < description.size(); ++i) - res << ", " << description[i].getID(); - - res << ")"; - return res.str(); - } - bool isGroupedOutput() const override { return true; } bool isSortedOutput() const override { return true; } const SortDescription & getSortDescription() const override { return description; } + Block getHeader() const override { return children.at(0)->getHeader(); } + protected: Block readImpl() override; diff --git a/dbms/src/DataStreams/RemoteBlockInputStream.cpp b/dbms/src/DataStreams/RemoteBlockInputStream.cpp index 31577f27846..311cda1727b 100644 --- a/dbms/src/DataStreams/RemoteBlockInputStream.cpp +++ b/dbms/src/DataStreams/RemoteBlockInputStream.cpp @@ -2,6 +2,7 @@ #include #include #include +#include #include @@ -17,9 +18,9 @@ namespace ErrorCodes RemoteBlockInputStream::RemoteBlockInputStream( Connection & connection, - const String & query_, const Context & context_, const Settings * settings, + const String & query_, const Block & header_, const Context & context_, const Settings * settings, const ThrottlerPtr & throttler, const Tables & external_tables_, QueryProcessingStage::Enum stage_) - : query(query_), context(context_), external_tables(external_tables_), stage(stage_) + : header(header_), query(query_), context(context_), external_tables(external_tables_), stage(stage_) { if (settings) context.setSettings(*settings); @@ -32,9 +33,9 @@ RemoteBlockInputStream::RemoteBlockInputStream( RemoteBlockInputStream::RemoteBlockInputStream( std::vector && connections, - const String & query_, const Context & context_, const Settings * settings, + const String & query_, const Block & header_, const Context & context_, const Settings * settings, const ThrottlerPtr & throttler, const Tables & external_tables_, QueryProcessingStage::Enum stage_) - : query(query_), context(context_), external_tables(external_tables_), stage(stage_) + : header(header_), query(query_), context(context_), external_tables(external_tables_), stage(stage_) { if (settings) context.setSettings(*settings); @@ -48,9 +49,9 @@ RemoteBlockInputStream::RemoteBlockInputStream( RemoteBlockInputStream::RemoteBlockInputStream( const ConnectionPoolWithFailoverPtr & pool, - const String & query_, const Context & context_, const Settings * settings, + const String & query_, const Block & header_, const Context & context_, const Settings * settings, const ThrottlerPtr & throttler, const Tables & external_tables_, QueryProcessingStage::Enum stage_) - : query(query_), context(context_), external_tables(external_tables_), stage(stage_) + : header(header_), query(query_), context(context_), external_tables(external_tables_), stage(stage_) { if (settings) context.setSettings(*settings); @@ -148,6 +149,25 @@ void RemoteBlockInputStream::sendExternalTables() multiplexed_connections->sendExternalTablesData(external_tables_data); } + +/** If we receive a block with slightly different column types, or with excessive columns, + * we will adapt it to expected structure. + */ +static Block adaptBlockStructure(const Block & block, const Block & header, const Context & context) +{ + /// Special case when reader doesn't care about result structure. Deprecated and used only in Benchmark, PerformanceTest. + if (!header) + return block; + + Block res; + res.info = block.info; + + for (const auto & elem : header) + res.insert({ castColumn(block.getByName(elem.name), elem.type, context), elem.type, elem.name }); + return res; +} + + Block RemoteBlockInputStream::readImpl() { if (!sent_query) @@ -170,7 +190,7 @@ Block RemoteBlockInputStream::readImpl() case Protocol::Server::Data: /// If the block is not empty and is not a header block if (packet.block && (packet.block.rows() > 0)) - return packet.block; + return adaptBlockStructure(packet.block, header, context); break; /// If the block is empty - we will receive other packets before EndOfStream. case Protocol::Server::Exception: diff --git a/dbms/src/DataStreams/RemoteBlockInputStream.h b/dbms/src/DataStreams/RemoteBlockInputStream.h index 2ee6aa2c6a5..8c3cff4f494 100644 --- a/dbms/src/DataStreams/RemoteBlockInputStream.h +++ b/dbms/src/DataStreams/RemoteBlockInputStream.h @@ -24,7 +24,7 @@ public: /// If `settings` is nullptr, settings will be taken from context. RemoteBlockInputStream( Connection & connection, - const String & query_, const Context & context_, const Settings * settings = nullptr, + const String & query_, const Block & header_, const Context & context_, const Settings * settings = nullptr, const ThrottlerPtr & throttler = nullptr, const Tables & external_tables_ = Tables(), QueryProcessingStage::Enum stage_ = QueryProcessingStage::Complete); @@ -32,7 +32,7 @@ public: /// If `settings` is nullptr, settings will be taken from context. RemoteBlockInputStream( std::vector && connections, - const String & query_, const Context & context_, const Settings * settings = nullptr, + const String & query_, const Block & header_, const Context & context_, const Settings * settings = nullptr, const ThrottlerPtr & throttler = nullptr, const Tables & external_tables_ = Tables(), QueryProcessingStage::Enum stage_ = QueryProcessingStage::Complete); @@ -40,7 +40,7 @@ public: /// If `settings` is nullptr, settings will be taken from context. RemoteBlockInputStream( const ConnectionPoolWithFailoverPtr & pool, - const String & query_, const Context & context_, const Settings * settings = nullptr, + const String & query_, const Block & header_, const Context & context_, const Settings * settings = nullptr, const ThrottlerPtr & throttler = nullptr, const Tables & external_tables_ = Tables(), QueryProcessingStage::Enum stage_ = QueryProcessingStage::Complete); @@ -66,18 +66,13 @@ public: String getName() const override { return "Remote"; } - String getID() const override - { - std::stringstream res; - res << this; - return res.str(); - } - BlockExtraInfo getBlockExtraInfo() const override { return multiplexed_connections->getBlockExtraInfo(); } + Block getHeader() const override { return header; } + protected: /// Send all temporary tables to remote servers void sendExternalTables(); @@ -95,10 +90,14 @@ protected: private: void sendQuery(); + Block receiveBlock(); + /// If wasn't sent yet, send request to cancell all connections to replicas void tryCancel(const char * reason); private: + Block header; + std::function()> create_multiplexed_connections; std::unique_ptr multiplexed_connections; diff --git a/dbms/src/DataStreams/RemoveColumnsBlockInputStream.h b/dbms/src/DataStreams/RemoveColumnsBlockInputStream.h index c8888440e28..a8b54962209 100644 --- a/dbms/src/DataStreams/RemoveColumnsBlockInputStream.h +++ b/dbms/src/DataStreams/RemoveColumnsBlockInputStream.h @@ -22,16 +22,15 @@ public: String getName() const override { return "RemoveColumns"; } - String getID() const override + Block getHeader() const override { - std::stringstream res; - res << "RemoveColumns(" << children.back()->getID(); + Block res = children.back()->getHeader(); for (const auto & it : columns_to_remove) - res << ", " << it; + if (res.has(it)) + res.erase(it); - res << ")"; - return res.str(); + return res; } protected: diff --git a/dbms/src/DataStreams/ReplacingSortedBlockInputStream.h b/dbms/src/DataStreams/ReplacingSortedBlockInputStream.h index 0e7fdadc25a..0ab6b185833 100644 --- a/dbms/src/DataStreams/ReplacingSortedBlockInputStream.h +++ b/dbms/src/DataStreams/ReplacingSortedBlockInputStream.h @@ -24,23 +24,6 @@ public: String getName() const override { return "ReplacingSorted"; } - String getID() const override - { - std::stringstream res; - res << "ReplacingSorted(inputs"; - - for (size_t i = 0; i < children.size(); ++i) - res << ", " << children[i]->getID(); - - res << ", description"; - - for (size_t i = 0; i < description.size(); ++i) - res << ", " << description[i].getID(); - - res << ", version_column, " << version_column << ")"; - return res.str(); - } - protected: /// Can return 1 more records than max_block_size. Block readImpl() override; diff --git a/dbms/src/DataStreams/SquashingBlockInputStream.h b/dbms/src/DataStreams/SquashingBlockInputStream.h index 3da819d2167..0f9a01d65e8 100644 --- a/dbms/src/DataStreams/SquashingBlockInputStream.h +++ b/dbms/src/DataStreams/SquashingBlockInputStream.h @@ -16,12 +16,7 @@ public: String getName() const override { return "Squashing"; } - String getID() const override - { - std::stringstream res; - res << "Squashing(" << children.at(0)->getID() << ")"; - return res.str(); - } + Block getHeader() const override { return children.at(0)->getHeader(); } protected: Block readImpl() override; diff --git a/dbms/src/DataStreams/SummingSortedBlockInputStream.cpp b/dbms/src/DataStreams/SummingSortedBlockInputStream.cpp index 42dffd5babf..1102258d348 100644 --- a/dbms/src/DataStreams/SummingSortedBlockInputStream.cpp +++ b/dbms/src/DataStreams/SummingSortedBlockInputStream.cpp @@ -23,24 +23,6 @@ namespace ErrorCodes } -String SummingSortedBlockInputStream::getID() const -{ - std::stringstream res; - res << "SummingSorted(inputs"; - - for (size_t i = 0; i < children.size(); ++i) - res << ", " << children[i]->getID(); - - res << ", description"; - - for (size_t i = 0; i < description.size(); ++i) - res << ", " << description[i].getID(); - - res << ")"; - return res.str(); -} - - void SummingSortedBlockInputStream::insertCurrentRowIfNeeded(MutableColumns & merged_columns, bool force_insertion) { for (auto & desc : columns_to_aggregate) diff --git a/dbms/src/DataStreams/SummingSortedBlockInputStream.h b/dbms/src/DataStreams/SummingSortedBlockInputStream.h index 6a81db02ea4..62df3863fc6 100644 --- a/dbms/src/DataStreams/SummingSortedBlockInputStream.h +++ b/dbms/src/DataStreams/SummingSortedBlockInputStream.h @@ -35,8 +35,6 @@ public: String getName() const override { return "SummingSorted"; } - String getID() const override; - protected: /// Can return 1 more records than max_block_size. Block readImpl() override; diff --git a/dbms/src/DataStreams/TotalsHavingBlockInputStream.cpp b/dbms/src/DataStreams/TotalsHavingBlockInputStream.cpp index 4692dc6df57..b204afc2944 100644 --- a/dbms/src/DataStreams/TotalsHavingBlockInputStream.cpp +++ b/dbms/src/DataStreams/TotalsHavingBlockInputStream.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include #include #include @@ -29,26 +30,18 @@ TotalsHavingBlockInputStream::TotalsHavingBlockInputStream( } -String TotalsHavingBlockInputStream::getID() const -{ - std::stringstream res; - res << "TotalsHavingBlockInputStream(" << children.back()->getID() - << "," << filter_column_name << ")"; - return res.str(); -} - - static void finalize(Block & block) { for (size_t i = 0; i < block.columns(); ++i) { ColumnWithTypeAndName & current = block.safeGetByPosition(i); - const ColumnAggregateFunction * unfinalized_column = typeid_cast(current.column.get()); + const DataTypeAggregateFunction * unfinalized_type = typeid_cast(current.type.get()); - if (unfinalized_column) + if (unfinalized_type) { - current.type = unfinalized_column->getAggregateFunction()->getReturnType(); - current.column = unfinalized_column->convertToValues(); + current.type = unfinalized_type->getReturnType(); + if (current.column) + current.column = typeid_cast(*current.column).convertToValues(); } } } @@ -70,7 +63,7 @@ const Block & TotalsHavingBlockInputStream::getTotals() addToTotals(overflow_aggregates, nullptr); } - totals = header.cloneWithColumns(std::move(current_totals)); + totals = children.at(0)->getHeader().cloneWithColumns(std::move(current_totals)); finalize(totals); } @@ -81,6 +74,16 @@ const Block & TotalsHavingBlockInputStream::getTotals() } +Block TotalsHavingBlockInputStream::getHeader() const +{ + Block res = children.at(0)->getHeader(); + finalize(res); + if (expression) + expression->execute(res); + return res; +} + + Block TotalsHavingBlockInputStream::readImpl() { Block finalized; @@ -90,9 +93,6 @@ Block TotalsHavingBlockInputStream::readImpl() { block = children[0]->read(); - if (!header) - header = block.cloneEmpty(); - /// Block with values not included in `max_rows_to_group_by`. We'll postpone it. if (overflow_row && block && block.info.is_overflows) { diff --git a/dbms/src/DataStreams/TotalsHavingBlockInputStream.h b/dbms/src/DataStreams/TotalsHavingBlockInputStream.h index 1cc257983cb..375854c5761 100644 --- a/dbms/src/DataStreams/TotalsHavingBlockInputStream.h +++ b/dbms/src/DataStreams/TotalsHavingBlockInputStream.h @@ -19,6 +19,7 @@ private: using ExpressionActionsPtr = std::shared_ptr; public: + /// expression may be nullptr TotalsHavingBlockInputStream( const BlockInputStreamPtr & input_, bool overflow_row_, const ExpressionActionsPtr & expression_, @@ -26,10 +27,10 @@ public: String getName() const override { return "TotalsHaving"; } - String getID() const override; - const Block & getTotals() override; + Block getHeader() const override; + protected: Block readImpl() override; @@ -42,8 +43,6 @@ private: size_t passed_keys = 0; size_t total_keys = 0; - Block header; - /** Here are the values that did not pass max_rows_to_group_by. * They are added or not added to the current_totals, depending on the totals_mode. */ diff --git a/dbms/src/DataStreams/UnionBlockInputStream.h b/dbms/src/DataStreams/UnionBlockInputStream.h index 60639002e9f..176cb472a61 100644 --- a/dbms/src/DataStreams/UnionBlockInputStream.h +++ b/dbms/src/DataStreams/UnionBlockInputStream.h @@ -86,26 +86,6 @@ public: String getName() const override { return "Union"; } - String getID() const override - { - std::stringstream res; - res << "Union("; - - Strings children_ids(children.size()); - for (size_t i = 0; i < children.size(); ++i) - children_ids[i] = children[i]->getID(); - - /// Order does not matter. - std::sort(children_ids.begin(), children_ids.end()); - - for (size_t i = 0; i < children_ids.size(); ++i) - res << (i == 0 ? "" : ", ") << children_ids[i]; - - res << ")"; - return res.str(); - } - - ~UnionBlockInputStream() override { try @@ -139,6 +119,8 @@ public: return doGetBlockExtraInfo(); } + Block getHeader() const override { return children.at(0)->getHeader(); } + protected: void finalize() { diff --git a/dbms/src/DataStreams/VersionedCollapsingSortedBlockInputStream.h b/dbms/src/DataStreams/VersionedCollapsingSortedBlockInputStream.h index ec75e218533..1c299e78e81 100644 --- a/dbms/src/DataStreams/VersionedCollapsingSortedBlockInputStream.h +++ b/dbms/src/DataStreams/VersionedCollapsingSortedBlockInputStream.h @@ -185,24 +185,6 @@ public: String getName() const override { return "VersionedCollapsingSorted"; } - String getID() const override - { - std::stringstream res; - res << "VersionedCollapsingSortedBlockInputStream(inputs"; - - for (const auto & child : children) - res << ", " << child->getID(); - - res << ", description"; - - for (const auto & descr : description) - res << ", " << descr.getID(); - - res << ", sign_column, " << sign_column; - res << ", version_column, " << sign_column << ")"; - return res.str(); - } - protected: /// Can return 1 more records than max_block_size. Block readImpl() override; diff --git a/dbms/src/DataTypes/DataTypeEnum.h b/dbms/src/DataTypes/DataTypeEnum.h index ea939c9f709..a4cc36b1c92 100644 --- a/dbms/src/DataTypes/DataTypeEnum.h +++ b/dbms/src/DataTypes/DataTypeEnum.h @@ -112,7 +112,7 @@ public: bool equals(const IDataType & rhs) const override; bool textCanContainOnlyValidUTF8() const override; - size_t getSizeOfValueInMemory() const override { return sizeof(Field); } + size_t getSizeOfValueInMemory() const override { return sizeof(FieldType); } }; diff --git a/dbms/src/Dictionaries/ClickHouseDictionarySource.cpp b/dbms/src/Dictionaries/ClickHouseDictionarySource.cpp index 039126b458f..f487aac3644 100644 --- a/dbms/src/Dictionaries/ClickHouseDictionarySource.cpp +++ b/dbms/src/Dictionaries/ClickHouseDictionarySource.cpp @@ -73,7 +73,7 @@ BlockInputStreamPtr ClickHouseDictionarySource::loadAll() */ if (is_local) return executeQuery(load_all_query, context, true).in; - return std::make_shared(pool, load_all_query, context); + return std::make_shared(pool, load_all_query, sample_block, context); } @@ -103,7 +103,7 @@ BlockInputStreamPtr ClickHouseDictionarySource::createStreamForSelectiveLoad(con { if (is_local) return executeQuery(query, context, true).in; - return std::make_shared(pool, query, context); + return std::make_shared(pool, query, sample_block, context); } } diff --git a/dbms/src/Dictionaries/DictionaryBlockInputStreamBase.cpp b/dbms/src/Dictionaries/DictionaryBlockInputStreamBase.cpp index 468d91a231d..813504b084d 100644 --- a/dbms/src/Dictionaries/DictionaryBlockInputStreamBase.cpp +++ b/dbms/src/Dictionaries/DictionaryBlockInputStreamBase.cpp @@ -8,13 +8,6 @@ DictionaryBlockInputStreamBase::DictionaryBlockInputStreamBase(size_t rows_count { } -String DictionaryBlockInputStreamBase::getID() const -{ - std::stringstream ss; - ss << static_cast(this); - return ss.str(); -} - Block DictionaryBlockInputStreamBase::readImpl() { if (next_row == rows_count) @@ -26,4 +19,9 @@ Block DictionaryBlockInputStreamBase::readImpl() return block; } +Block DictionaryBlockInputStreamBase::getHeader() const +{ + return getBlock(0, 0); +} + } diff --git a/dbms/src/Dictionaries/DictionaryBlockInputStreamBase.h b/dbms/src/Dictionaries/DictionaryBlockInputStreamBase.h index 6f34f73c957..ea027026d3f 100644 --- a/dbms/src/Dictionaries/DictionaryBlockInputStreamBase.h +++ b/dbms/src/Dictionaries/DictionaryBlockInputStreamBase.h @@ -11,17 +11,16 @@ protected: DictionaryBlockInputStreamBase(size_t rows_count, size_t max_block_size); - String getID() const override; - virtual Block getBlock(size_t start, size_t length) const = 0; + Block getHeader() const override; + private: const size_t rows_count; const size_t max_block_size; - size_t next_row; + size_t next_row = 0; Block readImpl() override; - void readPrefixImpl() override { next_row = 0; } }; } diff --git a/dbms/src/Dictionaries/ExecutableDictionarySource.cpp b/dbms/src/Dictionaries/ExecutableDictionarySource.cpp index 58b7445eb38..35ac7b4cbf9 100644 --- a/dbms/src/Dictionaries/ExecutableDictionarySource.cpp +++ b/dbms/src/Dictionaries/ExecutableDictionarySource.cpp @@ -101,6 +101,8 @@ public: } } + Block getHeader() const override { return stream->getHeader(); }; + private: Block readImpl() override { return stream->read(); } @@ -118,7 +120,6 @@ private: } String getName() const override { return "WithBackgroundThread"; } - String getID() const override { return "WithBackgroundThread(" + stream->getID() + ")"; } BlockInputStreamPtr stream; std::unique_ptr command; diff --git a/dbms/src/Dictionaries/LibraryDictionarySource.cpp b/dbms/src/Dictionaries/LibraryDictionarySource.cpp index 9015712a322..457996696cc 100644 --- a/dbms/src/Dictionaries/LibraryDictionarySource.cpp +++ b/dbms/src/Dictionaries/LibraryDictionarySource.cpp @@ -14,6 +14,7 @@ namespace ErrorCodes extern const int NOT_IMPLEMENTED; extern const int SIZES_OF_COLUMNS_DOESNT_MATCH; extern const int FILE_DOESNT_EXIST; + extern const int EXTERNAL_LIBRARY_ERROR; } @@ -71,7 +72,11 @@ namespace if (!data) return sample_block.cloneEmpty(); - auto columns_received = static_cast(data); + auto columns_received = static_cast(data); + if (columns_received->error_code) + throw Exception("Received error: " + std::to_string(columns_received->error_code) + " " + + (columns_received->error_string ? columns_received->error_string : ""), + ErrorCodes::EXTERNAL_LIBRARY_ERROR); MutableColumns columns(sample_block.columns()); for (const auto i : ext::range(0, columns.size())) @@ -86,17 +91,12 @@ namespace for (size_t row_n = 0; row_n < columns_received->data[col_n].size; ++row_n) { - const auto & type = sample_block.getByPosition(row_n).type; - if (type->isStringOrFixedString()) - { - const auto & data = ext::bit_cast(columns_received->data[col_n].data[row_n]); - auto len = strlen(data); - columns[row_n]->insertData(data, len); - } - else - { - columns[row_n]->insert(columns_received->data[col_n].data[row_n]); - } + const auto & field = columns_received->data[col_n].data[row_n]; + if (!field.data) + continue; + const auto & size = field.size; + const auto & data = static_cast(field.data); + columns[row_n]->insertData(data, size); } } @@ -157,11 +157,11 @@ BlockInputStreamPtr LibraryDictionarySource::loadAll() /// Get function pointer before dataAllocate call because library->get may throw. auto fptr - = library->getstrings), decltype(&columns))>("ClickHouseDictionary_v1_loadAll"); - data_ptr = library->get("ClickHouseDictionary_v1_dataAllocate")(); + = library->getstrings), decltype(&columns))>("ClickHouseDictionary_v2_loadAll"); + data_ptr = library->get("ClickHouseDictionary_v2_dataAllocate")(); auto data = fptr(data_ptr, &settings->strings, &columns); auto block = dataToBlock(description.sample_block, data); - library->get("ClickHouseDictionary_v1_dataDelete")(data_ptr); + library->get("ClickHouseDictionary_v2_dataDelete")(data_ptr); return std::make_shared(block); } @@ -183,11 +183,11 @@ BlockInputStreamPtr LibraryDictionarySource::loadIds(const std::vector & /// Get function pointer before dataAllocate call because library->get may throw. auto fptr = library->getstrings), decltype(&columns_pass), decltype(&ids_data))>( - "ClickHouseDictionary_v1_loadIds"); - data_ptr = library->get("ClickHouseDictionary_v1_dataAllocate")(); + "ClickHouseDictionary_v2_loadIds"); + data_ptr = library->get("ClickHouseDictionary_v2_dataAllocate")(); auto data = fptr(data_ptr, &settings->strings, &columns_pass, &ids_data); auto block = dataToBlock(description.sample_block, data); - library->get("ClickHouseDictionary_v1_dataDelete")(data_ptr); + library->get("ClickHouseDictionary_v2_dataDelete")(data_ptr); return std::make_shared(block); } @@ -195,16 +195,6 @@ BlockInputStreamPtr LibraryDictionarySource::loadKeys(const Columns & key_column { LOG_TRACE(log, "loadKeys " << toString() << " size = " << requested_rows.size()); - /* - auto columns_c = std::make_unique(key_columns.size() + 1); - size_t i = 0; - for (auto & column : key_columns) - { - columns_c[i] = column->getName().c_str(); - ++i; - } - columns_c[i] = nullptr; - */ auto columns_holder = std::make_unique(key_columns.size()); ClickHouseLibrary::CStrings columns_pass{ static_cast(columns_holder.get()), key_columns.size()}; @@ -221,17 +211,17 @@ BlockInputStreamPtr LibraryDictionarySource::loadKeys(const Columns & key_column /// Get function pointer before dataAllocate call because library->get may throw. auto fptr = library->getstrings), decltype(&columns_pass), decltype(&requested_rows_c))>( - "ClickHouseDictionary_v1_loadKeys"); - data_ptr = library->get("ClickHouseDictionary_v1_dataAllocate")(); + "ClickHouseDictionary_v2_loadKeys"); + data_ptr = library->get("ClickHouseDictionary_v2_dataAllocate")(); auto data = fptr(data_ptr, &settings->strings, &columns_pass, &requested_rows_c); auto block = dataToBlock(description.sample_block, data); - library->get("ClickHouseDictionary_v1_dataDelete")(data_ptr); + library->get("ClickHouseDictionary_v2_dataDelete")(data_ptr); return std::make_shared(block); } bool LibraryDictionarySource::isModified() const { - auto fptr = library->tryGetstrings))>("ClickHouseDictionary_v1_isModified"); + auto fptr = library->tryGetstrings))>("ClickHouseDictionary_v2_isModified"); if (fptr) return fptr(&settings->strings); return true; @@ -239,7 +229,7 @@ bool LibraryDictionarySource::isModified() const bool LibraryDictionarySource::supportsSelectiveLoad() const { - auto fptr = library->tryGetstrings))>("ClickHouseDictionary_v1_supportsSelectiveLoad"); + auto fptr = library->tryGetstrings))>("ClickHouseDictionary_v2_supportsSelectiveLoad"); if (fptr) return fptr(&settings->strings); return true; diff --git a/dbms/src/Dictionaries/LibraryDictionarySourceExternal.h b/dbms/src/Dictionaries/LibraryDictionarySourceExternal.h index 3a7af5acfce..f510c927d40 100644 --- a/dbms/src/Dictionaries/LibraryDictionarySourceExternal.h +++ b/dbms/src/Dictionaries/LibraryDictionarySourceExternal.h @@ -2,6 +2,8 @@ #include +#define CLICKHOUSE_DICTIONARY_LIBRARY_API 1 + namespace ClickHouseLibrary { using CString = const char *; @@ -25,4 +27,24 @@ struct ColumnsUInt64 VectorUInt64 * data = nullptr; uint64_t size = 0; }; + +struct Field +{ + const void * data = nullptr; + uint64_t size = 0; +}; + +struct Row +{ + const Field * data = nullptr; + uint64_t size = 0; +}; + +struct Table +{ + const Row * data = nullptr; + uint64_t size = 0; + uint64_t error_code = 0; // 0 = ok; !0 = error, with message in error_string + const char * error_string = nullptr; +}; } diff --git a/dbms/src/Dictionaries/MongoDBBlockInputStream.cpp b/dbms/src/Dictionaries/MongoDBBlockInputStream.cpp index 9f13b8c345b..b5f1d1f6f69 100644 --- a/dbms/src/Dictionaries/MongoDBBlockInputStream.cpp +++ b/dbms/src/Dictionaries/MongoDBBlockInputStream.cpp @@ -38,14 +38,6 @@ MongoDBBlockInputStream::MongoDBBlockInputStream( MongoDBBlockInputStream::~MongoDBBlockInputStream() = default; -String MongoDBBlockInputStream::getID() const -{ - std::ostringstream stream; - stream << cursor.get(); - return "MongoDB(@" + stream.str() + ")"; -} - - namespace { using ValueType = ExternalResultDescription::ValueType; diff --git a/dbms/src/Dictionaries/MongoDBBlockInputStream.h b/dbms/src/Dictionaries/MongoDBBlockInputStream.h index 25ba14d9145..046e3429b71 100644 --- a/dbms/src/Dictionaries/MongoDBBlockInputStream.h +++ b/dbms/src/Dictionaries/MongoDBBlockInputStream.h @@ -32,7 +32,7 @@ public: String getName() const override { return "MongoDB"; } - String getID() const override; + Block getHeader() const override { return description.sample_block; }; private: Block readImpl() override; diff --git a/dbms/src/Dictionaries/MySQLBlockInputStream.cpp b/dbms/src/Dictionaries/MySQLBlockInputStream.cpp index f0c304343d2..6e2275cd105 100644 --- a/dbms/src/Dictionaries/MySQLBlockInputStream.cpp +++ b/dbms/src/Dictionaries/MySQLBlockInputStream.cpp @@ -33,12 +33,6 @@ MySQLBlockInputStream::MySQLBlockInputStream( } -String MySQLBlockInputStream::getID() const -{ - return "MySQL(" + query.str() + ")"; -} - - namespace { using ValueType = ExternalResultDescription::ValueType; diff --git a/dbms/src/Dictionaries/MySQLBlockInputStream.h b/dbms/src/Dictionaries/MySQLBlockInputStream.h index 1013507f11e..6e72f4eb3cf 100644 --- a/dbms/src/Dictionaries/MySQLBlockInputStream.h +++ b/dbms/src/Dictionaries/MySQLBlockInputStream.h @@ -21,7 +21,7 @@ public: String getName() const override { return "MySQL"; } - String getID() const override; + Block getHeader() const override { return description.sample_block; }; private: Block readImpl() override; diff --git a/dbms/src/Dictionaries/ODBCBlockInputStream.cpp b/dbms/src/Dictionaries/ODBCBlockInputStream.cpp index 3f564d942b4..8b186f6791e 100644 --- a/dbms/src/Dictionaries/ODBCBlockInputStream.cpp +++ b/dbms/src/Dictionaries/ODBCBlockInputStream.cpp @@ -38,12 +38,6 @@ ODBCBlockInputStream::ODBCBlockInputStream( } -String ODBCBlockInputStream::getID() const -{ - return "ODBC(" + statement.toString() + ")"; -} - - namespace { using ValueType = ExternalResultDescription::ValueType; diff --git a/dbms/src/Dictionaries/ODBCBlockInputStream.h b/dbms/src/Dictionaries/ODBCBlockInputStream.h index 558f5cb5673..b881beb9b1f 100644 --- a/dbms/src/Dictionaries/ODBCBlockInputStream.h +++ b/dbms/src/Dictionaries/ODBCBlockInputStream.h @@ -27,7 +27,7 @@ public: String getName() const override { return "ODBC"; } - String getID() const override; + Block getHeader() const override { return description.sample_block; }; private: Block readImpl() override; diff --git a/dbms/src/Functions/FunctionsArray.cpp b/dbms/src/Functions/FunctionsArray.cpp index 3db0e32e794..27d5d3688e8 100644 --- a/dbms/src/Functions/FunctionsArray.cpp +++ b/dbms/src/Functions/FunctionsArray.cpp @@ -23,6 +23,7 @@ #include #include + namespace DB { @@ -156,7 +157,7 @@ public: ++index; } - ColumnPtr getNullMapData() && { return std::move(sink_null_map_holder); } + ColumnPtr getNullMapColumnPtr() && { return std::move(sink_null_map_holder); } private: const UInt8 * src_null_map = nullptr; @@ -776,25 +777,25 @@ DataTypePtr FunctionArrayElement::getReturnTypeImpl(const DataTypes & arguments) void FunctionArrayElement::executeImpl(Block & block, const ColumnNumbers & arguments, size_t result) { /// Check nullability. - bool is_nullable_array = false; + bool is_array_of_nullable = false; const ColumnArray * col_array = nullptr; const ColumnArray * col_const_array = nullptr; col_array = checkAndGetColumn(block.getByPosition(arguments[0]).column.get()); if (col_array) - is_nullable_array = col_array->getData().isColumnNullable(); + is_array_of_nullable = col_array->getData().isColumnNullable(); else { col_const_array = checkAndGetColumnConstData(block.getByPosition(arguments[0]).column.get()); if (col_const_array) - is_nullable_array = col_const_array->getData().isColumnNullable(); + is_array_of_nullable = col_const_array->getData().isColumnNullable(); else throw Exception("Illegal column " + block.getByPosition(arguments[0]).column->getName() + " of first argument of function " + getName(), ErrorCodes::ILLEGAL_COLUMN); } - if (!is_nullable_array) + if (!is_array_of_nullable) { ArrayImpl::NullMapBuilder builder; perform(block, arguments, result, builder); @@ -860,7 +861,7 @@ void FunctionArrayElement::executeImpl(Block & block, const ColumnNumbers & argu /// Store the result. const ColumnWithTypeAndName & source_col = source_block.getByPosition(2); ColumnWithTypeAndName & dest_col = block.getByPosition(result); - dest_col.column = ColumnNullable::create(source_col.column, std::move(builder).getNullMapData()); + dest_col.column = ColumnNullable::create(source_col.column, builder ? std::move(builder).getNullMapColumnPtr() : ColumnUInt8::create()); } } diff --git a/dbms/src/Functions/FunctionsConversion.h b/dbms/src/Functions/FunctionsConversion.h index 8f3edca53ee..00884ca0ffb 100644 --- a/dbms/src/Functions/FunctionsConversion.h +++ b/dbms/src/Functions/FunctionsConversion.h @@ -53,6 +53,13 @@ namespace ErrorCodes extern const int CANNOT_PARSE_UUID; extern const int TOO_LARGE_STRING_SIZE; extern const int TOO_LESS_ARGUMENTS_FOR_FUNCTION; + extern const int LOGICAL_ERROR; + extern const int TYPE_MISMATCH; + extern const int CANNOT_CONVERT_TYPE; + extern const int ILLEGAL_COLUMN; + extern const int NUMBER_OF_ARGUMENTS_DOESNT_MATCH; + extern const int ILLEGAL_TYPE_OF_ARGUMENT; + extern const int NOT_IMPLEMENTED; } @@ -508,9 +515,6 @@ struct ConvertImplGenericFromString { auto res = data_type_to.createColumn(); - if (!size) - return; - IColumn & column_to = *res; column_to.reserve(size); @@ -1272,9 +1276,7 @@ private: static WrapperType createFixedStringWrapper(const DataTypePtr & from_type, const size_t N) { if (!from_type->isStringOrFixedString()) - throw Exception{ - "CAST AS FixedString is only implemented for types String and FixedString", - ErrorCodes::NOT_IMPLEMENTED}; + throw Exception{"CAST AS FixedString is only implemented for types String and FixedString", ErrorCodes::NOT_IMPLEMENTED}; return [N] (Block & block, const ColumnNumbers & arguments, const size_t result) { @@ -1309,9 +1311,7 @@ private: /// both from_type and to_type should be nullptr now is array types had same dimensions if ((from_type == nullptr) != (to_type == nullptr)) - throw Exception{ - "CAST AS Array can only be performed between same-dimensional array types or from String", - ErrorCodes::TYPE_MISMATCH}; + throw Exception{"CAST AS Array can only be performed between same-dimensional array types or from String", ErrorCodes::TYPE_MISMATCH}; /// Prepare nested type conversion const auto nested_function = prepare(from_nested_type, to_nested_type.get()); @@ -1337,9 +1337,7 @@ private: block.getByPosition(result).column = ColumnArray::create(nested_block.getByPosition(1).column, col_array->getOffsetsPtr()); } else - throw Exception{ - "Illegal column " + array_arg.column->getName() + " for function CAST AS Array", - ErrorCodes::LOGICAL_ERROR}; + throw Exception{"Illegal column " + array_arg.column->getName() + " for function CAST AS Array", ErrorCodes::LOGICAL_ERROR}; }; } @@ -1356,16 +1354,12 @@ private: const auto from_type = checkAndGetDataType(from_type_untyped.get()); if (!from_type) - throw Exception{ - "CAST AS Tuple can only be performed between tuple types or from String.\nLeft type: " + from_type_untyped->getName() + - ", right type: " + to_type->getName(), - ErrorCodes::TYPE_MISMATCH}; + throw Exception{"CAST AS Tuple can only be performed between tuple types or from String.\nLeft type: " + from_type_untyped->getName() + + ", right type: " + to_type->getName(), ErrorCodes::TYPE_MISMATCH}; if (from_type->getElements().size() != to_type->getElements().size()) - throw Exception{ - "CAST AS Tuple can only be performed between tuple types with the same number of elements or from String.\n" - "Left type: " + from_type->getName() + ", right type: " + to_type->getName(), - ErrorCodes::TYPE_MISMATCH}; + throw Exception{"CAST AS Tuple can only be performed between tuple types with the same number of elements or from String.\n" + "Left type: " + from_type->getName() + ", right type: " + to_type->getName(), ErrorCodes::TYPE_MISMATCH}; const auto & from_element_types = from_type->getElements(); const auto & to_element_types = to_type->getElements(); @@ -1441,10 +1435,8 @@ private: }; } else - throw Exception{ - "Conversion from " + from_type->getName() + " to " + to_type->getName() + - " is not supported", - ErrorCodes::CANNOT_CONVERT_TYPE}; + throw Exception{"Conversion from " + from_type->getName() + " to " + to_type->getName() + + " is not supported", ErrorCodes::CANNOT_CONVERT_TYPE}; } template @@ -1467,10 +1459,8 @@ private: const auto & old_value = name_value.second; const auto & new_value = to_type->getValue(name_value.first); if (old_value != new_value) - throw Exception{ - "Enum conversion changes value for element '" + name_value.first + - "' from " + toString(old_value) + " to " + toString(new_value), - ErrorCodes::CANNOT_CONVERT_TYPE}; + throw Exception{"Enum conversion changes value for element '" + name_value.first + + "' from " + toString(old_value) + " to " + toString(new_value), ErrorCodes::CANNOT_CONVERT_TYPE}; } }; @@ -1499,8 +1489,7 @@ private: col_with_type_and_name.column = std::move(res); } else - throw Exception{ - "Unexpected column " + first_col->getName() + " as first argument of function " + function_name, + throw Exception{"Unexpected column " + first_col->getName() + " as first argument of function " + function_name, ErrorCodes::LOGICAL_ERROR}; }; } @@ -1540,8 +1529,7 @@ private: /// Check that the requested conversion is allowed. if (nullable_conversion.source_is_nullable && !nullable_conversion.result_is_nullable) - throw Exception{"Cannot convert data from a nullable type to a non-nullable type", - ErrorCodes::CANNOT_CONVERT_TYPE}; + throw Exception{"Cannot convert data from a nullable type to a non-nullable type", ErrorCodes::CANNOT_CONVERT_TYPE}; if (from_type->onlyNull()) { @@ -1671,9 +1659,7 @@ private: /// It's possible to use ConvertImplGenericFromString to convert from String to AggregateFunction, /// but it is disabled because deserializing aggregate functions state might be unsafe. - throw Exception{ - "Conversion from " + from_type->getName() + " to " + to_type->getName() + " is not supported", - ErrorCodes::CANNOT_CONVERT_TYPE}; + throw Exception{"Conversion from " + from_type->getName() + " to " + to_type->getName() + " is not supported", ErrorCodes::CANNOT_CONVERT_TYPE}; } }; @@ -1709,8 +1695,7 @@ protected: { const auto type_col = checkAndGetColumnConst(arguments.back().column.get()); if (!type_col) - throw Exception("Second argument to " + getName() + " must be a constant string describing type", - ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT); + throw Exception("Second argument to " + getName() + " must be a constant string describing type", ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT); return DataTypeFactory::instance().get(type_col->getValue()); } diff --git a/dbms/src/Functions/FunctionsHigherOrder.cpp b/dbms/src/Functions/FunctionsHigherOrder.cpp index 0c93b64b9c7..a78769b061a 100644 --- a/dbms/src/Functions/FunctionsHigherOrder.cpp +++ b/dbms/src/Functions/FunctionsHigherOrder.cpp @@ -16,6 +16,7 @@ void registerFunctionsHigherOrder(FunctionFactory & factory) factory.registerFunction(); factory.registerFunction(); factory.registerFunction(); + factory.registerFunction(); } } diff --git a/dbms/src/Functions/FunctionsHigherOrder.h b/dbms/src/Functions/FunctionsHigherOrder.h index 5f9e570a47a..c63dce364b9 100644 --- a/dbms/src/Functions/FunctionsHigherOrder.h +++ b/dbms/src/Functions/FunctionsHigherOrder.h @@ -594,6 +594,117 @@ struct ArraySortImpl } }; +struct ArrayCumSumImpl +{ + static bool needBoolean() { return false; } + static bool needExpression() { return false; } + static bool needOneArray() { return false; } + + static DataTypePtr getReturnType(const DataTypePtr & expression_return, const DataTypePtr & /*array_element*/) + { + if (checkDataType(&*expression_return) || + checkDataType(&*expression_return) || + checkDataType(&*expression_return) || + checkDataType(&*expression_return)) + return std::make_shared(std::make_shared()); + + if (checkDataType(&*expression_return) || + checkDataType(&*expression_return) || + checkDataType(&*expression_return) || + checkDataType(&*expression_return)) + return std::make_shared(std::make_shared()); + + if (checkDataType(&*expression_return) || + checkDataType(&*expression_return)) + return std::make_shared(std::make_shared()); + + throw Exception("arrayCumSum cannot add values of type " + expression_return->getName(), ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT); + } + + + template + static bool executeType(const ColumnPtr & mapped, const ColumnArray & array, ColumnPtr & res_ptr) + { + const ColumnVector * column = checkAndGetColumn>(&*mapped); + + if (!column) + { + const ColumnConst * column_const = checkAndGetColumnConst>(&*mapped); + + if (!column_const) + return false; + + const Element x = column_const->template getValue(); + const IColumn::Offsets & offsets = array.getOffsets(); + + auto res_nested = ColumnVector::create(); + typename ColumnVector::Container & res_values = res_nested->getData(); + res_values.resize(column_const->size()); + + size_t pos = 0; + for (size_t i = 0; i < offsets.size(); ++i) + { + // skip empty arrays + if (pos < offsets[i]) + { + res_values[pos++] = x; + for (; pos < offsets[i]; ++pos) + { + res_values[pos] = res_values[pos - 1] + x; + } + } + } + + res_ptr = ColumnArray::create(std::move(res_nested), array.getOffsetsPtr()); + return true; + } + + const IColumn::Offsets & offsets = array.getOffsets(); + const typename ColumnVector::Container & data = column->getData(); + + auto res_nested = ColumnVector::create(); + typename ColumnVector::Container & res_values = res_nested->getData(); + res_values.resize(data.size()); + + size_t pos = 0; + for (size_t i = 0; i < offsets.size(); ++i) + { + // skip empty arrays + if (pos < offsets[i]) + { + res_values[pos] = data[pos]; + for (++pos; pos < offsets[i]; ++pos) + { + res_values[pos] = res_values[pos - 1] + data[pos]; + } + } + } + res_ptr = ColumnArray::create(std::move(res_nested), array.getOffsetsPtr()); + return true; + + } + + static ColumnPtr execute(const ColumnArray & array, ColumnPtr mapped) + { + ColumnPtr res; + + if (executeType< UInt8 , UInt64>(mapped, array, res) || + executeType< UInt16, UInt64>(mapped, array, res) || + executeType< UInt32, UInt64>(mapped, array, res) || + executeType< UInt64, UInt64>(mapped, array, res) || + executeType< Int8 , Int64>(mapped, array, res) || + executeType< Int16, Int64>(mapped, array, res) || + executeType< Int32, Int64>(mapped, array, res) || + executeType< Int64, Int64>(mapped, array, res) || + executeType(mapped, array, res) || + executeType(mapped, array, res)) + return res; + else + throw Exception("Unexpected column for arrayCumSum: " + mapped->getName()); + } + +}; + template class FunctionArrayMapped : public IFunction @@ -846,6 +957,7 @@ struct NameArrayFirst { static constexpr auto name = "arrayFirst"; }; struct NameArrayFirstIndex { static constexpr auto name = "arrayFirstIndex"; }; struct NameArraySort { static constexpr auto name = "arraySort"; }; struct NameArrayReverseSort { static constexpr auto name = "arrayReverseSort"; }; +struct NameArrayCumSum { static constexpr auto name = "arrayCumSum"; }; using FunctionArrayMap = FunctionArrayMapped; using FunctionArrayFilter = FunctionArrayMapped; @@ -857,5 +969,6 @@ using FunctionArrayFirst = FunctionArrayMapped; using FunctionArrayFirstIndex = FunctionArrayMapped; using FunctionArraySort = FunctionArrayMapped, NameArraySort>; using FunctionArrayReverseSort = FunctionArrayMapped, NameArrayReverseSort>; +using FunctionArrayCumSum = FunctionArrayMapped; } diff --git a/dbms/src/Functions/FunctionsMath.h b/dbms/src/Functions/FunctionsMath.h index 29463ea765f..be0be33b4de 100644 --- a/dbms/src/Functions/FunctionsMath.h +++ b/dbms/src/Functions/FunctionsMath.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #include #include #include @@ -484,7 +484,7 @@ using FunctionExp = FunctionMathUnaryFloat64>; using FunctionExp2 = FunctionMathUnaryFloat64>; using FunctionLog2 = FunctionMathUnaryFloat64>; -using FunctionExp10 = FunctionMathUnaryFloat64>; +using FunctionExp10 = FunctionMathUnaryFloat64>; using FunctionLog10 = FunctionMathUnaryFloat64>; using FunctionSqrt = FunctionMathUnaryFloat64>; diff --git a/dbms/src/Functions/FunctionsMiscellaneous.cpp b/dbms/src/Functions/FunctionsMiscellaneous.cpp index 9c2f94c97a2..58ca5ce1d2d 100644 --- a/dbms/src/Functions/FunctionsMiscellaneous.cpp +++ b/dbms/src/Functions/FunctionsMiscellaneous.cpp @@ -599,30 +599,17 @@ public: void executeImpl(Block & block, const ColumnNumbers & arguments, size_t result) override { const IColumn * col = block.getByPosition(arguments[0]).column.get(); - double seconds; - size_t size = col->size(); - if (auto column = checkAndGetColumnConst>(col)) - seconds = column->getValue(); - - else if (auto column = checkAndGetColumnConst>(col)) - seconds = static_cast(column->getValue()); - - else if (auto column = checkAndGetColumnConst>(col)) - seconds = static_cast(column->getValue()); - - else if (auto column = checkAndGetColumnConst>(col)) - seconds = static_cast(column->getValue()); - - else if (auto column = checkAndGetColumnConst>(col)) - seconds = static_cast(column->getValue()); - - else if (auto column = checkAndGetColumnConst>(col)) - seconds = static_cast(column->getValue()); - - else + if (!col->isColumnConst()) throw Exception("The argument of function " + getName() + " must be constant.", ErrorCodes::ILLEGAL_COLUMN); + Float64 seconds = applyVisitor(FieldVisitorConvertToNumber(), static_cast(*col).getField()); + + if (seconds < 0) + throw Exception("Cannot sleep negative amount of time (not implemented)", ErrorCodes::BAD_ARGUMENTS); + + size_t size = col->size(); + /// We do not sleep if the block is empty. if (size > 0) { diff --git a/dbms/src/Functions/FunctionsTransform.h b/dbms/src/Functions/FunctionsTransform.h index c266df282b3..2f591413862 100644 --- a/dbms/src/Functions/FunctionsTransform.h +++ b/dbms/src/Functions/FunctionsTransform.h @@ -65,6 +65,8 @@ public: bool isVariadic() const override { return true; } size_t getNumberOfArguments() const override { return 0; } + bool useDefaultImplementationForConstants() const override { return true; } + ColumnNumbers getArgumentsThatAreAlwaysConstant() const override { return {1, 2}; } DataTypePtr getReturnTypeImpl(const DataTypes & arguments) const override { @@ -189,13 +191,13 @@ public: private: void executeConst(Block & block, const ColumnNumbers & arguments, const size_t result) { - /// Construct a block of full-size columns of size 1 and compute the function as usual. + /// Materialize the input column and compute the function as usual. Block tmp_block; ColumnNumbers tmp_arguments; tmp_block.insert(block.getByPosition(arguments[0])); - tmp_block.getByPosition(0).column = static_cast(tmp_block.getByPosition(0).column.get())->getDataColumnPtr(); + tmp_block.getByPosition(0).column = tmp_block.getByPosition(0).column->cloneResized(block.rows())->convertToFullColumnIfConst(); tmp_arguments.push_back(0); for (size_t i = 1; i < arguments.size(); ++i) @@ -209,9 +211,7 @@ private: execute(tmp_block, tmp_arguments, tmp_result); - block.getByPosition(result).column = block.getByPosition(result).type->createColumnConst( - block.rows(), - (*tmp_block.getByPosition(tmp_result).column)[0]); + block.getByPosition(result).column = tmp_block.getByPosition(tmp_result).column; } template @@ -727,7 +727,7 @@ private: /// Different versions of the hash tables to implement the mapping. using NumToNum = HashMap>; - using NumToString = HashMap >; /// Everywhere StringRef's with trailing zero. + using NumToString = HashMap >; /// Everywhere StringRef's with trailing zero. using StringToNum = HashMap; using StringToString = HashMap; @@ -740,7 +740,7 @@ private: Field const_default_value; /// Null, if not specified. - bool initialized = false; + std::atomic initialized {false}; std::mutex mutex; /// Can be called from different threads. It works only on the first call. diff --git a/dbms/src/IO/readFloatText.h b/dbms/src/IO/readFloatText.h index 428af3126f4..82a6ea29eec 100644 --- a/dbms/src/IO/readFloatText.h +++ b/dbms/src/IO/readFloatText.h @@ -213,7 +213,7 @@ ReturnType readFloatTextPreciseImpl(T & x, ReadBuffer & buf) else x = converter.StringToFloat(buf.position(), buf.buffer().end() - buf.position(), &num_processed_characters); - if (num_processed_characters <= 0) + if (num_processed_characters < 0) { if constexpr (throw_exception) throw Exception("Cannot read floating point value", ErrorCodes::CANNOT_PARSE_NUMBER); @@ -317,6 +317,7 @@ ReturnType readFloatTextFastImpl(T & x, ReadBuffer & in) static constexpr bool throw_exception = std::is_same_v; bool negative = false; + x = 0; UInt64 before_point = 0; UInt64 after_point = 0; int after_point_exponent = 0; @@ -446,13 +447,6 @@ ReturnType readFloatTextFastImpl(T & x, ReadBuffer & in) } return ReturnType(false); } - else - { - if constexpr (throw_exception) - throw Exception("Cannot read floating point value", ErrorCodes::CANNOT_PARSE_NUMBER); - else - return false; - } } return ReturnType(true); diff --git a/dbms/src/Interpreters/Aggregator.cpp b/dbms/src/Interpreters/Aggregator.cpp index a3bbbe303cc..df1fb72584c 100644 --- a/dbms/src/Interpreters/Aggregator.cpp +++ b/dbms/src/Interpreters/Aggregator.cpp @@ -6,6 +6,7 @@ #include #include +#include #include #include #include @@ -88,31 +89,55 @@ void AggregatedDataVariants::convertToTwoLevel() } -void Aggregator::Params::calculateColumnNumbers(const Block & block) +Block Aggregator::getHeader(bool final) const { - if (keys.empty() && !key_names.empty()) - for (Names::const_iterator it = key_names.begin(); it != key_names.end(); ++it) - keys.push_back(block.getPositionByName(*it)); + Block res; - for (AggregateDescriptions::iterator it = aggregates.begin(); it != aggregates.end(); ++it) - if (it->arguments.empty() && !it->argument_names.empty()) - for (Names::const_iterator jt = it->argument_names.begin(); jt != it->argument_names.end(); ++jt) - it->arguments.push_back(block.getPositionByName(*jt)); + if (params.src_header) + { + for (size_t i = 0; i < params.keys_size; ++i) + res.insert(params.src_header.safeGetByPosition(params.keys[i]).cloneEmpty()); + + for (size_t i = 0; i < params.aggregates_size; ++i) + { + size_t arguments_size = params.aggregates[i].arguments.size(); + DataTypes argument_types(arguments_size); + for (size_t j = 0; j < arguments_size; ++j) + argument_types[j] = params.src_header.safeGetByPosition(params.aggregates[i].arguments[j]).type; + + DataTypePtr type; + if (final) + type = params.aggregates[i].function->getReturnType(); + else + type = std::make_shared(params.aggregates[i].function, argument_types, params.aggregates[i].parameters); + + res.insert({ type->createColumn(), type, params.aggregates[i].column_name }); + } + } + else if (params.intermediate_header) + { + res = params.intermediate_header.cloneEmpty(); + + if (final) + { + for (size_t i = 0; i < params.aggregates_size; ++i) + { + auto & elem = res.getByPosition(params.keys_size + i); + + elem.type = params.aggregates[i].function->getReturnType(); + elem.column = elem.type->createColumn(); + } + } + } + + return res; } -void Aggregator::initialize(const Block & block) +Aggregator::Aggregator(const Params & params_) + : params(params_), + isCancelled([]() { return false; }) { - if (isCancelled()) - return; - - std::lock_guard lock(mutex); - - if (initialized) - return; - - initialized = true; - if (current_memory_tracker) memory_usage_before_aggregation = current_memory_tracker->get(); @@ -134,56 +159,7 @@ void Aggregator::initialize(const Block & block) all_aggregates_has_trivial_destructor = false; } - if (isCancelled()) - return; - - /** All below, if non-empty block passed. - * (it doesn't needed in methods that merging blocks with aggregation states). - */ - if (!block) - return; - - /// Transform names of columns to numbers. - params.calculateColumnNumbers(block); - - if (isCancelled()) - return; - - /// Create "header" block, describing result. - if (!sample) - { - for (size_t i = 0; i < params.keys_size; ++i) - { - sample.insert(block.safeGetByPosition(params.keys[i]).cloneEmpty()); - if (ColumnPtr converted = sample.safeGetByPosition(i).column->convertToFullColumnIfConst()) - sample.safeGetByPosition(i).column = converted; - } - - for (size_t i = 0; i < params.aggregates_size; ++i) - { - ColumnWithTypeAndName col; - col.name = params.aggregates[i].column_name; - - size_t arguments_size = params.aggregates[i].arguments.size(); - DataTypes argument_types(arguments_size); - for (size_t j = 0; j < arguments_size; ++j) - argument_types[j] = block.safeGetByPosition(params.aggregates[i].arguments[j]).type; - - col.type = std::make_shared(params.aggregates[i].function, argument_types, params.aggregates[i].parameters); - col.column = col.type->createColumn(); - - sample.insert(std::move(col)); - } - } -} - - -void Aggregator::setSampleBlock(const Block & block) -{ - std::lock_guard lock(mutex); - - if (!sample) - sample = block.cloneEmpty(); + method = chooseAggregationMethod(); } @@ -377,102 +353,70 @@ void Aggregator::compileIfPossible(AggregatedDataVariants::Type type) } -AggregatedDataVariants::Type Aggregator::chooseAggregationMethod(const ColumnRawPtrs & key_columns, Sizes & key_sizes) const +AggregatedDataVariants::Type Aggregator::chooseAggregationMethod() { + /// If no keys. All aggregating to single row. + if (params.keys_size == 0) + return AggregatedDataVariants::Type::without_key; + /// Check if at least one of the specified keys is nullable. - /// Create a set of nested key columns from the corresponding key columns. - /// Here "nested" means that, if a key column is nullable, we take its nested - /// column; otherwise we take the key column as is. - ColumnRawPtrs nested_key_columns; - nested_key_columns.reserve(key_columns.size()); + DataTypes types_removed_nullable; + types_removed_nullable.reserve(params.keys.size()); bool has_nullable_key = false; - for (const auto & col : key_columns) + for (const auto & pos : params.keys) { - if (col->isColumnNullable()) + const auto & type = (params.src_header ? params.src_header : params.intermediate_header).safeGetByPosition(pos).type; + + if (type->isNullable()) { - const ColumnNullable & nullable_col = static_cast(*col); - nested_key_columns.push_back(&nullable_col.getNestedColumn()); has_nullable_key = true; + types_removed_nullable.push_back(removeNullable(type)); } else - nested_key_columns.push_back(col); + types_removed_nullable.push_back(type); } /** Returns ordinary (not two-level) methods, because we start from them. * Later, during aggregation process, data may be converted (partitioned) to two-level structure, if cardinality is high. */ - bool all_fixed = true; size_t keys_bytes = 0; - size_t num_array_keys = 0; - bool has_arrays_of_non_fixed_elems = false; - bool all_non_array_keys_are_fixed = true; - bool has_tuples = false; - bool has_arrays_of_nullable = false; + size_t num_contiguous_keys = 0; + size_t num_fixed_contiguous_keys = 0; + size_t num_string_keys = 0; key_sizes.resize(params.keys_size); for (size_t j = 0; j < params.keys_size; ++j) { - if (nested_key_columns[j]->isFixedAndContiguous()) + if (types_removed_nullable[j]->isValueUnambiguouslyRepresentedInContiguousMemoryRegion()) { - key_sizes[j] = nested_key_columns[j]->sizeOfValueIfFixed(); - keys_bytes += key_sizes[j]; - } - else - { - all_fixed = false; + ++num_contiguous_keys; - if (const ColumnArray * arr = typeid_cast(nested_key_columns[j])) + if (types_removed_nullable[j]->isValueUnambiguouslyRepresentedInFixedSizeContiguousMemoryRegion()) { - ++num_array_keys; - - if (arr->getData().isColumnNullable()) - has_arrays_of_nullable = true; - - if (!arr->getData().isFixedAndContiguous()) - has_arrays_of_non_fixed_elems = true; + ++num_fixed_contiguous_keys; + key_sizes[j] = types_removed_nullable[j]->getSizeOfValueInMemory(); + keys_bytes += key_sizes[j]; } - else - { - all_non_array_keys_are_fixed = false; - if (typeid_cast(nested_key_columns[j])) - has_tuples = true; + if (types_removed_nullable[j]->isString()) + { + ++num_string_keys; } } } - /// If no keys. All aggregating to single row. - if (params.keys_size == 0) - return AggregatedDataVariants::Type::without_key; - - if (has_nullable_key || has_arrays_of_nullable) + if (has_nullable_key) { - /// At least one key is nullable. Therefore we choose an aggregation method - /// that takes into account this fact. - if ((params.keys_size == 1) && (nested_key_columns[0]->isNumeric())) - { - /// We have exactly one key and it is nullable. We shall add it a tag - /// which specifies whether its value is null or not. - size_t size_of_field = nested_key_columns[0]->sizeOfValueIfFixed(); - if ((size_of_field == 1) || (size_of_field == 2) || (size_of_field == 4) || (size_of_field == 8) || (size_of_field == 16)) - return AggregatedDataVariants::Type::nullable_keys128; - else - throw Exception{"Logical error: numeric column has sizeOfField not in 1, 2, 4, 8, 16.", - ErrorCodes::LOGICAL_ERROR}; - } - - if (all_fixed) + if (params.keys_size == num_fixed_contiguous_keys) { /// Pack if possible all the keys along with information about which key values are nulls /// into a fixed 16- or 32-byte blob. - if (keys_bytes > (std::numeric_limits::max() - std::tuple_size>::value)) - throw Exception{"Aggregator: keys sizes overflow", ErrorCodes::LOGICAL_ERROR}; - if ((std::tuple_size>::value + keys_bytes) <= 16) + if (std::tuple_size>::value + keys_bytes <= 16) return AggregatedDataVariants::Type::nullable_keys128; - if ((std::tuple_size>::value + keys_bytes) <= 32) + if (std::tuple_size>::value + keys_bytes <= 32) return AggregatedDataVariants::Type::nullable_keys256; } @@ -483,9 +427,9 @@ AggregatedDataVariants::Type Aggregator::chooseAggregationMethod(const ColumnRaw /// No key has been found to be nullable. /// Single numeric key. - if ((params.keys_size == 1) && nested_key_columns[0]->isNumeric()) + if (params.keys_size == 1 && types_removed_nullable[0]->isValueRepresentedByNumber()) { - size_t size_of_field = nested_key_columns[0]->sizeOfValueIfFixed(); + size_t size_of_field = types_removed_nullable[0]->getSizeOfValueInMemory(); if (size_of_field == 1) return AggregatedDataVariants::Type::key8; if (size_of_field == 2) @@ -500,23 +444,24 @@ AggregatedDataVariants::Type Aggregator::chooseAggregationMethod(const ColumnRaw } /// If all keys fits in N bits, will use hash table with all keys packed (placed contiguously) to single N-bit key. - if (all_fixed && keys_bytes <= 16) - return AggregatedDataVariants::Type::keys128; - if (all_fixed && keys_bytes <= 32) - return AggregatedDataVariants::Type::keys256; + if (params.keys_size == num_fixed_contiguous_keys) + { + if (keys_bytes <= 16) + return AggregatedDataVariants::Type::keys128; + if (keys_bytes <= 32) + return AggregatedDataVariants::Type::keys256; + } /// If single string key - will use hash table with references to it. Strings itself are stored separately in Arena. - if (params.keys_size == 1 && typeid_cast(nested_key_columns[0])) + if (params.keys_size == 1 && types_removed_nullable[0]->isString()) return AggregatedDataVariants::Type::key_string; - if (params.keys_size == 1 && typeid_cast(nested_key_columns[0])) + if (params.keys_size == 1 && types_removed_nullable[0]->isFixedString()) return AggregatedDataVariants::Type::key_fixed_string; - /** If some keys are arrays. - * If there is no more than one key that is array, and it is array of fixed-size elements, and all other keys are fixed-size, - * then it is possible to use 'concat' method (due to one-to-one correspondense). Otherwise the method will be 'serialized'. + /** If it is possible to use 'concat' method due to one-to-one correspondense. Otherwise the method will be 'serialized'. */ - if (num_array_keys == 1 && !has_arrays_of_non_fixed_elems && all_non_array_keys_are_fixed) + if (params.keys_size == num_contiguous_keys && num_fixed_contiguous_keys + 1 >= num_contiguous_keys) return AggregatedDataVariants::Type::concat; /** For case with multiple strings, we use 'concat' method despite the fact, that correspondense is not one-to-one. @@ -524,11 +469,8 @@ AggregatedDataVariants::Type Aggregator::chooseAggregationMethod(const ColumnRaw * But if strings contains zero bytes in between, different keys may clash. * For example, keys ('a\0b', 'c') and ('a', 'b\0c') will be aggregated as one key. * This is documented behaviour. It may be avoided by just switching to 'serialized' method, which is less efficient. - * - * Some of aggregation keys may be tuples. In most cases, tuples are flattened in expression analyzer and not passed here. - * But in rare cases, they are not flattened. Will fallback to 'serialized' method for simplicity. */ - if (num_array_keys == 0 && !has_tuples) + if (params.keys_size == num_fixed_contiguous_keys + num_string_keys) return AggregatedDataVariants::Type::concat; return AggregatedDataVariants::Type::serialized; @@ -706,13 +648,10 @@ void NO_INLINE Aggregator::executeWithoutKeyImpl( } -bool Aggregator::executeOnBlock(Block & block, AggregatedDataVariants & result, - ColumnRawPtrs & key_columns, AggregateColumns & aggregate_columns, - Sizes & key_sizes, StringRefs & key, +bool Aggregator::executeOnBlock(const Block & block, AggregatedDataVariants & result, + ColumnRawPtrs & key_columns, AggregateColumns & aggregate_columns, StringRefs & key, bool & no_more_keys) { - initialize(block); - if (isCancelled()) return true; @@ -769,7 +708,7 @@ bool Aggregator::executeOnBlock(Block & block, AggregatedDataVariants & result, /// How to perform the aggregation? if (result.empty()) { - result.init(chooseAggregationMethod(key_columns, key_sizes)); + result.init(method); result.keys_size = params.keys_size; result.key_sizes = key_sizes; LOG_TRACE(log, "Aggregation method: " << result.getMethodName()); @@ -1056,7 +995,6 @@ void Aggregator::execute(const BlockInputStreamPtr & stream, AggregatedDataVaria StringRefs key(params.keys_size); ColumnRawPtrs key_columns(params.keys_size); AggregateColumns aggregate_columns(params.aggregates_size); - Sizes key_sizes; /** Used if there is a limit on the maximum number of rows in the aggregation, * and if group_by_overflow_mode == ANY. @@ -1081,14 +1019,17 @@ void Aggregator::execute(const BlockInputStreamPtr & stream, AggregatedDataVaria src_rows += block.rows(); src_bytes += block.bytes(); - if (!executeOnBlock(block, result, - key_columns, aggregate_columns, key_sizes, key, - no_more_keys)) + if (!executeOnBlock(block, result, key_columns, aggregate_columns, key, no_more_keys)) break; } + /// If there was no data, and we aggregate without keys, and we must return single row with the result of empty aggregation. + /// To do this, we pass a block with zero rows to aggregate. + if (result.empty() && params.keys_size == 0 && !params.empty_result_for_aggregation_by_empty_set) + executeOnBlock(stream->getHeader(), result, key_columns, aggregate_columns, key, no_more_keys); + double elapsed_seconds = watch.elapsedSeconds(); - size_t rows = result.size(); + size_t rows = result.sizeWithoutOverflowRow(); LOG_TRACE(log, std::fixed << std::setprecision(3) << "Aggregated. " << src_rows << " to " << rows << " rows (from " << src_bytes / 1048576.0 << " MiB)" << " in " << elapsed_seconds << " sec." @@ -1174,9 +1115,11 @@ Block Aggregator::prepareBlockAndFill( MutableColumns final_aggregate_columns(params.aggregates_size); AggregateColumnsData aggregate_columns_data(params.aggregates_size); + Block header = getHeader(final); + for (size_t i = 0; i < params.keys_size; ++i) { - key_columns[i] = sample.safeGetByPosition(i).column->cloneEmpty(); + key_columns[i] = header.safeGetByPosition(i).type->createColumn(); key_columns[i]->reserve(rows); } @@ -1184,7 +1127,7 @@ Block Aggregator::prepareBlockAndFill( { if (!final) { - aggregate_columns[i] = sample.safeGetByPosition(i + params.keys_size).column->cloneEmpty(); + aggregate_columns[i] = header.safeGetByPosition(i + params.keys_size).type->createColumn(); /// The ColumnAggregateFunction column captures the shared ownership of the arena with the aggregate function states. ColumnAggregateFunction & column_aggregate_func = static_cast(*aggregate_columns[i]); @@ -1213,7 +1156,7 @@ Block Aggregator::prepareBlockAndFill( filler(key_columns, aggregate_columns_data, final_aggregate_columns, data_variants.key_sizes, final); - Block res = sample.cloneEmpty(); + Block res = header.cloneEmpty(); for (size_t i = 0; i < params.keys_size; ++i) res.getByPosition(i).column = std::move(key_columns[i]); @@ -1221,18 +1164,13 @@ Block Aggregator::prepareBlockAndFill( for (size_t i = 0; i < params.aggregates_size; ++i) { if (final) - { - res.getByPosition(i + params.keys_size).type = aggregate_functions[i]->getReturnType(); res.getByPosition(i + params.keys_size).column = std::move(final_aggregate_columns[i]); - } else - { res.getByPosition(i + params.keys_size).column = std::move(aggregate_columns[i]); - } } /// Change the size of the columns-constants in the block. - size_t columns = sample.columns(); + size_t columns = header.columns(); for (size_t i = 0; i < columns; ++i) if (res.getByPosition(i).column->isColumnConst()) res.getByPosition(i).column = res.getByPosition(i).column->cut(0, rows); @@ -1653,12 +1591,7 @@ public: String getName() const override { return "MergingAndConverting"; } - String getID() const override - { - std::stringstream res; - res << this; - return res.str(); - } + Block getHeader() const override { return aggregator.getHeader(final); } ~MergingAndConvertingBlockInputStream() { @@ -1846,7 +1779,7 @@ std::unique_ptr Aggregator::mergeAndConvertToBlocks( non_empty_data.push_back(data); if (non_empty_data.empty()) - return std::make_unique(); + return std::make_unique(getHeader(final)); if (non_empty_data.size() > 1) { @@ -2023,14 +1956,6 @@ void NO_INLINE Aggregator::mergeWithoutKeyStreamsImpl( void Aggregator::mergeStream(const BlockInputStreamPtr & stream, AggregatedDataVariants & result, size_t max_threads) { - if (isCancelled()) - return; - - StringRefs key(params.keys_size); - ColumnRawPtrs key_columns(params.keys_size); - - initialize({}); - if (isCancelled()) return; @@ -2062,15 +1987,6 @@ void Aggregator::mergeStream(const BlockInputStreamPtr & stream, AggregatedDataV if (bucket_to_blocks.empty()) return; - setSampleBlock(bucket_to_blocks.begin()->second.front()); - - /// How to perform the aggregation? - for (size_t i = 0; i < params.keys_size; ++i) - key_columns[i] = sample.safeGetByPosition(i).column.get(); - - Sizes key_sizes; - AggregatedDataVariants::Type method = chooseAggregationMethod(key_columns, key_sizes); - /** `minus one` means the absence of information about the bucket * - in the case of single-level aggregation, as well as for blocks with "overflowing" values. * If there is at least one block with a bucket number greater than zero, then there was a two-level aggregation. @@ -2111,7 +2027,7 @@ void Aggregator::mergeStream(const BlockInputStreamPtr & stream, AggregatedDataV LOG_TRACE(log, "Merging partially aggregated two-level data."); - auto merge_bucket = [&bucket_to_blocks, &result, &key_sizes, this](Int32 bucket, Arena * aggregates_pool, MemoryTracker * memory_tracker) + auto merge_bucket = [&bucket_to_blocks, &result, this](Int32 bucket, Arena * aggregates_pool, MemoryTracker * memory_tracker) { current_memory_tracker = memory_tracker; @@ -2122,7 +2038,7 @@ void Aggregator::mergeStream(const BlockInputStreamPtr & stream, AggregatedDataV #define M(NAME) \ else if (result.type == AggregatedDataVariants::Type::NAME) \ - mergeStreamsImpl(block, key_sizes, aggregates_pool, *result.NAME, result.NAME->data.impls[bucket], nullptr, false); + mergeStreamsImpl(block, result.key_sizes, aggregates_pool, *result.NAME, result.NAME->data.impls[bucket], nullptr, false); if (false) {} APPLY_FOR_VARIANTS_TWO_LEVEL(M) @@ -2190,7 +2106,7 @@ void Aggregator::mergeStream(const BlockInputStreamPtr & stream, AggregatedDataV #define M(NAME, IS_TWO_LEVEL) \ else if (result.type == AggregatedDataVariants::Type::NAME) \ - mergeStreamsImpl(block, key_sizes, result.aggregates_pool, *result.NAME, result.NAME->data, result.without_key, no_more_keys); + mergeStreamsImpl(block, result.key_sizes, result.aggregates_pool, *result.NAME, result.NAME->data, result.without_key, no_more_keys); APPLY_FOR_AGGREGATED_VARIANTS(M) #undef M @@ -2214,32 +2130,19 @@ Block Aggregator::mergeBlocks(BlocksList & blocks, bool final) LOG_TRACE(log, "Merging partially aggregated blocks (bucket = " << bucket_num << ")."); Stopwatch watch; - StringRefs key(params.keys_size); - ColumnRawPtrs key_columns(params.keys_size); - - initialize({}); - setSampleBlock(blocks.front()); - - /// How to perform the aggregation? - for (size_t i = 0; i < params.keys_size; ++i) - key_columns[i] = sample.safeGetByPosition(i).column.get(); - - Sizes key_sizes; - AggregatedDataVariants::Type method = chooseAggregationMethod(key_columns, key_sizes); - /** If possible, change 'method' to some_hash64. Otherwise, leave as is. * Better hash function is needed because during external aggregation, * we may merge partitions of data with total number of keys far greater than 4 billion. */ #define APPLY_FOR_VARIANTS_THAT_MAY_USE_BETTER_HASH_FUNCTION(M) \ - M(key64) \ - M(key_string) \ + M(key64) \ + M(key_string) \ M(key_fixed_string) \ - M(keys128) \ - M(keys256) \ - M(concat) \ - M(serialized) \ + M(keys128) \ + M(keys256) \ + M(concat) \ + M(serialized) \ #define M(NAME) \ if (method == AggregatedDataVariants::Type::NAME) \ @@ -2377,20 +2280,16 @@ std::vector Aggregator::convertBlockToTwoLevel(const Block & block) if (!block) return {}; - initialize({}); - setSampleBlock(block); - AggregatedDataVariants data; StringRefs key(params.keys_size); ColumnRawPtrs key_columns(params.keys_size); - Sizes key_sizes; /// Remember the columns we will work with for (size_t i = 0; i < params.keys_size; ++i) key_columns[i] = block.safeGetByPosition(i).column.get(); - AggregatedDataVariants::Type type = chooseAggregationMethod(key_columns, key_sizes); + AggregatedDataVariants::Type type = method; data.keys_size = params.keys_size; data.key_sizes = key_sizes; @@ -2496,30 +2395,6 @@ void Aggregator::destroyAllAggregateStates(AggregatedDataVariants & result) } -String Aggregator::getID() const -{ - std::stringstream res; - - if (params.keys.empty()) - { - res << "key_names"; - for (size_t i = 0; i < params.key_names.size(); ++i) - res << ", " << params.key_names[i]; - } - else - { - res << "keys"; - for (size_t i = 0; i < params.keys.size(); ++i) - res << ", " << params.keys[i]; - } - - res << ", aggregates"; - for (size_t i = 0; i < params.aggregates_size; ++i) - res << ", " << params.aggregates[i].column_name; - - return res.str(); -} - void Aggregator::setCancellationHook(const CancellationHook cancellation_hook) { isCancelled = cancellation_hook; diff --git a/dbms/src/Interpreters/Aggregator.h b/dbms/src/Interpreters/Aggregator.h index 02ef7f6835b..a498acf4c74 100644 --- a/dbms/src/Interpreters/Aggregator.h +++ b/dbms/src/Interpreters/Aggregator.h @@ -812,8 +812,8 @@ struct AggregatedDataVariants : private boost::noncopyable { switch (type_) { - case Type::EMPTY: break; - case Type::without_key: break; + case Type::EMPTY: break; + case Type::without_key: break; #define M(NAME, IS_TWO_LEVEL) \ case Type::NAME: NAME = std::make_unique(); break; @@ -832,8 +832,8 @@ struct AggregatedDataVariants : private boost::noncopyable { switch (type) { - case Type::EMPTY: return 0; - case Type::without_key: return 1; + case Type::EMPTY: return 0; + case Type::without_key: return 1; #define M(NAME, IS_TWO_LEVEL) \ case Type::NAME: return NAME->data.size() + (without_key != nullptr); @@ -850,8 +850,8 @@ struct AggregatedDataVariants : private boost::noncopyable { switch (type) { - case Type::EMPTY: return 0; - case Type::without_key: return 1; + case Type::EMPTY: return 0; + case Type::without_key: return 1; #define M(NAME, IS_TWO_LEVEL) \ case Type::NAME: return NAME->data.size(); @@ -867,8 +867,8 @@ struct AggregatedDataVariants : private boost::noncopyable { switch (type) { - case Type::EMPTY: return "EMPTY"; - case Type::without_key: return "without_key"; + case Type::EMPTY: return "EMPTY"; + case Type::without_key: return "without_key"; #define M(NAME, IS_TWO_LEVEL) \ case Type::NAME: return #NAME; @@ -884,8 +884,8 @@ struct AggregatedDataVariants : private boost::noncopyable { switch (type) { - case Type::EMPTY: return false; - case Type::without_key: return false; + case Type::EMPTY: return false; + case Type::without_key: return false; #define M(NAME, IS_TWO_LEVEL) \ case Type::NAME: return IS_TWO_LEVEL; @@ -900,25 +900,25 @@ struct AggregatedDataVariants : private boost::noncopyable #define APPLY_FOR_VARIANTS_CONVERTIBLE_TO_TWO_LEVEL(M) \ M(key32) \ M(key64) \ - M(key_string) \ - M(key_fixed_string) \ - M(keys128) \ - M(keys256) \ - M(hashed) \ - M(concat) \ - M(serialized) \ - M(nullable_keys128) \ - M(nullable_keys256) \ + M(key_string) \ + M(key_fixed_string) \ + M(keys128) \ + M(keys256) \ + M(hashed) \ + M(concat) \ + M(serialized) \ + M(nullable_keys128) \ + M(nullable_keys256) \ #define APPLY_FOR_VARIANTS_NOT_CONVERTIBLE_TO_TWO_LEVEL(M) \ - M(key8) \ + M(key8) \ M(key16) \ M(key64_hash64) \ - M(key_string_hash64) \ + M(key_string_hash64)\ M(key_fixed_string_hash64) \ - M(keys128_hash64) \ - M(keys256_hash64) \ - M(concat_hash64) \ + M(keys128_hash64) \ + M(keys256_hash64) \ + M(concat_hash64) \ M(serialized_hash64) \ #define APPLY_FOR_VARIANTS_SINGLE_LEVEL(M) \ @@ -943,16 +943,16 @@ struct AggregatedDataVariants : private boost::noncopyable void convertToTwoLevel(); #define APPLY_FOR_VARIANTS_TWO_LEVEL(M) \ - M(key32_two_level) \ - M(key64_two_level) \ - M(key_string_two_level) \ - M(key_fixed_string_two_level) \ - M(keys128_two_level) \ - M(keys256_two_level) \ - M(hashed_two_level) \ - M(concat_two_level) \ - M(serialized_two_level) \ - M(nullable_keys128_two_level) \ + M(key32_two_level) \ + M(key64_two_level) \ + M(key_string_two_level) \ + M(key_fixed_string_two_level) \ + M(keys128_two_level) \ + M(keys256_two_level) \ + M(hashed_two_level) \ + M(concat_two_level) \ + M(serialized_two_level) \ + M(nullable_keys128_two_level) \ M(nullable_keys256_two_level) }; @@ -979,9 +979,13 @@ class Aggregator public: struct Params { + /// Data structure of source blocks. + Block src_header; + /// Data structure of intermediate blocks before merge. + Block intermediate_header; + /// What to count. - Names key_names; - ColumnNumbers keys; /// The column numbers are computed later. + ColumnNumbers keys; AggregateDescriptions aggregates; size_t keys_size; size_t aggregates_size; @@ -1005,38 +1009,45 @@ public: /// Settings to flush temporary data to the filesystem (external aggregation). const size_t max_bytes_before_external_group_by; /// 0 - do not use external aggregation. + + /// Return empty result when aggregating without keys on empty set. + bool empty_result_for_aggregation_by_empty_set; + const std::string tmp_path; Params( - const Names & key_names_, const AggregateDescriptions & aggregates_, + const Block & src_header_, + const ColumnNumbers & keys_, const AggregateDescriptions & aggregates_, bool overflow_row_, size_t max_rows_to_group_by_, OverflowMode group_by_overflow_mode_, Compiler * compiler_, UInt32 min_count_to_compile_, size_t group_by_two_level_threshold_, size_t group_by_two_level_threshold_bytes_, - size_t max_bytes_before_external_group_by_, const std::string & tmp_path_) - : key_names(key_names_), aggregates(aggregates_), aggregates_size(aggregates.size()), + size_t max_bytes_before_external_group_by_, + bool empty_result_for_aggregation_by_empty_set_, + const std::string & tmp_path_) + : src_header(src_header_), + keys(keys_), aggregates(aggregates_), keys_size(keys.size()), aggregates_size(aggregates.size()), overflow_row(overflow_row_), max_rows_to_group_by(max_rows_to_group_by_), group_by_overflow_mode(group_by_overflow_mode_), compiler(compiler_), min_count_to_compile(min_count_to_compile_), group_by_two_level_threshold(group_by_two_level_threshold_), group_by_two_level_threshold_bytes(group_by_two_level_threshold_bytes_), - max_bytes_before_external_group_by(max_bytes_before_external_group_by_), tmp_path(tmp_path_) + max_bytes_before_external_group_by(max_bytes_before_external_group_by_), + empty_result_for_aggregation_by_empty_set(empty_result_for_aggregation_by_empty_set_), + tmp_path(tmp_path_) { - std::sort(key_names.begin(), key_names.end()); - key_names.erase(std::unique(key_names.begin(), key_names.end()), key_names.end()); - keys_size = key_names.size(); } /// Only parameters that matter during merge. - Params(const Names & key_names_, const AggregateDescriptions & aggregates_, bool overflow_row_) - : Params(key_names_, aggregates_, overflow_row_, 0, OverflowMode::THROW, nullptr, 0, 0, 0, 0, "") {} + Params(const Block & intermediate_header_, + const ColumnNumbers & keys_, const AggregateDescriptions & aggregates_, bool overflow_row_) + : Params(Block(), keys_, aggregates_, overflow_row_, 0, OverflowMode::THROW, nullptr, 0, 0, 0, 0, false, "") + { + intermediate_header = intermediate_header_; + } - /// Compute the column numbers in `keys` and `aggregates`. + /// Calculate the column numbers in `keys` and `aggregates`. void calculateColumnNumbers(const Block & block); }; - Aggregator(const Params & params_) - : params(params_), - isCancelled([]() { return false; }) - { - } + Aggregator(const Params & params_); /// Aggregate the source. Get the result in the form of one of the data structures. void execute(const BlockInputStreamPtr & stream, AggregatedDataVariants & result); @@ -1047,9 +1058,9 @@ public: using AggregateFunctionsPlainPtrs = std::vector; /// Process one block. Return false if the processing should be aborted (with group_by_overflow_mode = 'break'). - bool executeOnBlock(Block & block, AggregatedDataVariants & result, + bool executeOnBlock(const Block & block, AggregatedDataVariants & result, ColumnRawPtrs & key_columns, AggregateColumns & aggregate_columns, /// Passed to not create them anew for each block - Sizes & key_sizes, StringRefs & keys, /// - pass the corresponding objects that are initially empty. + StringRefs & keys, /// - pass the corresponding objects that are initially empty. bool & no_more_keys); /** Convert the aggregation data structure into a block. @@ -1087,9 +1098,6 @@ public: */ void setCancellationHook(const CancellationHook cancellation_hook); - /// For IBlockInputStream. - String getID() const; - /// For external aggregation. void writeToTemporaryFile(AggregatedDataVariants & data_variants); @@ -1111,12 +1119,18 @@ public: const TemporaryFiles & getTemporaryFiles() const { return temporary_files; } + /// Get data structure of the result. + Block getHeader(bool final) const; + protected: friend struct AggregatedDataVariants; friend class MergingAndConvertingBlockInputStream; Params params; + AggregatedDataVariants::Type method; + Sizes key_sizes; + AggregateFunctionsPlainPtrs aggregate_functions; /** This array serves two purposes. @@ -1145,12 +1159,8 @@ protected: /// How many RAM were used to process the query before processing the first block. Int64 memory_usage_before_aggregation = 0; - /// To initialize from the first block when used concurrently. - bool initialized = false; std::mutex mutex; - Block sample; - Logger * log = &Logger::get("Aggregator"); /** Dynamically compiled library for aggregation, if any. @@ -1179,18 +1189,8 @@ protected: /// For external aggregation. TemporaryFiles temporary_files; - /** If only the column names (key_names, and also aggregates[i].column_name) are specified, then calculate the column numbers. - * Generate block - sample of the result. It is used in the convertToBlocks, mergeAndConvertToBlocks methods. - */ - void initialize(const Block & block); - - /** Set the block - sample of the result, - * only if it has not already been set. - */ - void setSampleBlock(const Block & block); - /** Select the aggregation method based on the number and types of keys. */ - AggregatedDataVariants::Type chooseAggregationMethod(const ColumnRawPtrs & key_columns, Sizes & key_sizes) const; + AggregatedDataVariants::Type chooseAggregationMethod(); /** Create states of aggregate functions for one key. */ diff --git a/dbms/src/Interpreters/ClusterProxy/DescribeStreamFactory.cpp b/dbms/src/Interpreters/ClusterProxy/DescribeStreamFactory.cpp index 570e655263b..a61e14763f7 100644 --- a/dbms/src/Interpreters/ClusterProxy/DescribeStreamFactory.cpp +++ b/dbms/src/Interpreters/ClusterProxy/DescribeStreamFactory.cpp @@ -4,6 +4,7 @@ #include #include + namespace DB { @@ -46,7 +47,7 @@ void DescribeStreamFactory::createForShard( } auto remote_stream = std::make_shared( - shard_info.pool, query, context, nullptr, throttler); + shard_info.pool, query, InterpreterDescribeQuery::getSampleBlock(), context, nullptr, throttler); remote_stream->setPoolMode(PoolMode::GET_ALL); remote_stream->appendExtraInfo(); res.emplace_back(std::move(remote_stream)); diff --git a/dbms/src/Interpreters/ClusterProxy/SelectStreamFactory.cpp b/dbms/src/Interpreters/ClusterProxy/SelectStreamFactory.cpp index 7ba39c1eae5..43ef98dfb26 100644 --- a/dbms/src/Interpreters/ClusterProxy/SelectStreamFactory.cpp +++ b/dbms/src/Interpreters/ClusterProxy/SelectStreamFactory.cpp @@ -28,12 +28,14 @@ namespace ClusterProxy { SelectStreamFactory::SelectStreamFactory( - QueryProcessingStage::Enum processed_stage_, - QualifiedTableName main_table_, - const Tables & external_tables_) - : processed_stage{processed_stage_} - , main_table(std::move(main_table_)) - , external_tables{external_tables_} + const Block & header, + QueryProcessingStage::Enum processed_stage_, + QualifiedTableName main_table_, + const Tables & external_tables_) + : header(header), + processed_stage{processed_stage_}, + main_table(std::move(main_table_)), + external_tables{external_tables_} { } @@ -55,10 +57,10 @@ BlockInputStreamPtr createLocalStream(const ASTPtr & query_ast, const Context & } void SelectStreamFactory::createForShard( - const Cluster::ShardInfo & shard_info, - const String & query, const ASTPtr & query_ast, - const Context & context, const ThrottlerPtr & throttler, - BlockInputStreams & res) + const Cluster::ShardInfo & shard_info, + const String & query, const ASTPtr & query_ast, + const Context & context, const ThrottlerPtr & throttler, + BlockInputStreams & res) { auto emplace_local_stream = [&]() { @@ -67,7 +69,7 @@ void SelectStreamFactory::createForShard( auto emplace_remote_stream = [&]() { - auto stream = std::make_shared(shard_info.pool, query, context, nullptr, throttler, external_tables, processed_stage); + auto stream = std::make_shared(shard_info.pool, query, header, context, nullptr, throttler, external_tables, processed_stage); stream->setPoolMode(PoolMode::GET_MANY); stream->setMainTable(main_table); res.emplace_back(std::move(stream)); @@ -157,7 +159,7 @@ void SelectStreamFactory::createForShard( auto lazily_create_stream = [ pool = shard_info.pool, shard_num = shard_info.shard_num, query, query_ast, context, throttler, main_table = main_table, external_tables = external_tables, stage = processed_stage, - local_delay]() + local_delay, this]() -> BlockInputStreamPtr { std::vector try_results; @@ -192,11 +194,11 @@ void SelectStreamFactory::createForShard( connections.emplace_back(std::move(try_result.entry)); return std::make_shared( - std::move(connections), query, context, nullptr, throttler, external_tables, stage); + std::move(connections), query, header, context, nullptr, throttler, external_tables, stage); } }; - res.emplace_back(std::make_shared("LazyShardWithLocalReplica", lazily_create_stream)); + res.emplace_back(std::make_shared("LazyShardWithLocalReplica", header, lazily_create_stream)); } else emplace_remote_stream(); diff --git a/dbms/src/Interpreters/ClusterProxy/SelectStreamFactory.h b/dbms/src/Interpreters/ClusterProxy/SelectStreamFactory.h index f683a3306f7..53066a946e9 100644 --- a/dbms/src/Interpreters/ClusterProxy/SelectStreamFactory.h +++ b/dbms/src/Interpreters/ClusterProxy/SelectStreamFactory.h @@ -14,6 +14,7 @@ class SelectStreamFactory final : public IStreamFactory { public: SelectStreamFactory( + const Block & header, QueryProcessingStage::Enum processed_stage, QualifiedTableName main_table, const Tables & external_tables); @@ -25,6 +26,7 @@ public: BlockInputStreams & res) override; private: + const Block header; QueryProcessingStage::Enum processed_stage; QualifiedTableName main_table; const Tables & external_tables; diff --git a/dbms/src/Interpreters/DDLWorker.cpp b/dbms/src/Interpreters/DDLWorker.cpp index f01bd8424e6..c6bcb23989b 100644 --- a/dbms/src/Interpreters/DDLWorker.cpp +++ b/dbms/src/Interpreters/DDLWorker.cpp @@ -940,7 +940,7 @@ class DDLQueryStatusInputSream : public IProfilingBlockInputStream public: DDLQueryStatusInputSream(const String & zk_node_path, const DDLLogEntry & entry, const Context & context) - : node_path(zk_node_path), context(context), watch(CLOCK_MONOTONIC_COARSE), log(&Logger::get("DDLQueryStatusInputSream")) + : node_path(zk_node_path), context(context), watch(CLOCK_MONOTONIC_COARSE), log(&Logger::get("DDLQueryStatusInputSream")) { sample = Block{ {std::make_shared(), "host"}, @@ -964,10 +964,7 @@ public: return "DDLQueryStatusInputSream"; } - String getID() const override - { - return "DDLQueryStatusInputSream(" + node_path + ")"; - } + Block getHeader() const override { return sample; }; Block readImpl() override { @@ -1138,7 +1135,6 @@ BlockIO executeDDLQueryOnCluster(const ASTPtr & query_ptr_, const Context & cont return io; auto stream = std::make_shared(node_path, entry, context); - io.in_sample = stream->getSampleBlock(); io.in = std::move(stream); return io; } diff --git a/dbms/src/Interpreters/ExpressionActions.cpp b/dbms/src/Interpreters/ExpressionActions.cpp index 490ab509c00..1f8a5bb8f0d 100644 --- a/dbms/src/Interpreters/ExpressionActions.cpp +++ b/dbms/src/Interpreters/ExpressionActions.cpp @@ -910,45 +910,6 @@ void ExpressionActions::finalize(const Names & output_columns) } -std::string ExpressionActions::getID() const -{ - std::stringstream ss; - - for (size_t i = 0; i < actions.size(); ++i) - { - if (i) - ss << ", "; - if (actions[i].type == ExpressionAction::APPLY_FUNCTION) - ss << actions[i].result_name; - if (actions[i].type == ExpressionAction::ARRAY_JOIN) - { - ss << (actions[i].array_join_is_left ? "LEFT ARRAY JOIN" : "ARRAY JOIN") << "{"; - for (NameSet::const_iterator it = actions[i].array_joined_columns.begin(); - it != actions[i].array_joined_columns.end(); ++it) - { - if (it != actions[i].array_joined_columns.begin()) - ss << ", "; - ss << *it; - } - ss << "}"; - } - - /// TODO JOIN - } - - ss << ": {"; - NamesAndTypesList output_columns = sample_block.getNamesAndTypesList(); - for (NamesAndTypesList::const_iterator it = output_columns.begin(); it != output_columns.end(); ++it) - { - if (it != output_columns.begin()) - ss << ", "; - ss << it->name; - } - ss << "}"; - - return ss.str(); -} - std::string ExpressionActions::dumpActions() const { std::stringstream ss; @@ -1064,7 +1025,7 @@ BlockInputStreamPtr ExpressionActions::createStreamWithNonJoinedDataIfFullOrRigh { Block left_sample_block; for (const auto & input_elem : input_columns) - left_sample_block.insert({ nullptr, input_elem.type, input_elem.name }); + left_sample_block.insert(ColumnWithTypeAndName{ input_elem.type, input_elem.name }); return action.join->createStreamWithNonJoinedRows(left_sample_block, max_block_size); } diff --git a/dbms/src/Interpreters/ExpressionActions.h b/dbms/src/Interpreters/ExpressionActions.h index 5e8cc4ac170..59434c741ac 100644 --- a/dbms/src/Interpreters/ExpressionActions.h +++ b/dbms/src/Interpreters/ExpressionActions.h @@ -194,8 +194,6 @@ public: /// Obtain a sample block that contains the names and types of result columns. const Block & getSampleBlock() const { return sample_block; } - std::string getID() const; - std::string dumpActions() const; static std::string getSmallestColumn(const NamesAndTypesList & columns); diff --git a/dbms/src/Interpreters/ExpressionAnalyzer.cpp b/dbms/src/Interpreters/ExpressionAnalyzer.cpp index a519ebb6dbd..259cd8f3503 100644 --- a/dbms/src/Interpreters/ExpressionAnalyzer.cpp +++ b/dbms/src/Interpreters/ExpressionAnalyzer.cpp @@ -883,7 +883,6 @@ void ExpressionAnalyzer::addExternalStorage(ASTPtr & subquery_or_table_name_or_t external_tables[external_table_name] = external_storage; subqueries_for_sets[external_table_name].source = interpreter->execute().in; - subqueries_for_sets[external_table_name].source_sample = interpreter->getSampleBlock(); subqueries_for_sets[external_table_name].table = external_storage; /** NOTE If it was written IN tmp_table - the existing temporary (but not external) table, @@ -1661,8 +1660,7 @@ void ExpressionAnalyzer::makeSet(const ASTFunction * node, const Block & sample_ { auto interpreter = interpretSubquery(arg, context, subquery_depth, {}); subquery_for_set.source = std::make_shared( - [interpreter]() mutable { return interpreter->execute().in; }); - subquery_for_set.source_sample = interpreter->getSampleBlock(); + interpreter->getSampleBlock(), [interpreter]() mutable { return interpreter->execute().in; }); /** Why is LazyBlockInputStream used? * @@ -2486,13 +2484,14 @@ bool ExpressionAnalyzer::appendJoin(ExpressionActionsChain & chain, bool only_ty table = table_to_join.subquery; auto interpreter = interpretSubquery(table, context, subquery_depth, required_joined_columns); - subquery_for_set.source = std::make_shared([interpreter]() mutable { return interpreter->execute().in; }); - subquery_for_set.source_sample = interpreter->getSampleBlock(); + subquery_for_set.source = std::make_shared( + interpreter->getSampleBlock(), + [interpreter]() mutable { return interpreter->execute().in; }); } /// TODO You do not need to set this up when JOIN is only needed on remote servers. subquery_for_set.join = join; - subquery_for_set.join->setSampleBlock(subquery_for_set.source_sample); + subquery_for_set.join->setSampleBlock(subquery_for_set.source->getHeader()); } addJoinAction(step.actions, false); diff --git a/dbms/src/Interpreters/ExpressionAnalyzer.h b/dbms/src/Interpreters/ExpressionAnalyzer.h index b11bd025a2e..ccd60b296cb 100644 --- a/dbms/src/Interpreters/ExpressionAnalyzer.h +++ b/dbms/src/Interpreters/ExpressionAnalyzer.h @@ -41,7 +41,6 @@ struct SubqueryForSet { /// The source is obtained using the InterpreterSelectQuery subquery. BlockInputStreamPtr source; - Block source_sample; /// If set, build it from result. SetPtr set; diff --git a/dbms/src/Interpreters/InterpreterCheckQuery.cpp b/dbms/src/Interpreters/InterpreterCheckQuery.cpp index 722622cc70d..d96344190b5 100644 --- a/dbms/src/Interpreters/InterpreterCheckQuery.cpp +++ b/dbms/src/Interpreters/InterpreterCheckQuery.cpp @@ -244,7 +244,6 @@ BlockIO InterpreterCheckQuery::execute() BlockIO res; res.in = std::make_shared(block); - res.in_sample = getSampleBlock(); return res; } @@ -256,7 +255,6 @@ BlockIO InterpreterCheckQuery::execute() BlockIO res; res.in = std::make_shared(result); - res.in_sample = result.cloneEmpty(); return res; } diff --git a/dbms/src/Interpreters/InterpreterCreateQuery.cpp b/dbms/src/Interpreters/InterpreterCreateQuery.cpp index 853d42c5ccf..aa4bf23fc20 100644 --- a/dbms/src/Interpreters/InterpreterCreateQuery.cpp +++ b/dbms/src/Interpreters/InterpreterCreateQuery.cpp @@ -573,7 +573,6 @@ BlockIO InterpreterCreateQuery::createTable(ASTCreateQuery & create) out = std::make_shared(out, columns.materialized_columns); BlockIO io; - io.in_sample = as_select_sample; io.in = std::make_shared(interpreter_select->execute().in, out); return io; diff --git a/dbms/src/Interpreters/InterpreterDescribeQuery.cpp b/dbms/src/Interpreters/InterpreterDescribeQuery.cpp index af61a20d6f8..a01f4e327e8 100644 --- a/dbms/src/Interpreters/InterpreterDescribeQuery.cpp +++ b/dbms/src/Interpreters/InterpreterDescribeQuery.cpp @@ -24,8 +24,6 @@ BlockIO InterpreterDescribeQuery::execute() { BlockIO res; res.in = executeImpl(); - res.in_sample = getSampleBlock(); - return res; } diff --git a/dbms/src/Interpreters/InterpreterDescribeQuery.h b/dbms/src/Interpreters/InterpreterDescribeQuery.h index 28bf635f34c..fc0bea10f2d 100644 --- a/dbms/src/Interpreters/InterpreterDescribeQuery.h +++ b/dbms/src/Interpreters/InterpreterDescribeQuery.h @@ -21,11 +21,12 @@ public: BlockIO execute() override; + static Block getSampleBlock(); + private: ASTPtr query_ptr; const Context & context; - Block getSampleBlock(); BlockInputStreamPtr executeImpl(); }; diff --git a/dbms/src/Interpreters/InterpreterExistsQuery.cpp b/dbms/src/Interpreters/InterpreterExistsQuery.cpp index 1dac1692a81..08df9fb39ad 100644 --- a/dbms/src/Interpreters/InterpreterExistsQuery.cpp +++ b/dbms/src/Interpreters/InterpreterExistsQuery.cpp @@ -17,15 +17,16 @@ BlockIO InterpreterExistsQuery::execute() { BlockIO res; res.in = executeImpl(); - res.in_sample = getSampleBlock(); - return res; } Block InterpreterExistsQuery::getSampleBlock() { - return {{ std::make_shared(), "result" }}; + return Block{{ + ColumnUInt8::create(), + std::make_shared(), + "result" }}; } diff --git a/dbms/src/Interpreters/InterpreterExistsQuery.h b/dbms/src/Interpreters/InterpreterExistsQuery.h index e8a4d5e45ca..b2050b443d8 100644 --- a/dbms/src/Interpreters/InterpreterExistsQuery.h +++ b/dbms/src/Interpreters/InterpreterExistsQuery.h @@ -21,11 +21,12 @@ public: BlockIO execute() override; + static Block getSampleBlock(); + private: ASTPtr query_ptr; const Context & context; - Block getSampleBlock(); BlockInputStreamPtr executeImpl(); }; diff --git a/dbms/src/Interpreters/InterpreterInsertQuery.cpp b/dbms/src/Interpreters/InterpreterInsertQuery.cpp index 7ae0708fb05..63eea9542b8 100644 --- a/dbms/src/Interpreters/InterpreterInsertQuery.cpp +++ b/dbms/src/Interpreters/InterpreterInsertQuery.cpp @@ -140,11 +140,10 @@ BlockIO InterpreterInsertQuery::execute() else { InterpreterSelectQuery interpreter_select{query.select, context}; - res.in_sample = interpreter_select.getSampleBlock(); res.in = interpreter_select.execute().in; - res.in = std::make_shared(res.in, res.in_sample, res.out_sample); + res.in = std::make_shared(res.in, res.in->getHeader(), res.out_sample); res.in = std::make_shared(context, res.in, res.out_sample); res.in = std::make_shared(res.in, out); } diff --git a/dbms/src/Interpreters/InterpreterKillQueryQuery.cpp b/dbms/src/Interpreters/InterpreterKillQueryQuery.cpp index 20c0ae14354..64805455368 100644 --- a/dbms/src/Interpreters/InterpreterKillQueryQuery.cpp +++ b/dbms/src/Interpreters/InterpreterKillQueryQuery.cpp @@ -105,7 +105,7 @@ public: SyncKillQueryInputStream(ProcessList & process_list_, QueryDescriptors && processes_to_stop_, Block && processes_block_, const Block & res_sample_block_) - : process_list(process_list_), + : process_list(process_list_), processes_to_stop(std::move(processes_to_stop_)), processes_block(std::move(processes_block_)), res_sample_block(res_sample_block_) @@ -118,10 +118,7 @@ public: return "SynchronousQueryKiller"; } - String getID() const override - { - return "SynchronousQueryKiller_" + toString(intptr_t(this)); - } + Block getHeader() const override { return res_sample_block; }; Block readImpl() override { @@ -185,25 +182,25 @@ BlockIO InterpreterKillQueryQuery::execute() ProcessList & process_list = context.getProcessList(); QueryDescriptors queries_to_stop = extractQueriesExceptMeAndCheckAccess(processes_block, context); - res_io.in_sample = processes_block.cloneEmpty(); - res_io.in_sample.insert(0, {ColumnString::create(), std::make_shared(), "kill_status"}); + auto header = processes_block.cloneEmpty(); + header.insert(0, {ColumnString::create(), std::make_shared(), "kill_status"}); if (!query.sync || query.test) { - MutableColumns res_columns = res_io.in_sample.cloneEmptyColumns(); + MutableColumns res_columns = header.cloneEmptyColumns(); for (const auto & query_desc : queries_to_stop) { auto code = (query.test) ? CancellationCode::Unknown : process_list.sendCancelToQuery(query_desc.query_id, query_desc.user); - insertResultRow(query_desc.source_num, code, processes_block, res_io.in_sample, res_columns); + insertResultRow(query_desc.source_num, code, processes_block, header, res_columns); } - res_io.in = std::make_shared(res_io.in_sample.cloneWithColumns(std::move(res_columns))); + res_io.in = std::make_shared(header.cloneWithColumns(std::move(res_columns))); } else { res_io.in = std::make_shared( - process_list, std::move(queries_to_stop), std::move(processes_block), res_io.in_sample); + process_list, std::move(queries_to_stop), std::move(processes_block), header); } return res_io; diff --git a/dbms/src/Interpreters/InterpreterSelectQuery.cpp b/dbms/src/Interpreters/InterpreterSelectQuery.cpp index 5eb0bd798aa..be916e0b7b0 100644 --- a/dbms/src/Interpreters/InterpreterSelectQuery.cpp +++ b/dbms/src/Interpreters/InterpreterSelectQuery.cpp @@ -148,37 +148,48 @@ bool InterpreterSelectQuery::hasAggregation(const ASTSelectQuery & query_ptr) void InterpreterSelectQuery::basicInit(const BlockInputStreamPtr & input) { - auto query_table = query.table(); - - if (query_table && typeid_cast(query_table.get())) + /// Read from prepared input. + if (input) { if (table_column_names.empty()) - { - table_column_names = InterpreterSelectQuery::getSampleBlock(query_table, context).getNamesAndTypesList(); - } + table_column_names = input->getHeader().getNamesAndTypesList(); } else { - if (query_table && typeid_cast(query_table.get())) + auto table_expression = query.table(); + + /// Read from subquery. + if (table_expression && typeid_cast(table_expression.get())) { - /// Get the table function - TableFunctionPtr table_function_ptr = TableFunctionFactory::instance().get(typeid_cast(query_table.get())->name, context); - /// Run it and remember the result - storage = table_function_ptr->execute(query_table, context); + if (table_column_names.empty()) + table_column_names = InterpreterSelectQuery::getSampleBlock(table_expression, context).getNamesAndTypesList(); } else { - String database_name; - String table_name; + /// Read from table function. + if (table_expression && typeid_cast(table_expression.get())) + { + /// Get the table function + TableFunctionPtr table_function_ptr = TableFunctionFactory::instance().get( + typeid_cast(table_expression.get())->name, context); + /// Run it and remember the result + storage = table_function_ptr->execute(table_expression, context); + } + else + { + /// Read from table. + String database_name; + String table_name; - getDatabaseAndTableNames(database_name, table_name); + getDatabaseAndTableNames(database_name, table_name); - storage = context.getTable(database_name, table_name); + storage = context.getTable(database_name, table_name); + } + + table_lock = storage->lockStructure(false, __PRETTY_FUNCTION__); + if (table_column_names.empty()) + table_column_names = storage->getColumnsListNonMaterialized(); } - - table_lock = storage->lockStructure(false, __PRETTY_FUNCTION__); - if (table_column_names.empty()) - table_column_names = storage->getColumnsListNonMaterialized(); } if (table_column_names.empty()) @@ -385,14 +396,6 @@ BlockIO InterpreterSelectQuery::execute() { (void) executeWithoutUnion(); - if (hasNoData()) - { - BlockIO res; - res.in = std::make_shared(); - res.in_sample = getSampleBlock(); - return res; - } - executeUnion(); /// Constraints on the result, the quota on the result, and also callback for progress. @@ -416,8 +419,6 @@ BlockIO InterpreterSelectQuery::execute() BlockIO res; res.in = streams[0]; - res.in_sample = getSampleBlock(); - return res; } @@ -460,7 +461,7 @@ void InterpreterSelectQuery::executeSingleQuery() union_within_single_query = false; - /** Take out the data from Storage. from_stage - to what stage the request was completed in Storage. */ + /** Read the data from Storage. from_stage - to what stage the request was completed in Storage. */ QueryProcessingStage::Enum from_stage = executeFetchColumns(); LOG_TRACE(log, QueryProcessingStage::toString(from_stage) << " -> " << QueryProcessingStage::toString(to_stage)); @@ -553,14 +554,6 @@ void InterpreterSelectQuery::executeSingleQuery() chain.clear(); } - /** If there is no data. - * This check is specially postponed slightly lower than it could be (immediately after executeFetchColumns), - * for the query to be analyzed, and errors (for example, type mismatches) could be found in it. - * Otherwise, the empty result could be returned for the incorrect query. - */ - if (hasNoData()) - return; - /// Before executing WHERE and HAVING, remove the extra columns from the block (mostly the aggregation keys). if (has_where) before_where->prependProjectInput(); @@ -700,10 +693,6 @@ void InterpreterSelectQuery::executeSingleQuery() } } - /** If there is no data. */ - if (hasNoData()) - return; - SubqueriesForSets subqueries_for_sets = query_analyzer->getSubqueriesForSets(); if (!subqueries_for_sets.empty()) executeSubqueriesInSetsAndJoins(subqueries_for_sets); @@ -724,9 +713,6 @@ static void getLimitLengthAndOffset(ASTSelectQuery & query, size_t & length, siz QueryProcessingStage::Enum InterpreterSelectQuery::executeFetchColumns() { - if (!hasNoData()) - return QueryProcessingStage::FetchColumns; - /// The subquery interpreter, if the subquery std::optional interpreter_subquery; @@ -873,7 +859,12 @@ QueryProcessingStage::Enum InterpreterSelectQuery::executeFetchColumns() optimize_prewhere(*merge_tree); } - streams = storage->read(required_columns, query_info, context, from_stage, max_block_size, max_streams); + /// If there was no already prepared input. + if (streams.empty()) + streams = storage->read(required_columns, query_info, context, from_stage, max_block_size, max_streams); + + if (streams.empty()) + streams.emplace_back(std::make_shared(storage->getSampleBlockForColumns(required_columns))); if (alias_actions) { @@ -927,7 +918,7 @@ QueryProcessingStage::Enum InterpreterSelectQuery::executeFetchColumns() } -void InterpreterSelectQuery::executeWhere(ExpressionActionsPtr expression) +void InterpreterSelectQuery::executeWhere(const ExpressionActionsPtr & expression) { transformStreams([&](auto & stream) { @@ -936,7 +927,7 @@ void InterpreterSelectQuery::executeWhere(ExpressionActionsPtr expression) } -void InterpreterSelectQuery::executeAggregation(ExpressionActionsPtr expression, bool overflow_row, bool final) +void InterpreterSelectQuery::executeAggregation(const ExpressionActionsPtr & expression, bool overflow_row, bool final) { transformStreams([&](auto & stream) { @@ -947,6 +938,15 @@ void InterpreterSelectQuery::executeAggregation(ExpressionActionsPtr expression, AggregateDescriptions aggregates; query_analyzer->getAggregateInfo(key_names, aggregates); + Block header = streams[0]->getHeader(); + ColumnNumbers keys; + for (const auto & name : key_names) + keys.push_back(header.getPositionByName(name)); + for (auto & descr : aggregates) + if (descr.arguments.empty()) + for (const auto & name : descr.argument_names) + descr.arguments.push_back(header.getPositionByName(name)); + const Settings & settings = context.getSettingsRef(); /** Two-level aggregation is useful in two cases: @@ -955,12 +955,13 @@ void InterpreterSelectQuery::executeAggregation(ExpressionActionsPtr expression, */ bool allow_to_use_two_level_group_by = streams.size() > 1 || settings.limits.max_bytes_before_external_group_by != 0; - Aggregator::Params params(key_names, aggregates, + Aggregator::Params params(header, keys, aggregates, overflow_row, settings.limits.max_rows_to_group_by, settings.limits.group_by_overflow_mode, settings.compile ? &context.getCompiler() : nullptr, settings.min_count_to_compile, allow_to_use_two_level_group_by ? settings.group_by_two_level_threshold : SettingUInt64(0), allow_to_use_two_level_group_by ? settings.group_by_two_level_threshold_bytes : SettingUInt64(0), - settings.limits.max_bytes_before_external_group_by, context.getTemporaryPath()); + settings.limits.max_bytes_before_external_group_by, settings.empty_result_for_aggregation_by_empty_set, + context.getTemporaryPath()); /// If there are several sources, then we perform parallel aggregation if (streams.size() > 1) @@ -999,6 +1000,12 @@ void InterpreterSelectQuery::executeMergeAggregated(bool overflow_row, bool fina AggregateDescriptions aggregates; query_analyzer->getAggregateInfo(key_names, aggregates); + Block header = streams[0]->getHeader(); + + ColumnNumbers keys; + for (const auto & name : key_names) + keys.push_back(header.getPositionByName(name)); + /** There are two modes of distributed aggregation. * * 1. In different threads read from the remote servers blocks. @@ -1014,7 +1021,7 @@ void InterpreterSelectQuery::executeMergeAggregated(bool overflow_row, bool fina * but it can work more slowly. */ - Aggregator::Params params(key_names, aggregates, overflow_row); + Aggregator::Params params(header, keys, aggregates, overflow_row); const Settings & settings = context.getSettingsRef(); @@ -1039,7 +1046,7 @@ void InterpreterSelectQuery::executeMergeAggregated(bool overflow_row, bool fina } -void InterpreterSelectQuery::executeHaving(ExpressionActionsPtr expression) +void InterpreterSelectQuery::executeHaving(const ExpressionActionsPtr & expression) { transformStreams([&](auto & stream) { @@ -1048,7 +1055,7 @@ void InterpreterSelectQuery::executeHaving(ExpressionActionsPtr expression) } -void InterpreterSelectQuery::executeTotalsAndHaving(bool has_having, ExpressionActionsPtr expression, bool overflow_row) +void InterpreterSelectQuery::executeTotalsAndHaving(bool has_having, const ExpressionActionsPtr & expression, bool overflow_row) { executeUnion(); @@ -1060,7 +1067,7 @@ void InterpreterSelectQuery::executeTotalsAndHaving(bool has_having, ExpressionA } -void InterpreterSelectQuery::executeExpression(ExpressionActionsPtr expression) +void InterpreterSelectQuery::executeExpression(const ExpressionActionsPtr & expression) { transformStreams([&](auto & stream) { @@ -1161,7 +1168,7 @@ void InterpreterSelectQuery::executeMergeSorted() } -void InterpreterSelectQuery::executeProjection(ExpressionActionsPtr expression) +void InterpreterSelectQuery::executeProjection(const ExpressionActionsPtr & expression) { transformStreams([&](auto & stream) { @@ -1339,12 +1346,6 @@ void InterpreterSelectQuery::transformStreams(Transform && transform) } -bool InterpreterSelectQuery::hasNoData() const -{ - return streams.empty() && !stream_with_non_joined_data; -} - - bool InterpreterSelectQuery::hasMoreThanOneStream() const { return streams.size() + (stream_with_non_joined_data ? 1 : 0) > 1; diff --git a/dbms/src/Interpreters/InterpreterSelectQuery.h b/dbms/src/Interpreters/InterpreterSelectQuery.h index 57e8c925f98..cfc61e35f2c 100644 --- a/dbms/src/Interpreters/InterpreterSelectQuery.h +++ b/dbms/src/Interpreters/InterpreterSelectQuery.h @@ -80,6 +80,7 @@ public: */ const BlockInputStreams & executeWithoutUnion(); + /// TODO It's confusing that these methods return result structure for the case of QueryProcessingStage::Complete regardless to the actual 'to_stage'. DataTypes getReturnTypes(); Block getSampleBlock(); @@ -137,19 +138,19 @@ private: /// Fetch data from the table. Returns the stage to which the query was processed in Storage. QueryProcessingStage::Enum executeFetchColumns(); - void executeWhere(ExpressionActionsPtr expression); - void executeAggregation(ExpressionActionsPtr expression, bool overflow_row, bool final); + void executeWhere(const ExpressionActionsPtr & expression); + void executeAggregation(const ExpressionActionsPtr & expression, bool overflow_row, bool final); void executeMergeAggregated(bool overflow_row, bool final); - void executeTotalsAndHaving(bool has_having, ExpressionActionsPtr expression, bool overflow_row); - void executeHaving(ExpressionActionsPtr expression); - void executeExpression(ExpressionActionsPtr expression); + void executeTotalsAndHaving(bool has_having, const ExpressionActionsPtr & expression, bool overflow_row); + void executeHaving(const ExpressionActionsPtr & expression); + void executeExpression(const ExpressionActionsPtr & expression); void executeOrder(); void executeMergeSorted(); void executePreLimit(); void executeUnion(); void executeLimitBy(); void executeLimit(); - void executeProjection(ExpressionActionsPtr expression); + void executeProjection(const ExpressionActionsPtr & expression); void executeDistinct(bool before_order, Names columns); void executeSubqueriesInSetsAndJoins(std::unordered_map & subqueries_for_sets); diff --git a/dbms/src/Interpreters/InterpreterShowCreateQuery.cpp b/dbms/src/Interpreters/InterpreterShowCreateQuery.cpp index ab0c83a1971..774515c9cc3 100644 --- a/dbms/src/Interpreters/InterpreterShowCreateQuery.cpp +++ b/dbms/src/Interpreters/InterpreterShowCreateQuery.cpp @@ -19,15 +19,16 @@ BlockIO InterpreterShowCreateQuery::execute() { BlockIO res; res.in = executeImpl(); - res.in_sample = getSampleBlock(); - return res; } Block InterpreterShowCreateQuery::getSampleBlock() { - return {{ std::make_shared(), "statement" }}; + return Block{{ + ColumnString::create(), + std::make_shared(), + "statement"}}; } diff --git a/dbms/src/Interpreters/InterpreterShowCreateQuery.h b/dbms/src/Interpreters/InterpreterShowCreateQuery.h index 7fa85230f04..5e8672c1767 100644 --- a/dbms/src/Interpreters/InterpreterShowCreateQuery.h +++ b/dbms/src/Interpreters/InterpreterShowCreateQuery.h @@ -21,11 +21,12 @@ public: BlockIO execute() override; + static Block getSampleBlock(); + private: ASTPtr query_ptr; const Context & context; - Block getSampleBlock(); BlockInputStreamPtr executeImpl(); }; diff --git a/dbms/src/Interpreters/Join.cpp b/dbms/src/Interpreters/Join.cpp index aa406ca9b58..c469fc733a8 100644 --- a/dbms/src/Interpreters/Join.cpp +++ b/dbms/src/Interpreters/Join.cpp @@ -1038,12 +1038,7 @@ public: String getName() const override { return "NonJoined"; } - String getID() const override - { - std::stringstream res; - res << "NonJoined(" << &parent << ")"; - return res.str(); - } + Block getHeader() const override { return result_sample_block; }; protected: diff --git a/dbms/src/Interpreters/Set.cpp b/dbms/src/Interpreters/Set.cpp index 2c06149aa44..63b7024cb73 100644 --- a/dbms/src/Interpreters/Set.cpp +++ b/dbms/src/Interpreters/Set.cpp @@ -540,7 +540,7 @@ MergeTreeSetIndex::MergeTreeSetIndex(const SetElements & set_elements, std::vect * 1: the intersection of the set and the range is non-empty * 2: the range contains elements not in the set */ -BoolMask MergeTreeSetIndex::mayBeTrueInRange(const std::vector & key_ranges) +BoolMask MergeTreeSetIndex::mayBeTrueInRange(const std::vector & key_ranges, const DataTypes & data_types) { std::vector left_point; std::vector right_point; @@ -555,7 +555,7 @@ BoolMask MergeTreeSetIndex::mayBeTrueInRange(const std::vector & key_rang std::optional new_range = PKCondition::applyMonotonicFunctionsChainToRange( key_ranges[indexes_mapping[i].pk_index], indexes_mapping[i].functions, - indexes_mapping[i].data_type); + data_types[indexes_mapping[i].pk_index]); if (!new_range) return {true, true}; diff --git a/dbms/src/Interpreters/Set.h b/dbms/src/Interpreters/Set.h index 94d0d11f338..bd2a7363ad4 100644 --- a/dbms/src/Interpreters/Set.h +++ b/dbms/src/Interpreters/Set.h @@ -179,12 +179,11 @@ public: size_t tuple_index; size_t pk_index; std::vector functions; - DataTypePtr data_type; }; MergeTreeSetIndex(const SetElements & set_elements, std::vector && indexes_mapping_); - BoolMask mayBeTrueInRange(const std::vector & key_ranges); + BoolMask mayBeTrueInRange(const std::vector & key_ranges, const DataTypes & data_types); private: using OrderedTuples = std::vector>; OrderedTuples ordered_set; diff --git a/dbms/src/Interpreters/Settings.h b/dbms/src/Interpreters/Settings.h index 5244ebb5c9b..4946be8acb6 100644 --- a/dbms/src/Interpreters/Settings.h +++ b/dbms/src/Interpreters/Settings.h @@ -180,7 +180,9 @@ struct Settings M(SettingSeconds, http_send_timeout, DEFAULT_HTTP_READ_BUFFER_TIMEOUT, "HTTP send timeout") \ M(SettingSeconds, http_receive_timeout, DEFAULT_HTTP_READ_BUFFER_TIMEOUT, "HTTP receive timeout") \ M(SettingBool, optimize_throw_if_noop, false, "If setting is enabled and OPTIMIZE query didn't actually assign a merge then an explanatory exception is thrown") \ - M(SettingBool, use_index_for_in_with_subqueries, true, "Try using an index if there is a subquery or a table expression on the right side of the IN operator.") + M(SettingBool, use_index_for_in_with_subqueries, true, "Try using an index if there is a subquery or a table expression on the right side of the IN operator.") \ + \ + M(SettingBool, empty_result_for_aggregation_by_empty_set, false, "Return empty result when aggregating without keys on empty set.") /// Possible limits for query execution. diff --git a/dbms/src/Interpreters/castColumn.cpp b/dbms/src/Interpreters/castColumn.cpp index daa75081c52..6c5d68d4c7b 100644 --- a/dbms/src/Interpreters/castColumn.cpp +++ b/dbms/src/Interpreters/castColumn.cpp @@ -9,6 +9,9 @@ namespace DB ColumnPtr castColumn(const ColumnWithTypeAndName & arg, const DataTypePtr & type, const Context & context) { + if (arg.type->equals(*type)) + return arg.column; + Block temporary_block { arg, diff --git a/dbms/src/Interpreters/executeQuery.cpp b/dbms/src/Interpreters/executeQuery.cpp index c7cb2f58f6b..eb31be2a80f 100644 --- a/dbms/src/Interpreters/executeQuery.cpp +++ b/dbms/src/Interpreters/executeQuery.cpp @@ -442,7 +442,7 @@ void executeQuery( ? typeid_cast(*ast_query_with_output->format).name : context.getDefaultFormat(); - BlockOutputStreamPtr out = context.getOutputFormat(format_name, *out_buf, streams.in_sample); + BlockOutputStreamPtr out = context.getOutputFormat(format_name, *out_buf, streams.in->getHeader()); if (auto stream = dynamic_cast(streams.in.get())) { diff --git a/dbms/src/Interpreters/tests/aggregate.cpp b/dbms/src/Interpreters/tests/aggregate.cpp index d42d06f7cdd..65db982dbd1 100644 --- a/dbms/src/Interpreters/tests/aggregate.cpp +++ b/dbms/src/Interpreters/tests/aggregate.cpp @@ -70,10 +70,6 @@ int main(int argc, char ** argv) BlockInputStreamPtr stream = std::make_shared(block); AggregatedDataVariants aggregated_data_variants; - Names key_column_names; - key_column_names.emplace_back("x"); - key_column_names.emplace_back("s1"); - AggregateFunctionFactory factory; AggregateDescriptions aggregate_descriptions(1); @@ -81,7 +77,10 @@ int main(int argc, char ** argv) DataTypes empty_list_of_types; aggregate_descriptions[0].function = factory.get("count", empty_list_of_types); - Aggregator::Params params(key_column_names, aggregate_descriptions, false); + Aggregator::Params params( + stream->getHeader(), {0, 1}, aggregate_descriptions, + false, 0, OverflowMode::THROW, nullptr, 0, 0, 0, 0, false, ""); + Aggregator aggregator(params); { diff --git a/dbms/src/Server/Benchmark.cpp b/dbms/src/Server/Benchmark.cpp index ceeb75accce..989ab07aa0f 100644 --- a/dbms/src/Server/Benchmark.cpp +++ b/dbms/src/Server/Benchmark.cpp @@ -303,7 +303,7 @@ private: void execute(ConnectionPool::Entry & connection, Query & query) { Stopwatch watch; - RemoteBlockInputStream stream(*connection, query, global_context, &settings, nullptr, Tables(), query_processing_stage); + RemoteBlockInputStream stream(*connection, query, {}, global_context, &settings, nullptr, Tables(), query_processing_stage); Progress progress; stream.setProgressCallback([&progress](const Progress & value) { progress.incrementPiecewiseAtomically(value); }); diff --git a/dbms/src/Server/ClusterCopier.cpp b/dbms/src/Server/ClusterCopier.cpp index 7e0e9b27a8a..02dbf7367c2 100644 --- a/dbms/src/Server/ClusterCopier.cpp +++ b/dbms/src/Server/ClusterCopier.cpp @@ -25,6 +25,8 @@ #include #include #include +#include +#include #include #include #include @@ -49,6 +51,7 @@ #include #include #include +#include #include #include #include @@ -1405,14 +1408,16 @@ protected: bool existsRemoteTable(const DatabaseAndTableName & table, Connection & connection) { String query = "EXISTS " + getDatabaseDotTable(table); - Block block = getBlockWithAllStreamData(std::make_shared(connection, query, context)); + Block block = getBlockWithAllStreamData(std::make_shared( + connection, query, InterpreterExistsQuery::getSampleBlock(), context)); return block.safeGetByPosition(0).column->getUInt(0) != 0; } String getRemoteCreateTable(const DatabaseAndTableName & table, Connection & connection, const Settings * settings = nullptr) { String query = "SHOW CREATE TABLE " + getDatabaseDotTable(table); - Block block = getBlockWithAllStreamData(std::make_shared(connection, query, context, settings)); + Block block = getBlockWithAllStreamData(std::make_shared( + connection, query, InterpreterShowCreateQuery::getSampleBlock(), context, settings)); return typeid_cast(*block.safeGetByPosition(0).column).getDataAt(0).toString(); } @@ -1426,7 +1431,8 @@ protected: << " database = " << DB::quote << table.first << " AND table = " << DB::quote << table.second; - block = getBlockWithAllStreamData(std::make_shared(connection, wb.str(), context, settings)); + block = getBlockWithAllStreamData(std::make_shared( + connection, wb.str(), Block{{ ColumnString::create(), std::make_shared(), "partition" }}, context, settings)); } Strings res; @@ -1449,8 +1455,8 @@ protected: } /** Executes simple query (without output streams, for example DDL queries) on each shard of the cluster - * Returns number of shards for which at least one replica executed query successfully - */ + * Returns number of shards for which at least one replica executed query successfully + */ size_t executeQueryOnCluster( const ClusterPtr & cluster, const String & query, @@ -1513,7 +1519,7 @@ protected: { try { - RemoteBlockInputStream stream(*connection, query, context, ¤t_settings); + RemoteBlockInputStream stream(*connection, query, {}, context, ¤t_settings); NullBlockOutputStream output; copyData(stream, output); diff --git a/dbms/src/Server/PerformanceTest.cpp b/dbms/src/Server/PerformanceTest.cpp index e111c53f7ca..d5239ac0e49 100644 --- a/dbms/src/Server/PerformanceTest.cpp +++ b/dbms/src/Server/PerformanceTest.cpp @@ -1087,7 +1087,7 @@ private: statistics.last_query_rows_read = 0; statistics.last_query_bytes_read = 0; - RemoteBlockInputStream stream(connection, query, global_context, &settings); + RemoteBlockInputStream stream(connection, query, {}, global_context, &settings); stream.setProgressCallback( [&](const Progress & value) { this->checkFulfilledConditionsAndUpdate(value, stream, statistics, stop_conditions); }); diff --git a/dbms/src/Server/TCPHandler.cpp b/dbms/src/Server/TCPHandler.cpp index 8aec67aa2ba..e27d4f088e0 100644 --- a/dbms/src/Server/TCPHandler.cpp +++ b/dbms/src/Server/TCPHandler.cpp @@ -32,6 +32,7 @@ #include + namespace DB { @@ -302,8 +303,11 @@ void TCPHandler::processOrdinaryQuery() if (state.io.in) { /// Send header-block, to allow client to prepare output format for data to send. - if (state.io.in_sample) - sendData(state.io.in_sample); + { + Block header = state.io.in->getHeader(); + if (header) + sendData(header); + } AsynchronousBlockInputStream async_in(state.io.in); async_in.readPrefix(); @@ -338,12 +342,12 @@ void TCPHandler::processOrdinaryQuery() } } - /** If data has run out, we will send the profiling data and total values to - * the last zero block to be able to use - * this information in the suffix output of stream. - * If the request was interrupted, then `sendTotals` and other methods could not be called, - * because we have not read all the data yet, - * and there could be ongoing calculations in other threads at the same time. + /** If data has run out, we will send the profiling data and total values to + * the last zero block to be able to use + * this information in the suffix output of stream. + * If the request was interrupted, then `sendTotals` and other methods could not be called, + * because we have not read all the data yet, + * and there could be ongoing calculations in other threads at the same time. */ if (!block && !isQueryCancelled()) { @@ -709,7 +713,7 @@ bool TCPHandler::isQueryCancelled() } -void TCPHandler::sendData(Block & block) +void TCPHandler::sendData(const Block & block) { initBlockOutput(); diff --git a/dbms/src/Server/TCPHandler.h b/dbms/src/Server/TCPHandler.h index e699e5b44eb..93b82acd7ea 100644 --- a/dbms/src/Server/TCPHandler.h +++ b/dbms/src/Server/TCPHandler.h @@ -130,7 +130,7 @@ private: void processTablesStatusRequest(); void sendHello(); - void sendData(Block & block); /// Write a block to the network. + void sendData(const Block & block); /// Write a block to the network. void sendException(const Exception & e); void sendProgress(); void sendEndOfStream(); diff --git a/dbms/src/Storages/ITableDeclaration.cpp b/dbms/src/Storages/ITableDeclaration.cpp index 8bc53a8163c..da4cc920608 100644 --- a/dbms/src/Storages/ITableDeclaration.cpp +++ b/dbms/src/Storages/ITableDeclaration.cpp @@ -121,6 +121,20 @@ Block ITableDeclaration::getSampleBlockNonMaterialized() const } +Block ITableDeclaration::getSampleBlockForColumns(const Names & column_names) const +{ + Block res; + + for (const auto & name : column_names) + { + auto col = getColumn(name); + res.insert({ col.type->createColumn(), col.type, name }); + } + + return res; +} + + static std::string listOfColumns(const NamesAndTypesList & available_columns) { std::stringstream s; diff --git a/dbms/src/Storages/ITableDeclaration.h b/dbms/src/Storages/ITableDeclaration.h index 19c57d45e40..335ca7ace3d 100644 --- a/dbms/src/Storages/ITableDeclaration.h +++ b/dbms/src/Storages/ITableDeclaration.h @@ -59,6 +59,7 @@ public: */ Block getSampleBlock() const; Block getSampleBlockNonMaterialized() const; + Block getSampleBlockForColumns(const Names & column_names) const; /** Verify that all the requested names are in the table and are set correctly. * (the list of names is not empty and the names do not repeat) diff --git a/dbms/src/Storages/MergeTree/MergeTreeBaseBlockInputStream.cpp b/dbms/src/Storages/MergeTree/MergeTreeBaseBlockInputStream.cpp index bf1e9a6399d..32ab21161d6 100644 --- a/dbms/src/Storages/MergeTree/MergeTreeBaseBlockInputStream.cpp +++ b/dbms/src/Storages/MergeTree/MergeTreeBaseBlockInputStream.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include @@ -337,11 +338,7 @@ Block MergeTreeBaseBlockInputStream::readFromPart() const size_t limit = std::min(pre_filter.size(), pre_filter_pos + unread_rows_in_current_granule); bool will_read_until_mark = unread_rows_in_current_granule == limit - pre_filter_pos; - UInt8 nonzero = 0; - for (size_t row = pre_filter_pos; row < limit; ++row) - nonzero |= pre_filter[row]; - - if (!nonzero) + if (memoryIsZero(&pre_filter[pre_filter_pos], (limit - pre_filter_pos) * sizeof(pre_filter[0]))) { /// Zero! Prewhere condition is false for all (limit - pre_filter_pos) rows. readRows(); @@ -395,16 +392,21 @@ Block MergeTreeBaseBlockInputStream::readFromPart() post_filter.resize(post_filter_pos); + /// At this point we may have arrays with non-zero offsets but with empty data, + /// as a result of reading components of Nested data structures with no data in filesystem. + /// We must fill these arrays to filter them correctly. + + reader->fillMissingColumns(res, task->ordered_names, task->should_reorder); + /// Filter the columns related to PREWHERE using pre_filter, /// other columns - using post_filter. size_t rows = 0; for (const auto i : ext::range(0, res.columns())) { - auto & col = res.safeGetByPosition(i); + auto & col = res.getByPosition(i); if (col.name == prewhere_column_name && res.columns() > 1) continue; - col.column = - col.column->filter(task->column_name_set.count(col.name) ? post_filter : pre_filter, -1); + col.column = col.column->filter(task->column_name_set.count(col.name) ? post_filter : pre_filter, -1); rows = col.column->size(); } if (task->size_predictor) @@ -413,7 +415,6 @@ Block MergeTreeBaseBlockInputStream::readFromPart() /// Replace column with condition value from PREWHERE to a constant. if (!task->remove_prewhere_column) res.getByName(prewhere_column_name).column = DataTypeUInt8().createColumnConst(rows, UInt64(1)); - } if (res) diff --git a/dbms/src/Storages/MergeTree/MergeTreeBlockInputStream.cpp b/dbms/src/Storages/MergeTree/MergeTreeBlockInputStream.cpp index 7b93c1fd181..fcfb00084cf 100644 --- a/dbms/src/Storages/MergeTree/MergeTreeBlockInputStream.cpp +++ b/dbms/src/Storages/MergeTree/MergeTreeBlockInputStream.cpp @@ -62,26 +62,13 @@ MergeTreeBlockInputStream::MergeTreeBlockInputStream( setTotalRowsApprox(total_rows); } -String MergeTreeBlockInputStream::getID() const + +Block MergeTreeBlockInputStream::getHeader() const { - std::stringstream res; - res << "MergeTree(" << path << ", columns"; - - for (const NameAndTypePair & column : columns) - res << ", " << column.name; - - if (prewhere_actions) - res << ", prewhere, " << prewhere_actions->getID(); - - res << ", marks"; - - for (size_t i = 0; i < all_mark_ranges.size(); ++i) - res << ", " << all_mark_ranges[i].begin << ", " << all_mark_ranges[i].end; - - res << ")"; - return res.str(); + return storage.getSampleBlockForColumns(ordered_names); } + bool MergeTreeBlockInputStream::getNewTask() try { diff --git a/dbms/src/Storages/MergeTree/MergeTreeBlockInputStream.h b/dbms/src/Storages/MergeTree/MergeTreeBlockInputStream.h index 6eb9c2e8577..9739cfd49fc 100644 --- a/dbms/src/Storages/MergeTree/MergeTreeBlockInputStream.h +++ b/dbms/src/Storages/MergeTree/MergeTreeBlockInputStream.h @@ -38,7 +38,7 @@ public: String getName() const override { return "MergeTree"; } - String getID() const override; + Block getHeader() const override; /// Closes readers and unlock part locks void finish(); diff --git a/dbms/src/Storages/MergeTree/MergeTreeData.cpp b/dbms/src/Storages/MergeTree/MergeTreeData.cpp index 3d95b9408a0..f8f08028257 100644 --- a/dbms/src/Storages/MergeTree/MergeTreeData.cpp +++ b/dbms/src/Storages/MergeTree/MergeTreeData.cpp @@ -113,10 +113,8 @@ MergeTreeData::MergeTreeData( { merging_params.check(columns); - if (primary_expr_ast && merging_params.mode == MergingParams::Unsorted) - throw Exception("Primary key cannot be set for UnsortedMergeTree", ErrorCodes::BAD_ARGUMENTS); - if (!primary_expr_ast && merging_params.mode != MergingParams::Unsorted) - throw Exception("Primary key can be empty only for UnsortedMergeTree", ErrorCodes::BAD_ARGUMENTS); + if (!primary_expr_ast) /// TODO Allow tables without primary key. + throw Exception("Primary key cannot be empty", ErrorCodes::BAD_ARGUMENTS); initPrimaryKey(); @@ -402,7 +400,6 @@ String MergeTreeData::MergingParams::getModeName() const case Collapsing: return "Collapsing"; case Summing: return "Summing"; case Aggregating: return "Aggregating"; - case Unsorted: return "Unsorted"; case Replacing: return "Replacing"; case Graphite: return "Graphite"; case VersionedCollapsing: return "VersionedCollapsing"; diff --git a/dbms/src/Storages/MergeTree/MergeTreeData.h b/dbms/src/Storages/MergeTree/MergeTreeData.h index 87164d687d4..dbcd948aaae 100644 --- a/dbms/src/Storages/MergeTree/MergeTreeData.h +++ b/dbms/src/Storages/MergeTree/MergeTreeData.h @@ -78,8 +78,6 @@ namespace ErrorCodes /// column is set, keep the latest row with the maximal version. /// - Summing - sum all numeric columns not contained in the primary key for all rows with the same primary key. /// - Aggregating - merge columns containing aggregate function states for all rows with the same primary key. -/// - Unsorted - during the merge the data is not sorted but merely concatenated; this allows reading the data -/// in the same batches as they were written. /// - Graphite - performs coarsening of historical data for Graphite (a system for quantitative monitoring). /// The MergeTreeData class contains a list of parts and the data structure parameters. @@ -239,7 +237,6 @@ public: Collapsing = 1, Summing = 2, Aggregating = 3, - Unsorted = 4, Replacing = 5, Graphite = 6, VersionedCollapsing = 7, @@ -269,7 +266,7 @@ public: /// Attach the table corresponding to the directory in full_path (must end with /), with the given columns. /// Correctness of names and paths is not checked. /// - /// primary_expr_ast - expression used for sorting; empty for UnsortedMergeTree. + /// primary_expr_ast - expression used for sorting; /// date_column_name - if not empty, the name of the Date column used for partitioning by month. /// Otherwise, partition_expr_ast is used for partitioning. /// require_part_metadata - should checksums.txt and columns.txt exist in the part directory. @@ -442,6 +439,7 @@ public: broken_part_callback(name); } + bool hasPrimaryKey() const { return !primary_sort_descr.empty(); } ExpressionActionsPtr getPrimaryExpression() const { return primary_expr; } ExpressionActionsPtr getSecondarySortExpression() const { return secondary_sort_expr; } /// may return nullptr SortDescription getPrimarySortDescription() const { return primary_sort_descr; } diff --git a/dbms/src/Storages/MergeTree/MergeTreeDataMerger.cpp b/dbms/src/Storages/MergeTree/MergeTreeDataMerger.cpp index 0bc73afc690..b55cb5ed43d 100644 --- a/dbms/src/Storages/MergeTree/MergeTreeDataMerger.cpp +++ b/dbms/src/Storages/MergeTree/MergeTreeDataMerger.cpp @@ -592,7 +592,7 @@ MergeTreeData::MutableDataPartPtr MergeTreeDataMerger::mergePartsToTemporaryPart input->setProgressCallback(MergeProgressCallback( merge_entry, sum_input_rows_upper_bound, column_sizes, watch_prev_elapsed, merge_alg)); - if (data.merging_params.mode != MergeTreeData::MergingParams::Unsorted) + if (data.hasPrimaryKey()) src_streams.emplace_back(std::make_shared( std::make_shared(BlockInputStreamPtr(std::move(input)), data.getPrimaryExpression()))); else @@ -642,10 +642,6 @@ MergeTreeData::MutableDataPartPtr MergeTreeDataMerger::mergePartsToTemporaryPart src_streams, sort_desc, data.merging_params.sign_column, DEFAULT_MERGE_BLOCK_SIZE, false, rows_sources_write_buf.get()); break; - case MergeTreeData::MergingParams::Unsorted: - merged_stream = std::make_unique(src_streams); - break; - default: throw Exception("Unknown mode of operation for MergeTreeData: " + toString(data.merging_params.mode), ErrorCodes::LOGICAL_ERROR); } diff --git a/dbms/src/Storages/MergeTree/MergeTreeDataSelectExecutor.cpp b/dbms/src/Storages/MergeTree/MergeTreeDataSelectExecutor.cpp index 9ded38715bc..dc7018bb4d6 100644 --- a/dbms/src/Storages/MergeTree/MergeTreeDataSelectExecutor.cpp +++ b/dbms/src/Storages/MergeTree/MergeTreeDataSelectExecutor.cpp @@ -475,7 +475,7 @@ BlockInputStreams MergeTreeDataSelectExecutor::read( filter_expression = ExpressionAnalyzer(filter_function, context, nullptr, available_real_columns).getActions(false); - /// Add columns needed for `sampling_expression`. + /// Add columns needed for `sampling_expression` to `column_names_to_read`. std::vector add_columns = filter_expression->getRequiredColumns(); column_names_to_read.insert(column_names_to_read.end(), add_columns.begin(), add_columns.end()); std::sort(column_names_to_read.begin(), column_names_to_read.end()); @@ -508,7 +508,7 @@ BlockInputStreams MergeTreeDataSelectExecutor::read( * They are done before the execution of the pipeline; they can not be interrupted; during the computation, packets of progress are not sent. */ if (!prewhere_subqueries.empty()) - CreatingSetsBlockInputStream(std::make_shared(), prewhere_subqueries, settings.limits).read(); + CreatingSetsBlockInputStream(std::make_shared(Block()), prewhere_subqueries, settings.limits).read(); } RangesInDataParts parts_with_ranges; @@ -520,7 +520,7 @@ BlockInputStreams MergeTreeDataSelectExecutor::read( { RangesInDataPart ranges(part, part_index++); - if (data.merging_params.mode != MergeTreeData::MergingParams::Unsorted) + if (data.hasPrimaryKey()) ranges.ranges = markRangesFromPKRange(part->index, key_condition, settings); else ranges.ranges = MarkRanges{MarkRange{0, part->marks_count}}; @@ -830,9 +830,6 @@ BlockInputStreams MergeTreeDataSelectExecutor::spreadMarkRangesAmongStreamsFinal to_merge, data.getSortDescription(), data.merging_params.sign_column, max_block_size, true); break; - case MergeTreeData::MergingParams::Unsorted: - throw Exception("UnsortedMergeTree doesn't support FINAL", ErrorCodes::LOGICAL_ERROR); - case MergeTreeData::MergingParams::Graphite: throw Exception("GraphiteMergeTree doesn't support FINAL", ErrorCodes::LOGICAL_ERROR); } diff --git a/dbms/src/Storages/MergeTree/MergeTreeDataWriter.cpp b/dbms/src/Storages/MergeTree/MergeTreeDataWriter.cpp index 3d63966484a..60ed5650ead 100644 --- a/dbms/src/Storages/MergeTree/MergeTreeDataWriter.cpp +++ b/dbms/src/Storages/MergeTree/MergeTreeDataWriter.cpp @@ -172,8 +172,8 @@ MergeTreeData::MutableDataPartPtr MergeTreeDataWriter::writeTempPart(BlockWithPa dir.createDirectories(); - /// If you need to calculate some columns to sort, we do it. - if (data.merging_params.mode != MergeTreeData::MergingParams::Unsorted) + /// If we need to calculate some columns to sort. + if (data.hasPrimaryKey()) { data.getPrimaryExpression()->execute(block); auto secondary_sort_expr = data.getSecondarySortExpression(); @@ -188,7 +188,7 @@ MergeTreeData::MutableDataPartPtr MergeTreeDataWriter::writeTempPart(BlockWithPa /// Sort. IColumn::Permutation * perm_ptr = nullptr; IColumn::Permutation perm; - if (data.merging_params.mode != MergeTreeData::MergingParams::Unsorted) + if (data.hasPrimaryKey()) { if (!isAlreadySorted(block, sort_descr)) { diff --git a/dbms/src/Storages/MergeTree/MergeTreeReadPool.cpp b/dbms/src/Storages/MergeTree/MergeTreeReadPool.cpp index c30ddb3d27b..e95c576274c 100644 --- a/dbms/src/Storages/MergeTree/MergeTreeReadPool.cpp +++ b/dbms/src/Storages/MergeTree/MergeTreeReadPool.cpp @@ -117,6 +117,12 @@ MergeTreeReadTaskPtr MergeTreeReadPool::getTask(const size_t min_marks_to_read, } +Block MergeTreeReadPool::getHeader() const +{ + return data.getSampleBlockForColumns(column_names); +} + + void MergeTreeReadPool::profileFeedback(const ReadBufferFromFileBase::ProfileInfo info) { if (backoff_settings.min_read_latency_ms == 0 || do_not_steal_tasks) diff --git a/dbms/src/Storages/MergeTree/MergeTreeReadPool.h b/dbms/src/Storages/MergeTree/MergeTreeReadPool.h index e93a248bab1..cf7a9c71ef1 100644 --- a/dbms/src/Storages/MergeTree/MergeTreeReadPool.h +++ b/dbms/src/Storages/MergeTree/MergeTreeReadPool.h @@ -79,6 +79,8 @@ public: */ void profileFeedback(const ReadBufferFromFileBase::ProfileInfo info); + Block getHeader() const; + private: std::vector fillPerPartInfo( RangesInDataParts & parts, const ExpressionActionsPtr & prewhere_actions, const String & prewhere_column_name, diff --git a/dbms/src/Storages/MergeTree/MergeTreeReader.cpp b/dbms/src/Storages/MergeTree/MergeTreeReader.cpp index 4ae50b00b2e..63d763d5939 100644 --- a/dbms/src/Storages/MergeTree/MergeTreeReader.cpp +++ b/dbms/src/Storages/MergeTree/MergeTreeReader.cpp @@ -422,7 +422,6 @@ void MergeTreeReader::fillMissingColumns(Block & res, const Names & ordered_name { /// For a missing column of a nested data structure we must create not a column of empty /// arrays, but a column of arrays of correct length. - /// NOTE: Similar, but slightly different code is present in Block::addDefaults. /// First, collect offset columns for all arrays in the block. OffsetColumns offset_columns; diff --git a/dbms/src/Storages/MergeTree/MergeTreeReader.h b/dbms/src/Storages/MergeTree/MergeTreeReader.h index 6f4c1f60dc2..c2cd086d343 100644 --- a/dbms/src/Storages/MergeTree/MergeTreeReader.h +++ b/dbms/src/Storages/MergeTree/MergeTreeReader.h @@ -44,7 +44,7 @@ public: /// Add columns from ordered_names that are not present in the block. /// Missing columns are added in the order specified by ordered_names. /// If at least one column was added, reorders all columns in the block according to ordered_names. - void fillMissingColumns(Block & res, const Names & ordered_names, const bool always_reorder = false); + void fillMissingColumns(Block & res, const Names & ordered_names, const bool always_reorder); private: class Stream diff --git a/dbms/src/Storages/MergeTree/MergeTreeThreadBlockInputStream.cpp b/dbms/src/Storages/MergeTree/MergeTreeThreadBlockInputStream.cpp index b4e1cff0c93..ec961f28a99 100644 --- a/dbms/src/Storages/MergeTree/MergeTreeThreadBlockInputStream.cpp +++ b/dbms/src/Storages/MergeTree/MergeTreeThreadBlockInputStream.cpp @@ -38,13 +38,10 @@ MergeTreeThreadBlockInputStream::MergeTreeThreadBlockInputStream( } -String MergeTreeThreadBlockInputStream::getID() const +Block MergeTreeThreadBlockInputStream::getHeader() const { - std::stringstream res; - /// @todo print some meaningful information - res << static_cast(this); - return res.str(); -} + return pool->getHeader(); +}; /// Requests read task from MergeTreeReadPool and signals whether it got one diff --git a/dbms/src/Storages/MergeTree/MergeTreeThreadBlockInputStream.h b/dbms/src/Storages/MergeTree/MergeTreeThreadBlockInputStream.h index 058746a5d15..1a9c9a11bef 100644 --- a/dbms/src/Storages/MergeTree/MergeTreeThreadBlockInputStream.h +++ b/dbms/src/Storages/MergeTree/MergeTreeThreadBlockInputStream.h @@ -1,5 +1,5 @@ #pragma once -#include "MergeTreeBaseBlockInputStream.h" +#include namespace DB @@ -30,10 +30,10 @@ public: String getName() const override { return "MergeTreeThread"; } - String getID() const override; - ~MergeTreeThreadBlockInputStream() override; + Block getHeader() const override; + protected: /// Requests read task from MergeTreeReadPool and signals whether it got one bool getNewTask() override; diff --git a/dbms/src/Storages/MergeTree/MergedBlockOutputStream.cpp b/dbms/src/Storages/MergeTree/MergedBlockOutputStream.cpp index 9c680b814d5..66558dfde05 100644 --- a/dbms/src/Storages/MergeTree/MergedBlockOutputStream.cpp +++ b/dbms/src/Storages/MergeTree/MergedBlockOutputStream.cpp @@ -293,7 +293,7 @@ void MergedBlockOutputStream::writeSuffixAndFinalizePart( if (additional_column_checksums) checksums = std::move(*additional_column_checksums); - if (storage.merging_params.mode != MergeTreeData::MergingParams::Unsorted) + if (index_stream) { index_stream->next(); checksums.files["primary.idx"].file_size = index_stream->count(); @@ -354,7 +354,7 @@ void MergedBlockOutputStream::init() { Poco::File(part_path).createDirectories(); - if (storage.merging_params.mode != MergeTreeData::MergingParams::Unsorted) + if (storage.hasPrimaryKey()) { index_file_stream = std::make_unique( part_path + "primary.idx", DBMS_DEFAULT_BUFFER_SIZE, O_TRUNC | O_CREAT | O_WRONLY); @@ -443,7 +443,7 @@ void MergedBlockOutputStream::writeImpl(const Block & block, const IColumn::Perm /// Write index. The index contains Primary Key value for each `index_granularity` row. for (size_t i = index_offset; i < rows; i += storage.index_granularity) { - if (storage.merging_params.mode != MergeTreeData::MergingParams::Unsorted) + if (storage.hasPrimaryKey()) { for (size_t j = 0, size = primary_columns.size(); j < size; ++j) { diff --git a/dbms/src/Storages/MergeTree/PKCondition.cpp b/dbms/src/Storages/MergeTree/PKCondition.cpp index 2852e9f5551..a7198d5625d 100644 --- a/dbms/src/Storages/MergeTree/PKCondition.cpp +++ b/dbms/src/Storages/MergeTree/PKCondition.cpp @@ -462,9 +462,10 @@ void PKCondition::getPKTuplePositionMapping( { MergeTreeSetIndex::PKTuplePositionMapping index_mapping; index_mapping.tuple_index = tuple_index; + DataTypePtr data_type; if (isPrimaryKeyPossiblyWrappedByMonotonicFunctions( node, context, index_mapping.pk_index, - index_mapping.data_type, index_mapping.functions)) + data_type, index_mapping.functions)) { indexes_mapping.push_back(index_mapping); if (out_primary_key_column_num < index_mapping.pk_index) @@ -999,7 +1000,7 @@ bool PKCondition::mayBeTrueInRangeImpl(const std::vector & key_ranges, co PreparedSets::const_iterator it = prepared_sets.find(args[1].get()); if (in_func && it != prepared_sets.end()) { - rpn_stack.emplace_back(element.set_index->mayBeTrueInRange(key_ranges)); + rpn_stack.emplace_back(element.set_index->mayBeTrueInRange(key_ranges, data_types)); if (element.function == RPNElement::FUNCTION_NOT_IN_SET) { rpn_stack.back() = !rpn_stack.back(); diff --git a/dbms/src/Storages/MergeTree/ReplicatedMergeTreeBlockOutputStream.cpp b/dbms/src/Storages/MergeTree/ReplicatedMergeTreeBlockOutputStream.cpp index bdcad7f0fe1..a36a400aea5 100644 --- a/dbms/src/Storages/MergeTree/ReplicatedMergeTreeBlockOutputStream.cpp +++ b/dbms/src/Storages/MergeTree/ReplicatedMergeTreeBlockOutputStream.cpp @@ -146,8 +146,6 @@ void ReplicatedMergeTreeBlockOutputStream::write(const Block & block) LOG_DEBUG(log, "Wrote block with " << block.rows() << " rows"); } - - try { commitPart(zookeeper, part, block_id); @@ -417,7 +415,6 @@ void ReplicatedMergeTreeBlockOutputStream::commitPart(zkutil::ZooKeeperPtr & zoo + zkutil::ZooKeeper::error2string(info.code), ErrorCodes::UNEXPECTED_ZOOKEEPER_ERROR); } - if (quorum) { /// We are waiting for quorum to be satisfied. diff --git a/dbms/src/Storages/StorageBuffer.cpp b/dbms/src/Storages/StorageBuffer.cpp index ced007a4ced..ec4f7b498da 100644 --- a/dbms/src/Storages/StorageBuffer.cpp +++ b/dbms/src/Storages/StorageBuffer.cpp @@ -71,25 +71,15 @@ StorageBuffer::StorageBuffer(const std::string & name_, const NamesAndTypesList class BufferBlockInputStream : public IProfilingBlockInputStream { public: - BufferBlockInputStream(const Names & column_names_, StorageBuffer::Buffer & buffer_) - : column_names(column_names_.begin(), column_names_.end()), buffer(buffer_) {} + BufferBlockInputStream(const Names & column_names_, StorageBuffer::Buffer & buffer_, const StorageBuffer & storage_) + : column_names(column_names_.begin(), column_names_.end()), buffer(buffer_), storage(storage_) {} - String getName() const { return "Buffer"; } + String getName() const override { return "Buffer"; } - String getID() const - { - std::stringstream res; - res << "Buffer(" << &buffer; - - for (const auto & name : column_names) - res << ", " << name; - - res << ")"; - return res.str(); - } + Block getHeader() const override { return storage.getSampleBlockForColumns(column_names); }; protected: - Block readImpl() + Block readImpl() override { Block res; @@ -111,6 +101,7 @@ protected: private: Names column_names; StorageBuffer::Buffer & buffer; + const StorageBuffer & storage; bool has_been_read = false; }; @@ -140,7 +131,7 @@ BlockInputStreams StorageBuffer::read( BlockInputStreams streams_from_buffers; streams_from_buffers.reserve(num_shards); for (auto & buf : buffers) - streams_from_buffers.push_back(std::make_shared(column_names, buf)); + streams_from_buffers.push_back(std::make_shared(column_names, buf, *this)); /** If the sources from the table were processed before some non-initial stage of query execution, * then sources from the buffers must also be wrapped in the processing pipeline before the same stage. diff --git a/dbms/src/Storages/StorageCatBoostPool.cpp b/dbms/src/Storages/StorageCatBoostPool.cpp index d6c1b4291b9..d484158b018 100644 --- a/dbms/src/Storages/StorageCatBoostPool.cpp +++ b/dbms/src/Storages/StorageCatBoostPool.cpp @@ -39,11 +39,6 @@ public: return "CatBoostDatasetBlockInputStream"; } - String getID() const override - { - return "CatBoostDataset(" + format_name + ", " + file_name + ")"; - } - Block readImpl() override { return reader->read(); @@ -59,6 +54,8 @@ public: reader->readSuffix(); } + Block getHeader() const override { return sample_block; }; + private: Block sample_block; std::unique_ptr read_buf; diff --git a/dbms/src/Storages/StorageDistributed.cpp b/dbms/src/Storages/StorageDistributed.cpp index 747fc8ff4fa..e6683d6218b 100644 --- a/dbms/src/Storages/StorageDistributed.cpp +++ b/dbms/src/Storages/StorageDistributed.cpp @@ -1,6 +1,4 @@ -#include -#include -#include +#include #include @@ -172,7 +170,7 @@ StoragePtr StorageDistributed::createWithOwnCluster( BlockInputStreams StorageDistributed::read( - const Names & /*column_names*/, + const Names & column_names, const SelectQueryInfo & query_info, const Context & context, QueryProcessingStage::Enum & processed_stage, @@ -197,11 +195,14 @@ BlockInputStreams StorageDistributed::read( if (settings.global_subqueries_method == GlobalSubqueriesMethod::PUSH) external_tables = context.getExternalTables(); + Block header = InterpreterSelectQuery(query_info.query, context, processed_stage, 0, + std::make_shared(getSampleBlockForColumns(column_names))).execute().in->getHeader(); + ClusterProxy::SelectStreamFactory select_stream_factory( - processed_stage, QualifiedTableName{remote_database, remote_table}, external_tables); + header, processed_stage, QualifiedTableName{remote_database, remote_table}, external_tables); return ClusterProxy::executeQuery( - select_stream_factory, cluster, modified_query_ast, context, settings); + select_stream_factory, cluster, modified_query_ast, context, settings); } diff --git a/dbms/src/Storages/StorageFile.cpp b/dbms/src/Storages/StorageFile.cpp index 57d567ff903..1bbe9d6d00c 100644 --- a/dbms/src/Storages/StorageFile.cpp +++ b/dbms/src/Storages/StorageFile.cpp @@ -98,7 +98,6 @@ StorageFile::StorageFile( class StorageFileBlockInputStream : public IProfilingBlockInputStream { public: - StorageFileBlockInputStream(StorageFile & storage_, const Context & context, size_t max_block_size) : storage(storage_) { @@ -145,23 +144,13 @@ public: return storage.getName(); } - String getID() const override - { - std::stringstream res_stream; - res_stream << "File(" << storage.format_name << ", "; - if (!storage.path.empty()) - res_stream << storage.path; - else - res_stream << storage.table_fd; - res_stream << ")"; - return res_stream.str(); - } - Block readImpl() override { return reader->read(); } + Block getHeader() const override { return reader->getHeader(); }; + void readPrefixImpl() override { reader->readPrefix(); diff --git a/dbms/src/Storages/StorageKafka.cpp b/dbms/src/Storages/StorageKafka.cpp index 61236d34c32..c7ac83d1142 100644 --- a/dbms/src/Storages/StorageKafka.cpp +++ b/dbms/src/Storages/StorageKafka.cpp @@ -108,7 +108,8 @@ public: ~ReadBufferFromKafkaConsumer() { reset(); } /// Commit messages read with this consumer - void commit() { + void commit() + { LOG_TRACE(log, "Committing " << read_messages << " messages"); if (read_messages == 0) return; @@ -160,13 +161,6 @@ public: return storage.getName(); } - String getID() const override - { - std::stringstream res_stream; - res_stream << "Kafka(" << storage.topics.size() << ", " << storage.format_name << ")"; - return res_stream.str(); - } - Block readImpl() override { if (isCancelled()) @@ -175,6 +169,8 @@ public: return reader->read(); } + Block getHeader() const override { return reader->getHeader(); }; + void readPrefixImpl() override { // Start reading data diff --git a/dbms/src/Storages/StorageLog.cpp b/dbms/src/Storages/StorageLog.cpp index 6fdcaa2ed6a..443510fea42 100644 --- a/dbms/src/Storages/StorageLog.cpp +++ b/dbms/src/Storages/StorageLog.cpp @@ -62,17 +62,15 @@ public: String getName() const override { return "Log"; } - String getID() const override + Block getHeader() const override { - std::stringstream res; - res << "Log(" << storage.getTableName() << ", " << &storage << ", " << mark_number << ", " << rows_limit; + Block res; for (const auto & name_type : columns) - res << ", " << name_type.name; + res.insert({ name_type.type->createColumn(), name_type.type, name_type.name }); - res << ")"; - return res.str(); - } + return Nested::flatten(res); + }; protected: Block readImpl() override; diff --git a/dbms/src/Storages/StorageMemory.cpp b/dbms/src/Storages/StorageMemory.cpp index db4be02635c..89ce474b065 100644 --- a/dbms/src/Storages/StorageMemory.cpp +++ b/dbms/src/Storages/StorageMemory.cpp @@ -20,22 +20,12 @@ namespace ErrorCodes class MemoryBlockInputStream : public IProfilingBlockInputStream { public: - MemoryBlockInputStream(const Names & column_names_, BlocksList::iterator begin_, BlocksList::iterator end_) - : column_names(column_names_), begin(begin_), end(end_), it(begin) {} + MemoryBlockInputStream(const Names & column_names_, BlocksList::iterator begin_, BlocksList::iterator end_, const StorageMemory & storage_) + : column_names(column_names_), begin(begin_), end(end_), it(begin), storage(storage_) {} String getName() const override { return "Memory"; } - String getID() const override - { - std::stringstream res; - res << "Memory(" << &*begin << ", " << &*end; - - for (const auto & name : column_names) - res << ", " << name; - - res << ")"; - return res.str(); - } + Block getHeader() const override { return storage.getSampleBlockForColumns(column_names); } protected: Block readImpl() override @@ -62,6 +52,7 @@ private: BlocksList::iterator begin; BlocksList::iterator end; BlocksList::iterator it; + const StorageMemory & storage; }; @@ -121,7 +112,7 @@ BlockInputStreams StorageMemory::read( std::advance(begin, stream * size / num_streams); std::advance(end, (stream + 1) * size / num_streams); - res.push_back(std::make_shared(column_names, begin, end)); + res.push_back(std::make_shared(column_names, begin, end, *this)); } return res; diff --git a/dbms/src/Storages/StorageMerge.cpp b/dbms/src/Storages/StorageMerge.cpp index 1e9a590714b..39be47eab9b 100644 --- a/dbms/src/Storages/StorageMerge.cpp +++ b/dbms/src/Storages/StorageMerge.cpp @@ -137,6 +137,7 @@ BlockInputStreams StorageMerge::read( const unsigned num_streams) { BlockInputStreams res; + Block header = getSampleBlockForColumns(column_names); Names virt_column_names, real_column_names; for (const auto & it : column_names) @@ -223,13 +224,13 @@ BlockInputStreams StorageMerge::read( for (auto & stream : source_streams) { /// will throw if some columns not convertible - stream = std::make_shared(context, stream, getSampleBlock()); + stream = std::make_shared(context, stream, header); } } else { /// If many streams, initialize it lazily, to avoid long delay before start of query processing. - source_streams.emplace_back(std::make_shared([=] + source_streams.emplace_back(std::make_shared(header, [=] { QueryProcessingStage::Enum processed_stage_in_source_table = processed_stage; BlockInputStreams streams = table->read( @@ -247,11 +248,11 @@ BlockInputStreams StorageMerge::read( throw Exception("Source tables for Merge table are processing data up to different stages", ErrorCodes::INCOMPATIBLE_SOURCE_TABLES); - auto stream = streams.empty() ? std::make_shared() : streams.front(); + auto stream = streams.empty() ? std::make_shared(header) : streams.front(); if (!streams.empty()) { /// will throw if some columns not convertible - stream = std::make_shared(context, stream, getSampleBlock()); + stream = std::make_shared(context, stream, header); } return stream; })); diff --git a/dbms/src/Storages/StorageNull.h b/dbms/src/Storages/StorageNull.h index b2d3fb557bf..e413ff2d930 100644 --- a/dbms/src/Storages/StorageNull.h +++ b/dbms/src/Storages/StorageNull.h @@ -21,14 +21,14 @@ public: std::string getTableName() const override { return name; } BlockInputStreams read( - const Names &, + const Names & column_names, const SelectQueryInfo &, const Context &, QueryProcessingStage::Enum &, size_t, unsigned) override { - return { std::make_shared() }; + return { std::make_shared(getSampleBlockForColumns(column_names)) }; } BlockOutputStreamPtr write(const ASTPtr &, const Settings &) override diff --git a/dbms/src/Storages/StorageReplicatedMergeTree.cpp b/dbms/src/Storages/StorageReplicatedMergeTree.cpp index d5c1075e07e..14cc102f609 100644 --- a/dbms/src/Storages/StorageReplicatedMergeTree.cpp +++ b/dbms/src/Storages/StorageReplicatedMergeTree.cpp @@ -1669,7 +1669,7 @@ namespace if (left->info.max_block <= part_info.min_block && right->info.min_block >= part_info.max_block) { - if (out_reason) + if (out_reason) *out_reason = "Quorum 'last part' condition is unsatisfied"; return false; } @@ -3213,7 +3213,7 @@ void StorageReplicatedMergeTree::sendRequestToLeaderReplica(const ASTPtr & query leader_address.database, "", "", timeouts, "ClickHouse replica"); - RemoteBlockInputStream stream(connection, formattedAST(new_query), context, &settings); + RemoteBlockInputStream stream(connection, formattedAST(new_query), {}, context, &settings); NullBlockOutputStream output; copyData(stream, output); diff --git a/dbms/src/Storages/StorageSet.cpp b/dbms/src/Storages/StorageSet.cpp index 3ec37897348..498e475a465 100644 --- a/dbms/src/Storages/StorageSet.cpp +++ b/dbms/src/Storages/StorageSet.cpp @@ -157,7 +157,7 @@ void StorageSetOrJoinBase::restoreFromFile(const String & file_path) { ReadBufferFromFile backup_buf(file_path); CompressedReadBuffer compressed_backup_buf(backup_buf); - NativeBlockInputStream backup_stream(compressed_backup_buf); + NativeBlockInputStream backup_stream(compressed_backup_buf, 0); backup_stream.readPrefix(); while (Block block = backup_stream.read()) diff --git a/dbms/src/Storages/StorageStripeLog.cpp b/dbms/src/Storages/StorageStripeLog.cpp index 62e9c3cc998..1d2d31e27bb 100644 --- a/dbms/src/Storages/StorageStripeLog.cpp +++ b/dbms/src/Storages/StorageStripeLog.cpp @@ -21,6 +21,8 @@ #include #include +#include + #include #include @@ -57,28 +59,25 @@ public: String getName() const override { return "StripeLog"; } - String getID() const override + Block getHeader() const override { - std::stringstream s; - s << this; - return s.str(); - } + if (index_begin == index_end) + return {}; + + Block header; + for (const auto & column : index_begin->columns) + { + auto type = DataTypeFactory::instance().get(column.type); + header.insert({ type->createColumn(), type, column.name }); + } + return header; + }; protected: Block readImpl() override { Block res; - - if (!started) - { - started = true; - - data_in.emplace( - storage.full_path() + "data.bin", 0, 0, - std::min(static_cast(max_read_buffer_size), Poco::File(storage.full_path() + "data.bin").getSize())); - - block_in.emplace(*data_in, 0, true, index_begin, index_end); - } + start(); if (block_in) { @@ -111,6 +110,20 @@ private: bool started = false; std::optional data_in; std::optional block_in; + + void start() + { + if (!started) + { + started = true; + + data_in.emplace( + storage.full_path() + "data.bin", 0, 0, + std::min(static_cast(max_read_buffer_size), Poco::File(storage.full_path() + "data.bin").getSize())); + + block_in.emplace(*data_in, 0, index_begin, index_end); + } + } }; @@ -232,7 +245,7 @@ BlockInputStreams StorageStripeLog::read( NameSet column_names_set(column_names.begin(), column_names.end()); if (!Poco::File(full_path() + "index.mrk").exists()) - return { std::make_shared() }; + return { std::make_shared(getSampleBlockForColumns(column_names)) }; CompressedReadBufferFromFile index_in(full_path() + "index.mrk", 0, 0, INDEX_BUFFER_SIZE); std::shared_ptr index{std::make_shared(index_in, column_names_set)}; diff --git a/dbms/src/Storages/StorageTinyLog.cpp b/dbms/src/Storages/StorageTinyLog.cpp index 23d1e0c4475..957d1ca9aff 100644 --- a/dbms/src/Storages/StorageTinyLog.cpp +++ b/dbms/src/Storages/StorageTinyLog.cpp @@ -60,7 +60,15 @@ public: String getName() const override { return "TinyLog"; } - String getID() const override; + Block getHeader() const override + { + Block res; + + for (const auto & name_type : columns) + res.insert({ name_type.type->createColumn(), name_type.type, name_type.name }); + + return Nested::flatten(res); + }; protected: Block readImpl() override; @@ -144,19 +152,6 @@ private: }; -String TinyLogBlockInputStream::getID() const -{ - std::stringstream res; - res << "TinyLog(" << storage.getTableName() << ", " << &storage; - - for (const auto & name_type : columns) - res << ", " << name_type.name; - - res << ")"; - return res.str(); -} - - Block TinyLogBlockInputStream::readImpl() { Block res; diff --git a/dbms/src/Storages/System/StorageSystemNumbers.cpp b/dbms/src/Storages/System/StorageSystemNumbers.cpp index 4a9e85049e7..30586bbbba3 100644 --- a/dbms/src/Storages/System/StorageSystemNumbers.cpp +++ b/dbms/src/Storages/System/StorageSystemNumbers.cpp @@ -15,11 +15,15 @@ public: NumbersBlockInputStream(size_t block_size_, size_t offset_, size_t step_) : block_size(block_size_), next(offset_), step(step_) {} - String getName() const { return "Numbers"; } - String getID() const { return "Numbers"; } + String getName() const override { return "Numbers"; } + + Block getHeader() const override + { + return { ColumnWithTypeAndName(ColumnUInt64::create(), std::make_shared(), "number") }; + } protected: - Block readImpl() + Block readImpl() override { auto column = ColumnUInt64::create(block_size); ColumnUInt64::Container & vec = column->getData(); diff --git a/dbms/src/TableFunctions/getStructureOfRemoteTable.cpp b/dbms/src/TableFunctions/getStructureOfRemoteTable.cpp index 8f043560804..3cb68d25416 100644 --- a/dbms/src/TableFunctions/getStructureOfRemoteTable.cpp +++ b/dbms/src/TableFunctions/getStructureOfRemoteTable.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include #include @@ -33,7 +34,7 @@ NamesAndTypesList getStructureOfRemoteTable( if (shard_info.isLocal()) return context.getTable(database, table)->getColumnsList(); - auto input = std::make_shared(shard_info.pool, query, context); + auto input = std::make_shared(shard_info.pool, query, InterpreterDescribeQuery::getSampleBlock(), context); input->setPoolMode(PoolMode::GET_ONE); input->setMainTable(QualifiedTableName{database, table}); input->readPrefix(); diff --git a/dbms/tests/external_dictionaries/dictionary_library/dictionary_library.cpp b/dbms/tests/external_dictionaries/dictionary_library/dictionary_library.cpp index 97fb8158567..3c759ba336e 100644 --- a/dbms/tests/external_dictionaries/dictionary_library/dictionary_library.cpp +++ b/dbms/tests/external_dictionaries/dictionary_library/dictionary_library.cpp @@ -17,11 +17,12 @@ struct DataHolder ClickHouseLibrary::ColumnsUInt64 columns; }; -extern "C" -{ +extern "C" { -void * ClickHouseDictionary_v1_loadIds( - void * data_ptr, ClickHouseLibrary::CStrings * settings, ClickHouseLibrary::CStrings * columns, const struct ClickHouseLibrary::VectorUInt64 * ids) +void * ClickHouseDictionary_v2_loadIds(void * data_ptr, + ClickHouseLibrary::CStrings * settings, + ClickHouseLibrary::CStrings * columns, + const struct ClickHouseLibrary::VectorUInt64 * ids) { auto ptr = static_cast(data_ptr); @@ -73,7 +74,7 @@ void * ClickHouseDictionary_v1_loadIds( return nullptr; } -void * ClickHouseDictionary_v1_loadAll(void * data_ptr, ClickHouseLibrary::CStrings * settings, ClickHouseLibrary::CStrings * /*columns*/) +void * ClickHouseDictionary_v2_loadAll(void * data_ptr, ClickHouseLibrary::CStrings * settings, ClickHouseLibrary::CStrings * /*columns*/) { auto ptr = static_cast(data_ptr); std::cerr << "loadAll lib call ptr=" << data_ptr << " => " << ptr << "\n"; @@ -113,7 +114,7 @@ void * ClickHouseDictionary_v1_loadAll(void * data_ptr, ClickHouseLibrary::CStri return nullptr; } -void * ClickHouseDictionary_v1_loadKeys(void * data_ptr, +void * ClickHouseDictionary_v2_loadKeys(void * data_ptr, ClickHouseLibrary::CStrings * settings, ClickHouseLibrary::CStrings * columns, const ClickHouseLibrary::VectorUInt64 * requested_rows) @@ -148,13 +149,13 @@ void * ClickHouseDictionary_v1_loadKeys(void * data_ptr, return nullptr; } -void * ClickHouseDictionary_v1_dataAllocate() +void * ClickHouseDictionary_v2_dataAllocate() { auto data_ptr = new DataHolder; return data_ptr; } -void ClickHouseDictionary_v1_dataDelete(void * data_ptr) +void ClickHouseDictionary_v2_dataDelete(void * data_ptr) { auto ptr = static_cast(data_ptr); delete ptr; diff --git a/dbms/tests/performance/array/array_element.xml b/dbms/tests/performance/array/array_element.xml new file mode 100644 index 00000000000..e16ca5ff938 --- /dev/null +++ b/dbms/tests/performance/array/array_element.xml @@ -0,0 +1,23 @@ + + array_element + once + + + + 10000 + 1000 + + + + + + + + + + + + SELECT count() FROM system.numbers WHERE NOT ignore([[1], [2]][number % 2 + 2]) + SELECT count() FROM system.numbers WHERE NOT ignore([[], [2]][number % 2 + 2]) + SELECT count() FROM system.numbers WHERE NOT ignore([[], []][number % 2 + 2]) + diff --git a/dbms/tests/queries/0_stateless/00017_in_subquery_with_empty_result.reference b/dbms/tests/queries/0_stateless/00017_in_subquery_with_empty_result.reference index e25c5780b65..d4d0e64e94c 100644 --- a/dbms/tests/queries/0_stateless/00017_in_subquery_with_empty_result.reference +++ b/dbms/tests/queries/0_stateless/00017_in_subquery_with_empty_result.reference @@ -9,10 +9,12 @@ "data": [ - + { + "count()": "0" + } ], - "rows": 0, + "rows": 1, "rows_before_limit_at_least": 1000 } diff --git a/dbms/tests/queries/0_stateless/00181_aggregate_functions_statistics.reference b/dbms/tests/queries/0_stateless/00181_aggregate_functions_statistics.reference index 80cedd76191..4338ddbb043 100644 --- a/dbms/tests/queries/0_stateless/00181_aggregate_functions_statistics.reference +++ b/dbms/tests/queries/0_stateless/00181_aggregate_functions_statistics.reference @@ -1,14 +1,21 @@ nan +nan +0 +nan +nan 0 nan 0 0 +nan 0 0 +nan +nan 0 nan 0 0 -0 +nan nan 0 diff --git a/dbms/tests/queries/0_stateless/00181_aggregate_functions_statistics_stable.reference b/dbms/tests/queries/0_stateless/00181_aggregate_functions_statistics_stable.reference index ce706690f1a..9e875346c02 100644 --- a/dbms/tests/queries/0_stateless/00181_aggregate_functions_statistics_stable.reference +++ b/dbms/tests/queries/0_stateless/00181_aggregate_functions_statistics_stable.reference @@ -1,14 +1,21 @@ inf +inf +0 +inf +inf 0 inf 0 0 +inf 0 0 +inf +inf 0 inf 0 0 -0 +inf inf 0 diff --git a/dbms/tests/queries/0_stateless/00182_functions_higher_order_and_consts.reference b/dbms/tests/queries/0_stateless/00182_functions_higher_order_and_consts.reference index 4aa1757a136..79e0ef261d0 100644 --- a/dbms/tests/queries/0_stateless/00182_functions_higher_order_and_consts.reference +++ b/dbms/tests/queries/0_stateless/00182_functions_higher_order_and_consts.reference @@ -186,6 +186,31 @@ 1 1 1 +---cumsum--- +[] +[0,0,0] +[] +[0] +[0,0] +[0,0,0] +[0,0,0,0] +[0,0,0,0,0] +[0,0,0,0,0,0] +[0,0,0,0,0,0,0] +[0,0,0,0,0,0,0,0] +[0,0,0,0,0,0,0,0,0] +[] +[10,20,30] +[] +[10] +[10,20] +[10,20,30] +[10,20,30,40] +[10,20,30,40,50] +[10,20,30,40,50,60] +[10,20,30,40,50,60,70] +[10,20,30,40,50,60,70,80] +[10,20,30,40,50,60,70,80,90] ---map-- [] [123,123,123] @@ -374,6 +399,31 @@ 1 1 1 +--cumsum--- +[] +[0,0,0] +[] +[0] +[0,0] +[0,0,0] +[0,0,0,0] +[0,0,0,0,0] +[0,0,0,0,0,0] +[0,0,0,0,0,0,0] +[0,0,0,0,0,0,0,0] +[0,0,0,0,0,0,0,0,0] +[] +[10,20,30] +[] +[10] +[10,20] +[10,20,30] +[10,20,30,40] +[10,20,30,40,50] +[10,20,30,40,50,60] +[10,20,30,40,50,60,70] +[10,20,30,40,50,60,70,80] +[10,20,30,40,50,60,70,80,90] ---map-- [] [123,123,123] @@ -562,6 +612,31 @@ 1 1 1 +---cumsum--- +[] +[0,0,0] +[] +[0] +[0,0] +[0,0,0] +[0,0,0,0] +[0,0,0,0,0] +[0,0,0,0,0,0] +[0,0,0,0,0,0,0] +[0,0,0,0,0,0,0,0] +[0,0,0,0,0,0,0,0,0] +[] +[10,20,30] +[] +[10] +[10,20] +[10,20,30] +[10,20,30,40] +[10,20,30,40,50] +[10,20,30,40,50,60] +[10,20,30,40,50,60,70] +[10,20,30,40,50,60,70,80] +[10,20,30,40,50,60,70,80,90] ---map-- [] [123,123,123] @@ -750,6 +825,31 @@ 1 1 1 +---cumsum--- +[] +[0,0,0] +[] +[0] +[0,0] +[0,0,0] +[0,0,0,0] +[0,0,0,0,0] +[0,0,0,0,0,0] +[0,0,0,0,0,0,0] +[0,0,0,0,0,0,0,0] +[0,0,0,0,0,0,0,0,0] +[] +[10,20,30] +[] +[10] +[10,20] +[10,20,30] +[10,20,30,40] +[10,20,30,40,50] +[10,20,30,40,50,60] +[10,20,30,40,50,60,70] +[10,20,30,40,50,60,70,80] +[10,20,30,40,50,60,70,80,90] --- --- [] [1] @@ -831,6 +931,16 @@ 1 0 1 +[] +[1] +[0,0] +[1,2,3] +[0,0,0,0] +[1,2,3,4,5] +[0,0,0,0,0,0] +[1,2,3,4,5,6,7] +[0,0,0,0,0,0,0,0] +[1,2,3,4,5,6,7,8,9] --- --- [] [1] @@ -912,3 +1022,13 @@ 1 0 1 +[] +[1] +[0,0] +[1,2,3] +[0,0,0,0] +[1,2,3,4,5] +[0,0,0,0,0,0] +[1,2,3,4,5,6,7] +[0,0,0,0,0,0,0,0] +[1,2,3,4,5,6,7,8,9] diff --git a/dbms/tests/queries/0_stateless/00182_functions_higher_order_and_consts.sql b/dbms/tests/queries/0_stateless/00182_functions_higher_order_and_consts.sql index 5513df2e1b0..4f8772d807b 100644 --- a/dbms/tests/queries/0_stateless/00182_functions_higher_order_and_consts.sql +++ b/dbms/tests/queries/0_stateless/00182_functions_higher_order_and_consts.sql @@ -51,6 +51,13 @@ SELECT arrayFirstIndex(x -> 0, range(number)) FROM system.numbers LIMIT 10; SELECT arrayFirstIndex(x -> 1, emptyArrayUInt8()); SELECT arrayFirstIndex(x -> 1, [1, 2, 3]); SELECT arrayFirstIndex(x -> 1, range(number)) FROM system.numbers LIMIT 10; +SELECT '---cumsum---'; +SELECT arrayCumSum(x -> 0, emptyArrayUInt8()); +SELECT arrayCumSum(x -> 0, [1, 2, 3]); +SELECT arrayCumSum(x -> 0, range(number)) FROM system.numbers LIMIT 10; +SELECT arrayCumSum(x -> 10, emptyArrayUInt8()); +SELECT arrayCumSum(x -> 10, [1, 2, 3]); +SELECT arrayCumSum(x -> 10, range(number)) FROM system.numbers LIMIT 10; SELECT '---map--'; SELECT arrayMap(x -> materialize(123), emptyArrayUInt8()); @@ -105,6 +112,13 @@ SELECT arrayFirstIndex(x -> materialize(0), range(number)) FROM system.numbers L SELECT arrayFirstIndex(x -> materialize(1), emptyArrayUInt8()); SELECT arrayFirstIndex(x -> materialize(1), [1, 2, 3]); SELECT arrayFirstIndex(x -> materialize(1), range(number)) FROM system.numbers LIMIT 10; +SELECT '--cumsum---'; +SELECT arrayCumSum(x -> materialize(0), emptyArrayUInt8()); +SELECT arrayCumSum(x -> materialize(0), [1, 2, 3]); +SELECT arrayCumSum(x -> materialize(0), range(number)) FROM system.numbers LIMIT 10; +SELECT arrayCumSum(x -> materialize(10), emptyArrayUInt8()); +SELECT arrayCumSum(x -> materialize(10), [1, 2, 3]); +SELECT arrayCumSum(x -> materialize(10), range(number)) FROM system.numbers LIMIT 10; SELECT '---map--'; SELECT arrayMap(x -> 123, emptyArrayString()); @@ -159,6 +173,13 @@ SELECT arrayFirstIndex(x -> 0, arrayMap(x -> toString(x), range(number))) FROM s SELECT arrayFirstIndex(x -> 1, emptyArrayString()); SELECT arrayFirstIndex(x -> 1, arrayMap(x -> toString(x), [1, 2, 3])); SELECT arrayFirstIndex(x -> 1, arrayMap(x -> toString(x), range(number))) FROM system.numbers LIMIT 10; +SELECT '---cumsum---'; +SELECT arrayCumSum(x -> 0, emptyArrayString()); +SELECT arrayCumSum(x -> 0, arrayMap(x -> toString(x), [1, 2, 3])); +SELECT arrayCumSum(x -> 0, arrayMap(x -> toString(x), range(number))) FROM system.numbers LIMIT 10; +SELECT arrayCumSum(x -> 10, emptyArrayString()); +SELECT arrayCumSum(x -> 10, arrayMap(x -> toString(x), [1, 2, 3])); +SELECT arrayCumSum(x -> 10, arrayMap(x -> toString(x), range(number))) FROM system.numbers LIMIT 10; SELECT '---map--'; SELECT arrayMap(x -> materialize(123), emptyArrayString()); @@ -213,7 +234,13 @@ SELECT arrayFirstIndex(x -> materialize(0), arrayMap(x -> toString(x), range(num SELECT arrayFirstIndex(x -> materialize(1), emptyArrayString()); SELECT arrayFirstIndex(x -> materialize(1), arrayMap(x -> toString(x), [1, 2, 3])); SELECT arrayFirstIndex(x -> materialize(1), arrayMap(x -> toString(x), range(number))) FROM system.numbers LIMIT 10; - +SELECT '---cumsum---'; +SELECT arrayCumSum(x -> materialize(0), emptyArrayString()); +SELECT arrayCumSum(x -> materialize(0), arrayMap(x -> toString(x), [1, 2, 3])); +SELECT arrayCumSum(x -> materialize(0), arrayMap(x -> toString(x), range(number))) FROM system.numbers LIMIT 10; +SELECT arrayCumSum(x -> materialize(10), emptyArrayString()); +SELECT arrayCumSum(x -> materialize(10), arrayMap(x -> toString(x), [1, 2, 3])); +SELECT arrayCumSum(x -> materialize(10), arrayMap(x -> toString(x), range(number))) FROM system.numbers LIMIT 10; SELECT '--- ---'; SELECT arrayMap(x -> number % 2, range(number)) FROM system.numbers LIMIT 10; @@ -224,6 +251,7 @@ SELECT arrayAll(x -> number % 2, range(number)) FROM system.numbers LIMIT 10; SELECT arrayExists(x -> number % 2, range(number)) FROM system.numbers LIMIT 10; SELECT arrayFirst(x -> number % 2, range(number)) FROM system.numbers LIMIT 10; SELECT arrayFirstIndex(x -> number % 2, range(number)) FROM system.numbers LIMIT 10; +SELECT arrayCumSum(x -> number % 2, range(number)) FROM system.numbers LIMIT 10; SELECT '--- ---'; SELECT arrayMap(x -> number % 2, arrayMap(x -> toString(x), range(number))) FROM system.numbers LIMIT 10; SELECT arrayFilter(x -> number % 2, arrayMap(x -> toString(x), range(number))) FROM system.numbers LIMIT 10; @@ -233,3 +261,4 @@ SELECT arrayAll(x -> number % 2, arrayMap(x -> toString(x), range(number))) FROM SELECT arrayExists(x -> number % 2, arrayMap(x -> toString(x), range(number))) FROM system.numbers LIMIT 10; SELECT arrayFirst(x -> number % 2, arrayMap(x -> toString(x), range(number))) FROM system.numbers LIMIT 10; SELECT arrayFirstIndex(x -> number % 2, arrayMap(x -> toString(x), range(number))) FROM system.numbers LIMIT 10; +SELECT arrayCumSum(x -> number % 2, arrayMap(x -> toString(x), range(number))) FROM system.numbers LIMIT 10; diff --git a/dbms/tests/queries/0_stateless/00276_sample.reference b/dbms/tests/queries/0_stateless/00276_sample.reference index 8fb4144f5a8..90bf02ffd8d 100644 --- a/dbms/tests/queries/0_stateless/00276_sample.reference +++ b/dbms/tests/queries/0_stateless/00276_sample.reference @@ -8,6 +8,7 @@ 5 0 4 10 5 26 25 50 975 26 26 230 255 6305 26 +0 0 0 0 0 13 243 255 3237 13 1 256 0 255 32640 256 diff --git a/dbms/tests/queries/0_stateless/00321_pk_set.reference b/dbms/tests/queries/0_stateless/00321_pk_set.reference index d00491fd7e5..2b0a5dc3946 100644 --- a/dbms/tests/queries/0_stateless/00321_pk_set.reference +++ b/dbms/tests/queries/0_stateless/00321_pk_set.reference @@ -1 +1,7 @@ +0 +0 +0 +0 +0 +0 1 diff --git a/dbms/tests/queries/0_stateless/00334_column_aggregate_function_limit.reference b/dbms/tests/queries/0_stateless/00334_column_aggregate_function_limit.reference index 49541f72104..573541ac970 100644 --- a/dbms/tests/queries/0_stateless/00334_column_aggregate_function_limit.reference +++ b/dbms/tests/queries/0_stateless/00334_column_aggregate_function_limit.reference @@ -1 +1 @@ -94 +0 diff --git a/dbms/tests/queries/0_stateless/00334_column_aggregate_function_limit.sql b/dbms/tests/queries/0_stateless/00334_column_aggregate_function_limit.sql index 39d5e53404e..c45e27222a1 100644 --- a/dbms/tests/queries/0_stateless/00334_column_aggregate_function_limit.sql +++ b/dbms/tests/queries/0_stateless/00334_column_aggregate_function_limit.sql @@ -4,6 +4,6 @@ CREATE TABLE test.ontime (FlightDate Date, Carrier String, FlightNum String) ENG INSERT INTO test.ontime VALUES ('1987-10-01','AA','2'),('1987-10-01','AA','2'),('1987-10-01','AA','7'),('1987-10-01','AA','7'),('1987-10-01','AA','26'),('1987-10-01','AA','34'),('1987-10-01','AA','36'),('1987-10-01','AA','91'),('1987-10-01','AA','101'),('1987-10-01','AA','101'),('1987-10-01','AA','109'),('1987-10-01','AA','109'),('1987-10-01','AA','112'),('1987-10-01','AA','123'),('1987-10-01','AA','160'),('1987-10-01','AA','165'),('1987-10-01','AA','165'),('1987-10-01','AA','165'),('1987-10-01','AA','176'),('1987-10-01','AA','176'),('1987-10-01','AA','176'),('1987-10-01','AA','176'),('1987-10-01','AA','179'),('1987-10-01','AA','179'),('1987-10-01','AA','215'),('1987-10-01','AA','215'),('1987-10-01','AA','231'),('1987-10-01','AA','231'),('1987-10-01','AA','263'),('1987-10-01','AA','263'),('1987-10-01','AA','268'),('1987-10-01','AA','268'),('1987-10-01','AA','281'),('1987-10-01','AA','287'),('1987-10-01','AA','287'),('1987-10-01','AA','309'),('1987-10-01','AA','309'),('1987-10-01','AA','309'),('1987-10-01','AA','341'),('1987-10-01','AA','344'),('1987-10-01','AA','344'),('1987-10-01','AA','347'),('1987-10-01','AA','347'),('1987-10-01','AA','368'),('1987-10-01','AA','381'),('1987-10-01','AA','381'),('1987-10-01','AA','381'),('1987-10-01','AA','396'),('1987-10-01','AA','396'),('1987-10-01','AA','397'),('1987-10-01','AA','397'),('1987-10-01','AA','417'),('1987-10-01','AA','417'),('1987-10-01','AA','446'),('1987-10-01','AA','451'),('1987-10-01','AA','451'),('1987-10-01','AA','460'),('1987-10-01','AA','460'),('1987-10-01','AA','491'),('1987-10-01','AA','504'),('1987-10-01','AA','504'),('1987-10-01','AA','519'),('1987-10-01','AA','519'),('1987-10-01','AA','523'),('1987-10-01','AA','523'),('1987-10-01','AA','525'),('1987-10-01','AA','525'),('1987-10-01','AA','525'),('1987-10-01','AA','533'),('1987-10-01','AA','533'),('1987-10-01','AA','533'),('1987-10-01','AA','546'),('1987-10-01','AA','546'),('1987-10-01','AA','556'),('1987-10-01','AA','556'),('1987-10-01','AA','556'),('1987-10-01','AA','597'),('1987-10-01','AA','597'),('1987-10-01','AA','597'),('1987-10-01','AA','601'),('1987-10-01','AA','601'),('1987-10-01','AA','627'),('1987-10-01','AA','670'),('1987-10-01','AA','673'),('1987-10-01','AA','673'),('1987-10-01','AA','680'),('1987-10-01','AA','680'),('1987-10-01','AA','817'),('1987-10-01','AA','817'),('1987-10-01','AA','824'),('1987-10-01','AA','824'),('1987-10-01','AA','824'),('1987-10-01','AA','824'),('1987-10-01','AA','832'),('1987-10-01','AA','832'),('1987-10-01','AA','852'),('1987-10-01','AA','852'),('1987-10-01','AA','866'),('1987-10-01','AA','866'),('1987-10-01','AA','871'),('1987-10-01','AA','871'),('1987-10-01','AA','880'),('1987-10-01','AA','880'),('1987-10-01','AA','880'),('1987-10-01','AA','880'),('1987-10-01','AA','883'),('1987-10-01','AA','883'),('1987-10-01','AA','885'),('1987-10-01','AA','885'),('1987-10-01','AA','885'),('1987-10-01','AA','890'),('1987-10-01','AA','893'),('1987-10-01','AA','893'),('1987-10-01','AA','905'),('1987-10-01','AA','905'),('1987-10-01','AA','929'),('1987-10-01','AA','929'),('1987-10-01','AA','936'),('1987-10-01','AA','936'),('1987-10-01','AA','937'),('1987-10-01','AA','937'),('1987-10-01','AA','955'),('1987-10-01','AA','966'),('1987-10-01','AA','1002'),('1987-10-01','AA','1002'),('1987-10-01','AA','1004'),('1987-10-01','AA','1004'),('1987-10-01','AA','1015'),('1987-10-01','AA','1015'),('1987-10-01','AA','1021'),('1987-10-01','AA','1021'),('1987-10-01','AA','1041'),('1987-10-01','AA','1041'),('1987-10-01','AA','1046'),('1987-10-01','AA','1046'),('1987-10-01','AA','1048'),('1987-10-01','AA','1048'),('1987-10-01','AA','1061'),('1987-10-01','AA','1061'),('1987-10-01','AA','1088'),('1987-10-01','AA','1088'),('1987-10-01','AA','2033'),('1987-10-01','AA','2033'),('1987-10-01','AA','2050'),('1987-10-01','AA','2058'),('1987-10-01','AA','2071'),('1987-10-01','AA','2071'),('1987-10-01','AA','2086'),('1987-10-01','AA','2105'),('1987-10-01','AA','2111'),('1987-10-01','AA','2123'),('1987-10-01','AA','2123'),('1987-10-01','AA','2147'),('1987-10-01','AA','2147'),('1987-10-01','AA','2199'),('1987-10-01','AA','2199'),('1987-10-01','AA','2207'),('1987-10-01','AA','2207'),('1987-10-01','AA','2217'),('1987-10-01','AA','2230'),('1987-10-01','AA','2245'),('1987-10-01','AA','2251'),('1987-10-01','AA','2251'),('1987-10-01','AA','2275'),('1987-10-01','AA','2278'),('1987-10-01','AA','2351'),('1987-10-01','AA','2357'),('1987-10-01','AA','2490'),('1987-10-01','AA','2528'),('1987-10-01','AA','2528'),('1987-10-01','AA','2735'),('1987-10-01','AA','2735'),('1987-10-01','AA','2751'),('1987-10-01','AL','2'),('1987-10-01','AL','2'),('1987-10-01','AL','7'),('1987-10-01','AL','7'),('1987-10-01','AL','26'),('1987-10-01','AL','26'),('1987-10-01','AL','34'),('1987-10-01','AL','34'),('1987-10-01','AL','36'),('1987-10-01','AL','36'),('1987-10-01','AL','45'),('1987-10-01','AL','45'),('1987-10-01','AL','45'),('1987-10-01','AL','91'),('1987-10-01','AL','91'),('1987-10-01','AL','104'),('1987-10-01','AL','104'),('1987-10-01','AL','104'),('1987-10-01','AL','109'),('1987-10-01','AL','112'),('1987-10-01','AL','112'),('1987-10-01','AL','123'),('1987-10-01','AL','149'),('1987-10-01','AL','160'),('1987-10-01','AL','160'),('1987-10-01','AL','165'),('1987-10-01','AL','171'),('1987-10-01','AL','171'),('1987-10-01','AL','176'),('1987-10-01','AL','176'),('1987-10-01','AL','179'),('1987-10-01','AL','215'),('1987-10-01','AL','231'),('1987-10-01','AL','263'),('1987-10-01','AL','263'),('1987-10-01','AL','268'),('1987-10-01','AL','268'),('1987-10-01','AL','268'),('1987-10-01','AL','281'),('1987-10-01','AL','281'),('1987-10-01','AL','287'),('1987-10-01','AL','287'),('1987-10-01','AL','309'),('1987-10-01','AL','309'),('1987-10-01','AL','341'),('1987-10-01','AL','344'),('1987-10-01','AL','344'),('1987-10-01','AL','357'),('1987-10-01','AL','357'),('1987-10-01','AL','368'),('1987-10-01','AL','381'),('1987-10-01','AL','396'),('1987-10-01','AL','397'),('1987-10-01','AL','397'),('1987-10-01','AL','416'),('1987-10-01','AL','416'),('1987-10-01','AL','417'),('1987-10-01','AL','438'),('1987-10-01','AL','446'),('1987-10-01','AL','451'),('1987-10-01','AL','451'),('1987-10-01','AL','491'),('1987-10-01','AL','491'),('1987-10-01','AL','523'),('1987-10-01','AL','523'),('1987-10-01','AL','523'),('1987-10-01','AL','525'),('1987-10-01','AL','525'),('1987-10-01','AL','533'),('1987-10-01','AL','533'),('1987-10-01','AL','546'),('1987-10-01','AL','546'),('1987-10-01','AL','556'),('1987-10-01','AL','556'),('1987-10-01','AL','601'),('1987-10-01','AL','601'),('1987-10-01','AL','627'),('1987-10-01','AL','629'),('1987-10-01','AL','670'),('1987-10-01','AL','670'),('1987-10-01','AL','670'),('1987-10-01','AL','673'),('1987-10-01','AL','680'),('1987-10-01','AL','700'),('1987-10-02','AA','2'),('1987-10-02','AA','2'),('1987-10-02','AA','2'),('1987-10-02','AA','7'),('1987-10-02','AA','7'),('1987-10-02','AA','26'),('1987-10-02','AA','34'),('1987-10-02','AA','36'),('1987-10-02','AA','91'),('1987-10-02','AA','101'),('1987-10-02','AA','101'),('1987-10-02','AA','109'),('1987-10-02','AA','109'),('1987-10-02','AA','112'),('1987-10-02','AA','123'),('1987-10-02','AA','123'),('1987-10-02','AA','160'),('1987-10-02','AA','165'),('1987-10-02','AA','165'),('1987-10-02','AA','165'),('1987-10-02','AA','176'),('1987-10-02','AA','176'),('1987-10-02','AA','176'),('1987-10-02','AA','176'),('1987-10-02','AA','179'),('1987-10-02','AA','179'),('1987-10-02','AA','215'),('1987-10-02','AA','215'),('1987-10-02','AA','231'),('1987-10-02','AA','231'),('1987-10-02','AA','263'),('1987-10-02','AA','263'),('1987-10-02','AA','268'),('1987-10-02','AA','281'),('1987-10-02','AA','287'),('1987-10-02','AA','287'),('1987-10-02','AA','309'),('1987-10-02','AA','309'),('1987-10-02','AA','309'),('1987-10-02','AA','341'),('1987-10-02','AA','344'),('1987-10-02','AA','344'),('1987-10-02','AA','347'),('1987-10-02','AA','347'),('1987-10-02','AA','368'),('1987-10-02','AA','381'),('1987-10-02','AA','381'),('1987-10-02','AA','381'),('1987-10-02','AA','396'),('1987-10-02','AA','396'),('1987-10-02','AA','397'),('1987-10-02','AA','397'),('1987-10-02','AA','417'),('1987-10-02','AA','417'),('1987-10-02','AA','446'),('1987-10-02','AA','451'),('1987-10-02','AA','451'),('1987-10-02','AA','460'),('1987-10-02','AA','460'),('1987-10-02','AA','491'),('1987-10-02','AA','504'),('1987-10-02','AA','504'),('1987-10-02','AA','519'),('1987-10-02','AA','519'),('1987-10-02','AA','523'),('1987-10-02','AA','523'),('1987-10-02','AA','525'),('1987-10-02','AA','525'),('1987-10-02','AA','525'),('1987-10-02','AA','533'),('1987-10-02','AA','533'),('1987-10-02','AA','533'),('1987-10-02','AA','546'),('1987-10-02','AA','546'),('1987-10-02','AA','546'),('1987-10-02','AA','546'),('1987-10-02','AA','556'),('1987-10-02','AA','556'),('1987-10-02','AA','556'),('1987-10-02','AA','597'),('1987-10-02','AA','597'),('1987-10-02','AA','597'),('1987-10-02','AA','601'),('1987-10-02','AA','601'),('1987-10-02','AA','627'),('1987-10-02','AA','629'),('1987-10-02','AA','629'),('1987-10-02','AA','670'),('1987-10-02','AA','673'),('1987-10-02','AA','673'),('1987-10-02','AA','680'),('1987-10-02','AA','680'),('1987-10-02','AA','817'),('1987-10-02','AA','817'),('1987-10-02','AA','824'),('1987-10-02','AA','824'),('1987-10-02','AA','824'),('1987-10-02','AA','824'),('1987-10-02','AA','832'),('1987-10-02','AA','832'),('1987-10-02','AA','852'),('1987-10-02','AA','866'),('1987-10-02','AA','866'),('1987-10-02','AA','871'),('1987-10-02','AA','871'),('1987-10-02','AA','880'),('1987-10-02','AA','880'),('1987-10-02','AA','880'),('1987-10-02','AA','880'),('1987-10-02','AA','883'),('1987-10-02','AA','883'),('1987-10-02','AA','885'),('1987-10-02','AA','885'),('1987-10-02','AA','885'),('1987-10-02','AA','890'),('1987-10-02','AA','890'),('1987-10-02','AA','893'),('1987-10-02','AA','893'),('1987-10-02','AA','905'),('1987-10-02','AA','905'),('1987-10-02','AA','915'),('1987-10-02','AA','929'),('1987-10-02','AA','929'),('1987-10-02','AA','936'),('1987-10-02','AA','936'),('1987-10-02','AA','937'),('1987-10-02','AA','937'),('1987-10-02','AA','955'),('1987-10-02','AA','955'),('1987-10-02','AA','966'),('1987-10-02','AA','1002'),('1987-10-02','AA','1002'),('1987-10-02','AA','1004'),('1987-10-02','AA','1004'),('1987-10-02','AA','1015'),('1987-10-02','AA','1015'),('1987-10-02','AA','1021'),('1987-10-02','AA','1021'),('1987-10-02','AA','1041'),('1987-10-02','AA','1041'),('1987-10-02','AA','1046'),('1987-10-02','AA','1046'),('1987-10-02','AA','1048'),('1987-10-02','AA','1048'),('1987-10-02','AA','1061'),('1987-10-02','AA','1061'),('1987-10-02','AA','1088'),('1987-10-02','AA','1088'),('1987-10-02','AA','2033'),('1987-10-02','AA','2033'),('1987-10-02','AA','2050'),('1987-10-02','AA','2058'),('1987-10-02','AA','2071'),('1987-10-02','AA','2071'),('1987-10-02','AA','2086'),('1987-10-02','AA','2105'),('1987-10-02','AA','2111'),('1987-10-02','AA','2123'),('1987-10-02','AA','2123'),('1987-10-02','AA','2147'),('1987-10-02','AA','2147'),('1987-10-02','AA','2199'),('1987-10-02','AA','2199'),('1987-10-02','AA','2207'),('1987-10-02','AA','2207'),('1987-10-02','AA','2217'),('1987-10-02','AA','2230'),('1987-10-02','AA','2245'),('1987-10-02','AA','2251'),('1987-10-02','AA','2251'),('1987-10-02','AA','2275'),('1987-10-02','AA','2278'),('1987-10-02','AA','2351'),('1987-10-02','AA','2357'),('1987-10-02','AA','2361'),('1987-10-02','AA','2490'),('1987-10-02','AA','2528'),('1987-10-02','AA','2528'),('1987-10-02','AA','2735'),('1987-10-02','AA','2735'),('1987-10-02','AA','2751'),('1987-10-02','AL','2'),('1987-10-02','AL','2'),('1987-10-02','AL','7'),('1987-10-02','AL','7'),('1987-10-02','AL','26'),('1987-10-02','AL','26'),('1987-10-02','AL','34'),('1987-10-02','AL','34'),('1987-10-02','AL','36'),('1987-10-02','AL','36'),('1987-10-02','AL','45'),('1987-10-02','AL','45'),('1987-10-02','AL','45'),('1987-10-02','AL','91'),('1987-10-02','AL','91'),('1987-10-02','AL','104'),('1987-10-02','AL','104'),('1987-10-02','AL','104'),('1987-10-02','AL','109'),('1987-10-02','AL','112'),('1987-10-02','AL','112'),('1987-10-02','AL','123'),('1987-10-02','AL','149'),('1987-10-02','AL','160'),('1987-10-02','AL','160'),('1987-10-02','AL','165'),('1987-10-02','AL','171'),('1987-10-02','AL','171'),('1987-10-02','AL','176'),('1987-10-02','AL','176'),('1987-10-02','AL','179'),('1987-10-02','AL','215'),('1987-10-02','AL','231'),('1987-10-02','AL','263'),('1987-10-02','AL','263'),('1987-10-02','AL','268'),('1987-10-02','AL','268'),('1987-10-02','AL','268'),('1987-10-02','AL','281'),('1987-10-02','AL','281'),('1987-10-02','AL','287'),('1987-10-02','AL','287'),('1987-10-02','AL','309'),('1987-10-02','AL','309'),('1987-10-02','AL','341'),('1987-10-02','AL','344'),('1987-10-02','AL','344'),('1987-10-02','AL','357'),('1987-10-02','AL','357'),('1987-10-02','AL','368'),('1987-10-02','AL','381'),('1987-10-02','AL','396'),('1987-10-02','AL','397'),('1987-10-02','AL','397'),('1987-10-02','AL','416'),('1987-10-02','AL','416'),('1987-10-02','AL','417'),('1987-10-02','AL','438'),('1987-10-02','AL','438'),('1987-10-02','AL','446'),('1987-10-02','AL','451'),('1987-10-02','AL','451'),('1987-10-02','AL','491'),('1987-10-02','AL','491'),('1987-10-02','AL','523'),('1987-10-02','AL','523'),('1987-10-02','AL','523'),('1987-10-02','AL','525'),('1987-10-02','AL','525'),('1987-10-02','AL','533'),('1987-10-02','AL','533'),('1987-10-02','AL','546'),('1987-10-02','AL','546'),('1987-10-02','AL','556'),('1987-10-02','AL','556'),('1987-10-02','AL','601'),('1987-10-02','AL','601'),('1987-10-02','AL','627'),('1987-10-02','AL','629'),('1987-10-02','AL','670'),('1987-10-02','AL','670'),('1987-10-02','AL','670'),('1987-10-02','AL','673'),('1987-10-02','AL','680'),('1987-10-03','AA','2'),('1987-10-03','AA','2'),('1987-10-03','AA','2'),('1987-10-03','AA','7'),('1987-10-03','AA','7'),('1987-10-03','AA','26'),('1987-10-03','AA','34'),('1987-10-03','AA','36'),('1987-10-03','AA','91'),('1987-10-03','AA','101'),('1987-10-03','AA','101'),('1987-10-03','AA','109'),('1987-10-03','AA','109'),('1987-10-03','AA','112'),('1987-10-03','AA','123'),('1987-10-03','AA','123'),('1987-10-03','AA','165'),('1987-10-03','AA','165'),('1987-10-03','AA','165'),('1987-10-03','AA','176'),('1987-10-03','AA','176'),('1987-10-03','AA','176'),('1987-10-03','AA','176'),('1987-10-03','AA','179'),('1987-10-03','AA','179'),('1987-10-03','AA','215'),('1987-10-03','AA','215'),('1987-10-03','AA','231'),('1987-10-03','AA','231'),('1987-10-03','AA','263'),('1987-10-03','AA','263'),('1987-10-03','AA','268'),('1987-10-03','AA','281'),('1987-10-03','AA','287'),('1987-10-03','AA','287'),('1987-10-03','AA','309'),('1987-10-03','AA','309'),('1987-10-03','AA','309'),('1987-10-03','AA','341'),('1987-10-03','AA','344'),('1987-10-03','AA','344'),('1987-10-03','AA','347'),('1987-10-03','AA','347'),('1987-10-03','AA','368'),('1987-10-03','AA','381'),('1987-10-03','AA','381'),('1987-10-03','AA','381'),('1987-10-03','AA','396'),('1987-10-03','AA','396'),('1987-10-03','AA','397'),('1987-10-03','AA','397'),('1987-10-03','AA','417'),('1987-10-03','AA','417'),('1987-10-03','AA','446'),('1987-10-03','AA','451'),('1987-10-03','AA','451'),('1987-10-03','AA','460'),('1987-10-03','AA','460'),('1987-10-03','AA','491'),('1987-10-03','AA','491'),('1987-10-03','AA','504'),('1987-10-03','AA','504'),('1987-10-03','AA','519'),('1987-10-03','AA','519'),('1987-10-03','AA','523'),('1987-10-03','AA','523'),('1987-10-03','AA','525'),('1987-10-03','AA','525'),('1987-10-03','AA','525'),('1987-10-03','AA','533'),('1987-10-03','AA','533'),('1987-10-03','AA','546'),('1987-10-03','AA','546'),('1987-10-03','AA','546'),('1987-10-03','AA','546'),('1987-10-03','AA','556'),('1987-10-03','AA','556'),('1987-10-03','AA','556'),('1987-10-03','AA','597'),('1987-10-03','AA','597'),('1987-10-03','AA','597'),('1987-10-03','AA','601'),('1987-10-03','AA','601'),('1987-10-03','AA','627'),('1987-10-03','AA','629'),('1987-10-03','AA','629'),('1987-10-03','AA','670'),('1987-10-03','AA','673'),('1987-10-03','AA','673'),('1987-10-03','AA','680'),('1987-10-03','AA','680'),('1987-10-03','AA','817'),('1987-10-03','AA','817'),('1987-10-03','AA','824'),('1987-10-03','AA','824'),('1987-10-03','AA','824'),('1987-10-03','AA','824'),('1987-10-03','AA','832'),('1987-10-03','AA','832'),('1987-10-03','AA','852'),('1987-10-03','AA','852'),('1987-10-03','AA','866'),('1987-10-03','AA','866'),('1987-10-03','AA','871'),('1987-10-03','AA','871'),('1987-10-03','AA','880'),('1987-10-03','AA','880'),('1987-10-03','AA','880'),('1987-10-03','AA','880'),('1987-10-03','AA','883'),('1987-10-03','AA','883'),('1987-10-03','AA','885'),('1987-10-03','AA','885'),('1987-10-03','AA','885'),('1987-10-03','AA','890'),('1987-10-03','AA','890'),('1987-10-03','AA','893'),('1987-10-03','AA','893'),('1987-10-03','AA','905'),('1987-10-03','AA','905'),('1987-10-03','AA','915'),('1987-10-03','AA','929'),('1987-10-03','AA','929'),('1987-10-03','AA','936'),('1987-10-03','AA','936'),('1987-10-03','AA','937'),('1987-10-03','AA','937'),('1987-10-03','AA','955'),('1987-10-03','AA','955'),('1987-10-03','AA','966'),('1987-10-03','AA','1002'),('1987-10-03','AA','1002'),('1987-10-03','AA','1004'),('1987-10-03','AA','1004'),('1987-10-03','AA','1015'),('1987-10-03','AA','1015'),('1987-10-03','AA','1021'),('1987-10-03','AA','1041'),('1987-10-03','AA','1041'),('1987-10-03','AA','1046'),('1987-10-03','AA','1046'),('1987-10-03','AA','1048'),('1987-10-03','AA','1048'),('1987-10-03','AA','1061'),('1987-10-03','AA','1061'),('1987-10-03','AA','1088'),('1987-10-03','AA','1088'),('1987-10-03','AA','2033'),('1987-10-03','AA','2033'),('1987-10-03','AA','2050'),('1987-10-03','AA','2058'),('1987-10-03','AA','2071'),('1987-10-03','AA','2071'),('1987-10-03','AA','2086'),('1987-10-03','AA','2105'),('1987-10-03','AA','2111'),('1987-10-03','AA','2123'),('1987-10-03','AA','2123'),('1987-10-03','AA','2147'),('1987-10-03','AA','2147'),('1987-10-03','AA','2199'),('1987-10-03','AA','2207'),('1987-10-03','AA','2207'),('1987-10-03','AA','2245'),('1987-10-03','AA','2251'),('1987-10-03','AA','2251'),('1987-10-03','AA','2275'),('1987-10-03','AA','2278'),('1987-10-03','AA','2361'),('1987-10-03','AA','2490'),('1987-10-03','AA','2528'),('1987-10-03','AA','2528'),('1987-10-03','AA','2735'),('1987-10-03','AA','2735'),('1987-10-03','AL','2'),('1987-10-03','AL','2'),('1987-10-03','AL','7'),('1987-10-03','AL','7'),('1987-10-03','AL','26'),('1987-10-03','AL','26'),('1987-10-03','AL','34'),('1987-10-03','AL','34'),('1987-10-03','AL','36'),('1987-10-03','AL','36'),('1987-10-03','AL','45'),('1987-10-03','AL','45'),('1987-10-03','AL','45'),('1987-10-03','AL','91'),('1987-10-03','AL','91'),('1987-10-03','AL','104'),('1987-10-03','AL','104'),('1987-10-03','AL','109'),('1987-10-03','AL','112'),('1987-10-03','AL','112'),('1987-10-03','AL','149'),('1987-10-03','AL','160'),('1987-10-03','AL','160'),('1987-10-03','AL','165'),('1987-10-03','AL','171'),('1987-10-03','AL','171'),('1987-10-03','AL','176'),('1987-10-03','AL','176'),('1987-10-03','AL','179'),('1987-10-03','AL','215'),('1987-10-03','AL','231'),('1987-10-03','AL','263'),('1987-10-03','AL','287'),('1987-10-03','AL','287'),('1987-10-03','AL','309'),('1987-10-03','AL','309'),('1987-10-03','AL','344'),('1987-10-03','AL','344'),('1987-10-03','AL','357'),('1987-10-03','AL','357'),('1987-10-03','AL','381'),('1987-10-03','AL','396'),('1987-10-03','AL','397'),('1987-10-03','AL','397'),('1987-10-03','AL','397'),('1987-10-03','AL','416'),('1987-10-03','AL','417'),('1987-10-03','AL','438'),('1987-10-03','AL','451'),('1987-10-03','AL','451'),('1987-10-03','AL','491'),('1987-10-03','AL','491'),('1987-10-03','AL','523'),('1987-10-03','AL','523'),('1987-10-03','AL','525'),('1987-10-03','AL','525'),('1987-10-03','AL','533'),('1987-10-03','AL','546'),('1987-10-03','AL','546'),('1987-10-03','AL','556'),('1987-10-03','AL','556'),('1987-10-03','AL','601'),('1987-10-03','AL','601'),('1987-10-03','AL','627'),('1987-10-03','AL','670'),('1987-10-03','AL','673'),('1987-10-03','AL','680'),('1987-10-03','AL','905'),('1987-10-03','AL','936'),('1987-10-03','AL','966'),('1987-10-04','AA','2'),('1987-10-04','AA','2'),('1987-10-04','AA','2'),('1987-10-04','AA','7'),('1987-10-04','AA','7'),('1987-10-04','AA','26'),('1987-10-04','AA','34'),('1987-10-04','AA','36'),('1987-10-04','AA','91'),('1987-10-04','AA','101'),('1987-10-04','AA','101'),('1987-10-04','AA','109'),('1987-10-04','AA','109'),('1987-10-04','AA','112'),('1987-10-04','AA','123'),('1987-10-04','AA','123'),('1987-10-04','AA','160'),('1987-10-04','AA','165'),('1987-10-04','AA','165'),('1987-10-04','AA','165'),('1987-10-04','AA','176'),('1987-10-04','AA','176'),('1987-10-04','AA','176'),('1987-10-04','AA','176'),('1987-10-04','AA','179'),('1987-10-04','AA','179'),('1987-10-04','AA','215'),('1987-10-04','AA','215'),('1987-10-04','AA','231'),('1987-10-04','AA','231'),('1987-10-04','AA','263'),('1987-10-04','AA','263'),('1987-10-04','AA','268'),('1987-10-04','AA','268'),('1987-10-04','AA','281'),('1987-10-04','AA','287'),('1987-10-04','AA','287'),('1987-10-04','AA','309'),('1987-10-04','AA','309'),('1987-10-04','AA','309'),('1987-10-04','AA','341'),('1987-10-04','AA','344'),('1987-10-04','AA','344'),('1987-10-04','AA','347'),('1987-10-04','AA','347'),('1987-10-04','AA','381'),('1987-10-04','AA','381'),('1987-10-04','AA','381'),('1987-10-04','AA','396'),('1987-10-04','AA','396'),('1987-10-04','AA','397'),('1987-10-04','AA','397'),('1987-10-04','AA','417'),('1987-10-04','AA','417'),('1987-10-04','AA','446'),('1987-10-04','AA','451'),('1987-10-04','AA','451'),('1987-10-04','AA','460'),('1987-10-04','AA','460'),('1987-10-04','AA','491'),('1987-10-04','AA','491'),('1987-10-04','AA','504'),('1987-10-04','AA','504'),('1987-10-04','AA','519'),('1987-10-04','AA','519'),('1987-10-04','AA','523'),('1987-10-04','AA','523'),('1987-10-04','AA','525'),('1987-10-04','AA','525'),('1987-10-04','AA','525'),('1987-10-04','AA','533'),('1987-10-04','AA','533'),('1987-10-04','AA','533'),('1987-10-04','AA','546'),('1987-10-04','AA','546'),('1987-10-04','AA','546'),('1987-10-04','AA','546'),('1987-10-04','AA','556'),('1987-10-04','AA','556'),('1987-10-04','AA','556'),('1987-10-04','AA','597'),('1987-10-04','AA','597'),('1987-10-04','AA','597'),('1987-10-04','AA','601'),('1987-10-04','AA','601'),('1987-10-04','AA','627'),('1987-10-04','AA','629'),('1987-10-04','AA','629'),('1987-10-04','AA','670'),('1987-10-04','AA','673'),('1987-10-04','AA','673'),('1987-10-04','AA','680'),('1987-10-04','AA','680'),('1987-10-04','AA','817'),('1987-10-04','AA','817'),('1987-10-04','AA','824'),('1987-10-04','AA','824'),('1987-10-04','AA','824'),('1987-10-04','AA','832'),('1987-10-04','AA','832'),('1987-10-04','AA','852'),('1987-10-04','AA','852'),('1987-10-04','AA','866'),('1987-10-04','AA','866'),('1987-10-04','AA','871'),('1987-10-04','AA','871'),('1987-10-04','AA','880'),('1987-10-04','AA','880'),('1987-10-04','AA','880'),('1987-10-04','AA','880'),('1987-10-04','AA','883'),('1987-10-04','AA','883'),('1987-10-04','AA','885'),('1987-10-04','AA','885'),('1987-10-04','AA','890'),('1987-10-04','AA','890'),('1987-10-04','AA','893'),('1987-10-04','AA','893'),('1987-10-04','AA','905'),('1987-10-04','AA','905'),('1987-10-04','AA','915'),('1987-10-04','AA','929'),('1987-10-04','AA','929'),('1987-10-04','AA','936'),('1987-10-04','AA','936'),('1987-10-04','AA','937'),('1987-10-04','AA','937'),('1987-10-04','AA','955'),('1987-10-04','AA','955'),('1987-10-04','AA','966'),('1987-10-04','AA','1002'),('1987-10-04','AA','1002'),('1987-10-04','AA','1004'),('1987-10-04','AA','1004'),('1987-10-04','AA','1015'),('1987-10-04','AA','1021'),('1987-10-04','AA','1021'),('1987-10-04','AA','1041'),('1987-10-04','AA','1041'),('1987-10-04','AA','1046'),('1987-10-04','AA','1046'),('1987-10-04','AA','1048'),('1987-10-04','AA','1048'),('1987-10-04','AA','1061'),('1987-10-04','AA','1061'),('1987-10-04','AA','1088'),('1987-10-04','AA','1088'),('1987-10-04','AA','2033'),('1987-10-04','AA','2033'),('1987-10-04','AA','2050'),('1987-10-04','AA','2058'),('1987-10-04','AA','2071'),('1987-10-04','AA','2071'),('1987-10-04','AA','2086'),('1987-10-04','AA','2111'),('1987-10-04','AA','2123'),('1987-10-04','AA','2123'),('1987-10-04','AA','2147'),('1987-10-04','AA','2147'),('1987-10-04','AA','2199'),('1987-10-04','AA','2199'),('1987-10-04','AA','2207'),('1987-10-04','AA','2207'),('1987-10-04','AA','2230'),('1987-10-04','AA','2245'),('1987-10-04','AA','2251'),('1987-10-04','AA','2251'),('1987-10-04','AA','2275'),('1987-10-04','AA','2278'),('1987-10-04','AA','2357'),('1987-10-04','AA','2361'),('1987-10-04','AA','2490'),('1987-10-04','AA','2528'),('1987-10-04','AA','2528'),('1987-10-04','AA','2735'),('1987-10-04','AA','2735'),('1987-10-04','AA','2751'),('1987-10-04','AL','7'),('1987-10-04','AL','7'),('1987-10-04','AL','26'),('1987-10-04','AL','26'),('1987-10-04','AL','34'),('1987-10-04','AL','34'),('1987-10-04','AL','36'),('1987-10-04','AL','36'),('1987-10-04','AL','45'),('1987-10-04','AL','45'),('1987-10-04','AL','45'),('1987-10-04','AL','91'),('1987-10-04','AL','91'),('1987-10-04','AL','104'),('1987-10-04','AL','123'),('1987-10-04','AL','149'),('1987-10-04','AL','160'),('1987-10-04','AL','160'),('1987-10-04','AL','165'),('1987-10-04','AL','171'),('1987-10-04','AL','171'),('1987-10-04','AL','176'),('1987-10-04','AL','176'),('1987-10-04','AL','179'),('1987-10-04','AL','215'),('1987-10-04','AL','231'),('1987-10-04','AL','263'),('1987-10-04','AL','263'),('1987-10-04','AL','281'),('1987-10-04','AL','281'),('1987-10-04','AL','309'),('1987-10-04','AL','309'),('1987-10-04','AL','341'),('1987-10-04','AL','344'),('1987-10-04','AL','344'),('1987-10-04','AL','357'),('1987-10-04','AL','357'),('1987-10-04','AL','368'),('1987-10-04','AL','416'),('1987-10-04','AL','416'),('1987-10-04','AL','417'),('1987-10-04','AL','438'),('1987-10-04','AL','438'),('1987-10-04','AL','451'),('1987-10-04','AL','491'),('1987-10-04','AL','491'),('1987-10-04','AL','525'),('1987-10-04','AL','525'),('1987-10-04','AL','533'),('1987-10-04','AL','533'),('1987-10-04','AL','546'),('1987-10-04','AL','546'),('1987-10-04','AL','556'),('1987-10-04','AL','556'),('1987-10-04','AL','601'),('1987-10-04','AL','627'),('1987-10-04','AL','629'),('1987-10-04','AL','670'),('1987-10-04','AL','670'),('1987-10-04','AL','670'),('1987-10-04','AL','673'),('1987-10-04','AL','680'),('1987-10-04','AL','937'),('1987-10-04','AL','937'),('1987-10-04','AL','955'),('1987-10-12','AA','2'),('1987-10-12','AA','2'),('1987-10-12','AA','2'),('1987-10-12','AA','7'),('1987-10-12','AA','7'),('1987-10-12','AA','26'),('1987-10-12','AA','34'),('1987-10-12','AA','36'),('1987-10-12','AA','91'),('1987-10-12','AA','101'),('1987-10-12','AA','101'),('1987-10-12','AA','109'),('1987-10-12','AA','109'),('1987-10-12','AA','112'),('1987-10-12','AA','123'),('1987-10-12','AA','123'),('1987-10-12','AA','160'),('1987-10-12','AA','165'),('1987-10-12','AA','165'),('1987-10-12','AA','165'),('1987-10-12','AA','176'),('1987-10-12','AA','176'),('1987-10-12','AA','176'),('1987-10-12','AA','176'),('1987-10-12','AA','179'),('1987-10-12','AA','179'),('1987-10-12','AA','215'),('1987-10-12','AA','215'),('1987-10-12','AA','231'),('1987-10-12','AA','263'),('1987-10-12','AA','263'),('1987-10-12','AA','268'),('1987-10-12','AA','268'),('1987-10-12','AA','281'),('1987-10-12','AA','287'),('1987-10-12','AA','287'),('1987-10-12','AA','309'),('1987-10-12','AA','309'),('1987-10-12','AA','309'),('1987-10-12','AA','341'),('1987-10-12','AA','344'),('1987-10-12','AA','344'),('1987-10-12','AA','347'),('1987-10-12','AA','347'),('1987-10-12','AA','368'),('1987-10-12','AA','381'),('1987-10-12','AA','381'),('1987-10-12','AA','381'),('1987-10-12','AA','396'),('1987-10-12','AA','396'),('1987-10-12','AA','397'),('1987-10-12','AA','397'),('1987-10-12','AA','417'),('1987-10-12','AA','417'),('1987-10-12','AA','446'),('1987-10-12','AA','451'),('1987-10-12','AA','451'),('1987-10-12','AA','460'),('1987-10-12','AA','460'),('1987-10-12','AA','491'),('1987-10-12','AA','504'),('1987-10-12','AA','504'),('1987-10-12','AA','519'),('1987-10-12','AA','523'),('1987-10-12','AA','523'),('1987-10-12','AA','525'),('1987-10-12','AA','525'),('1987-10-12','AA','525'),('1987-10-12','AA','533'),('1987-10-12','AA','533'),('1987-10-12','AA','533'),('1987-10-12','AA','546'),('1987-10-12','AA','546'),('1987-10-12','AA','546'),('1987-10-12','AA','546'),('1987-10-12','AA','556'),('1987-10-12','AA','556'),('1987-10-12','AA','556'),('1987-10-12','AA','597'),('1987-10-12','AA','597'),('1987-10-12','AA','597'),('1987-10-12','AA','601'),('1987-10-12','AA','601'),('1987-10-12','AA','627'),('1987-10-12','AA','629'),('1987-10-12','AA','629'),('1987-10-12','AA','670'),('1987-10-12','AA','673'),('1987-10-12','AA','673'),('1987-10-12','AA','680'),('1987-10-12','AA','680'),('1987-10-12','AA','817'),('1987-10-12','AA','817'),('1987-10-12','AA','824'),('1987-10-12','AA','824'),('1987-10-12','AA','824'),('1987-10-12','AA','824'),('1987-10-12','AA','832'),('1987-10-12','AA','832'),('1987-10-12','AA','852'),('1987-10-12','AA','852'),('1987-10-12','AA','866'),('1987-10-12','AA','866'),('1987-10-12','AA','871'),('1987-10-12','AA','871'),('1987-10-12','AA','880'),('1987-10-12','AA','880'),('1987-10-12','AA','880'),('1987-10-12','AA','880'),('1987-10-12','AA','883'),('1987-10-12','AA','883'),('1987-10-12','AA','885'),('1987-10-12','AA','885'),('1987-10-12','AA','885'),('1987-10-12','AA','890'),('1987-10-12','AA','890'),('1987-10-12','AA','893'),('1987-10-12','AA','893'),('1987-10-12','AA','905'),('1987-10-12','AA','905'),('1987-10-12','AA','915'),('1987-10-12','AA','929'),('1987-10-12','AA','929'),('1987-10-12','AA','936'),('1987-10-12','AA','936'),('1987-10-12','AA','937'),('1987-10-12','AA','937'),('1987-10-12','AA','955'),('1987-10-12','AA','955'),('1987-10-12','AA','966'),('1987-10-12','AA','1002'),('1987-10-12','AA','1002'),('1987-10-12','AA','1004'),('1987-10-12','AA','1015'),('1987-10-12','AA','1015'),('1987-10-12','AA','1021'),('1987-10-12','AA','1021'),('1987-10-12','AA','1041'),('1987-10-12','AA','1041'),('1987-10-12','AA','1046'),('1987-10-12','AA','1046'),('1987-10-12','AA','1048'),('1987-10-12','AA','1048'),('1987-10-12','AA','1061'),('1987-10-12','AA','1061'),('1987-10-12','AA','1088'),('1987-10-12','AA','1088'),('1987-10-12','AA','2033'),('1987-10-12','AA','2033'),('1987-10-12','AA','2050'),('1987-10-12','AA','2058'),('1987-10-12','AA','2071'),('1987-10-12','AA','2071'),('1987-10-12','AA','2086'),('1987-10-12','AA','2105'),('1987-10-12','AA','2111'),('1987-10-12','AA','2123'),('1987-10-12','AA','2123'),('1987-10-12','AA','2147'),('1987-10-12','AA','2147'),('1987-10-12','AA','2199'),('1987-10-12','AA','2199'),('1987-10-12','AA','2207'),('1987-10-12','AA','2207'),('1987-10-12','AA','2217'),('1987-10-12','AA','2230'),('1987-10-12','AA','2245'),('1987-10-12','AA','2251'),('1987-10-12','AA','2251'),('1987-10-12','AA','2275'),('1987-10-12','AA','2278'),('1987-10-12','AA','2351'),('1987-10-12','AA','2357'),('1987-10-12','AA','2361'),('1987-10-12','AA','2490'),('1987-10-12','AA','2528'),('1987-10-12','AA','2528'),('1987-10-12','AA','2735'),('1987-10-12','AA','2735'),('1987-10-12','AA','2751'),('1987-10-12','AL','2'),('1987-10-12','AL','2'),('1987-10-12','AL','7'),('1987-10-12','AL','7'),('1987-10-12','AL','26'),('1987-10-12','AL','26'),('1987-10-12','AL','34'),('1987-10-12','AL','34'),('1987-10-12','AL','36'),('1987-10-12','AL','36'),('1987-10-12','AL','45'),('1987-10-12','AL','45'),('1987-10-12','AL','45'),('1987-10-12','AL','91'),('1987-10-12','AL','91'),('1987-10-12','AL','104'),('1987-10-12','AL','104'),('1987-10-12','AL','104'),('1987-10-12','AL','109'),('1987-10-12','AL','112'),('1987-10-12','AL','112'),('1987-10-12','AL','123'),('1987-10-12','AL','149'),('1987-10-12','AL','160'),('1987-10-12','AL','160'),('1987-10-12','AL','165'),('1987-10-12','AL','171'),('1987-10-12','AL','171'),('1987-10-12','AL','176'),('1987-10-12','AL','176'),('1987-10-12','AL','179'),('1987-10-12','AL','215'),('1987-10-12','AL','231'),('1987-10-12','AL','263'),('1987-10-12','AL','263'),('1987-10-12','AL','268'),('1987-10-12','AL','268'),('1987-10-12','AL','268'),('1987-10-12','AL','281'),('1987-10-12','AL','281'),('1987-10-12','AL','287'),('1987-10-12','AL','287'),('1987-10-12','AL','309'),('1987-10-12','AL','309'),('1987-10-12','AL','341'),('1987-10-12','AL','344'),('1987-10-12','AL','344'),('1987-10-12','AL','357'),('1987-10-12','AL','357'),('1987-10-12','AL','368'),('1987-10-12','AL','381'),('1987-10-12','AL','396'),('1987-10-12','AL','397'),('1987-10-12','AL','397'),('1987-10-12','AL','416'),('1987-10-12','AL','416'),('1987-10-12','AL','417'),('1987-10-12','AL','438'),('1987-10-12','AL','438'),('1987-10-12','AL','446'),('1987-10-12','AL','451'),('1987-10-12','AL','451'),('1987-10-12','AL','491'),('1987-10-12','AL','491'),('1987-10-12','AL','523'),('1987-10-12','AL','523'),('1987-10-12','AL','523'),('1987-10-12','AL','525'),('1987-10-12','AL','525'),('1987-10-12','AL','533'),('1987-10-12','AL','533'),('1987-10-12','AL','546'),('1987-10-12','AL','546'),('1987-10-12','AL','556'),('1987-10-12','AL','556'),('1987-10-12','AL','627'),('1987-10-12','AL','629'),('1987-10-12','AL','670'),('1987-10-12','AL','670'),('1987-10-12','AL','670'),('1987-10-12','AL','673'),('1987-10-13','AA','2'),('1987-10-13','AA','2'),('1987-10-13','AA','2'),('1987-10-13','AA','7'),('1987-10-13','AA','7'),('1987-10-13','AA','26'),('1987-10-13','AA','34'),('1987-10-13','AA','36'),('1987-10-13','AA','91'),('1987-10-13','AA','101'),('1987-10-13','AA','101'),('1987-10-13','AA','109'),('1987-10-13','AA','109'),('1987-10-13','AA','112'),('1987-10-13','AA','123'),('1987-10-13','AA','123'),('1987-10-13','AA','160'),('1987-10-13','AA','165'),('1987-10-13','AA','165'),('1987-10-13','AA','165'),('1987-10-13','AA','176'),('1987-10-13','AA','176'),('1987-10-13','AA','176'),('1987-10-13','AA','176'),('1987-10-13','AA','179'),('1987-10-13','AA','179'),('1987-10-13','AA','215'),('1987-10-13','AA','215'),('1987-10-13','AA','231'),('1987-10-13','AA','231'),('1987-10-13','AA','263'),('1987-10-13','AA','263'),('1987-10-13','AA','268'),('1987-10-13','AA','268'),('1987-10-13','AA','281'),('1987-10-13','AA','287'),('1987-10-13','AA','287'),('1987-10-13','AA','309'),('1987-10-13','AA','309'),('1987-10-13','AA','309'),('1987-10-13','AA','341'),('1987-10-13','AA','344'),('1987-10-13','AA','344'),('1987-10-13','AA','347'),('1987-10-13','AA','347'),('1987-10-13','AA','368'),('1987-10-13','AA','381'),('1987-10-13','AA','381'),('1987-10-13','AA','381'),('1987-10-13','AA','396'),('1987-10-13','AA','396'),('1987-10-13','AA','397'),('1987-10-13','AA','397'),('1987-10-13','AA','417'),('1987-10-13','AA','417'),('1987-10-13','AA','446'),('1987-10-13','AA','451'),('1987-10-13','AA','451'),('1987-10-13','AA','460'),('1987-10-13','AA','460'),('1987-10-13','AA','491'),('1987-10-13','AA','504'),('1987-10-13','AA','504'),('1987-10-13','AA','519'),('1987-10-13','AA','519'),('1987-10-13','AA','523'),('1987-10-13','AA','523'),('1987-10-13','AA','525'),('1987-10-13','AA','525'),('1987-10-13','AA','533'),('1987-10-13','AA','533'),('1987-10-13','AA','533'),('1987-10-13','AA','546'),('1987-10-13','AA','546'),('1987-10-13','AA','546'),('1987-10-13','AA','556'),('1987-10-13','AA','556'),('1987-10-13','AA','556'),('1987-10-13','AA','597'),('1987-10-13','AA','597'),('1987-10-13','AA','597'),('1987-10-13','AA','601'),('1987-10-13','AA','601'),('1987-10-13','AA','627'),('1987-10-13','AA','629'),('1987-10-13','AA','629'),('1987-10-13','AA','673'),('1987-10-13','AA','673'),('1987-10-13','AA','680'),('1987-10-13','AA','817'),('1987-10-13','AA','817'),('1987-10-13','AA','824'),('1987-10-13','AA','824'),('1987-10-13','AA','824'),('1987-10-13','AA','832'),('1987-10-13','AA','832'),('1987-10-13','AA','852'),('1987-10-13','AA','866'),('1987-10-13','AA','866'),('1987-10-13','AA','871'),('1987-10-13','AA','871'),('1987-10-13','AA','880'),('1987-10-13','AA','880'),('1987-10-13','AA','880'),('1987-10-13','AA','880'),('1987-10-13','AA','883'),('1987-10-13','AA','883'),('1987-10-13','AA','885'),('1987-10-13','AA','885'),('1987-10-13','AA','885'),('1987-10-13','AA','890'),('1987-10-13','AA','890'),('1987-10-13','AA','893'),('1987-10-13','AA','893'),('1987-10-13','AA','905'),('1987-10-13','AA','905'),('1987-10-13','AA','915'),('1987-10-13','AA','929'),('1987-10-13','AA','929'),('1987-10-13','AA','936'),('1987-10-13','AA','936'),('1987-10-13','AA','937'),('1987-10-13','AA','937'),('1987-10-13','AA','955'),('1987-10-13','AA','955'),('1987-10-13','AA','966'),('1987-10-13','AA','1002'),('1987-10-13','AA','1002'),('1987-10-13','AA','1004'),('1987-10-13','AA','1004'),('1987-10-13','AA','1015'),('1987-10-13','AA','1015'),('1987-10-13','AA','1021'),('1987-10-13','AA','1021'),('1987-10-13','AA','1041'),('1987-10-13','AA','1041'),('1987-10-13','AA','1046'),('1987-10-13','AA','1046'),('1987-10-13','AA','1048'),('1987-10-13','AA','1048'),('1987-10-13','AA','1061'),('1987-10-13','AA','1061'),('1987-10-13','AA','1088'),('1987-10-13','AA','1088'),('1987-10-13','AA','2033'),('1987-10-13','AA','2050'),('1987-10-13','AA','2071'),('1987-10-13','AA','2071'),('1987-10-13','AA','2086'),('1987-10-13','AA','2105'),('1987-10-13','AA','2111'),('1987-10-13','AA','2123'),('1987-10-13','AA','2123'),('1987-10-13','AA','2147'),('1987-10-13','AA','2147'),('1987-10-13','AA','2199'),('1987-10-13','AA','2199'),('1987-10-13','AA','2207'),('1987-10-13','AA','2207'),('1987-10-13','AA','2217'),('1987-10-13','AA','2230'),('1987-10-13','AA','2245'),('1987-10-13','AA','2251'),('1987-10-13','AA','2251'),('1987-10-13','AA','2275'),('1987-10-13','AA','2351'),('1987-10-13','AA','2357'),('1987-10-13','AA','2361'),('1987-10-13','AA','2490'),('1987-10-13','AA','2528'),('1987-10-13','AA','2528'),('1987-10-13','AA','2735'),('1987-10-13','AA','2735'),('1987-10-13','AA','2751'),('1987-10-13','AL','2'),('1987-10-13','AL','2'),('1987-10-13','AL','7'),('1987-10-13','AL','7'),('1987-10-13','AL','26'),('1987-10-13','AL','26'),('1987-10-13','AL','34'),('1987-10-13','AL','34'),('1987-10-13','AL','36'),('1987-10-13','AL','36'),('1987-10-13','AL','45'),('1987-10-13','AL','45'),('1987-10-13','AL','45'),('1987-10-13','AL','91'),('1987-10-13','AL','91'),('1987-10-13','AL','104'),('1987-10-13','AL','104'),('1987-10-13','AL','104'),('1987-10-13','AL','109'),('1987-10-13','AL','112'),('1987-10-13','AL','112'),('1987-10-13','AL','123'),('1987-10-13','AL','149'),('1987-10-13','AL','160'),('1987-10-13','AL','160'),('1987-10-13','AL','171'),('1987-10-13','AL','171'),('1987-10-13','AL','176'),('1987-10-13','AL','176'),('1987-10-13','AL','179'),('1987-10-13','AL','231'),('1987-10-13','AL','263'),('1987-10-13','AL','263'),('1987-10-13','AL','268'),('1987-10-13','AL','268'),('1987-10-13','AL','268'),('1987-10-13','AL','281'),('1987-10-13','AL','281'),('1987-10-13','AL','287'),('1987-10-13','AL','287'),('1987-10-13','AL','309'),('1987-10-13','AL','309'),('1987-10-13','AL','341'),('1987-10-13','AL','357'),('1987-10-13','AL','357'),('1987-10-13','AL','368'),('1987-10-13','AL','381'),('1987-10-13','AL','396'),('1987-10-13','AL','397'),('1987-10-13','AL','397'),('1987-10-13','AL','416'),('1987-10-13','AL','417'),('1987-10-13','AL','438'),('1987-10-13','AL','438'),('1987-10-13','AL','446'),('1987-10-13','AL','451'),('1987-10-13','AL','451'),('1987-10-13','AL','491'),('1987-10-13','AL','491'),('1987-10-13','AL','523'),('1987-10-13','AL','523'),('1987-10-13','AL','523'),('1987-10-13','AL','525'),('1987-10-13','AL','525'),('1987-10-13','AL','533'),('1987-10-13','AL','533'),('1987-10-13','AL','546'),('1987-10-13','AL','546'),('1987-10-13','AL','556'),('1987-10-13','AL','556'),('1987-10-13','AL','601'),('1987-10-13','AL','601'),('1987-10-13','AL','627'),('1987-10-13','AL','629'),('1987-10-13','AL','670'),('1987-10-13','AL','670'),('1987-10-13','AL','670'),('1987-10-13','AL','673'),('1987-10-13','AL','680'),('1987-10-14','AA','2'),('1987-10-14','AA','2'),('1987-10-14','AA','2'),('1987-10-14','AA','7'),('1987-10-14','AA','7'),('1987-10-14','AA','26'),('1987-10-14','AA','34'),('1987-10-14','AA','36'),('1987-10-14','AA','91'),('1987-10-14','AA','101'),('1987-10-14','AA','101'),('1987-10-14','AA','109'),('1987-10-14','AA','109'),('1987-10-14','AA','112'),('1987-10-14','AA','123'),('1987-10-14','AA','123'),('1987-10-14','AA','160'),('1987-10-14','AA','165'),('1987-10-14','AA','165'),('1987-10-14','AA','176'),('1987-10-14','AA','176'),('1987-10-14','AA','176'),('1987-10-14','AA','176'),('1987-10-14','AA','179'),('1987-10-14','AA','179'),('1987-10-14','AA','215'),('1987-10-14','AA','215'),('1987-10-14','AA','231'),('1987-10-14','AA','231'),('1987-10-14','AA','263'),('1987-10-14','AA','263'),('1987-10-14','AA','268'),('1987-10-14','AA','268'),('1987-10-14','AA','281'),('1987-10-14','AA','287'),('1987-10-14','AA','309'),('1987-10-14','AA','309'),('1987-10-14','AA','309'),('1987-10-14','AA','341'),('1987-10-14','AA','344'),('1987-10-14','AA','344'),('1987-10-14','AA','347'),('1987-10-14','AA','347'),('1987-10-14','AA','368'),('1987-10-14','AA','381'),('1987-10-14','AA','381'),('1987-10-14','AA','381'),('1987-10-14','AA','396'),('1987-10-14','AA','396'),('1987-10-14','AA','397'),('1987-10-14','AA','417'),('1987-10-14','AA','446'),('1987-10-14','AA','451'),('1987-10-14','AA','451'),('1987-10-14','AA','460'),('1987-10-14','AA','460'),('1987-10-14','AA','491'),('1987-10-14','AA','504'),('1987-10-14','AA','519'),('1987-10-14','AA','519'),('1987-10-14','AA','523'),('1987-10-14','AA','523'),('1987-10-14','AA','525'),('1987-10-14','AA','525'),('1987-10-14','AA','533'),('1987-10-14','AA','533'),('1987-10-14','AA','533'),('1987-10-14','AA','546'),('1987-10-14','AA','546'),('1987-10-14','AA','546'),('1987-10-14','AA','546'),('1987-10-14','AA','556'),('1987-10-14','AA','556'),('1987-10-14','AA','556'),('1987-10-14','AA','597'),('1987-10-14','AA','597'),('1987-10-14','AA','597'),('1987-10-14','AA','601'),('1987-10-14','AA','601'),('1987-10-14','AA','627'),('1987-10-14','AA','629'),('1987-10-14','AA','629'),('1987-10-14','AA','670'),('1987-10-14','AA','673'),('1987-10-14','AA','673'),('1987-10-14','AA','680'),('1987-10-14','AA','680'),('1987-10-14','AA','817'),('1987-10-14','AA','817'),('1987-10-14','AA','824'),('1987-10-14','AA','824'),('1987-10-14','AA','824'),('1987-10-14','AA','824'),('1987-10-14','AA','832'),('1987-10-14','AA','832'),('1987-10-14','AA','852'),('1987-10-14','AA','866'),('1987-10-14','AA','866'),('1987-10-14','AA','871'),('1987-10-14','AA','871'),('1987-10-14','AA','880'),('1987-10-14','AA','880'),('1987-10-14','AA','880'),('1987-10-14','AA','883'),('1987-10-14','AA','883'),('1987-10-14','AA','885'),('1987-10-14','AA','885'),('1987-10-14','AA','885'),('1987-10-14','AA','890'),('1987-10-14','AA','890'),('1987-10-14','AA','893'),('1987-10-14','AA','893'),('1987-10-14','AA','905'),('1987-10-14','AA','905'),('1987-10-14','AA','915'),('1987-10-14','AA','929'),('1987-10-14','AA','929'),('1987-10-14','AA','936'),('1987-10-14','AA','936'),('1987-10-14','AA','937'),('1987-10-14','AA','937'),('1987-10-14','AA','955'),('1987-10-14','AA','955'),('1987-10-14','AA','966'),('1987-10-14','AA','1002'),('1987-10-14','AA','1002'),('1987-10-14','AA','1004'),('1987-10-14','AA','1004'),('1987-10-14','AA','1015'),('1987-10-14','AA','1015'),('1987-10-14','AA','1021'),('1987-10-14','AA','1021'),('1987-10-14','AA','1041'),('1987-10-14','AA','1041'),('1987-10-14','AA','1046'),('1987-10-14','AA','1046'),('1987-10-14','AA','1048'),('1987-10-14','AA','1048'),('1987-10-14','AA','1061'),('1987-10-14','AA','1061'),('1987-10-14','AA','1088'),('1987-10-14','AA','1088'),('1987-10-14','AA','2033'),('1987-10-14','AA','2033'),('1987-10-14','AA','2050'),('1987-10-14','AA','2058'),('1987-10-14','AA','2071'),('1987-10-14','AA','2071'),('1987-10-14','AA','2086'),('1987-10-14','AA','2111'),('1987-10-14','AA','2123'),('1987-10-14','AA','2123'),('1987-10-14','AA','2147'),('1987-10-14','AA','2147'),('1987-10-14','AA','2199'),('1987-10-14','AA','2199'),('1987-10-14','AA','2207'),('1987-10-14','AA','2207'),('1987-10-14','AA','2217'),('1987-10-14','AA','2230'),('1987-10-14','AA','2251'),('1987-10-14','AA','2251'),('1987-10-14','AA','2278'),('1987-10-14','AA','2351'),('1987-10-14','AA','2357'),('1987-10-14','AA','2490'),('1987-10-14','AA','2528'),('1987-10-14','AA','2528'),('1987-10-14','AA','2735'),('1987-10-14','AA','2735'),('1987-10-14','AA','2751'),('1987-10-14','AL','2'),('1987-10-14','AL','2'),('1987-10-14','AL','7'),('1987-10-14','AL','7'),('1987-10-14','AL','26'),('1987-10-14','AL','26'),('1987-10-14','AL','34'),('1987-10-14','AL','36'),('1987-10-14','AL','36'),('1987-10-14','AL','45'),('1987-10-14','AL','45'),('1987-10-14','AL','91'),('1987-10-14','AL','91'),('1987-10-14','AL','104'),('1987-10-14','AL','104'),('1987-10-14','AL','104'),('1987-10-14','AL','109'),('1987-10-14','AL','112'),('1987-10-14','AL','112'),('1987-10-14','AL','123'),('1987-10-14','AL','149'),('1987-10-14','AL','160'),('1987-10-14','AL','160'),('1987-10-14','AL','165'),('1987-10-14','AL','171'),('1987-10-14','AL','171'),('1987-10-14','AL','176'),('1987-10-14','AL','176'),('1987-10-14','AL','179'),('1987-10-14','AL','215'),('1987-10-14','AL','231'),('1987-10-14','AL','263'),('1987-10-14','AL','263'),('1987-10-14','AL','268'),('1987-10-14','AL','268'),('1987-10-14','AL','268'),('1987-10-14','AL','281'),('1987-10-14','AL','281'),('1987-10-14','AL','287'),('1987-10-14','AL','287'),('1987-10-14','AL','309'),('1987-10-14','AL','309'),('1987-10-14','AL','341'),('1987-10-14','AL','344'),('1987-10-14','AL','344'),('1987-10-14','AL','357'),('1987-10-14','AL','357'),('1987-10-14','AL','368'),('1987-10-14','AL','381'),('1987-10-14','AL','396'),('1987-10-14','AL','397'),('1987-10-14','AL','397'),('1987-10-14','AL','416'),('1987-10-14','AL','416'),('1987-10-14','AL','417'),('1987-10-14','AL','438'),('1987-10-14','AL','438'),('1987-10-14','AL','446'),('1987-10-14','AL','451'),('1987-10-14','AL','451'),('1987-10-14','AL','491'),('1987-10-14','AL','491'),('1987-10-14','AL','523'),('1987-10-14','AL','523'),('1987-10-14','AL','523'),('1987-10-14','AL','525'),('1987-10-14','AL','525'),('1987-10-14','AL','533'),('1987-10-14','AL','533'),('1987-10-14','AL','546'),('1987-10-14','AL','546'),('1987-10-14','AL','556'),('1987-10-14','AL','556'),('1987-10-14','AL','601'),('1987-10-14','AL','601'),('1987-10-14','AL','627'),('1987-10-14','AL','629'),('1987-10-14','AL','670'),('1987-10-14','AL','670'),('1987-10-14','AL','670'),('1987-10-14','AL','673'),('1987-10-14','AL','680'),('1987-10-15','AA','2'),('1987-10-15','AA','2'),('1987-10-15','AA','2'),('1987-10-15','AA','7'),('1987-10-15','AA','7'),('1987-10-15','AA','26'),('1987-10-15','AA','34'),('1987-10-15','AA','36'),('1987-10-15','AA','91'),('1987-10-15','AA','101'),('1987-10-15','AA','101'),('1987-10-15','AA','109'),('1987-10-15','AA','109'),('1987-10-15','AA','112'),('1987-10-15','AA','123'),('1987-10-15','AA','123'),('1987-10-15','AA','160'),('1987-10-15','AA','165'),('1987-10-15','AA','165'),('1987-10-15','AA','165'),('1987-10-15','AA','176'),('1987-10-15','AA','176'),('1987-10-15','AA','176'),('1987-10-15','AA','176'),('1987-10-15','AA','179'),('1987-10-15','AA','179'),('1987-10-15','AA','215'),('1987-10-15','AA','215'),('1987-10-15','AA','231'),('1987-10-15','AA','263'),('1987-10-15','AA','263'),('1987-10-15','AA','268'),('1987-10-15','AA','268'),('1987-10-15','AA','281'),('1987-10-15','AA','287'),('1987-10-15','AA','287'),('1987-10-15','AA','309'),('1987-10-15','AA','309'),('1987-10-15','AA','309'),('1987-10-15','AA','341'),('1987-10-15','AA','344'),('1987-10-15','AA','344'),('1987-10-15','AA','347'),('1987-10-15','AA','347'),('1987-10-15','AA','368'),('1987-10-15','AA','381'),('1987-10-15','AA','381'),('1987-10-15','AA','396'),('1987-10-15','AA','396'),('1987-10-15','AA','397'),('1987-10-15','AA','397'),('1987-10-15','AA','417'),('1987-10-15','AA','417'),('1987-10-15','AA','446'),('1987-10-15','AA','451'),('1987-10-15','AA','451'),('1987-10-15','AA','460'),('1987-10-15','AA','460'),('1987-10-15','AA','491'),('1987-10-15','AA','504'),('1987-10-15','AA','504'),('1987-10-15','AA','519'),('1987-10-15','AA','519'),('1987-10-15','AA','523'),('1987-10-15','AA','523'),('1987-10-15','AA','525'),('1987-10-15','AA','525'),('1987-10-15','AA','525'),('1987-10-15','AA','533'),('1987-10-15','AA','533'),('1987-10-15','AA','533'),('1987-10-15','AA','546'),('1987-10-15','AA','546'),('1987-10-15','AA','546'),('1987-10-15','AA','546'),('1987-10-15','AA','556'),('1987-10-15','AA','556'),('1987-10-15','AA','556'),('1987-10-15','AA','597'),('1987-10-15','AA','597'),('1987-10-15','AA','597'),('1987-10-15','AA','601'),('1987-10-15','AA','601'),('1987-10-15','AA','629'),('1987-10-15','AA','629'),('1987-10-15','AA','670'),('1987-10-15','AA','673'),('1987-10-15','AA','673'),('1987-10-15','AA','680'),('1987-10-15','AA','680'),('1987-10-15','AA','817'),('1987-10-15','AA','817'),('1987-10-15','AA','824'),('1987-10-15','AA','824'),('1987-10-15','AA','824'),('1987-10-15','AA','824'),('1987-10-15','AA','832'),('1987-10-15','AA','832'),('1987-10-15','AA','852'),('1987-10-15','AA','866'),('1987-10-15','AA','866'),('1987-10-15','AA','871'),('1987-10-15','AA','871'),('1987-10-15','AA','880'),('1987-10-15','AA','880'),('1987-10-15','AA','880'),('1987-10-15','AA','883'),('1987-10-15','AA','883'),('1987-10-15','AA','885'),('1987-10-15','AA','885'),('1987-10-15','AA','885'),('1987-10-15','AA','890'),('1987-10-15','AA','890'),('1987-10-15','AA','893'),('1987-10-15','AA','893'),('1987-10-15','AA','905'),('1987-10-15','AA','905'),('1987-10-15','AA','915'),('1987-10-15','AA','929'),('1987-10-15','AA','929'),('1987-10-15','AA','936'),('1987-10-15','AA','936'),('1987-10-15','AA','937'),('1987-10-15','AA','955'),('1987-10-15','AA','955'),('1987-10-15','AA','966'),('1987-10-15','AA','1002'),('1987-10-15','AA','1002'),('1987-10-15','AA','1004'),('1987-10-15','AA','1004'),('1987-10-15','AA','1015'),('1987-10-15','AA','1015'),('1987-10-15','AA','1021'),('1987-10-15','AA','1021'),('1987-10-15','AA','1041'),('1987-10-15','AA','1041'),('1987-10-15','AA','1046'),('1987-10-15','AA','1046'),('1987-10-15','AA','1048'),('1987-10-15','AA','1048'),('1987-10-15','AA','1061'),('1987-10-15','AA','1061'),('1987-10-15','AA','1088'),('1987-10-15','AA','1088'),('1987-10-15','AA','2033'),('1987-10-15','AA','2033'),('1987-10-15','AA','2050'),('1987-10-15','AA','2058'),('1987-10-15','AA','2071'),('1987-10-15','AA','2071'),('1987-10-15','AA','2086'),('1987-10-15','AA','2105'),('1987-10-15','AA','2111'),('1987-10-15','AA','2123'),('1987-10-15','AA','2123'),('1987-10-15','AA','2147'),('1987-10-15','AA','2147'),('1987-10-15','AA','2199'),('1987-10-15','AA','2199'),('1987-10-15','AA','2207'),('1987-10-15','AA','2207'),('1987-10-15','AA','2217'),('1987-10-15','AA','2230'),('1987-10-15','AA','2245'),('1987-10-15','AA','2251'),('1987-10-15','AA','2251'),('1987-10-15','AA','2275'),('1987-10-15','AA','2278'),('1987-10-15','AA','2351'),('1987-10-15','AA','2357'),('1987-10-15','AA','2361'),('1987-10-15','AA','2490'),('1987-10-15','AA','2528'),('1987-10-15','AA','2528'),('1987-10-15','AA','2735'),('1987-10-15','AA','2735'),('1987-10-15','AA','2751'),('1987-10-15','AL','2'),('1987-10-15','AL','2'),('1987-10-15','AL','7'),('1987-10-15','AL','7'),('1987-10-15','AL','26'),('1987-10-15','AL','26'),('1987-10-15','AL','34'),('1987-10-15','AL','34'),('1987-10-15','AL','36'),('1987-10-15','AL','36'),('1987-10-15','AL','45'),('1987-10-15','AL','45'),('1987-10-15','AL','45'),('1987-10-15','AL','91'),('1987-10-15','AL','91'),('1987-10-15','AL','104'),('1987-10-15','AL','104'),('1987-10-15','AL','104'),('1987-10-15','AL','109'),('1987-10-15','AL','112'),('1987-10-15','AL','112'),('1987-10-15','AL','123'),('1987-10-15','AL','149'),('1987-10-15','AL','160'),('1987-10-15','AL','160'),('1987-10-15','AL','165'),('1987-10-15','AL','171'),('1987-10-15','AL','171'),('1987-10-15','AL','176'),('1987-10-15','AL','176'),('1987-10-15','AL','179'),('1987-10-15','AL','215'),('1987-10-15','AL','231'),('1987-10-15','AL','263'),('1987-10-15','AL','263'),('1987-10-15','AL','268'),('1987-10-15','AL','268'),('1987-10-15','AL','268'),('1987-10-15','AL','281'),('1987-10-15','AL','281'),('1987-10-15','AL','287'),('1987-10-15','AL','287'),('1987-10-15','AL','309'),('1987-10-15','AL','309'),('1987-10-15','AL','341'),('1987-10-15','AL','344'),('1987-10-15','AL','344'),('1987-10-15','AL','357'),('1987-10-15','AL','357'),('1987-10-15','AL','368'),('1987-10-15','AL','381'),('1987-10-15','AL','396'),('1987-10-15','AL','397'),('1987-10-15','AL','397'),('1987-10-15','AL','416'),('1987-10-15','AL','416'),('1987-10-15','AL','417'),('1987-10-15','AL','438'),('1987-10-15','AL','438'),('1987-10-15','AL','446'),('1987-10-15','AL','451'),('1987-10-15','AL','451'),('1987-10-15','AL','491'),('1987-10-15','AL','491'),('1987-10-15','AL','523'),('1987-10-15','AL','523'),('1987-10-15','AL','523'),('1987-10-15','AL','525'),('1987-10-15','AL','525'),('1987-10-15','AL','533'),('1987-10-15','AL','533'),('1987-10-15','AL','546'),('1987-10-15','AL','546'),('1987-10-15','AL','556'),('1987-10-15','AL','556'),('1987-10-15','AL','601'),('1987-10-15','AL','601'),('1987-10-15','AL','627'),('1987-10-15','AL','629'),('1987-10-15','AL','670'),('1987-10-15','AL','670'),('1987-10-15','AL','670'),('1987-10-15','AL','673'),('1987-10-15','AL','680'),('1987-10-16','AA','2'),('1987-10-16','AA','2'),('1987-10-16','AA','2'),('1987-10-16','AA','7'),('1987-10-16','AA','7'),('1987-10-16','AA','26'),('1987-10-16','AA','34'),('1987-10-16','AA','36'),('1987-10-16','AA','91'),('1987-10-16','AA','101'),('1987-10-16','AA','101'),('1987-10-16','AA','109'),('1987-10-16','AA','109'),('1987-10-16','AA','112'),('1987-10-16','AA','123'),('1987-10-16','AA','160'),('1987-10-16','AA','165'),('1987-10-16','AA','165'),('1987-10-16','AA','176'),('1987-10-16','AA','176'),('1987-10-16','AA','176'),('1987-10-16','AA','176'),('1987-10-16','AA','179'),('1987-10-16','AA','179'),('1987-10-16','AA','215'),('1987-10-16','AA','215'),('1987-10-16','AA','231'),('1987-10-16','AA','263'),('1987-10-16','AA','263'),('1987-10-16','AA','268'),('1987-10-16','AA','281'),('1987-10-16','AA','287'),('1987-10-16','AA','287'),('1987-10-16','AA','309'),('1987-10-16','AA','309'),('1987-10-16','AA','309'),('1987-10-16','AA','341'),('1987-10-16','AA','344'),('1987-10-16','AA','344'),('1987-10-16','AA','347'),('1987-10-16','AA','347'),('1987-10-16','AA','368'),('1987-10-16','AA','381'),('1987-10-16','AA','381'),('1987-10-16','AA','381'),('1987-10-16','AA','396'),('1987-10-16','AA','396'),('1987-10-16','AA','397'),('1987-10-16','AA','417'),('1987-10-16','AA','417'),('1987-10-16','AA','446'),('1987-10-16','AA','451'),('1987-10-16','AA','451'),('1987-10-16','AA','460'),('1987-10-16','AA','460'),('1987-10-16','AA','491'),('1987-10-16','AA','504'),('1987-10-16','AA','504'),('1987-10-16','AA','519'),('1987-10-16','AA','519'),('1987-10-16','AA','523'),('1987-10-16','AA','523'),('1987-10-16','AA','525'),('1987-10-16','AA','525'),('1987-10-16','AA','533'),('1987-10-16','AA','533'),('1987-10-16','AA','546'),('1987-10-16','AA','546'),('1987-10-16','AA','546'),('1987-10-16','AA','546'),('1987-10-16','AA','556'),('1987-10-16','AA','556'),('1987-10-16','AA','556'),('1987-10-16','AA','597'),('1987-10-16','AA','597'),('1987-10-16','AA','597'),('1987-10-16','AA','601'),('1987-10-16','AA','601'),('1987-10-16','AA','627'),('1987-10-16','AA','629'),('1987-10-16','AA','629'),('1987-10-16','AA','670'),('1987-10-16','AA','673'),('1987-10-16','AA','673'),('1987-10-16','AA','680'),('1987-10-16','AA','680'),('1987-10-16','AA','817'),('1987-10-16','AA','817'),('1987-10-16','AA','824'),('1987-10-16','AA','824'),('1987-10-16','AA','824'),('1987-10-16','AA','824'),('1987-10-16','AA','832'),('1987-10-16','AA','832'),('1987-10-16','AA','852'),('1987-10-16','AA','866'),('1987-10-16','AA','866'),('1987-10-16','AA','871'),('1987-10-16','AA','871'),('1987-10-16','AA','880'),('1987-10-16','AA','880'),('1987-10-16','AA','880'),('1987-10-16','AA','880'),('1987-10-16','AA','883'),('1987-10-16','AA','883'),('1987-10-16','AA','885'),('1987-10-16','AA','885'),('1987-10-16','AA','885'),('1987-10-16','AA','890'),('1987-10-16','AA','890'),('1987-10-16','AA','893'),('1987-10-16','AA','893'),('1987-10-16','AA','905'),('1987-10-16','AA','905'),('1987-10-16','AA','915'),('1987-10-16','AA','929'),('1987-10-16','AA','929'),('1987-10-16','AA','936'),('1987-10-16','AA','936'),('1987-10-16','AA','937'),('1987-10-16','AA','937'),('1987-10-16','AA','955'),('1987-10-16','AA','955'),('1987-10-16','AA','966'),('1987-10-16','AA','1002'),('1987-10-16','AA','1002'),('1987-10-16','AA','1004'),('1987-10-16','AA','1004'),('1987-10-16','AA','1015'),('1987-10-16','AA','1015'),('1987-10-16','AA','1021'),('1987-10-16','AA','1021'),('1987-10-16','AA','1041'),('1987-10-16','AA','1041'),('1987-10-16','AA','1046'),('1987-10-16','AA','1046'),('1987-10-16','AA','1048'),('1987-10-16','AA','1048'),('1987-10-16','AA','1061'),('1987-10-16','AA','1061'),('1987-10-16','AA','1088'),('1987-10-16','AA','1088'),('1987-10-16','AA','2033'),('1987-10-16','AA','2033'),('1987-10-16','AA','2050'),('1987-10-16','AA','2058'),('1987-10-16','AA','2071'),('1987-10-16','AA','2071'),('1987-10-16','AA','2086'),('1987-10-16','AA','2105'),('1987-10-16','AA','2111'),('1987-10-16','AA','2123'),('1987-10-16','AA','2123'),('1987-10-16','AA','2147'),('1987-10-16','AA','2147'),('1987-10-16','AA','2199'),('1987-10-16','AA','2199'),('1987-10-16','AA','2207'),('1987-10-16','AA','2207'),('1987-10-16','AA','2217'),('1987-10-16','AA','2230'),('1987-10-16','AA','2245'),('1987-10-16','AA','2251'),('1987-10-16','AA','2251'),('1987-10-16','AA','2275'),('1987-10-16','AA','2278'),('1987-10-16','AA','2351'),('1987-10-16','AA','2357'),('1987-10-16','AA','2361'),('1987-10-16','AA','2490'),('1987-10-16','AA','2528'),('1987-10-16','AA','2528'),('1987-10-16','AA','2735'),('1987-10-16','AA','2735'),('1987-10-16','AA','2751'),('1987-10-16','AL','2'),('1987-10-16','AL','2'),('1987-10-16','AL','7'),('1987-10-16','AL','7'),('1987-10-16','AL','26'),('1987-10-16','AL','26'),('1987-10-16','AL','34'),('1987-10-16','AL','36'),('1987-10-16','AL','36'),('1987-10-16','AL','45'),('1987-10-16','AL','45'),('1987-10-16','AL','45'),('1987-10-16','AL','91'),('1987-10-16','AL','91'),('1987-10-16','AL','104'),('1987-10-16','AL','104'),('1987-10-16','AL','109'),('1987-10-16','AL','112'),('1987-10-16','AL','112'),('1987-10-16','AL','123'),('1987-10-16','AL','149'),('1987-10-16','AL','160'),('1987-10-16','AL','160'),('1987-10-16','AL','165'),('1987-10-16','AL','171'),('1987-10-16','AL','171'),('1987-10-16','AL','176'),('1987-10-16','AL','176'),('1987-10-16','AL','179'),('1987-10-16','AL','215'),('1987-10-16','AL','231'),('1987-10-16','AL','263'),('1987-10-16','AL','263'),('1987-10-16','AL','268'),('1987-10-16','AL','268'),('1987-10-16','AL','268'),('1987-10-16','AL','281'),('1987-10-16','AL','281'),('1987-10-16','AL','287'),('1987-10-16','AL','287'),('1987-10-16','AL','309'),('1987-10-16','AL','309'),('1987-10-16','AL','341'),('1987-10-16','AL','344'),('1987-10-16','AL','344'),('1987-10-16','AL','357'),('1987-10-16','AL','357'),('1987-10-16','AL','368'),('1987-10-16','AL','381'),('1987-10-16','AL','396'),('1987-10-16','AL','397'),('1987-10-16','AL','397'),('1987-10-16','AL','416'),('1987-10-16','AL','416'),('1987-10-16','AL','417'),('1987-10-16','AL','438'),('1987-10-16','AL','438'),('1987-10-16','AL','446'),('1987-10-16','AL','451'),('1987-10-16','AL','451'),('1987-10-16','AL','491'),('1987-10-16','AL','491'),('1987-10-16','AL','523'),('1987-10-16','AL','523'),('1987-10-16','AL','523'),('1987-10-16','AL','525'),('1987-10-16','AL','525'),('1987-10-16','AL','533'),('1987-10-16','AL','533'),('1987-10-16','AL','546'),('1987-10-16','AL','546'),('1987-10-16','AL','556'),('1987-10-16','AL','556'),('1987-10-16','AL','601'),('1987-10-16','AL','601'),('1987-10-16','AL','627'),('1987-10-16','AL','629'),('1987-10-16','AL','670'),('1987-10-16','AL','670'),('1987-10-16','AL','670'),('1987-10-16','AL','673'),('1987-10-16','AL','680'),('1987-10-17','AA','2'),('1987-10-17','AA','2'),('1987-10-17','AA','2'),('1987-10-17','AA','7'),('1987-10-17','AA','7'),('1987-10-17','AA','26'),('1987-10-17','AA','36'),('1987-10-17','AA','91'),('1987-10-17','AA','101'),('1987-10-17','AA','101'),('1987-10-17','AA','109'),('1987-10-17','AA','109'),('1987-10-17','AA','112'),('1987-10-17','AA','123'),('1987-10-17','AA','123'),('1987-10-17','AA','160'),('1987-10-17','AA','165'),('1987-10-17','AA','165'),('1987-10-17','AA','165'),('1987-10-17','AA','176'),('1987-10-17','AA','176'),('1987-10-17','AA','176'),('1987-10-17','AA','176'),('1987-10-17','AA','179'),('1987-10-17','AA','179'),('1987-10-17','AA','215'),('1987-10-17','AA','215'),('1987-10-17','AA','231'),('1987-10-17','AA','231'),('1987-10-17','AA','263'),('1987-10-17','AA','263'),('1987-10-17','AA','268'),('1987-10-17','AA','268'),('1987-10-17','AA','281'),('1987-10-17','AA','287'),('1987-10-17','AA','287'),('1987-10-17','AA','309'),('1987-10-17','AA','309'),('1987-10-17','AA','309'),('1987-10-17','AA','341'),('1987-10-17','AA','344'),('1987-10-17','AA','344'),('1987-10-17','AA','347'),('1987-10-17','AA','347'),('1987-10-17','AA','368'),('1987-10-17','AA','381'),('1987-10-17','AA','381'),('1987-10-17','AA','381'),('1987-10-17','AA','396'),('1987-10-17','AA','396'),('1987-10-17','AA','397'),('1987-10-17','AA','417'),('1987-10-17','AA','446'),('1987-10-17','AA','451'),('1987-10-17','AA','451'),('1987-10-17','AA','460'),('1987-10-17','AA','460'),('1987-10-17','AA','491'),('1987-10-17','AA','491'),('1987-10-17','AA','504'),('1987-10-17','AA','504'),('1987-10-17','AA','519'),('1987-10-17','AA','519'),('1987-10-17','AA','523'),('1987-10-17','AA','523'),('1987-10-17','AA','525'),('1987-10-17','AA','525'),('1987-10-17','AA','525'),('1987-10-17','AA','533'),('1987-10-17','AA','533'),('1987-10-17','AA','546'),('1987-10-17','AA','546'),('1987-10-17','AA','546'),('1987-10-17','AA','546'),('1987-10-17','AA','556'),('1987-10-17','AA','556'),('1987-10-17','AA','556'),('1987-10-17','AA','597'),('1987-10-17','AA','597'),('1987-10-17','AA','597'),('1987-10-17','AA','601'),('1987-10-17','AA','627'),('1987-10-17','AA','629'),('1987-10-17','AA','629'),('1987-10-17','AA','670'),('1987-10-17','AA','673'),('1987-10-17','AA','673'),('1987-10-17','AA','680'),('1987-10-17','AA','680'),('1987-10-17','AA','817'),('1987-10-17','AA','817'),('1987-10-17','AA','824'),('1987-10-17','AA','824'),('1987-10-17','AA','824'),('1987-10-17','AA','824'),('1987-10-17','AA','832'),('1987-10-17','AA','832'),('1987-10-17','AA','852'),('1987-10-17','AA','852'),('1987-10-17','AA','866'),('1987-10-17','AA','866'),('1987-10-17','AA','871'),('1987-10-17','AA','871'),('1987-10-17','AA','880'),('1987-10-17','AA','880'),('1987-10-17','AA','880'),('1987-10-17','AA','880'),('1987-10-17','AA','883'),('1987-10-17','AA','883'),('1987-10-17','AA','885'),('1987-10-17','AA','885'),('1987-10-17','AA','885'),('1987-10-17','AA','890'),('1987-10-17','AA','890'),('1987-10-17','AA','893'),('1987-10-17','AA','893'),('1987-10-17','AA','905'),('1987-10-17','AA','905'),('1987-10-17','AA','915'),('1987-10-17','AA','929'),('1987-10-17','AA','936'),('1987-10-17','AA','936'),('1987-10-17','AA','937'),('1987-10-17','AA','937'),('1987-10-17','AA','955'),('1987-10-17','AA','955'),('1987-10-17','AA','966'),('1987-10-17','AA','1002'),('1987-10-17','AA','1002'),('1987-10-17','AA','1004'),('1987-10-17','AA','1004'),('1987-10-17','AA','1015'),('1987-10-17','AA','1015'),('1987-10-17','AA','1021'),('1987-10-17','AA','1021'),('1987-10-17','AA','1041'),('1987-10-17','AA','1041'),('1987-10-17','AA','1046'),('1987-10-17','AA','1046'),('1987-10-17','AA','1048'),('1987-10-17','AA','1048'),('1987-10-17','AA','1061'),('1987-10-17','AA','1061'),('1987-10-17','AA','1088'),('1987-10-17','AA','1088'),('1987-10-17','AA','2033'),('1987-10-17','AA','2033'),('1987-10-17','AA','2050'),('1987-10-17','AA','2058'),('1987-10-17','AA','2071'),('1987-10-17','AA','2086'),('1987-10-17','AA','2105'),('1987-10-17','AA','2111'),('1987-10-17','AA','2123'),('1987-10-17','AA','2123'),('1987-10-17','AA','2147'),('1987-10-17','AA','2147'),('1987-10-17','AA','2199'),('1987-10-17','AA','2199'),('1987-10-17','AA','2207'),('1987-10-17','AA','2207'),('1987-10-17','AA','2217'),('1987-10-17','AA','2230'),('1987-10-17','AA','2251'),('1987-10-17','AA','2251'),('1987-10-17','AA','2275'),('1987-10-17','AA','2278'),('1987-10-17','AA','2351'),('1987-10-17','AA','2357'),('1987-10-17','AA','2361'),('1987-10-17','AA','2490'),('1987-10-17','AA','2528'),('1987-10-17','AA','2528'),('1987-10-17','AA','2735'),('1987-10-17','AA','2735'),('1987-10-17','AL','2'),('1987-10-17','AL','2'),('1987-10-17','AL','7'),('1987-10-17','AL','7'),('1987-10-17','AL','26'),('1987-10-17','AL','26'),('1987-10-17','AL','34'),('1987-10-17','AL','36'),('1987-10-17','AL','36'),('1987-10-17','AL','45'),('1987-10-17','AL','45'),('1987-10-17','AL','45'),('1987-10-17','AL','91'),('1987-10-17','AL','91'),('1987-10-17','AL','104'),('1987-10-17','AL','104'),('1987-10-17','AL','109'),('1987-10-17','AL','112'),('1987-10-17','AL','112'),('1987-10-17','AL','149'),('1987-10-17','AL','160'),('1987-10-17','AL','160'),('1987-10-17','AL','165'),('1987-10-17','AL','171'),('1987-10-17','AL','171'),('1987-10-17','AL','176'),('1987-10-17','AL','176'),('1987-10-17','AL','179'),('1987-10-17','AL','215'),('1987-10-17','AL','231'),('1987-10-17','AL','263'),('1987-10-17','AL','268'),('1987-10-17','AL','268'),('1987-10-17','AL','268'),('1987-10-17','AL','287'),('1987-10-17','AL','287'),('1987-10-17','AL','309'),('1987-10-17','AL','309'),('1987-10-17','AL','344'),('1987-10-17','AL','344'),('1987-10-17','AL','357'),('1987-10-17','AL','357'),('1987-10-17','AL','381'),('1987-10-17','AL','396'),('1987-10-17','AL','397'),('1987-10-17','AL','397'),('1987-10-17','AL','397'),('1987-10-17','AL','416'),('1987-10-17','AL','417'),('1987-10-17','AL','438'),('1987-10-17','AL','438'),('1987-10-17','AL','451'),('1987-10-17','AL','451'),('1987-10-17','AL','491'),('1987-10-17','AL','491'),('1987-10-17','AL','523'),('1987-10-17','AL','523'),('1987-10-17','AL','525'),('1987-10-17','AL','525'),('1987-10-17','AL','533'),('1987-10-17','AL','546'),('1987-10-17','AL','546'),('1987-10-17','AL','556'),('1987-10-17','AL','556'),('1987-10-17','AL','601'),('1987-10-17','AL','601'),('1987-10-17','AL','627'),('1987-10-17','AL','670'),('1987-10-17','AL','673'),('1987-10-17','AL','680'),('1987-10-17','AL','936'),('1987-10-17','AL','966'),('1987-10-18','AA','2'),('1987-10-18','AA','2'),('1987-10-18','AA','2'),('1987-10-18','AA','7'),('1987-10-18','AA','7'),('1987-10-18','AA','26'),('1987-10-18','AA','34'),('1987-10-18','AA','36'),('1987-10-18','AA','91'),('1987-10-18','AA','101'),('1987-10-18','AA','101'),('1987-10-18','AA','109'),('1987-10-18','AA','109'),('1987-10-18','AA','112'),('1987-10-18','AA','123'),('1987-10-18','AA','123'),('1987-10-18','AA','160'),('1987-10-18','AA','165'),('1987-10-18','AA','165'),('1987-10-18','AA','165'),('1987-10-18','AA','176'),('1987-10-18','AA','176'),('1987-10-18','AA','176'),('1987-10-18','AA','176'),('1987-10-18','AA','179'),('1987-10-18','AA','179'),('1987-10-18','AA','215'),('1987-10-18','AA','231'),('1987-10-18','AA','231'),('1987-10-18','AA','263'),('1987-10-18','AA','268'),('1987-10-18','AA','268'),('1987-10-18','AA','281'),('1987-10-18','AA','287'),('1987-10-18','AA','287'),('1987-10-18','AA','309'),('1987-10-18','AA','309'),('1987-10-18','AA','309'),('1987-10-18','AA','341'),('1987-10-18','AA','344'),('1987-10-18','AA','344'),('1987-10-18','AA','347'),('1987-10-18','AA','347'),('1987-10-18','AA','368'),('1987-10-18','AA','381'),('1987-10-18','AA','381'),('1987-10-18','AA','381'),('1987-10-18','AA','396'),('1987-10-18','AA','396'),('1987-10-18','AA','397'),('1987-10-18','AA','397'),('1987-10-18','AA','417'),('1987-10-18','AA','417'),('1987-10-18','AA','451'),('1987-10-18','AA','451'),('1987-10-18','AA','460'),('1987-10-18','AA','491'),('1987-10-18','AA','491'),('1987-10-18','AA','504'),('1987-10-18','AA','504'),('1987-10-18','AA','519'),('1987-10-18','AA','519'),('1987-10-18','AA','523'),('1987-10-18','AA','523'),('1987-10-18','AA','525'),('1987-10-18','AA','525'),('1987-10-18','AA','525'),('1987-10-18','AA','533'),('1987-10-18','AA','533'),('1987-10-18','AA','546'),('1987-10-18','AA','546'),('1987-10-18','AA','546'),('1987-10-18','AA','546'),('1987-10-18','AA','556'),('1987-10-18','AA','556'),('1987-10-18','AA','556'),('1987-10-18','AA','597'),('1987-10-18','AA','597'),('1987-10-18','AA','597'),('1987-10-18','AA','601'),('1987-10-18','AA','601'),('1987-10-18','AA','629'),('1987-10-18','AA','629'),('1987-10-18','AA','670'),('1987-10-18','AA','673'),('1987-10-18','AA','680'),('1987-10-18','AA','680'),('1987-10-18','AA','817'),('1987-10-18','AA','817'),('1987-10-18','AA','824'),('1987-10-18','AA','824'),('1987-10-18','AA','824'),('1987-10-18','AA','824'),('1987-10-18','AA','832'),('1987-10-18','AA','832'),('1987-10-18','AA','852'),('1987-10-18','AA','866'),('1987-10-18','AA','866'),('1987-10-18','AA','871'),('1987-10-18','AA','871'),('1987-10-18','AA','880'),('1987-10-18','AA','880'),('1987-10-18','AA','880'),('1987-10-18','AA','880'),('1987-10-18','AA','883'),('1987-10-18','AA','883'),('1987-10-18','AA','885'),('1987-10-18','AA','885'),('1987-10-18','AA','885'),('1987-10-18','AA','890'),('1987-10-18','AA','890'),('1987-10-18','AA','893'),('1987-10-18','AA','893'),('1987-10-18','AA','905'),('1987-10-18','AA','905'),('1987-10-18','AA','915'),('1987-10-18','AA','929'),('1987-10-18','AA','929'),('1987-10-18','AA','936'),('1987-10-18','AA','936'),('1987-10-18','AA','937'),('1987-10-18','AA','937'),('1987-10-18','AA','955'),('1987-10-18','AA','966'),('1987-10-18','AA','1002'),('1987-10-18','AA','1002'),('1987-10-18','AA','1004'),('1987-10-18','AA','1004'),('1987-10-18','AA','1015'),('1987-10-18','AA','1015'),('1987-10-18','AA','1021'),('1987-10-18','AA','1021'),('1987-10-18','AA','1041'),('1987-10-18','AA','1041'),('1987-10-18','AA','1046'),('1987-10-18','AA','1046'),('1987-10-18','AA','1048'),('1987-10-18','AA','1048'),('1987-10-18','AA','1061'),('1987-10-18','AA','1061'),('1987-10-18','AA','1088'),('1987-10-18','AA','1088'),('1987-10-18','AA','2033'),('1987-10-18','AA','2033'),('1987-10-18','AA','2050'),('1987-10-18','AA','2058'),('1987-10-18','AA','2071'),('1987-10-18','AA','2071'),('1987-10-18','AA','2086'),('1987-10-18','AA','2111'),('1987-10-18','AA','2123'),('1987-10-18','AA','2147'),('1987-10-18','AA','2147'),('1987-10-18','AA','2199'),('1987-10-18','AA','2199'),('1987-10-18','AA','2207'),('1987-10-18','AA','2207'),('1987-10-18','AA','2230'),('1987-10-18','AA','2245'),('1987-10-18','AA','2251'),('1987-10-18','AA','2251'),('1987-10-18','AA','2275'),('1987-10-18','AA','2278'),('1987-10-18','AA','2351'),('1987-10-18','AA','2357'),('1987-10-18','AA','2361'),('1987-10-18','AA','2490'),('1987-10-18','AA','2528'),('1987-10-18','AA','2528'),('1987-10-18','AA','2735'),('1987-10-18','AA','2735'),('1987-10-18','AA','2751'),('1987-10-18','AL','2'),('1987-10-18','AL','2'),('1987-10-18','AL','7'),('1987-10-18','AL','7'),('1987-10-18','AL','26'),('1987-10-18','AL','26'),('1987-10-18','AL','34'),('1987-10-18','AL','34'),('1987-10-18','AL','36'),('1987-10-18','AL','36'),('1987-10-18','AL','45'),('1987-10-18','AL','45'),('1987-10-18','AL','45'),('1987-10-18','AL','91'),('1987-10-18','AL','91'),('1987-10-18','AL','104'),('1987-10-18','AL','104'),('1987-10-18','AL','104'),('1987-10-18','AL','112'),('1987-10-18','AL','123'),('1987-10-18','AL','160'),('1987-10-18','AL','160'),('1987-10-18','AL','165'),('1987-10-18','AL','171'),('1987-10-18','AL','171'),('1987-10-18','AL','176'),('1987-10-18','AL','176'),('1987-10-18','AL','179'),('1987-10-18','AL','215'),('1987-10-18','AL','231'),('1987-10-18','AL','263'),('1987-10-18','AL','263'),('1987-10-18','AL','281'),('1987-10-18','AL','281'),('1987-10-18','AL','309'),('1987-10-18','AL','309'),('1987-10-18','AL','341'),('1987-10-18','AL','344'),('1987-10-18','AL','344'),('1987-10-18','AL','357'),('1987-10-18','AL','357'),('1987-10-18','AL','368'),('1987-10-18','AL','396'),('1987-10-18','AL','416'),('1987-10-18','AL','416'),('1987-10-18','AL','417'),('1987-10-18','AL','438'),('1987-10-18','AL','438'),('1987-10-18','AL','446'),('1987-10-18','AL','451'),('1987-10-18','AL','491'),('1987-10-18','AL','523'),('1987-10-18','AL','523'),('1987-10-18','AL','523'),('1987-10-18','AL','525'),('1987-10-18','AL','525'),('1987-10-18','AL','533'),('1987-10-18','AL','533'),('1987-10-18','AL','546'),('1987-10-18','AL','546'),('1987-10-18','AL','556'),('1987-10-18','AL','601'),('1987-10-18','AL','601'),('1987-10-18','AL','627'),('1987-10-18','AL','629'),('1987-10-18','AL','670'),('1987-10-18','AL','670'),('1987-10-18','AL','670'),('1987-10-18','AL','673'),('1987-10-18','AL','680'),('1987-10-18','AL','937'),('1987-10-18','AL','937'),('1987-10-18','AL','955'),('1987-10-19','AA','2'),('1987-10-19','AA','2'),('1987-10-19','AA','2'),('1987-10-19','AA','7'),('1987-10-19','AA','7'),('1987-10-19','AA','26'),('1987-10-19','AA','34'),('1987-10-19','AA','36'),('1987-10-19','AA','91'),('1987-10-19','AA','101'),('1987-10-19','AA','101'),('1987-10-19','AA','109'),('1987-10-19','AA','109'),('1987-10-19','AA','112'),('1987-10-19','AA','123'),('1987-10-19','AA','123'),('1987-10-19','AA','160'),('1987-10-19','AA','165'),('1987-10-19','AA','165'),('1987-10-19','AA','165'),('1987-10-19','AA','176'),('1987-10-19','AA','176'),('1987-10-19','AA','176'),('1987-10-19','AA','176'),('1987-10-19','AA','179'),('1987-10-19','AA','179'),('1987-10-19','AA','215'),('1987-10-19','AA','215'),('1987-10-19','AA','231'),('1987-10-19','AA','231'),('1987-10-19','AA','263'),('1987-10-19','AA','263'),('1987-10-19','AA','268'),('1987-10-19','AA','268'),('1987-10-19','AA','281'),('1987-10-19','AA','287'),('1987-10-19','AA','287'),('1987-10-19','AA','309'),('1987-10-19','AA','309'),('1987-10-19','AA','341'),('1987-10-19','AA','344'),('1987-10-19','AA','344'),('1987-10-19','AA','347'),('1987-10-19','AA','347'),('1987-10-19','AA','368'),('1987-10-19','AA','381'),('1987-10-19','AA','381'),('1987-10-19','AA','381'),('1987-10-19','AA','396'),('1987-10-19','AA','396'),('1987-10-19','AA','397'),('1987-10-19','AA','397'),('1987-10-19','AA','417'),('1987-10-19','AA','417'),('1987-10-19','AA','446'),('1987-10-19','AA','451'),('1987-10-19','AA','451'),('1987-10-19','AA','491'),('1987-10-19','AA','504'),('1987-10-19','AA','504'),('1987-10-19','AA','519'),('1987-10-19','AA','519'),('1987-10-19','AA','523'),('1987-10-19','AA','523'),('1987-10-19','AA','525'),('1987-10-19','AA','525'),('1987-10-19','AA','525'),('1987-10-19','AA','533'),('1987-10-19','AA','533'),('1987-10-19','AA','546'),('1987-10-19','AA','546'),('1987-10-19','AA','546'),('1987-10-19','AA','546'),('1987-10-19','AA','556'),('1987-10-19','AA','556'),('1987-10-19','AA','556'),('1987-10-19','AA','597'),('1987-10-19','AA','597'),('1987-10-19','AA','597'),('1987-10-19','AA','601'),('1987-10-19','AA','601'),('1987-10-19','AA','627'),('1987-10-19','AA','629'),('1987-10-19','AA','629'),('1987-10-19','AA','670'),('1987-10-19','AA','673'),('1987-10-19','AA','673'),('1987-10-19','AA','680'),('1987-10-19','AA','680'),('1987-10-19','AA','817'),('1987-10-19','AA','817'),('1987-10-19','AA','824'),('1987-10-19','AA','824'),('1987-10-19','AA','824'),('1987-10-19','AA','832'),('1987-10-19','AA','832'),('1987-10-19','AA','852'),('1987-10-19','AA','852'),('1987-10-19','AA','866'),('1987-10-19','AA','866'),('1987-10-19','AA','871'),('1987-10-19','AA','871'),('1987-10-19','AA','880'),('1987-10-19','AA','880'),('1987-10-19','AA','880'),('1987-10-19','AA','880'),('1987-10-19','AA','883'),('1987-10-19','AA','883'),('1987-10-19','AA','885'),('1987-10-19','AA','885'),('1987-10-19','AA','890'),('1987-10-19','AA','890'),('1987-10-19','AA','893'),('1987-10-19','AA','893'),('1987-10-19','AA','905'),('1987-10-19','AA','905'),('1987-10-19','AA','915'),('1987-10-19','AA','929'),('1987-10-19','AA','929'),('1987-10-19','AA','936'),('1987-10-19','AA','936'),('1987-10-19','AA','937'),('1987-10-19','AA','955'),('1987-10-19','AA','955'),('1987-10-19','AA','966'),('1987-10-19','AA','1002'),('1987-10-19','AA','1002'),('1987-10-19','AA','1004'),('1987-10-19','AA','1004'),('1987-10-19','AA','1015'),('1987-10-19','AA','1015'),('1987-10-19','AA','1021'),('1987-10-19','AA','1021'),('1987-10-19','AA','1041'),('1987-10-19','AA','1041'),('1987-10-19','AA','1046'),('1987-10-19','AA','1046'),('1987-10-19','AA','1048'),('1987-10-19','AA','1048'),('1987-10-19','AA','1061'),('1987-10-19','AA','1061'),('1987-10-19','AA','1088'),('1987-10-19','AA','1088'),('1987-10-19','AA','2033'),('1987-10-19','AA','2033'),('1987-10-19','AA','2050'),('1987-10-19','AA','2058'),('1987-10-19','AA','2071'),('1987-10-19','AA','2071'),('1987-10-19','AA','2086'),('1987-10-19','AA','2105'),('1987-10-19','AA','2111'),('1987-10-19','AA','2123'),('1987-10-19','AA','2123'),('1987-10-19','AA','2147'),('1987-10-19','AA','2147'),('1987-10-19','AA','2199'),('1987-10-19','AA','2199'),('1987-10-19','AA','2207'),('1987-10-19','AA','2207'),('1987-10-19','AA','2217'),('1987-10-19','AA','2230'),('1987-10-19','AA','2245'),('1987-10-19','AA','2251'),('1987-10-19','AA','2251'),('1987-10-19','AA','2275'),('1987-10-19','AA','2278'),('1987-10-19','AA','2357'),('1987-10-19','AA','2361'),('1987-10-19','AA','2490'),('1987-10-19','AA','2528'),('1987-10-19','AA','2735'),('1987-10-19','AA','2735'),('1987-10-19','AA','2751'),('1987-10-19','AL','2'),('1987-10-19','AL','2'),('1987-10-19','AL','7'),('1987-10-19','AL','7'),('1987-10-19','AL','26'),('1987-10-19','AL','26'),('1987-10-19','AL','34'),('1987-10-19','AL','34'),('1987-10-19','AL','36'),('1987-10-19','AL','36'),('1987-10-19','AL','45'),('1987-10-19','AL','45'),('1987-10-19','AL','45'),('1987-10-19','AL','91'),('1987-10-19','AL','91'),('1987-10-19','AL','104'),('1987-10-19','AL','104'),('1987-10-19','AL','104'),('1987-10-19','AL','109'),('1987-10-19','AL','112'),('1987-10-19','AL','112'),('1987-10-19','AL','123'),('1987-10-19','AL','149'),('1987-10-19','AL','160'),('1987-10-19','AL','160'),('1987-10-19','AL','165'),('1987-10-19','AL','171'),('1987-10-19','AL','171'),('1987-10-19','AL','176'),('1987-10-19','AL','176'),('1987-10-19','AL','179'),('1987-10-19','AL','215'),('1987-10-19','AL','231'),('1987-10-19','AL','263'),('1987-10-19','AL','263'),('1987-10-19','AL','268'),('1987-10-19','AL','268'),('1987-10-19','AL','268'),('1987-10-19','AL','281'),('1987-10-19','AL','281'),('1987-10-19','AL','287'),('1987-10-19','AL','287'),('1987-10-19','AL','309'),('1987-10-19','AL','309'),('1987-10-19','AL','341'),('1987-10-19','AL','344'),('1987-10-19','AL','344'),('1987-10-19','AL','357'),('1987-10-19','AL','357'),('1987-10-19','AL','368'),('1987-10-19','AL','381'),('1987-10-19','AL','396'),('1987-10-19','AL','416'),('1987-10-19','AL','416'),('1987-10-19','AL','417'),('1987-10-19','AL','438'),('1987-10-19','AL','438'),('1987-10-19','AL','446'),('1987-10-19','AL','451'),('1987-10-19','AL','451'),('1987-10-19','AL','491'),('1987-10-19','AL','491'),('1987-10-19','AL','523'),('1987-10-19','AL','523'),('1987-10-19','AL','523'),('1987-10-19','AL','525'),('1987-10-19','AL','525'),('1987-10-19','AL','533'),('1987-10-19','AL','533'),('1987-10-19','AL','546'),('1987-10-19','AL','546'),('1987-10-19','AL','556'),('1987-10-19','AL','556'),('1987-10-19','AL','601'),('1987-10-19','AL','601'),('1987-10-19','AL','627'),('1987-10-19','AL','629'),('1987-10-19','AL','670'),('1987-10-19','AL','670'),('1987-10-19','AL','670'),('1987-10-20','AA','2'),('1987-10-20','AA','2'),('1987-10-20','AA','2'),('1987-10-20','AA','7'),('1987-10-20','AA','7'),('1987-10-20','AA','34'),('1987-10-20','AA','36'),('1987-10-20','AA','91'),('1987-10-20','AA','101'),('1987-10-20','AA','101'),('1987-10-20','AA','109'),('1987-10-20','AA','109'),('1987-10-20','AA','112'),('1987-10-20','AA','123'),('1987-10-20','AA','123'),('1987-10-20','AA','160'),('1987-10-20','AA','165'),('1987-10-20','AA','165'),('1987-10-20','AA','165'),('1987-10-20','AA','176'),('1987-10-20','AA','176'),('1987-10-20','AA','176'),('1987-10-20','AA','176'),('1987-10-20','AA','179'),('1987-10-20','AA','179'),('1987-10-20','AA','215'),('1987-10-20','AA','215'),('1987-10-20','AA','231'),('1987-10-20','AA','231'),('1987-10-20','AA','263'),('1987-10-20','AA','263'),('1987-10-20','AA','268'),('1987-10-20','AA','268'),('1987-10-20','AA','281'),('1987-10-20','AA','287'),('1987-10-20','AA','287'),('1987-10-20','AA','309'),('1987-10-20','AA','309'),('1987-10-20','AA','309'),('1987-10-20','AA','341'),('1987-10-20','AA','344'),('1987-10-20','AA','344'),('1987-10-20','AA','347'),('1987-10-20','AA','347'),('1987-10-20','AA','368'),('1987-10-20','AA','381'),('1987-10-20','AA','381'),('1987-10-20','AA','381'),('1987-10-20','AA','396'),('1987-10-20','AA','396'),('1987-10-20','AA','397'),('1987-10-20','AA','397'),('1987-10-20','AA','417'),('1987-10-20','AA','417'),('1987-10-20','AA','446'),('1987-10-20','AA','460'),('1987-10-20','AA','460'),('1987-10-20','AA','491'),('1987-10-20','AA','504'),('1987-10-20','AA','504'),('1987-10-20','AA','519'),('1987-10-20','AA','519'),('1987-10-20','AA','523'),('1987-10-20','AA','525'),('1987-10-20','AA','525'),('1987-10-20','AA','525'),('1987-10-20','AA','533'),('1987-10-20','AA','533'),('1987-10-20','AA','533'),('1987-10-20','AA','546'),('1987-10-20','AA','546'),('1987-10-20','AA','546'),('1987-10-20','AA','546'),('1987-10-20','AA','556'),('1987-10-20','AA','556'),('1987-10-20','AA','597'),('1987-10-20','AA','597'),('1987-10-20','AA','601'),('1987-10-20','AA','601'),('1987-10-20','AA','629'),('1987-10-20','AA','670'),('1987-10-20','AA','673'),('1987-10-20','AA','673'),('1987-10-20','AA','680'),('1987-10-20','AA','680'),('1987-10-20','AA','817'),('1987-10-20','AA','824'),('1987-10-20','AA','824'),('1987-10-20','AA','824'),('1987-10-20','AA','832'),('1987-10-20','AA','832'),('1987-10-20','AA','852'),('1987-10-20','AA','852'),('1987-10-20','AA','866'),('1987-10-20','AA','866'),('1987-10-20','AA','871'),('1987-10-20','AA','871'),('1987-10-20','AA','880'),('1987-10-20','AA','880'),('1987-10-20','AA','880'),('1987-10-20','AA','880'),('1987-10-20','AA','883'),('1987-10-20','AA','883'),('1987-10-20','AA','885'),('1987-10-20','AA','885'),('1987-10-20','AA','885'),('1987-10-20','AA','890'),('1987-10-20','AA','890'),('1987-10-20','AA','893'),('1987-10-20','AA','893'),('1987-10-20','AA','905'),('1987-10-20','AA','905'),('1987-10-20','AA','915'),('1987-10-20','AA','929'),('1987-10-20','AA','929'),('1987-10-20','AA','936'),('1987-10-20','AA','937'),('1987-10-20','AA','937'),('1987-10-20','AA','955'),('1987-10-20','AA','955'),('1987-10-20','AA','966'),('1987-10-20','AA','1002'),('1987-10-20','AA','1002'),('1987-10-20','AA','1004'),('1987-10-20','AA','1004'),('1987-10-20','AA','1015'),('1987-10-20','AA','1015'),('1987-10-20','AA','1021'),('1987-10-20','AA','1021'),('1987-10-20','AA','1041'),('1987-10-20','AA','1041'),('1987-10-20','AA','1046'),('1987-10-20','AA','1046'),('1987-10-20','AA','1048'),('1987-10-20','AA','1048'),('1987-10-20','AA','1061'),('1987-10-20','AA','1061'),('1987-10-20','AA','1088'),('1987-10-20','AA','1088'),('1987-10-20','AA','2033'),('1987-10-20','AA','2033'),('1987-10-20','AA','2050'),('1987-10-20','AA','2058'),('1987-10-20','AA','2071'),('1987-10-20','AA','2071'),('1987-10-20','AA','2086'),('1987-10-20','AA','2105'),('1987-10-20','AA','2111'),('1987-10-20','AA','2123'),('1987-10-20','AA','2123'),('1987-10-20','AA','2147'),('1987-10-20','AA','2199'),('1987-10-20','AA','2207'),('1987-10-20','AA','2217'),('1987-10-20','AA','2230'),('1987-10-20','AA','2245'),('1987-10-20','AA','2251'),('1987-10-20','AA','2251'),('1987-10-20','AA','2275'),('1987-10-20','AA','2278'),('1987-10-20','AA','2351'),('1987-10-20','AA','2357'),('1987-10-20','AA','2361'),('1987-10-20','AA','2490'),('1987-10-20','AA','2528'),('1987-10-20','AA','2528'),('1987-10-20','AA','2735'),('1987-10-20','AA','2735'),('1987-10-20','AA','2751'),('1987-10-20','AL','2'),('1987-10-20','AL','2'),('1987-10-20','AL','7'),('1987-10-20','AL','7'),('1987-10-20','AL','26'),('1987-10-20','AL','26'),('1987-10-20','AL','34'),('1987-10-20','AL','34'),('1987-10-20','AL','36'),('1987-10-20','AL','36'),('1987-10-20','AL','45'),('1987-10-20','AL','45'),('1987-10-20','AL','45'),('1987-10-20','AL','104'),('1987-10-20','AL','104'),('1987-10-20','AL','104'),('1987-10-20','AL','109'),('1987-10-20','AL','112'),('1987-10-20','AL','112'),('1987-10-20','AL','123'),('1987-10-20','AL','149'),('1987-10-20','AL','160'),('1987-10-20','AL','160'),('1987-10-20','AL','165'),('1987-10-20','AL','171'),('1987-10-20','AL','171'),('1987-10-20','AL','176'),('1987-10-20','AL','176'),('1987-10-20','AL','179'),('1987-10-20','AL','215'),('1987-10-20','AL','231'),('1987-10-20','AL','263'),('1987-10-20','AL','263'),('1987-10-20','AL','268'),('1987-10-20','AL','268'),('1987-10-20','AL','268'),('1987-10-20','AL','281'),('1987-10-20','AL','281'),('1987-10-20','AL','287'),('1987-10-20','AL','287'),('1987-10-20','AL','309'),('1987-10-20','AL','309'),('1987-10-20','AL','341'),('1987-10-20','AL','344'),('1987-10-20','AL','344'),('1987-10-20','AL','357'),('1987-10-20','AL','357'),('1987-10-20','AL','368'),('1987-10-20','AL','381'),('1987-10-20','AL','396'),('1987-10-20','AL','397'),('1987-10-20','AL','397'),('1987-10-20','AL','416'),('1987-10-20','AL','416'),('1987-10-20','AL','417'),('1987-10-20','AL','438'),('1987-10-20','AL','438'),('1987-10-20','AL','446'),('1987-10-20','AL','451'),('1987-10-20','AL','451'),('1987-10-20','AL','491'),('1987-10-20','AL','491'),('1987-10-20','AL','523'),('1987-10-20','AL','523'),('1987-10-20','AL','523'),('1987-10-20','AL','525'),('1987-10-20','AL','525'),('1987-10-20','AL','533'),('1987-10-20','AL','533'),('1987-10-20','AL','546'),('1987-10-20','AL','546'),('1987-10-20','AL','556'),('1987-10-20','AL','556'),('1987-10-20','AL','601'),('1987-10-20','AL','601'),('1987-10-20','AL','627'),('1987-10-20','AL','629'),('1987-10-20','AL','670'),('1987-10-20','AL','670'),('1987-10-20','AL','670'),('1987-10-20','AL','673'),('1987-10-20','AL','680'),('1987-10-05','AA','2'),('1987-10-05','AA','2'),('1987-10-05','AA','2'),('1987-10-05','AA','7'),('1987-10-05','AA','7'),('1987-10-05','AA','26'),('1987-10-05','AA','34'),('1987-10-05','AA','36'),('1987-10-05','AA','91'),('1987-10-05','AA','101'),('1987-10-05','AA','101'),('1987-10-05','AA','109'),('1987-10-05','AA','109'),('1987-10-05','AA','112'),('1987-10-05','AA','123'),('1987-10-05','AA','123'),('1987-10-05','AA','165'),('1987-10-05','AA','165'),('1987-10-05','AA','165'),('1987-10-05','AA','176'),('1987-10-05','AA','176'),('1987-10-05','AA','176'),('1987-10-05','AA','176'),('1987-10-05','AA','179'),('1987-10-05','AA','179'),('1987-10-05','AA','215'),('1987-10-05','AA','215'),('1987-10-05','AA','231'),('1987-10-05','AA','263'),('1987-10-05','AA','263'),('1987-10-05','AA','281'),('1987-10-05','AA','287'),('1987-10-05','AA','287'),('1987-10-05','AA','309'),('1987-10-05','AA','309'),('1987-10-05','AA','309'),('1987-10-05','AA','341'),('1987-10-05','AA','347'),('1987-10-05','AA','347'),('1987-10-05','AA','368'),('1987-10-05','AA','381'),('1987-10-05','AA','381'),('1987-10-05','AA','381'),('1987-10-05','AA','396'),('1987-10-05','AA','396'),('1987-10-05','AA','397'),('1987-10-05','AA','397'),('1987-10-05','AA','417'),('1987-10-05','AA','417'),('1987-10-05','AA','446'),('1987-10-05','AA','451'),('1987-10-05','AA','451'),('1987-10-05','AA','460'),('1987-10-05','AA','460'),('1987-10-05','AA','491'),('1987-10-05','AA','504'),('1987-10-05','AA','504'),('1987-10-05','AA','519'),('1987-10-05','AA','519'),('1987-10-05','AA','523'),('1987-10-05','AA','523'),('1987-10-05','AA','525'),('1987-10-05','AA','525'),('1987-10-05','AA','525'),('1987-10-05','AA','533'),('1987-10-05','AA','533'),('1987-10-05','AA','533'),('1987-10-05','AA','546'),('1987-10-05','AA','546'),('1987-10-05','AA','546'),('1987-10-05','AA','546'),('1987-10-05','AA','556'),('1987-10-05','AA','556'),('1987-10-05','AA','556'),('1987-10-05','AA','597'),('1987-10-05','AA','597'),('1987-10-05','AA','597'),('1987-10-05','AA','601'),('1987-10-05','AA','601'),('1987-10-05','AA','627'),('1987-10-05','AA','629'),('1987-10-05','AA','629'),('1987-10-05','AA','670'),('1987-10-05','AA','673'),('1987-10-05','AA','673'),('1987-10-05','AA','680'),('1987-10-05','AA','680'),('1987-10-05','AA','817'),('1987-10-05','AA','817'),('1987-10-05','AA','824'),('1987-10-05','AA','824'),('1987-10-05','AA','824'),('1987-10-05','AA','824'),('1987-10-05','AA','832'),('1987-10-05','AA','832'),('1987-10-05','AA','852'),('1987-10-05','AA','852'),('1987-10-05','AA','866'),('1987-10-05','AA','866'),('1987-10-05','AA','871'),('1987-10-05','AA','871'),('1987-10-05','AA','880'),('1987-10-05','AA','880'),('1987-10-05','AA','880'),('1987-10-05','AA','880'),('1987-10-05','AA','883'),('1987-10-05','AA','883'),('1987-10-05','AA','885'),('1987-10-05','AA','885'),('1987-10-05','AA','885'),('1987-10-05','AA','890'),('1987-10-05','AA','890'),('1987-10-05','AA','893'),('1987-10-05','AA','893'),('1987-10-05','AA','905'),('1987-10-05','AA','905'),('1987-10-05','AA','915'),('1987-10-05','AA','929'),('1987-10-05','AA','929'),('1987-10-05','AA','936'),('1987-10-05','AA','936'),('1987-10-05','AA','937'),('1987-10-05','AA','937'),('1987-10-05','AA','955'),('1987-10-05','AA','955'),('1987-10-05','AA','966'),('1987-10-05','AA','1002'),('1987-10-05','AA','1002'),('1987-10-05','AA','1004'),('1987-10-05','AA','1004'),('1987-10-05','AA','1015'),('1987-10-05','AA','1015'),('1987-10-05','AA','1021'),('1987-10-05','AA','1021'),('1987-10-05','AA','1041'),('1987-10-05','AA','1041'),('1987-10-05','AA','1046'),('1987-10-05','AA','1046'),('1987-10-05','AA','1048'),('1987-10-05','AA','1048'),('1987-10-05','AA','1061'),('1987-10-05','AA','1061'),('1987-10-05','AA','1088'),('1987-10-05','AA','1088'),('1987-10-05','AA','2033'),('1987-10-05','AA','2033'),('1987-10-05','AA','2050'),('1987-10-05','AA','2058'),('1987-10-05','AA','2071'),('1987-10-05','AA','2071'),('1987-10-05','AA','2086'),('1987-10-05','AA','2105'),('1987-10-05','AA','2111'),('1987-10-05','AA','2123'),('1987-10-05','AA','2123'),('1987-10-05','AA','2147'),('1987-10-05','AA','2147'),('1987-10-05','AA','2199'),('1987-10-05','AA','2199'),('1987-10-05','AA','2207'),('1987-10-05','AA','2207'),('1987-10-05','AA','2217'),('1987-10-05','AA','2230'),('1987-10-05','AA','2245'),('1987-10-05','AA','2251'),('1987-10-05','AA','2251'),('1987-10-05','AA','2275'),('1987-10-05','AA','2278'),('1987-10-05','AA','2351'),('1987-10-05','AA','2357'),('1987-10-05','AA','2361'),('1987-10-05','AA','2528'),('1987-10-05','AA','2528'),('1987-10-05','AA','2735'),('1987-10-05','AA','2735'),('1987-10-05','AA','2751'),('1987-10-05','AL','2'),('1987-10-05','AL','2'),('1987-10-05','AL','7'),('1987-10-05','AL','7'),('1987-10-05','AL','26'),('1987-10-05','AL','26'),('1987-10-05','AL','36'),('1987-10-05','AL','36'),('1987-10-05','AL','45'),('1987-10-05','AL','45'),('1987-10-05','AL','45'),('1987-10-05','AL','91'),('1987-10-05','AL','91'),('1987-10-05','AL','104'),('1987-10-05','AL','104'),('1987-10-05','AL','104'),('1987-10-05','AL','109'),('1987-10-05','AL','112'),('1987-10-05','AL','112'),('1987-10-05','AL','123'),('1987-10-05','AL','149'),('1987-10-05','AL','160'),('1987-10-05','AL','160'),('1987-10-05','AL','165'),('1987-10-05','AL','171'),('1987-10-05','AL','171'),('1987-10-05','AL','176'),('1987-10-05','AL','176'),('1987-10-05','AL','179'),('1987-10-05','AL','215'),('1987-10-05','AL','231'),('1987-10-05','AL','263'),('1987-10-05','AL','263'),('1987-10-05','AL','268'),('1987-10-05','AL','268'),('1987-10-05','AL','268'),('1987-10-05','AL','281'),('1987-10-05','AL','281'),('1987-10-05','AL','287'),('1987-10-05','AL','287'),('1987-10-05','AL','309'),('1987-10-05','AL','309'),('1987-10-05','AL','341'),('1987-10-05','AL','344'),('1987-10-05','AL','344'),('1987-10-05','AL','357'),('1987-10-05','AL','357'),('1987-10-05','AL','368'),('1987-10-05','AL','381'),('1987-10-05','AL','396'),('1987-10-05','AL','397'),('1987-10-05','AL','397'),('1987-10-05','AL','416'),('1987-10-05','AL','416'),('1987-10-05','AL','417'),('1987-10-05','AL','438'),('1987-10-05','AL','438'),('1987-10-05','AL','446'),('1987-10-05','AL','451'),('1987-10-05','AL','451'),('1987-10-05','AL','491'),('1987-10-05','AL','491'),('1987-10-05','AL','523'),('1987-10-05','AL','523'),('1987-10-05','AL','523'),('1987-10-05','AL','525'),('1987-10-05','AL','525'),('1987-10-05','AL','533'),('1987-10-05','AL','533'),('1987-10-05','AL','546'),('1987-10-05','AL','546'),('1987-10-05','AL','601'),('1987-10-05','AL','601'),('1987-10-05','AL','627'),('1987-10-05','AL','629'),('1987-10-05','AL','670'),('1987-10-05','AL','670'),('1987-10-05','AL','670'),('1987-10-05','AL','673'),('1987-10-05','AL','680'),('1987-10-06','AA','2'),('1987-10-06','AA','2'),('1987-10-06','AA','7'),('1987-10-06','AA','7'),('1987-10-06','AA','34'),('1987-10-06','AA','36'),('1987-10-06','AA','91'),('1987-10-06','AA','101'),('1987-10-06','AA','109'),('1987-10-06','AA','109'),('1987-10-06','AA','112'),('1987-10-06','AA','123'),('1987-10-06','AA','123'),('1987-10-06','AA','165'),('1987-10-06','AA','165'),('1987-10-06','AA','165'),('1987-10-06','AA','176'),('1987-10-06','AA','176'),('1987-10-06','AA','176'),('1987-10-06','AA','176'),('1987-10-06','AA','179'),('1987-10-06','AA','179'),('1987-10-06','AA','215'),('1987-10-06','AA','215'),('1987-10-06','AA','231'),('1987-10-06','AA','231'),('1987-10-06','AA','263'),('1987-10-06','AA','263'),('1987-10-06','AA','268'),('1987-10-06','AA','268'),('1987-10-06','AA','287'),('1987-10-06','AA','287'),('1987-10-06','AA','309'),('1987-10-06','AA','309'),('1987-10-06','AA','309'),('1987-10-06','AA','341'),('1987-10-06','AA','344'),('1987-10-06','AA','344'),('1987-10-06','AA','347'),('1987-10-06','AA','347'),('1987-10-06','AA','368'),('1987-10-06','AA','381'),('1987-10-06','AA','381'),('1987-10-06','AA','381'),('1987-10-06','AA','396'),('1987-10-06','AA','396'),('1987-10-06','AA','397'),('1987-10-06','AA','397'),('1987-10-06','AA','417'),('1987-10-06','AA','417'),('1987-10-06','AA','446'),('1987-10-06','AA','451'),('1987-10-06','AA','451'),('1987-10-06','AA','460'),('1987-10-06','AA','460'),('1987-10-06','AA','491'),('1987-10-06','AA','504'),('1987-10-06','AA','504'),('1987-10-06','AA','519'),('1987-10-06','AA','519'),('1987-10-06','AA','523'),('1987-10-06','AA','523'),('1987-10-06','AA','525'),('1987-10-06','AA','525'),('1987-10-06','AA','525'),('1987-10-06','AA','533'),('1987-10-06','AA','533'),('1987-10-06','AA','533'),('1987-10-06','AA','546'),('1987-10-06','AA','546'),('1987-10-06','AA','546'),('1987-10-06','AA','546'),('1987-10-06','AA','556'),('1987-10-06','AA','556'),('1987-10-06','AA','556'),('1987-10-06','AA','597'),('1987-10-06','AA','597'),('1987-10-06','AA','597'),('1987-10-06','AA','601'),('1987-10-06','AA','601'),('1987-10-06','AA','627'),('1987-10-06','AA','629'),('1987-10-06','AA','629'),('1987-10-06','AA','670'),('1987-10-06','AA','673'),('1987-10-06','AA','673'),('1987-10-06','AA','680'),('1987-10-06','AA','680'),('1987-10-06','AA','817'),('1987-10-06','AA','817'),('1987-10-06','AA','824'),('1987-10-06','AA','824'),('1987-10-06','AA','824'),('1987-10-06','AA','824'),('1987-10-06','AA','832'),('1987-10-06','AA','832'),('1987-10-06','AA','852'),('1987-10-06','AA','852'),('1987-10-06','AA','866'),('1987-10-06','AA','871'),('1987-10-06','AA','871'),('1987-10-06','AA','880'),('1987-10-06','AA','880'),('1987-10-06','AA','880'),('1987-10-06','AA','880'),('1987-10-06','AA','883'),('1987-10-06','AA','883'),('1987-10-06','AA','885'),('1987-10-06','AA','885'),('1987-10-06','AA','885'),('1987-10-06','AA','890'),('1987-10-06','AA','890'),('1987-10-06','AA','893'),('1987-10-06','AA','893'),('1987-10-06','AA','905'),('1987-10-06','AA','905'),('1987-10-06','AA','915'),('1987-10-06','AA','929'),('1987-10-06','AA','929'),('1987-10-06','AA','936'),('1987-10-06','AA','936'),('1987-10-06','AA','937'),('1987-10-06','AA','937'),('1987-10-06','AA','955'),('1987-10-06','AA','955'),('1987-10-06','AA','966'),('1987-10-06','AA','1002'),('1987-10-06','AA','1002'),('1987-10-06','AA','1004'),('1987-10-06','AA','1004'),('1987-10-06','AA','1015'),('1987-10-06','AA','1015'),('1987-10-06','AA','1021'),('1987-10-06','AA','1021'),('1987-10-06','AA','1041'),('1987-10-06','AA','1041'),('1987-10-06','AA','1046'),('1987-10-06','AA','1046'),('1987-10-06','AA','1048'),('1987-10-06','AA','1061'),('1987-10-06','AA','1088'),('1987-10-06','AA','1088'),('1987-10-06','AA','2033'),('1987-10-06','AA','2033'),('1987-10-06','AA','2050'),('1987-10-06','AA','2058'),('1987-10-06','AA','2071'),('1987-10-06','AA','2071'),('1987-10-06','AA','2086'),('1987-10-06','AA','2105'),('1987-10-06','AA','2111'),('1987-10-06','AA','2123'),('1987-10-06','AA','2123'),('1987-10-06','AA','2147'),('1987-10-06','AA','2147'),('1987-10-06','AA','2199'),('1987-10-06','AA','2199'),('1987-10-06','AA','2207'),('1987-10-06','AA','2207'),('1987-10-06','AA','2217'),('1987-10-06','AA','2230'),('1987-10-06','AA','2245'),('1987-10-06','AA','2251'),('1987-10-06','AA','2251'),('1987-10-06','AA','2275'),('1987-10-06','AA','2278'),('1987-10-06','AA','2351'),('1987-10-06','AA','2357'),('1987-10-06','AA','2490'),('1987-10-06','AA','2528'),('1987-10-06','AA','2528'),('1987-10-06','AA','2735'),('1987-10-06','AA','2735'),('1987-10-06','AA','2751'),('1987-10-06','AL','2'),('1987-10-06','AL','2'),('1987-10-06','AL','7'),('1987-10-06','AL','7'),('1987-10-06','AL','26'),('1987-10-06','AL','26'),('1987-10-06','AL','34'),('1987-10-06','AL','34'),('1987-10-06','AL','36'),('1987-10-06','AL','36'),('1987-10-06','AL','45'),('1987-10-06','AL','45'),('1987-10-06','AL','45'),('1987-10-06','AL','91'),('1987-10-06','AL','91'),('1987-10-06','AL','104'),('1987-10-06','AL','104'),('1987-10-06','AL','104'),('1987-10-06','AL','109'),('1987-10-06','AL','112'),('1987-10-06','AL','112'),('1987-10-06','AL','123'),('1987-10-06','AL','149'),('1987-10-06','AL','160'),('1987-10-06','AL','160'),('1987-10-06','AL','165'),('1987-10-06','AL','171'),('1987-10-06','AL','171'),('1987-10-06','AL','176'),('1987-10-06','AL','176'),('1987-10-06','AL','179'),('1987-10-06','AL','231'),('1987-10-06','AL','263'),('1987-10-06','AL','263'),('1987-10-06','AL','268'),('1987-10-06','AL','268'),('1987-10-06','AL','268'),('1987-10-06','AL','281'),('1987-10-06','AL','281'),('1987-10-06','AL','287'),('1987-10-06','AL','287'),('1987-10-06','AL','309'),('1987-10-06','AL','309'),('1987-10-06','AL','341'),('1987-10-06','AL','344'),('1987-10-06','AL','344'),('1987-10-06','AL','357'),('1987-10-06','AL','357'),('1987-10-06','AL','381'),('1987-10-06','AL','397'),('1987-10-06','AL','397'),('1987-10-06','AL','416'),('1987-10-06','AL','416'),('1987-10-06','AL','417'),('1987-10-06','AL','438'),('1987-10-06','AL','438'),('1987-10-06','AL','446'),('1987-10-06','AL','451'),('1987-10-06','AL','451'),('1987-10-06','AL','491'),('1987-10-06','AL','491'),('1987-10-06','AL','523'),('1987-10-06','AL','523'),('1987-10-06','AL','523'),('1987-10-06','AL','525'),('1987-10-06','AL','525'),('1987-10-06','AL','533'),('1987-10-06','AL','533'),('1987-10-06','AL','546'),('1987-10-06','AL','546'),('1987-10-06','AL','601'),('1987-10-06','AL','601'),('1987-10-06','AL','627'),('1987-10-06','AL','629'),('1987-10-06','AL','670'),('1987-10-06','AL','670'),('1987-10-06','AL','670'),('1987-10-06','AL','673'),('1987-10-06','AL','680'),('1987-10-07','AA','2'),('1987-10-07','AA','2'),('1987-10-07','AA','2'),('1987-10-07','AA','7'),('1987-10-07','AA','7'),('1987-10-07','AA','26'),('1987-10-07','AA','34'),('1987-10-07','AA','36'),('1987-10-07','AA','91'),('1987-10-07','AA','101'),('1987-10-07','AA','101'),('1987-10-07','AA','109'),('1987-10-07','AA','112'),('1987-10-07','AA','123'),('1987-10-07','AA','123'),('1987-10-07','AA','160'),('1987-10-07','AA','165'),('1987-10-07','AA','165'),('1987-10-07','AA','165'),('1987-10-07','AA','176'),('1987-10-07','AA','176'),('1987-10-07','AA','176'),('1987-10-07','AA','176'),('1987-10-07','AA','179'),('1987-10-07','AA','179'),('1987-10-07','AA','215'),('1987-10-07','AA','215'),('1987-10-07','AA','231'),('1987-10-07','AA','231'),('1987-10-07','AA','263'),('1987-10-07','AA','263'),('1987-10-07','AA','268'),('1987-10-07','AA','268'),('1987-10-07','AA','281'),('1987-10-07','AA','287'),('1987-10-07','AA','287'),('1987-10-07','AA','309'),('1987-10-07','AA','309'),('1987-10-07','AA','309'),('1987-10-07','AA','341'),('1987-10-07','AA','344'),('1987-10-07','AA','344'),('1987-10-07','AA','347'),('1987-10-07','AA','347'),('1987-10-07','AA','368'),('1987-10-07','AA','381'),('1987-10-07','AA','381'),('1987-10-07','AA','381'),('1987-10-07','AA','396'),('1987-10-07','AA','396'),('1987-10-07','AA','397'),('1987-10-07','AA','397'),('1987-10-07','AA','417'),('1987-10-07','AA','417'),('1987-10-07','AA','446'),('1987-10-07','AA','451'),('1987-10-07','AA','451'),('1987-10-07','AA','460'),('1987-10-07','AA','460'),('1987-10-07','AA','504'),('1987-10-07','AA','504'),('1987-10-07','AA','519'),('1987-10-07','AA','519'),('1987-10-07','AA','523'),('1987-10-07','AA','523'),('1987-10-07','AA','525'),('1987-10-07','AA','525'),('1987-10-07','AA','525'),('1987-10-07','AA','533'),('1987-10-07','AA','533'),('1987-10-07','AA','533'),('1987-10-07','AA','546'),('1987-10-07','AA','546'),('1987-10-07','AA','546'),('1987-10-07','AA','546'),('1987-10-07','AA','556'),('1987-10-07','AA','556'),('1987-10-07','AA','556'),('1987-10-07','AA','597'),('1987-10-07','AA','597'),('1987-10-07','AA','597'),('1987-10-07','AA','601'),('1987-10-07','AA','601'),('1987-10-07','AA','627'),('1987-10-07','AA','629'),('1987-10-07','AA','629'),('1987-10-07','AA','670'),('1987-10-07','AA','673'),('1987-10-07','AA','673'),('1987-10-07','AA','680'),('1987-10-07','AA','680'),('1987-10-07','AA','817'),('1987-10-07','AA','817'),('1987-10-07','AA','824'),('1987-10-07','AA','824'),('1987-10-07','AA','824'),('1987-10-07','AA','824'),('1987-10-07','AA','832'),('1987-10-07','AA','832'),('1987-10-07','AA','852'),('1987-10-07','AA','852'),('1987-10-07','AA','866'),('1987-10-07','AA','866'),('1987-10-07','AA','871'),('1987-10-07','AA','871'),('1987-10-07','AA','880'),('1987-10-07','AA','880'),('1987-10-07','AA','880'),('1987-10-07','AA','880'),('1987-10-07','AA','883'),('1987-10-07','AA','883'),('1987-10-07','AA','885'),('1987-10-07','AA','885'),('1987-10-07','AA','890'),('1987-10-07','AA','890'),('1987-10-07','AA','893'),('1987-10-07','AA','893'),('1987-10-07','AA','905'),('1987-10-07','AA','905'),('1987-10-07','AA','915'),('1987-10-07','AA','929'),('1987-10-07','AA','929'),('1987-10-07','AA','936'),('1987-10-07','AA','936'),('1987-10-07','AA','937'),('1987-10-07','AA','937'),('1987-10-07','AA','955'),('1987-10-07','AA','955'),('1987-10-07','AA','966'),('1987-10-07','AA','1002'),('1987-10-07','AA','1002'),('1987-10-07','AA','1004'),('1987-10-07','AA','1004'),('1987-10-07','AA','1015'),('1987-10-07','AA','1015'),('1987-10-07','AA','1021'),('1987-10-07','AA','1021'),('1987-10-07','AA','1041'),('1987-10-07','AA','1041'),('1987-10-07','AA','1046'),('1987-10-07','AA','1046'),('1987-10-07','AA','1048'),('1987-10-07','AA','1048'),('1987-10-07','AA','1061'),('1987-10-07','AA','1061'),('1987-10-07','AA','1088'),('1987-10-07','AA','1088'),('1987-10-07','AA','2033'),('1987-10-07','AA','2033'),('1987-10-07','AA','2050'),('1987-10-07','AA','2058'),('1987-10-07','AA','2071'),('1987-10-07','AA','2071'),('1987-10-07','AA','2086'),('1987-10-07','AA','2105'),('1987-10-07','AA','2111'),('1987-10-07','AA','2123'),('1987-10-07','AA','2123'),('1987-10-07','AA','2147'),('1987-10-07','AA','2147'),('1987-10-07','AA','2199'),('1987-10-07','AA','2199'),('1987-10-07','AA','2207'),('1987-10-07','AA','2207'),('1987-10-07','AA','2217'),('1987-10-07','AA','2230'),('1987-10-07','AA','2245'),('1987-10-07','AA','2251'),('1987-10-07','AA','2251'),('1987-10-07','AA','2275'),('1987-10-07','AA','2351'),('1987-10-07','AA','2357'),('1987-10-07','AA','2361'),('1987-10-07','AA','2490'),('1987-10-07','AA','2528'),('1987-10-07','AA','2528'),('1987-10-07','AA','2735'),('1987-10-07','AA','2735'),('1987-10-07','AA','2751'),('1987-10-07','AL','2'),('1987-10-07','AL','2'),('1987-10-07','AL','7'),('1987-10-07','AL','7'),('1987-10-07','AL','26'),('1987-10-07','AL','26'),('1987-10-07','AL','34'),('1987-10-07','AL','34'),('1987-10-07','AL','36'),('1987-10-07','AL','36'),('1987-10-07','AL','45'),('1987-10-07','AL','45'),('1987-10-07','AL','45'),('1987-10-07','AL','91'),('1987-10-07','AL','91'),('1987-10-07','AL','104'),('1987-10-07','AL','104'),('1987-10-07','AL','104'),('1987-10-07','AL','109'),('1987-10-07','AL','112'),('1987-10-07','AL','112'),('1987-10-07','AL','123'),('1987-10-07','AL','149'),('1987-10-07','AL','160'),('1987-10-07','AL','160'),('1987-10-07','AL','165'),('1987-10-07','AL','171'),('1987-10-07','AL','171'),('1987-10-07','AL','176'),('1987-10-07','AL','176'),('1987-10-07','AL','179'),('1987-10-07','AL','215'),('1987-10-07','AL','231'),('1987-10-07','AL','263'),('1987-10-07','AL','263'),('1987-10-07','AL','268'),('1987-10-07','AL','268'),('1987-10-07','AL','268'),('1987-10-07','AL','281'),('1987-10-07','AL','281'),('1987-10-07','AL','287'),('1987-10-07','AL','287'),('1987-10-07','AL','309'),('1987-10-07','AL','309'),('1987-10-07','AL','341'),('1987-10-07','AL','344'),('1987-10-07','AL','344'),('1987-10-07','AL','357'),('1987-10-07','AL','357'),('1987-10-07','AL','368'),('1987-10-07','AL','381'),('1987-10-07','AL','396'),('1987-10-07','AL','397'),('1987-10-07','AL','397'),('1987-10-07','AL','416'),('1987-10-07','AL','416'),('1987-10-07','AL','417'),('1987-10-07','AL','438'),('1987-10-07','AL','438'),('1987-10-07','AL','446'),('1987-10-07','AL','451'),('1987-10-07','AL','451'),('1987-10-07','AL','491'),('1987-10-07','AL','491'),('1987-10-07','AL','523'),('1987-10-07','AL','523'),('1987-10-07','AL','523'),('1987-10-07','AL','525'),('1987-10-07','AL','525'),('1987-10-07','AL','533'),('1987-10-07','AL','533'),('1987-10-07','AL','546'),('1987-10-07','AL','546'),('1987-10-07','AL','556'),('1987-10-07','AL','556'),('1987-10-07','AL','601'),('1987-10-07','AL','627'),('1987-10-07','AL','629'),('1987-10-07','AL','670'),('1987-10-07','AL','670'),('1987-10-07','AL','670'),('1987-10-07','AL','673'),('1987-10-07','AL','680'),('1987-10-08','AA','2'),('1987-10-08','AA','2'),('1987-10-08','AA','2'),('1987-10-08','AA','7'),('1987-10-08','AA','7'),('1987-10-08','AA','26'),('1987-10-08','AA','34'),('1987-10-08','AA','36'),('1987-10-08','AA','91'),('1987-10-08','AA','101'),('1987-10-08','AA','101'),('1987-10-08','AA','109'),('1987-10-08','AA','109'),('1987-10-08','AA','112'),('1987-10-08','AA','123'),('1987-10-08','AA','123'),('1987-10-08','AA','160'),('1987-10-08','AA','165'),('1987-10-08','AA','165'),('1987-10-08','AA','165'),('1987-10-08','AA','176'),('1987-10-08','AA','176'),('1987-10-08','AA','176'),('1987-10-08','AA','176'),('1987-10-08','AA','179'),('1987-10-08','AA','179'),('1987-10-08','AA','215'),('1987-10-08','AA','215'),('1987-10-08','AA','231'),('1987-10-08','AA','231'),('1987-10-08','AA','263'),('1987-10-08','AA','263'),('1987-10-08','AA','268'),('1987-10-08','AA','268'),('1987-10-08','AA','281'),('1987-10-08','AA','287'),('1987-10-08','AA','287'),('1987-10-08','AA','309'),('1987-10-08','AA','309'),('1987-10-08','AA','309'),('1987-10-08','AA','344'),('1987-10-08','AA','344'),('1987-10-08','AA','347'),('1987-10-08','AA','347'),('1987-10-08','AA','368'),('1987-10-08','AA','381'),('1987-10-08','AA','381'),('1987-10-08','AA','381'),('1987-10-08','AA','396'),('1987-10-08','AA','396'),('1987-10-08','AA','397'),('1987-10-08','AA','397'),('1987-10-08','AA','417'),('1987-10-08','AA','417'),('1987-10-08','AA','446'),('1987-10-08','AA','451'),('1987-10-08','AA','460'),('1987-10-08','AA','460'),('1987-10-08','AA','491'),('1987-10-08','AA','504'),('1987-10-08','AA','504'),('1987-10-08','AA','519'),('1987-10-08','AA','519'),('1987-10-08','AA','523'),('1987-10-08','AA','525'),('1987-10-08','AA','533'),('1987-10-08','AA','533'),('1987-10-08','AA','533'),('1987-10-08','AA','546'),('1987-10-08','AA','546'),('1987-10-08','AA','546'),('1987-10-08','AA','546'),('1987-10-08','AA','556'),('1987-10-08','AA','556'),('1987-10-08','AA','556'),('1987-10-08','AA','597'),('1987-10-08','AA','597'),('1987-10-08','AA','597'),('1987-10-08','AA','601'),('1987-10-08','AA','601'),('1987-10-08','AA','627'),('1987-10-08','AA','629'),('1987-10-08','AA','629'),('1987-10-08','AA','670'),('1987-10-08','AA','673'),('1987-10-08','AA','673'),('1987-10-08','AA','680'),('1987-10-08','AA','680'),('1987-10-08','AA','817'),('1987-10-08','AA','817'),('1987-10-08','AA','824'),('1987-10-08','AA','824'),('1987-10-08','AA','832'),('1987-10-08','AA','832'),('1987-10-08','AA','852'),('1987-10-08','AA','866'),('1987-10-08','AA','866'),('1987-10-08','AA','871'),('1987-10-08','AA','871'),('1987-10-08','AA','880'),('1987-10-08','AA','880'),('1987-10-08','AA','880'),('1987-10-08','AA','880'),('1987-10-08','AA','883'),('1987-10-08','AA','883'),('1987-10-08','AA','885'),('1987-10-08','AA','885'),('1987-10-08','AA','885'),('1987-10-08','AA','890'),('1987-10-08','AA','890'),('1987-10-08','AA','893'),('1987-10-08','AA','893'),('1987-10-08','AA','905'),('1987-10-08','AA','905'),('1987-10-08','AA','915'),('1987-10-08','AA','929'),('1987-10-08','AA','929'),('1987-10-08','AA','936'),('1987-10-08','AA','936'),('1987-10-08','AA','937'),('1987-10-08','AA','937'),('1987-10-08','AA','955'),('1987-10-08','AA','955'),('1987-10-08','AA','966'),('1987-10-08','AA','1002'),('1987-10-08','AA','1002'),('1987-10-08','AA','1004'),('1987-10-08','AA','1004'),('1987-10-08','AA','1015'),('1987-10-08','AA','1015'),('1987-10-08','AA','1021'),('1987-10-08','AA','1021'),('1987-10-08','AA','1041'),('1987-10-08','AA','1041'),('1987-10-08','AA','1046'),('1987-10-08','AA','1046'),('1987-10-08','AA','1048'),('1987-10-08','AA','1061'),('1987-10-08','AA','1061'),('1987-10-08','AA','1088'),('1987-10-08','AA','1088'),('1987-10-08','AA','2033'),('1987-10-08','AA','2033'),('1987-10-08','AA','2050'),('1987-10-08','AA','2058'),('1987-10-08','AA','2071'),('1987-10-08','AA','2071'),('1987-10-08','AA','2086'),('1987-10-08','AA','2111'),('1987-10-08','AA','2123'),('1987-10-08','AA','2123'),('1987-10-08','AA','2147'),('1987-10-08','AA','2147'),('1987-10-08','AA','2199'),('1987-10-08','AA','2199'),('1987-10-08','AA','2207'),('1987-10-08','AA','2207'),('1987-10-08','AA','2217'),('1987-10-08','AA','2230'),('1987-10-08','AA','2245'),('1987-10-08','AA','2251'),('1987-10-08','AA','2251'),('1987-10-08','AA','2275'),('1987-10-08','AA','2278'),('1987-10-08','AA','2351'),('1987-10-08','AA','2357'),('1987-10-08','AA','2361'),('1987-10-08','AA','2490'),('1987-10-08','AA','2528'),('1987-10-08','AA','2528'),('1987-10-08','AA','2735'),('1987-10-08','AA','2735'),('1987-10-08','AA','2751'),('1987-10-08','AL','2'),('1987-10-08','AL','2'),('1987-10-08','AL','7'),('1987-10-08','AL','7'),('1987-10-08','AL','26'),('1987-10-08','AL','26'),('1987-10-08','AL','34'),('1987-10-08','AL','34'),('1987-10-08','AL','36'),('1987-10-08','AL','36'),('1987-10-08','AL','45'),('1987-10-08','AL','45'),('1987-10-08','AL','45'),('1987-10-08','AL','91'),('1987-10-08','AL','91'),('1987-10-08','AL','104'),('1987-10-08','AL','104'),('1987-10-08','AL','104'),('1987-10-08','AL','109'),('1987-10-08','AL','112'),('1987-10-08','AL','112'),('1987-10-08','AL','123'),('1987-10-08','AL','149'),('1987-10-08','AL','160'),('1987-10-08','AL','160'),('1987-10-08','AL','165'),('1987-10-08','AL','171'),('1987-10-08','AL','171'),('1987-10-08','AL','176'),('1987-10-08','AL','176'),('1987-10-08','AL','179'),('1987-10-08','AL','215'),('1987-10-08','AL','231'),('1987-10-08','AL','263'),('1987-10-08','AL','263'),('1987-10-08','AL','268'),('1987-10-08','AL','268'),('1987-10-08','AL','268'),('1987-10-08','AL','281'),('1987-10-08','AL','281'),('1987-10-08','AL','287'),('1987-10-08','AL','287'),('1987-10-08','AL','309'),('1987-10-08','AL','309'),('1987-10-08','AL','341'),('1987-10-08','AL','344'),('1987-10-08','AL','344'),('1987-10-08','AL','357'),('1987-10-08','AL','357'),('1987-10-08','AL','368'),('1987-10-08','AL','381'),('1987-10-08','AL','396'),('1987-10-08','AL','397'),('1987-10-08','AL','397'),('1987-10-08','AL','416'),('1987-10-08','AL','416'),('1987-10-08','AL','417'),('1987-10-08','AL','438'),('1987-10-08','AL','438'),('1987-10-08','AL','446'),('1987-10-08','AL','451'),('1987-10-08','AL','451'),('1987-10-08','AL','491'),('1987-10-08','AL','491'),('1987-10-08','AL','523'),('1987-10-08','AL','523'),('1987-10-08','AL','523'),('1987-10-08','AL','525'),('1987-10-08','AL','525'),('1987-10-08','AL','533'),('1987-10-08','AL','533'),('1987-10-08','AL','546'),('1987-10-08','AL','546'),('1987-10-08','AL','556'),('1987-10-08','AL','556'),('1987-10-08','AL','601'),('1987-10-08','AL','601'),('1987-10-08','AL','627'),('1987-10-08','AL','629'),('1987-10-08','AL','670'),('1987-10-08','AL','670'),('1987-10-08','AL','670'),('1987-10-08','AL','680'),('1987-10-09','AA','2'),('1987-10-09','AA','2'),('1987-10-09','AA','2'),('1987-10-09','AA','7'),('1987-10-09','AA','7'),('1987-10-09','AA','26'),('1987-10-09','AA','34'),('1987-10-09','AA','36'),('1987-10-09','AA','91'),('1987-10-09','AA','101'),('1987-10-09','AA','101'),('1987-10-09','AA','109'),('1987-10-09','AA','109'),('1987-10-09','AA','112'),('1987-10-09','AA','123'),('1987-10-09','AA','123'),('1987-10-09','AA','160'),('1987-10-09','AA','165'),('1987-10-09','AA','165'),('1987-10-09','AA','176'),('1987-10-09','AA','176'),('1987-10-09','AA','176'),('1987-10-09','AA','176'),('1987-10-09','AA','179'),('1987-10-09','AA','179'),('1987-10-09','AA','215'),('1987-10-09','AA','215'),('1987-10-09','AA','231'),('1987-10-09','AA','263'),('1987-10-09','AA','263'),('1987-10-09','AA','268'),('1987-10-09','AA','268'),('1987-10-09','AA','281'),('1987-10-09','AA','287'),('1987-10-09','AA','309'),('1987-10-09','AA','309'),('1987-10-09','AA','309'),('1987-10-09','AA','344'),('1987-10-09','AA','344'),('1987-10-09','AA','347'),('1987-10-09','AA','347'),('1987-10-09','AA','368'),('1987-10-09','AA','381'),('1987-10-09','AA','381'),('1987-10-09','AA','381'),('1987-10-09','AA','396'),('1987-10-09','AA','396'),('1987-10-09','AA','397'),('1987-10-09','AA','397'),('1987-10-09','AA','417'),('1987-10-09','AA','417'),('1987-10-09','AA','451'),('1987-10-09','AA','451'),('1987-10-09','AA','460'),('1987-10-09','AA','460'),('1987-10-09','AA','491'),('1987-10-09','AA','504'),('1987-10-09','AA','504'),('1987-10-09','AA','519'),('1987-10-09','AA','519'),('1987-10-09','AA','523'),('1987-10-09','AA','523'),('1987-10-09','AA','525'),('1987-10-09','AA','525'),('1987-10-09','AA','525'),('1987-10-09','AA','533'),('1987-10-09','AA','533'),('1987-10-09','AA','533'),('1987-10-09','AA','546'),('1987-10-09','AA','546'),('1987-10-09','AA','546'),('1987-10-09','AA','546'),('1987-10-09','AA','556'),('1987-10-09','AA','556'),('1987-10-09','AA','556'),('1987-10-09','AA','597'),('1987-10-09','AA','597'),('1987-10-09','AA','597'),('1987-10-09','AA','601'),('1987-10-09','AA','601'),('1987-10-09','AA','629'),('1987-10-09','AA','629'),('1987-10-09','AA','670'),('1987-10-09','AA','673'),('1987-10-09','AA','673'),('1987-10-09','AA','680'),('1987-10-09','AA','680'),('1987-10-09','AA','817'),('1987-10-09','AA','824'),('1987-10-09','AA','824'),('1987-10-09','AA','824'),('1987-10-09','AA','824'),('1987-10-09','AA','832'),('1987-10-09','AA','832'),('1987-10-09','AA','852'),('1987-10-09','AA','852'),('1987-10-09','AA','866'),('1987-10-09','AA','866'),('1987-10-09','AA','871'),('1987-10-09','AA','880'),('1987-10-09','AA','880'),('1987-10-09','AA','880'),('1987-10-09','AA','883'),('1987-10-09','AA','883'),('1987-10-09','AA','885'),('1987-10-09','AA','885'),('1987-10-09','AA','885'),('1987-10-09','AA','890'),('1987-10-09','AA','890'),('1987-10-09','AA','893'),('1987-10-09','AA','893'),('1987-10-09','AA','905'),('1987-10-09','AA','905'),('1987-10-09','AA','915'),('1987-10-09','AA','929'),('1987-10-09','AA','929'),('1987-10-09','AA','936'),('1987-10-09','AA','936'),('1987-10-09','AA','937'),('1987-10-09','AA','937'),('1987-10-09','AA','955'),('1987-10-09','AA','955'),('1987-10-09','AA','966'),('1987-10-09','AA','1002'),('1987-10-09','AA','1002'),('1987-10-09','AA','1004'),('1987-10-09','AA','1004'),('1987-10-09','AA','1015'),('1987-10-09','AA','1015'),('1987-10-09','AA','1021'),('1987-10-09','AA','1021'),('1987-10-09','AA','1041'),('1987-10-09','AA','1041'),('1987-10-09','AA','1046'),('1987-10-09','AA','1046'),('1987-10-09','AA','1048'),('1987-10-09','AA','1048'),('1987-10-09','AA','1061'),('1987-10-09','AA','1061'),('1987-10-09','AA','1088'),('1987-10-09','AA','1088'),('1987-10-09','AA','2033'),('1987-10-09','AA','2033'),('1987-10-09','AA','2050'),('1987-10-09','AA','2058'),('1987-10-09','AA','2071'),('1987-10-09','AA','2071'),('1987-10-09','AA','2086'),('1987-10-09','AA','2105'),('1987-10-09','AA','2111'),('1987-10-09','AA','2123'),('1987-10-09','AA','2123'),('1987-10-09','AA','2147'),('1987-10-09','AA','2147'),('1987-10-09','AA','2199'),('1987-10-09','AA','2199'),('1987-10-09','AA','2207'),('1987-10-09','AA','2207'),('1987-10-09','AA','2217'),('1987-10-09','AA','2230'),('1987-10-09','AA','2245'),('1987-10-09','AA','2251'),('1987-10-09','AA','2251'),('1987-10-09','AA','2275'),('1987-10-09','AA','2278'),('1987-10-09','AA','2351'),('1987-10-09','AA','2357'),('1987-10-09','AA','2361'),('1987-10-09','AA','2490'),('1987-10-09','AA','2528'),('1987-10-09','AA','2528'),('1987-10-09','AA','2735'),('1987-10-09','AA','2735'),('1987-10-09','AA','2751'),('1987-10-09','AL','2'),('1987-10-09','AL','2'),('1987-10-09','AL','7'),('1987-10-09','AL','7'),('1987-10-09','AL','26'),('1987-10-09','AL','34'),('1987-10-09','AL','34'),('1987-10-09','AL','36'),('1987-10-09','AL','36'),('1987-10-09','AL','45'),('1987-10-09','AL','45'),('1987-10-09','AL','45'),('1987-10-09','AL','91'),('1987-10-09','AL','91'),('1987-10-09','AL','104'),('1987-10-09','AL','104'),('1987-10-09','AL','104'),('1987-10-09','AL','109'),('1987-10-09','AL','112'),('1987-10-09','AL','112'),('1987-10-09','AL','123'),('1987-10-09','AL','149'),('1987-10-09','AL','160'),('1987-10-09','AL','160'),('1987-10-09','AL','165'),('1987-10-09','AL','171'),('1987-10-09','AL','171'),('1987-10-09','AL','176'),('1987-10-09','AL','176'),('1987-10-09','AL','179'),('1987-10-09','AL','215'),('1987-10-09','AL','231'),('1987-10-09','AL','263'),('1987-10-09','AL','263'),('1987-10-09','AL','268'),('1987-10-09','AL','268'),('1987-10-09','AL','268'),('1987-10-09','AL','281'),('1987-10-09','AL','281'),('1987-10-09','AL','287'),('1987-10-09','AL','287'),('1987-10-09','AL','309'),('1987-10-09','AL','309'),('1987-10-09','AL','341'),('1987-10-09','AL','344'),('1987-10-09','AL','344'),('1987-10-09','AL','368'),('1987-10-09','AL','381'),('1987-10-09','AL','396'),('1987-10-09','AL','397'),('1987-10-09','AL','397'),('1987-10-09','AL','416'),('1987-10-09','AL','416'),('1987-10-09','AL','417'),('1987-10-09','AL','438'),('1987-10-09','AL','438'),('1987-10-09','AL','446'),('1987-10-09','AL','451'),('1987-10-09','AL','491'),('1987-10-09','AL','491'),('1987-10-09','AL','523'),('1987-10-09','AL','523'),('1987-10-09','AL','523'),('1987-10-09','AL','525'),('1987-10-09','AL','525'),('1987-10-09','AL','533'),('1987-10-09','AL','533'),('1987-10-09','AL','546'),('1987-10-09','AL','546'),('1987-10-09','AL','556'),('1987-10-09','AL','556'),('1987-10-09','AL','601'),('1987-10-09','AL','601'),('1987-10-09','AL','627'),('1987-10-09','AL','629'),('1987-10-09','AL','670'),('1987-10-09','AL','670'),('1987-10-09','AL','670'),('1987-10-09','AL','673'),('1987-10-09','AL','680'),('1987-10-10','AA','2'),('1987-10-10','AA','2'),('1987-10-10','AA','2'),('1987-10-10','AA','7'),('1987-10-10','AA','7'),('1987-10-10','AA','26'),('1987-10-10','AA','34'),('1987-10-10','AA','36'),('1987-10-10','AA','91'),('1987-10-10','AA','101'),('1987-10-10','AA','101'),('1987-10-10','AA','109'),('1987-10-10','AA','109'),('1987-10-10','AA','112'),('1987-10-10','AA','123'),('1987-10-10','AA','123'),('1987-10-10','AA','160'),('1987-10-10','AA','165'),('1987-10-10','AA','165'),('1987-10-10','AA','165'),('1987-10-10','AA','176'),('1987-10-10','AA','176'),('1987-10-10','AA','176'),('1987-10-10','AA','176'),('1987-10-10','AA','179'),('1987-10-10','AA','179'),('1987-10-10','AA','215'),('1987-10-10','AA','215'),('1987-10-10','AA','231'),('1987-10-10','AA','263'),('1987-10-10','AA','263'),('1987-10-10','AA','268'),('1987-10-10','AA','268'),('1987-10-10','AA','281'),('1987-10-10','AA','287'),('1987-10-10','AA','287'),('1987-10-10','AA','309'),('1987-10-10','AA','309'),('1987-10-10','AA','309'),('1987-10-10','AA','341'),('1987-10-10','AA','344'),('1987-10-10','AA','344'),('1987-10-10','AA','347'),('1987-10-10','AA','347'),('1987-10-10','AA','368'),('1987-10-10','AA','381'),('1987-10-10','AA','381'),('1987-10-10','AA','381'),('1987-10-10','AA','396'),('1987-10-10','AA','396'),('1987-10-10','AA','397'),('1987-10-10','AA','417'),('1987-10-10','AA','417'),('1987-10-10','AA','446'),('1987-10-10','AA','451'),('1987-10-10','AA','451'),('1987-10-10','AA','460'),('1987-10-10','AA','460'),('1987-10-10','AA','491'),('1987-10-10','AA','491'),('1987-10-10','AA','504'),('1987-10-10','AA','504'),('1987-10-10','AA','519'),('1987-10-10','AA','523'),('1987-10-10','AA','523'),('1987-10-10','AA','525'),('1987-10-10','AA','525'),('1987-10-10','AA','525'),('1987-10-10','AA','533'),('1987-10-10','AA','533'),('1987-10-10','AA','546'),('1987-10-10','AA','546'),('1987-10-10','AA','546'),('1987-10-10','AA','546'),('1987-10-10','AA','556'),('1987-10-10','AA','556'),('1987-10-10','AA','556'),('1987-10-10','AA','597'),('1987-10-10','AA','597'),('1987-10-10','AA','597'),('1987-10-10','AA','601'),('1987-10-10','AA','601'),('1987-10-10','AA','627'),('1987-10-10','AA','629'),('1987-10-10','AA','629'),('1987-10-10','AA','670'),('1987-10-10','AA','673'),('1987-10-10','AA','673'),('1987-10-10','AA','680'),('1987-10-10','AA','680'),('1987-10-10','AA','817'),('1987-10-10','AA','817'),('1987-10-10','AA','824'),('1987-10-10','AA','824'),('1987-10-10','AA','824'),('1987-10-10','AA','824'),('1987-10-10','AA','832'),('1987-10-10','AA','832'),('1987-10-10','AA','852'),('1987-10-10','AA','852'),('1987-10-10','AA','866'),('1987-10-10','AA','866'),('1987-10-10','AA','871'),('1987-10-10','AA','871'),('1987-10-10','AA','880'),('1987-10-10','AA','880'),('1987-10-10','AA','880'),('1987-10-10','AA','880'),('1987-10-10','AA','883'),('1987-10-10','AA','883'),('1987-10-10','AA','885'),('1987-10-10','AA','885'),('1987-10-10','AA','885'),('1987-10-10','AA','890'),('1987-10-10','AA','890'),('1987-10-10','AA','893'),('1987-10-10','AA','893'),('1987-10-10','AA','905'),('1987-10-10','AA','905'),('1987-10-10','AA','915'),('1987-10-10','AA','929'),('1987-10-10','AA','929'),('1987-10-10','AA','936'),('1987-10-10','AA','936'),('1987-10-10','AA','937'),('1987-10-10','AA','955'),('1987-10-10','AA','955'),('1987-10-10','AA','966'),('1987-10-10','AA','1002'),('1987-10-10','AA','1002'),('1987-10-10','AA','1004'),('1987-10-10','AA','1004'),('1987-10-10','AA','1015'),('1987-10-10','AA','1015'),('1987-10-10','AA','1021'),('1987-10-10','AA','1021'),('1987-10-10','AA','1041'),('1987-10-10','AA','1041'),('1987-10-10','AA','1046'),('1987-10-10','AA','1046'),('1987-10-10','AA','1048'),('1987-10-10','AA','1048'),('1987-10-10','AA','1061'),('1987-10-10','AA','1061'),('1987-10-10','AA','1088'),('1987-10-10','AA','1088'),('1987-10-10','AA','2033'),('1987-10-10','AA','2033'),('1987-10-10','AA','2050'),('1987-10-10','AA','2058'),('1987-10-10','AA','2071'),('1987-10-10','AA','2071'),('1987-10-10','AA','2086'),('1987-10-10','AA','2111'),('1987-10-10','AA','2123'),('1987-10-10','AA','2123'),('1987-10-10','AA','2147'),('1987-10-10','AA','2147'),('1987-10-10','AA','2199'),('1987-10-10','AA','2207'),('1987-10-10','AA','2207'),('1987-10-10','AA','2217'),('1987-10-10','AA','2230'),('1987-10-10','AA','2245'),('1987-10-10','AA','2251'),('1987-10-10','AA','2251'),('1987-10-10','AA','2275'),('1987-10-10','AA','2278'),('1987-10-10','AA','2351'),('1987-10-10','AA','2357'),('1987-10-10','AA','2361'),('1987-10-10','AA','2490'),('1987-10-10','AA','2528'),('1987-10-10','AA','2528'),('1987-10-10','AA','2735'),('1987-10-10','AA','2735'),('1987-10-10','AL','2'),('1987-10-10','AL','2'),('1987-10-10','AL','7'),('1987-10-10','AL','7'),('1987-10-10','AL','26'),('1987-10-10','AL','26'),('1987-10-10','AL','34'),('1987-10-10','AL','34'),('1987-10-10','AL','36'),('1987-10-10','AL','36'),('1987-10-10','AL','45'),('1987-10-10','AL','45'),('1987-10-10','AL','45'),('1987-10-10','AL','91'),('1987-10-10','AL','91'),('1987-10-10','AL','104'),('1987-10-10','AL','104'),('1987-10-10','AL','109'),('1987-10-10','AL','112'),('1987-10-10','AL','112'),('1987-10-10','AL','149'),('1987-10-10','AL','160'),('1987-10-10','AL','165'),('1987-10-10','AL','171'),('1987-10-10','AL','171'),('1987-10-10','AL','176'),('1987-10-10','AL','176'),('1987-10-10','AL','179'),('1987-10-10','AL','215'),('1987-10-10','AL','231'),('1987-10-10','AL','263'),('1987-10-10','AL','268'),('1987-10-10','AL','268'),('1987-10-10','AL','268'),('1987-10-10','AL','287'),('1987-10-10','AL','287'),('1987-10-10','AL','309'),('1987-10-10','AL','309'),('1987-10-10','AL','344'),('1987-10-10','AL','344'),('1987-10-10','AL','357'),('1987-10-10','AL','396'),('1987-10-10','AL','397'),('1987-10-10','AL','397'),('1987-10-10','AL','397'),('1987-10-10','AL','416'),('1987-10-10','AL','417'),('1987-10-10','AL','438'),('1987-10-10','AL','438'),('1987-10-10','AL','451'),('1987-10-10','AL','451'),('1987-10-10','AL','491'),('1987-10-10','AL','491'),('1987-10-10','AL','523'),('1987-10-10','AL','523'),('1987-10-10','AL','525'),('1987-10-10','AL','525'),('1987-10-10','AL','533'),('1987-10-10','AL','546'),('1987-10-10','AL','546'),('1987-10-10','AL','556'),('1987-10-10','AL','556'),('1987-10-10','AL','601'),('1987-10-10','AL','601'),('1987-10-10','AL','627'),('1987-10-10','AL','670'),('1987-10-10','AL','673'),('1987-10-10','AL','680'),('1987-10-10','AL','905'),('1987-10-10','AL','936'),('1987-10-10','AL','966'),('1987-10-11','AA','2'),('1987-10-11','AA','2'),('1987-10-11','AA','2'),('1987-10-11','AA','7'),('1987-10-11','AA','7'),('1987-10-11','AA','26'),('1987-10-11','AA','36'),('1987-10-11','AA','91'),('1987-10-11','AA','101'),('1987-10-11','AA','101'),('1987-10-11','AA','109'),('1987-10-11','AA','109'),('1987-10-11','AA','112'),('1987-10-11','AA','123'),('1987-10-11','AA','160'),('1987-10-11','AA','165'),('1987-10-11','AA','165'),('1987-10-11','AA','165'),('1987-10-11','AA','176'),('1987-10-11','AA','176'),('1987-10-11','AA','176'),('1987-10-11','AA','176'),('1987-10-11','AA','179'),('1987-10-11','AA','179'),('1987-10-11','AA','215'),('1987-10-11','AA','215'),('1987-10-11','AA','231'),('1987-10-11','AA','263'),('1987-10-11','AA','263'),('1987-10-11','AA','268'),('1987-10-11','AA','268'),('1987-10-11','AA','281'),('1987-10-11','AA','287'),('1987-10-11','AA','287'),('1987-10-11','AA','309'),('1987-10-11','AA','309'),('1987-10-11','AA','309'),('1987-10-11','AA','341'),('1987-10-11','AA','344'),('1987-10-11','AA','344'),('1987-10-11','AA','347'),('1987-10-11','AA','347'),('1987-10-11','AA','368'),('1987-10-11','AA','381'),('1987-10-11','AA','381'),('1987-10-11','AA','381'),('1987-10-11','AA','396'),('1987-10-11','AA','396'),('1987-10-11','AA','397'),('1987-10-11','AA','397'),('1987-10-11','AA','417'),('1987-10-11','AA','417'),('1987-10-11','AA','446'),('1987-10-11','AA','451'),('1987-10-11','AA','451'),('1987-10-11','AA','460'),('1987-10-11','AA','460'),('1987-10-11','AA','491'),('1987-10-11','AA','491'),('1987-10-11','AA','504'),('1987-10-11','AA','504'),('1987-10-11','AA','519'),('1987-10-11','AA','519'),('1987-10-11','AA','523'),('1987-10-11','AA','523'),('1987-10-11','AA','525'),('1987-10-11','AA','525'),('1987-10-11','AA','525'),('1987-10-11','AA','533'),('1987-10-11','AA','533'),('1987-10-11','AA','533'),('1987-10-11','AA','546'),('1987-10-11','AA','546'),('1987-10-11','AA','546'),('1987-10-11','AA','546'),('1987-10-11','AA','556'),('1987-10-11','AA','556'),('1987-10-11','AA','556'),('1987-10-11','AA','597'),('1987-10-11','AA','597'),('1987-10-11','AA','597'),('1987-10-11','AA','601'),('1987-10-11','AA','601'),('1987-10-11','AA','627'),('1987-10-11','AA','629'),('1987-10-11','AA','629'),('1987-10-11','AA','670'),('1987-10-11','AA','673'),('1987-10-11','AA','673'),('1987-10-11','AA','680'),('1987-10-11','AA','680'),('1987-10-11','AA','817'),('1987-10-11','AA','817'),('1987-10-11','AA','824'),('1987-10-11','AA','824'),('1987-10-11','AA','824'),('1987-10-11','AA','824'),('1987-10-11','AA','832'),('1987-10-11','AA','832'),('1987-10-11','AA','852'),('1987-10-11','AA','852'),('1987-10-11','AA','866'),('1987-10-11','AA','866'),('1987-10-11','AA','871'),('1987-10-11','AA','871'),('1987-10-11','AA','880'),('1987-10-11','AA','880'),('1987-10-11','AA','880'),('1987-10-11','AA','880'),('1987-10-11','AA','883'),('1987-10-11','AA','883'),('1987-10-11','AA','885'),('1987-10-11','AA','885'),('1987-10-11','AA','885'),('1987-10-11','AA','890'),('1987-10-11','AA','890'),('1987-10-11','AA','893'),('1987-10-11','AA','893'),('1987-10-11','AA','905'),('1987-10-11','AA','905'),('1987-10-11','AA','915'),('1987-10-11','AA','929'),('1987-10-11','AA','929'),('1987-10-11','AA','936'),('1987-10-11','AA','936'),('1987-10-11','AA','937'),('1987-10-11','AA','937'),('1987-10-11','AA','955'),('1987-10-11','AA','955'),('1987-10-11','AA','966'),('1987-10-11','AA','1002'),('1987-10-11','AA','1002'),('1987-10-11','AA','1004'),('1987-10-11','AA','1004'),('1987-10-11','AA','1015'),('1987-10-11','AA','1015'),('1987-10-11','AA','1021'),('1987-10-11','AA','1021'),('1987-10-11','AA','1041'),('1987-10-11','AA','1041'),('1987-10-11','AA','1046'),('1987-10-11','AA','1046'),('1987-10-11','AA','1048'),('1987-10-11','AA','1048'),('1987-10-11','AA','1061'),('1987-10-11','AA','1061'),('1987-10-11','AA','1088'),('1987-10-11','AA','1088'),('1987-10-11','AA','2033'),('1987-10-11','AA','2033'),('1987-10-11','AA','2058'),('1987-10-11','AA','2071'),('1987-10-11','AA','2071'),('1987-10-11','AA','2086'),('1987-10-11','AA','2111'),('1987-10-11','AA','2123'),('1987-10-11','AA','2123'),('1987-10-11','AA','2147'),('1987-10-11','AA','2147'),('1987-10-11','AA','2199'),('1987-10-11','AA','2199'),('1987-10-11','AA','2199'),('1987-10-11','AA','2207'),('1987-10-11','AA','2207'),('1987-10-11','AA','2230'),('1987-10-11','AA','2245'),('1987-10-11','AA','2251'),('1987-10-11','AA','2251'),('1987-10-11','AA','2275'),('1987-10-11','AA','2278'),('1987-10-11','AA','2351'),('1987-10-11','AA','2357'),('1987-10-11','AA','2361'),('1987-10-11','AA','2490'),('1987-10-11','AA','2528'),('1987-10-11','AA','2528'),('1987-10-11','AA','2735'),('1987-10-11','AA','2735'),('1987-10-11','AA','2751'),('1987-10-11','AL','2'),('1987-10-11','AL','2'),('1987-10-11','AL','7'),('1987-10-11','AL','7'),('1987-10-11','AL','26'),('1987-10-11','AL','26'),('1987-10-11','AL','34'),('1987-10-11','AL','34'),('1987-10-11','AL','36'),('1987-10-11','AL','36'),('1987-10-11','AL','45'),('1987-10-11','AL','45'),('1987-10-11','AL','45'),('1987-10-11','AL','91'),('1987-10-11','AL','91'),('1987-10-11','AL','104'),('1987-10-11','AL','104'),('1987-10-11','AL','104'),('1987-10-11','AL','112'),('1987-10-11','AL','123'),('1987-10-11','AL','149'),('1987-10-11','AL','160'),('1987-10-11','AL','160'),('1987-10-11','AL','165'),('1987-10-11','AL','171'),('1987-10-11','AL','171'),('1987-10-11','AL','176'),('1987-10-11','AL','176'),('1987-10-11','AL','179'),('1987-10-11','AL','215'),('1987-10-11','AL','231'),('1987-10-11','AL','263'),('1987-10-11','AL','263'),('1987-10-11','AL','281'),('1987-10-11','AL','281'),('1987-10-11','AL','309'),('1987-10-11','AL','309'),('1987-10-11','AL','341'),('1987-10-11','AL','344'),('1987-10-11','AL','344'),('1987-10-11','AL','357'),('1987-10-11','AL','357'),('1987-10-11','AL','368'),('1987-10-11','AL','396'),('1987-10-11','AL','416'),('1987-10-11','AL','416'),('1987-10-11','AL','417'),('1987-10-11','AL','438'),('1987-10-11','AL','438'),('1987-10-11','AL','446'),('1987-10-11','AL','451'),('1987-10-11','AL','491'),('1987-10-11','AL','491'),('1987-10-11','AL','523'),('1987-10-11','AL','523'),('1987-10-11','AL','523'),('1987-10-11','AL','525'),('1987-10-11','AL','525'),('1987-10-11','AL','533'),('1987-10-11','AL','533'),('1987-10-11','AL','546'),('1987-10-11','AL','546'),('1987-10-11','AL','556'),('1987-10-11','AL','556'),('1987-10-11','AL','601'),('1987-10-11','AL','601'),('1987-10-11','AL','627'),('1987-10-11','AL','629'),('1987-10-11','AL','670'),('1987-10-11','AL','670'),('1987-10-11','AL','670'),('1987-10-11','AL','673'),('1987-10-11','AL','680'),('1987-10-11','AL','937'),('1987-10-11','AL','937'),('1987-10-11','AL','955'),('1987-10-21','AA','2'),('1987-10-21','AA','2'),('1987-10-21','AA','2'),('1987-10-21','AA','7'),('1987-10-21','AA','7'),('1987-10-21','AA','26'),('1987-10-21','AA','34'),('1987-10-21','AA','36'),('1987-10-21','AA','91'),('1987-10-21','AA','101'),('1987-10-21','AA','101'),('1987-10-21','AA','109'),('1987-10-21','AA','109'),('1987-10-21','AA','123'),('1987-10-21','AA','123'),('1987-10-21','AA','160'),('1987-10-21','AA','165'),('1987-10-21','AA','165'),('1987-10-21','AA','165'),('1987-10-21','AA','176'),('1987-10-21','AA','176'),('1987-10-21','AA','176'),('1987-10-21','AA','176'),('1987-10-21','AA','179'),('1987-10-21','AA','179'),('1987-10-21','AA','215'),('1987-10-21','AA','231'),('1987-10-21','AA','231'),('1987-10-21','AA','263'),('1987-10-21','AA','263'),('1987-10-21','AA','268'),('1987-10-21','AA','268'),('1987-10-21','AA','281'),('1987-10-21','AA','287'),('1987-10-21','AA','287'),('1987-10-21','AA','309'),('1987-10-21','AA','309'),('1987-10-21','AA','309'),('1987-10-21','AA','341'),('1987-10-21','AA','344'),('1987-10-21','AA','344'),('1987-10-21','AA','347'),('1987-10-21','AA','347'),('1987-10-21','AA','368'),('1987-10-21','AA','381'),('1987-10-21','AA','381'),('1987-10-21','AA','381'),('1987-10-21','AA','396'),('1987-10-21','AA','396'),('1987-10-21','AA','397'),('1987-10-21','AA','397'),('1987-10-21','AA','417'),('1987-10-21','AA','417'),('1987-10-21','AA','446'),('1987-10-21','AA','451'),('1987-10-21','AA','451'),('1987-10-21','AA','460'),('1987-10-21','AA','460'),('1987-10-21','AA','491'),('1987-10-21','AA','504'),('1987-10-21','AA','504'),('1987-10-21','AA','519'),('1987-10-21','AA','519'),('1987-10-21','AA','523'),('1987-10-21','AA','523'),('1987-10-21','AA','525'),('1987-10-21','AA','525'),('1987-10-21','AA','525'),('1987-10-21','AA','533'),('1987-10-21','AA','533'),('1987-10-21','AA','533'),('1987-10-21','AA','546'),('1987-10-21','AA','546'),('1987-10-21','AA','546'),('1987-10-21','AA','546'),('1987-10-21','AA','556'),('1987-10-21','AA','556'),('1987-10-21','AA','556'),('1987-10-21','AA','597'),('1987-10-21','AA','597'),('1987-10-21','AA','597'),('1987-10-21','AA','601'),('1987-10-21','AA','601'),('1987-10-21','AA','627'),('1987-10-21','AA','629'),('1987-10-21','AA','629'),('1987-10-21','AA','673'),('1987-10-21','AA','673'),('1987-10-21','AA','680'),('1987-10-21','AA','680'),('1987-10-21','AA','817'),('1987-10-21','AA','817'),('1987-10-21','AA','824'),('1987-10-21','AA','824'),('1987-10-21','AA','824'),('1987-10-21','AA','832'),('1987-10-21','AA','832'),('1987-10-21','AA','852'),('1987-10-21','AA','866'),('1987-10-21','AA','866'),('1987-10-21','AA','871'),('1987-10-21','AA','871'),('1987-10-21','AA','880'),('1987-10-21','AA','880'),('1987-10-21','AA','880'),('1987-10-21','AA','880'),('1987-10-21','AA','883'),('1987-10-21','AA','883'),('1987-10-21','AA','885'),('1987-10-21','AA','885'),('1987-10-21','AA','885'),('1987-10-21','AA','890'),('1987-10-21','AA','890'),('1987-10-21','AA','893'),('1987-10-21','AA','893'),('1987-10-21','AA','905'),('1987-10-21','AA','905'),('1987-10-21','AA','915'),('1987-10-21','AA','929'),('1987-10-21','AA','929'),('1987-10-21','AA','936'),('1987-10-21','AA','936'),('1987-10-21','AA','937'),('1987-10-21','AA','1002'),('1987-10-21','AA','1002'),('1987-10-21','AA','1004'),('1987-10-21','AA','1004'),('1987-10-21','AA','1015'),('1987-10-21','AA','1021'),('1987-10-21','AA','1021'),('1987-10-21','AA','1041'),('1987-10-21','AA','1041'),('1987-10-21','AA','1046'),('1987-10-21','AA','1046'),('1987-10-21','AA','1048'),('1987-10-21','AA','1048'),('1987-10-21','AA','1061'),('1987-10-21','AA','1061'),('1987-10-21','AA','1088'),('1987-10-21','AA','1088'),('1987-10-21','AA','2033'),('1987-10-21','AA','2033'),('1987-10-21','AA','2050'),('1987-10-21','AA','2071'),('1987-10-21','AA','2086'),('1987-10-21','AA','2105'),('1987-10-21','AA','2111'),('1987-10-21','AA','2123'),('1987-10-21','AA','2123'),('1987-10-21','AA','2147'),('1987-10-21','AA','2147'),('1987-10-21','AA','2199'),('1987-10-21','AA','2199'),('1987-10-21','AA','2207'),('1987-10-21','AA','2207'),('1987-10-21','AA','2217'),('1987-10-21','AA','2230'),('1987-10-21','AA','2245'),('1987-10-21','AA','2251'),('1987-10-21','AA','2251'),('1987-10-21','AA','2275'),('1987-10-21','AA','2278'),('1987-10-21','AA','2351'),('1987-10-21','AA','2357'),('1987-10-21','AA','2361'),('1987-10-21','AA','2490'),('1987-10-21','AA','2528'),('1987-10-21','AA','2528'),('1987-10-21','AA','2735'),('1987-10-21','AA','2735'),('1987-10-21','AA','2751'),('1987-10-21','AL','2'),('1987-10-21','AL','2'),('1987-10-21','AL','7'),('1987-10-21','AL','7'),('1987-10-21','AL','26'),('1987-10-21','AL','26'),('1987-10-21','AL','34'),('1987-10-21','AL','34'),('1987-10-21','AL','36'),('1987-10-21','AL','36'),('1987-10-21','AL','45'),('1987-10-21','AL','45'),('1987-10-21','AL','45'),('1987-10-21','AL','91'),('1987-10-21','AL','91'),('1987-10-21','AL','104'),('1987-10-21','AL','104'),('1987-10-21','AL','104'),('1987-10-21','AL','109'),('1987-10-21','AL','112'),('1987-10-21','AL','112'),('1987-10-21','AL','123'),('1987-10-21','AL','149'),('1987-10-21','AL','160'),('1987-10-21','AL','160'),('1987-10-21','AL','165'),('1987-10-21','AL','171'),('1987-10-21','AL','171'),('1987-10-21','AL','176'),('1987-10-21','AL','176'),('1987-10-21','AL','179'),('1987-10-21','AL','215'),('1987-10-21','AL','263'),('1987-10-21','AL','263'),('1987-10-21','AL','268'),('1987-10-21','AL','268'),('1987-10-21','AL','268'),('1987-10-21','AL','281'),('1987-10-21','AL','281'),('1987-10-21','AL','287'),('1987-10-21','AL','287'),('1987-10-21','AL','309'),('1987-10-21','AL','309'),('1987-10-21','AL','341'),('1987-10-21','AL','344'),('1987-10-21','AL','344'),('1987-10-21','AL','357'),('1987-10-21','AL','357'),('1987-10-21','AL','368'),('1987-10-21','AL','381'),('1987-10-21','AL','396'),('1987-10-21','AL','397'),('1987-10-21','AL','397'),('1987-10-21','AL','416'),('1987-10-21','AL','416'),('1987-10-21','AL','417'),('1987-10-21','AL','438'),('1987-10-21','AL','438'),('1987-10-21','AL','446'),('1987-10-21','AL','451'),('1987-10-21','AL','451'),('1987-10-21','AL','491'),('1987-10-21','AL','491'),('1987-10-21','AL','523'),('1987-10-21','AL','523'),('1987-10-21','AL','523'),('1987-10-21','AL','525'),('1987-10-21','AL','525'),('1987-10-21','AL','533'),('1987-10-21','AL','533'),('1987-10-21','AL','546'),('1987-10-21','AL','546'),('1987-10-21','AL','556'),('1987-10-21','AL','556'),('1987-10-21','AL','601'),('1987-10-21','AL','601'),('1987-10-21','AL','627'),('1987-10-21','AL','629'),('1987-10-21','AL','670'),('1987-10-21','AL','670'),('1987-10-21','AL','670'),('1987-10-21','AL','673'),('1987-10-21','AL','680'),('1987-10-22','AA','2'),('1987-10-22','AA','2'),('1987-10-22','AA','2'),('1987-10-22','AA','7'),('1987-10-22','AA','7'),('1987-10-22','AA','26'),('1987-10-22','AA','34'),('1987-10-22','AA','36'),('1987-10-22','AA','91'),('1987-10-22','AA','101'),('1987-10-22','AA','101'),('1987-10-22','AA','109'),('1987-10-22','AA','109'),('1987-10-22','AA','112'),('1987-10-22','AA','123'),('1987-10-22','AA','123'),('1987-10-22','AA','160'),('1987-10-22','AA','165'),('1987-10-22','AA','165'),('1987-10-22','AA','165'),('1987-10-22','AA','176'),('1987-10-22','AA','176'),('1987-10-22','AA','176'),('1987-10-22','AA','179'),('1987-10-22','AA','215'),('1987-10-22','AA','215'),('1987-10-22','AA','231'),('1987-10-22','AA','231'),('1987-10-22','AA','263'),('1987-10-22','AA','263'),('1987-10-22','AA','268'),('1987-10-22','AA','268'),('1987-10-22','AA','281'),('1987-10-22','AA','287'),('1987-10-22','AA','287'),('1987-10-22','AA','309'),('1987-10-22','AA','309'),('1987-10-22','AA','309'),('1987-10-22','AA','341'),('1987-10-22','AA','344'),('1987-10-22','AA','344'),('1987-10-22','AA','347'),('1987-10-22','AA','368'),('1987-10-22','AA','381'),('1987-10-22','AA','381'),('1987-10-22','AA','381'),('1987-10-22','AA','396'),('1987-10-22','AA','396'),('1987-10-22','AA','397'),('1987-10-22','AA','397'),('1987-10-22','AA','417'),('1987-10-22','AA','417'),('1987-10-22','AA','446'),('1987-10-22','AA','451'),('1987-10-22','AA','451'),('1987-10-22','AA','460'),('1987-10-22','AA','460'),('1987-10-22','AA','491'),('1987-10-22','AA','504'),('1987-10-22','AA','519'),('1987-10-22','AA','519'),('1987-10-22','AA','523'),('1987-10-22','AA','523'),('1987-10-22','AA','525'),('1987-10-22','AA','525'),('1987-10-22','AA','533'),('1987-10-22','AA','533'),('1987-10-22','AA','533'),('1987-10-22','AA','546'),('1987-10-22','AA','546'),('1987-10-22','AA','546'),('1987-10-22','AA','546'),('1987-10-22','AA','556'),('1987-10-22','AA','556'),('1987-10-22','AA','556'),('1987-10-22','AA','597'),('1987-10-22','AA','597'),('1987-10-22','AA','597'),('1987-10-22','AA','601'),('1987-10-22','AA','601'),('1987-10-22','AA','627'),('1987-10-22','AA','629'),('1987-10-22','AA','629'),('1987-10-22','AA','673'),('1987-10-22','AA','673'),('1987-10-22','AA','680'),('1987-10-22','AA','680'),('1987-10-22','AA','817'),('1987-10-22','AA','817'),('1987-10-22','AA','824'),('1987-10-22','AA','824'),('1987-10-22','AA','824'),('1987-10-22','AA','832'),('1987-10-22','AA','832'),('1987-10-22','AA','852'),('1987-10-22','AA','852'),('1987-10-22','AA','866'),('1987-10-22','AA','866'),('1987-10-22','AA','871'),('1987-10-22','AA','871'),('1987-10-22','AA','880'),('1987-10-22','AA','880'),('1987-10-22','AA','880'),('1987-10-22','AA','880'),('1987-10-22','AA','883'),('1987-10-22','AA','883'),('1987-10-22','AA','885'),('1987-10-22','AA','885'),('1987-10-22','AA','885'),('1987-10-22','AA','890'),('1987-10-22','AA','890'),('1987-10-22','AA','893'),('1987-10-22','AA','893'),('1987-10-22','AA','905'),('1987-10-22','AA','905'),('1987-10-22','AA','915'),('1987-10-22','AA','929'),('1987-10-22','AA','929'),('1987-10-22','AA','936'),('1987-10-22','AA','936'),('1987-10-22','AA','937'),('1987-10-22','AA','937'),('1987-10-22','AA','955'),('1987-10-22','AA','955'),('1987-10-22','AA','1002'),('1987-10-22','AA','1002'),('1987-10-22','AA','1004'),('1987-10-22','AA','1015'),('1987-10-22','AA','1015'),('1987-10-22','AA','1021'),('1987-10-22','AA','1021'),('1987-10-22','AA','1041'),('1987-10-22','AA','1041'),('1987-10-22','AA','1046'),('1987-10-22','AA','1046'),('1987-10-22','AA','1048'),('1987-10-22','AA','1048'),('1987-10-22','AA','1061'),('1987-10-22','AA','1061'),('1987-10-22','AA','1088'),('1987-10-22','AA','1088'),('1987-10-22','AA','2033'),('1987-10-22','AA','2058'),('1987-10-22','AA','2071'),('1987-10-22','AA','2071'),('1987-10-22','AA','2086'),('1987-10-22','AA','2105'),('1987-10-22','AA','2111'),('1987-10-22','AA','2147'),('1987-10-22','AA','2147'),('1987-10-22','AA','2199'),('1987-10-22','AA','2207'),('1987-10-22','AA','2207'),('1987-10-22','AA','2217'),('1987-10-22','AA','2230'),('1987-10-22','AA','2245'),('1987-10-22','AA','2251'),('1987-10-22','AA','2251'),('1987-10-22','AA','2275'),('1987-10-22','AA','2278'),('1987-10-22','AA','2351'),('1987-10-22','AA','2357'),('1987-10-22','AA','2361'),('1987-10-22','AA','2490'),('1987-10-22','AA','2528'),('1987-10-22','AA','2528'),('1987-10-22','AA','2735'),('1987-10-22','AA','2735'),('1987-10-22','AA','2751'),('1987-10-22','AL','2'),('1987-10-22','AL','2'),('1987-10-22','AL','7'),('1987-10-22','AL','7'),('1987-10-22','AL','26'),('1987-10-22','AL','26'),('1987-10-22','AL','34'),('1987-10-22','AL','34'),('1987-10-22','AL','36'),('1987-10-22','AL','36'),('1987-10-22','AL','45'),('1987-10-22','AL','45'),('1987-10-22','AL','45'),('1987-10-22','AL','91'),('1987-10-22','AL','91'),('1987-10-22','AL','104'),('1987-10-22','AL','104'),('1987-10-22','AL','104'),('1987-10-22','AL','109'),('1987-10-22','AL','112'),('1987-10-22','AL','112'),('1987-10-22','AL','123'),('1987-10-22','AL','149'),('1987-10-22','AL','160'),('1987-10-22','AL','160'),('1987-10-22','AL','165'),('1987-10-22','AL','171'),('1987-10-22','AL','171'),('1987-10-22','AL','176'),('1987-10-22','AL','176'),('1987-10-22','AL','179'),('1987-10-22','AL','215'),('1987-10-22','AL','231'),('1987-10-22','AL','263'),('1987-10-22','AL','263'),('1987-10-22','AL','268'),('1987-10-22','AL','268'),('1987-10-22','AL','268'),('1987-10-22','AL','281'),('1987-10-22','AL','281'),('1987-10-22','AL','287'),('1987-10-22','AL','287'),('1987-10-22','AL','309'),('1987-10-22','AL','309'),('1987-10-22','AL','341'),('1987-10-22','AL','344'),('1987-10-22','AL','344'),('1987-10-22','AL','357'),('1987-10-22','AL','357'),('1987-10-22','AL','368'),('1987-10-22','AL','381'),('1987-10-22','AL','396'),('1987-10-22','AL','397'),('1987-10-22','AL','397'),('1987-10-22','AL','416'),('1987-10-22','AL','417'),('1987-10-22','AL','438'),('1987-10-22','AL','438'),('1987-10-22','AL','446'),('1987-10-22','AL','451'),('1987-10-22','AL','451'),('1987-10-22','AL','491'),('1987-10-22','AL','491'),('1987-10-22','AL','523'),('1987-10-22','AL','523'),('1987-10-22','AL','523'),('1987-10-22','AL','525'),('1987-10-22','AL','525'),('1987-10-22','AL','533'),('1987-10-22','AL','533'),('1987-10-22','AL','546'),('1987-10-22','AL','546'),('1987-10-22','AL','556'),('1987-10-22','AL','556'),('1987-10-22','AL','601'),('1987-10-22','AL','601'),('1987-10-22','AL','627'),('1987-10-22','AL','629'),('1987-10-22','AL','670'),('1987-10-22','AL','670'),('1987-10-22','AL','670'),('1987-10-22','AL','673'),('1987-10-22','AL','680'),('1987-10-23','AA','2'),('1987-10-23','AA','2'),('1987-10-23','AA','2'),('1987-10-23','AA','7'),('1987-10-23','AA','7'),('1987-10-23','AA','26'),('1987-10-23','AA','34'),('1987-10-23','AA','36'),('1987-10-23','AA','91'),('1987-10-23','AA','101'),('1987-10-23','AA','109'),('1987-10-23','AA','109'),('1987-10-23','AA','112'),('1987-10-23','AA','123'),('1987-10-23','AA','123'),('1987-10-23','AA','160'),('1987-10-23','AA','165'),('1987-10-23','AA','165'),('1987-10-23','AA','165'),('1987-10-23','AA','176'),('1987-10-23','AA','176'),('1987-10-23','AA','176'),('1987-10-23','AA','176'),('1987-10-23','AA','179'),('1987-10-23','AA','179'),('1987-10-23','AA','215'),('1987-10-23','AA','215'),('1987-10-23','AA','231'),('1987-10-23','AA','231'),('1987-10-23','AA','263'),('1987-10-23','AA','263'),('1987-10-23','AA','268'),('1987-10-23','AA','268'),('1987-10-23','AA','281'),('1987-10-23','AA','287'),('1987-10-23','AA','287'),('1987-10-23','AA','309'),('1987-10-23','AA','309'),('1987-10-23','AA','309'),('1987-10-23','AA','341'),('1987-10-23','AA','344'),('1987-10-23','AA','344'),('1987-10-23','AA','347'),('1987-10-23','AA','368'),('1987-10-23','AA','381'),('1987-10-23','AA','381'),('1987-10-23','AA','381'),('1987-10-23','AA','396'),('1987-10-23','AA','396'),('1987-10-23','AA','397'),('1987-10-23','AA','397'),('1987-10-23','AA','417'),('1987-10-23','AA','417'),('1987-10-23','AA','446'),('1987-10-23','AA','451'),('1987-10-23','AA','451'),('1987-10-23','AA','460'),('1987-10-23','AA','491'),('1987-10-23','AA','504'),('1987-10-23','AA','504'),('1987-10-23','AA','519'),('1987-10-23','AA','519'),('1987-10-23','AA','523'),('1987-10-23','AA','523'),('1987-10-23','AA','525'),('1987-10-23','AA','533'),('1987-10-23','AA','533'),('1987-10-23','AA','533'),('1987-10-23','AA','546'),('1987-10-23','AA','546'),('1987-10-23','AA','546'),('1987-10-23','AA','546'),('1987-10-23','AA','556'),('1987-10-23','AA','556'),('1987-10-23','AA','556'),('1987-10-23','AA','597'),('1987-10-23','AA','597'),('1987-10-23','AA','601'),('1987-10-23','AA','601'),('1987-10-23','AA','627'),('1987-10-23','AA','629'),('1987-10-23','AA','629'),('1987-10-23','AA','673'),('1987-10-23','AA','680'),('1987-10-23','AA','680'),('1987-10-23','AA','817'),('1987-10-23','AA','817'),('1987-10-23','AA','824'),('1987-10-23','AA','824'),('1987-10-23','AA','824'),('1987-10-23','AA','824'),('1987-10-23','AA','832'),('1987-10-23','AA','832'),('1987-10-23','AA','852'),('1987-10-23','AA','866'),('1987-10-23','AA','866'),('1987-10-23','AA','871'),('1987-10-23','AA','871'),('1987-10-23','AA','880'),('1987-10-23','AA','880'),('1987-10-23','AA','880'),('1987-10-23','AA','880'),('1987-10-23','AA','883'),('1987-10-23','AA','883'),('1987-10-23','AA','885'),('1987-10-23','AA','885'),('1987-10-23','AA','885'),('1987-10-23','AA','890'),('1987-10-23','AA','890'),('1987-10-23','AA','893'),('1987-10-23','AA','893'),('1987-10-23','AA','905'),('1987-10-23','AA','905'),('1987-10-23','AA','929'),('1987-10-23','AA','929'),('1987-10-23','AA','936'),('1987-10-23','AA','936'),('1987-10-23','AA','937'),('1987-10-23','AA','937'),('1987-10-23','AA','955'),('1987-10-23','AA','955'),('1987-10-23','AA','966'),('1987-10-23','AA','1002'),('1987-10-23','AA','1002'),('1987-10-23','AA','1004'),('1987-10-23','AA','1004'),('1987-10-23','AA','1015'),('1987-10-23','AA','1015'),('1987-10-23','AA','1021'),('1987-10-23','AA','1021'),('1987-10-23','AA','1041'),('1987-10-23','AA','1041'),('1987-10-23','AA','1046'),('1987-10-23','AA','1048'),('1987-10-23','AA','1048'),('1987-10-23','AA','1061'),('1987-10-23','AA','1061'),('1987-10-23','AA','1088'),('1987-10-23','AA','1088'),('1987-10-23','AA','2033'),('1987-10-23','AA','2033'),('1987-10-23','AA','2050'),('1987-10-23','AA','2058'),('1987-10-23','AA','2071'),('1987-10-23','AA','2071'),('1987-10-23','AA','2086'),('1987-10-23','AA','2105'),('1987-10-23','AA','2111'),('1987-10-23','AA','2123'),('1987-10-23','AA','2123'),('1987-10-23','AA','2147'),('1987-10-23','AA','2147'),('1987-10-23','AA','2199'),('1987-10-23','AA','2199'),('1987-10-23','AA','2199'),('1987-10-23','AA','2207'),('1987-10-23','AA','2207'),('1987-10-23','AA','2245'),('1987-10-23','AA','2251'),('1987-10-23','AA','2275'),('1987-10-23','AA','2278'),('1987-10-23','AA','2351'),('1987-10-23','AA','2357'),('1987-10-23','AA','2361'),('1987-10-23','AA','2490'),('1987-10-23','AA','2528'),('1987-10-23','AA','2528'),('1987-10-23','AA','2735'),('1987-10-23','AA','2735'),('1987-10-23','AA','2751'),('1987-10-23','AL','2'),('1987-10-23','AL','2'),('1987-10-23','AL','7'),('1987-10-23','AL','7'),('1987-10-23','AL','26'),('1987-10-23','AL','26'),('1987-10-23','AL','34'),('1987-10-23','AL','34'),('1987-10-23','AL','36'),('1987-10-23','AL','36'),('1987-10-23','AL','45'),('1987-10-23','AL','45'),('1987-10-23','AL','45'),('1987-10-23','AL','91'),('1987-10-23','AL','91'),('1987-10-23','AL','104'),('1987-10-23','AL','104'),('1987-10-23','AL','104'),('1987-10-23','AL','109'),('1987-10-23','AL','112'),('1987-10-23','AL','112'),('1987-10-23','AL','123'),('1987-10-23','AL','149'),('1987-10-23','AL','160'),('1987-10-23','AL','160'),('1987-10-23','AL','165'),('1987-10-23','AL','171'),('1987-10-23','AL','176'),('1987-10-23','AL','176'),('1987-10-23','AL','179'),('1987-10-23','AL','215'),('1987-10-23','AL','231'),('1987-10-23','AL','263'),('1987-10-23','AL','263'),('1987-10-23','AL','268'),('1987-10-23','AL','268'),('1987-10-23','AL','268'),('1987-10-23','AL','281'),('1987-10-23','AL','281'),('1987-10-23','AL','287'),('1987-10-23','AL','287'),('1987-10-23','AL','309'),('1987-10-23','AL','309'),('1987-10-23','AL','341'),('1987-10-23','AL','344'),('1987-10-23','AL','344'),('1987-10-23','AL','357'),('1987-10-23','AL','357'),('1987-10-23','AL','368'),('1987-10-23','AL','381'),('1987-10-23','AL','396'),('1987-10-23','AL','397'),('1987-10-23','AL','397'),('1987-10-23','AL','416'),('1987-10-23','AL','416'),('1987-10-23','AL','417'),('1987-10-23','AL','438'),('1987-10-23','AL','438'),('1987-10-23','AL','446'),('1987-10-23','AL','451'),('1987-10-23','AL','451'),('1987-10-23','AL','491'),('1987-10-23','AL','491'),('1987-10-23','AL','523'),('1987-10-23','AL','523'),('1987-10-23','AL','523'),('1987-10-23','AL','525'),('1987-10-23','AL','525'),('1987-10-23','AL','533'),('1987-10-23','AL','533'),('1987-10-23','AL','546'),('1987-10-23','AL','546'),('1987-10-23','AL','556'),('1987-10-23','AL','556'),('1987-10-23','AL','601'),('1987-10-23','AL','601'),('1987-10-23','AL','627'),('1987-10-23','AL','629'),('1987-10-23','AL','670'),('1987-10-23','AL','670'),('1987-10-23','AL','670'),('1987-10-23','AL','673'),('1987-10-23','AL','680'),('1987-10-24','AA','2'),('1987-10-24','AA','2'),('1987-10-24','AA','7'),('1987-10-24','AA','7'),('1987-10-24','AA','26'),('1987-10-24','AA','34'),('1987-10-24','AA','36'),('1987-10-24','AA','91'),('1987-10-24','AA','101'),('1987-10-24','AA','101'),('1987-10-24','AA','109'),('1987-10-24','AA','109'),('1987-10-24','AA','112'),('1987-10-24','AA','123'),('1987-10-24','AA','123'),('1987-10-24','AA','160'),('1987-10-24','AA','165'),('1987-10-24','AA','165'),('1987-10-24','AA','165'),('1987-10-24','AA','176'),('1987-10-24','AA','176'),('1987-10-24','AA','176'),('1987-10-24','AA','179'),('1987-10-24','AA','179'),('1987-10-24','AA','215'),('1987-10-24','AA','215'),('1987-10-24','AA','231'),('1987-10-24','AA','263'),('1987-10-24','AA','263'),('1987-10-24','AA','268'),('1987-10-24','AA','268'),('1987-10-24','AA','281'),('1987-10-24','AA','287'),('1987-10-24','AA','287'),('1987-10-24','AA','309'),('1987-10-24','AA','309'),('1987-10-24','AA','309'),('1987-10-24','AA','344'),('1987-10-24','AA','344'),('1987-10-24','AA','347'),('1987-10-24','AA','347'),('1987-10-24','AA','368'),('1987-10-24','AA','381'),('1987-10-24','AA','381'),('1987-10-24','AA','381'),('1987-10-24','AA','396'),('1987-10-24','AA','396'),('1987-10-24','AA','397'),('1987-10-24','AA','397'),('1987-10-24','AA','417'),('1987-10-24','AA','417'),('1987-10-24','AA','446'),('1987-10-24','AA','451'),('1987-10-24','AA','451'),('1987-10-24','AA','460'),('1987-10-24','AA','460'),('1987-10-24','AA','491'),('1987-10-24','AA','491'),('1987-10-24','AA','504'),('1987-10-24','AA','504'),('1987-10-24','AA','519'),('1987-10-24','AA','519'),('1987-10-24','AA','523'),('1987-10-24','AA','523'),('1987-10-24','AA','525'),('1987-10-24','AA','525'),('1987-10-24','AA','525'),('1987-10-24','AA','533'),('1987-10-24','AA','533'),('1987-10-24','AA','546'),('1987-10-24','AA','546'),('1987-10-24','AA','546'),('1987-10-24','AA','556'),('1987-10-24','AA','556'),('1987-10-24','AA','556'),('1987-10-24','AA','597'),('1987-10-24','AA','597'),('1987-10-24','AA','597'),('1987-10-24','AA','601'),('1987-10-24','AA','601'),('1987-10-24','AA','627'),('1987-10-24','AA','629'),('1987-10-24','AA','673'),('1987-10-24','AA','673'),('1987-10-24','AA','680'),('1987-10-24','AA','680'),('1987-10-24','AA','817'),('1987-10-24','AA','817'),('1987-10-24','AA','824'),('1987-10-24','AA','824'),('1987-10-24','AA','824'),('1987-10-24','AA','832'),('1987-10-24','AA','832'),('1987-10-24','AA','852'),('1987-10-24','AA','852'),('1987-10-24','AA','866'),('1987-10-24','AA','866'),('1987-10-24','AA','871'),('1987-10-24','AA','871'),('1987-10-24','AA','880'),('1987-10-24','AA','880'),('1987-10-24','AA','880'),('1987-10-24','AA','880'),('1987-10-24','AA','883'),('1987-10-24','AA','883'),('1987-10-24','AA','885'),('1987-10-24','AA','885'),('1987-10-24','AA','885'),('1987-10-24','AA','890'),('1987-10-24','AA','890'),('1987-10-24','AA','893'),('1987-10-24','AA','893'),('1987-10-24','AA','905'),('1987-10-24','AA','905'),('1987-10-24','AA','915'),('1987-10-24','AA','929'),('1987-10-24','AA','929'),('1987-10-24','AA','936'),('1987-10-24','AA','936'),('1987-10-24','AA','937'),('1987-10-24','AA','937'),('1987-10-24','AA','955'),('1987-10-24','AA','955'),('1987-10-24','AA','966'),('1987-10-24','AA','1002'),('1987-10-24','AA','1002'),('1987-10-24','AA','1004'),('1987-10-24','AA','1004'),('1987-10-24','AA','1015'),('1987-10-24','AA','1021'),('1987-10-24','AA','1021'),('1987-10-24','AA','1041'),('1987-10-24','AA','1041'),('1987-10-24','AA','1046'),('1987-10-24','AA','1046'),('1987-10-24','AA','1048'),('1987-10-24','AA','1048'),('1987-10-24','AA','1061'),('1987-10-24','AA','1061'),('1987-10-24','AA','1088'),('1987-10-24','AA','1088'),('1987-10-24','AA','2033'),('1987-10-24','AA','2033'),('1987-10-24','AA','2050'),('1987-10-24','AA','2058'),('1987-10-24','AA','2071'),('1987-10-24','AA','2071'),('1987-10-24','AA','2086'),('1987-10-24','AA','2105'),('1987-10-24','AA','2111'),('1987-10-24','AA','2123'),('1987-10-24','AA','2147'),('1987-10-24','AA','2199'),('1987-10-24','AA','2199'),('1987-10-24','AA','2207'),('1987-10-24','AA','2217'),('1987-10-24','AA','2230'),('1987-10-24','AA','2245'),('1987-10-24','AA','2251'),('1987-10-24','AA','2251'),('1987-10-24','AA','2275'),('1987-10-24','AA','2278'),('1987-10-24','AA','2351'),('1987-10-24','AA','2357'),('1987-10-24','AA','2361'),('1987-10-24','AA','2490'),('1987-10-24','AA','2528'),('1987-10-24','AA','2528'),('1987-10-24','AA','2735'),('1987-10-24','AA','2735'),('1987-10-24','AL','2'),('1987-10-24','AL','2'),('1987-10-24','AL','7'),('1987-10-24','AL','7'),('1987-10-24','AL','26'),('1987-10-24','AL','26'),('1987-10-24','AL','34'),('1987-10-24','AL','34'),('1987-10-24','AL','36'),('1987-10-24','AL','36'),('1987-10-24','AL','45'),('1987-10-24','AL','91'),('1987-10-24','AL','91'),('1987-10-24','AL','104'),('1987-10-24','AL','104'),('1987-10-24','AL','109'),('1987-10-24','AL','112'),('1987-10-24','AL','112'),('1987-10-24','AL','149'),('1987-10-24','AL','160'),('1987-10-24','AL','160'),('1987-10-24','AL','165'),('1987-10-24','AL','171'),('1987-10-24','AL','171'),('1987-10-24','AL','176'),('1987-10-24','AL','176'),('1987-10-24','AL','179'),('1987-10-24','AL','215'),('1987-10-24','AL','231'),('1987-10-24','AL','263'),('1987-10-24','AL','268'),('1987-10-24','AL','268'),('1987-10-24','AL','268'),('1987-10-24','AL','287'),('1987-10-24','AL','287'),('1987-10-24','AL','309'),('1987-10-24','AL','309'),('1987-10-24','AL','344'),('1987-10-24','AL','344'),('1987-10-24','AL','357'),('1987-10-24','AL','357'),('1987-10-24','AL','381'),('1987-10-24','AL','396'),('1987-10-24','AL','397'),('1987-10-24','AL','397'),('1987-10-24','AL','397'),('1987-10-24','AL','416'),('1987-10-24','AL','417'),('1987-10-24','AL','438'),('1987-10-24','AL','438'),('1987-10-24','AL','451'),('1987-10-24','AL','451'),('1987-10-24','AL','491'),('1987-10-24','AL','491'),('1987-10-24','AL','523'),('1987-10-24','AL','523'),('1987-10-24','AL','525'),('1987-10-24','AL','525'),('1987-10-24','AL','533'),('1987-10-24','AL','546'),('1987-10-24','AL','546'),('1987-10-24','AL','556'),('1987-10-24','AL','556'),('1987-10-24','AL','601'),('1987-10-24','AL','601'),('1987-10-24','AL','627'),('1987-10-24','AL','670'),('1987-10-24','AL','673'),('1987-10-24','AL','680'),('1987-10-24','AL','905'),('1987-10-24','AL','936'),('1987-10-24','AL','966'),('1987-10-24','AL','982'),('1987-10-25','AA','2'),('1987-10-25','AA','2'),('1987-10-25','AA','2'),('1987-10-25','AA','7'),('1987-10-25','AA','7'),('1987-10-25','AA','26'),('1987-10-25','AA','34'),('1987-10-25','AA','36'),('1987-10-25','AA','91'),('1987-10-25','AA','101'),('1987-10-25','AA','109'),('1987-10-25','AA','109'),('1987-10-25','AA','123'),('1987-10-25','AA','123'),('1987-10-25','AA','160'),('1987-10-25','AA','165'),('1987-10-25','AA','165'),('1987-10-25','AA','165'),('1987-10-25','AA','176'),('1987-10-25','AA','176'),('1987-10-25','AA','176'),('1987-10-25','AA','176'),('1987-10-25','AA','179'),('1987-10-25','AA','179'),('1987-10-25','AA','215'),('1987-10-25','AA','215'),('1987-10-25','AA','231'),('1987-10-25','AA','231'),('1987-10-25','AA','263'),('1987-10-25','AA','263'),('1987-10-25','AA','268'),('1987-10-25','AA','268'),('1987-10-25','AA','281'),('1987-10-25','AA','287'),('1987-10-25','AA','287'),('1987-10-25','AA','309'),('1987-10-25','AA','309'),('1987-10-25','AA','309'),('1987-10-25','AA','341'),('1987-10-25','AA','344'),('1987-10-25','AA','344'),('1987-10-25','AA','347'),('1987-10-25','AA','347'),('1987-10-25','AA','368'),('1987-10-25','AA','381'),('1987-10-25','AA','381'),('1987-10-25','AA','396'),('1987-10-25','AA','397'),('1987-10-25','AA','397'),('1987-10-25','AA','417'),('1987-10-25','AA','417'),('1987-10-25','AA','446'),('1987-10-25','AA','451'),('1987-10-25','AA','460'),('1987-10-25','AA','460'),('1987-10-25','AA','491'),('1987-10-25','AA','491'),('1987-10-25','AA','504'),('1987-10-25','AA','504'),('1987-10-25','AA','519'),('1987-10-25','AA','519'),('1987-10-25','AA','523'),('1987-10-25','AA','523'),('1987-10-25','AA','525'),('1987-10-25','AA','525'),('1987-10-25','AA','525'),('1987-10-25','AA','533'),('1987-10-25','AA','533'),('1987-10-25','AA','533'),('1987-10-25','AA','546'),('1987-10-25','AA','546'),('1987-10-25','AA','546'),('1987-10-25','AA','546'),('1987-10-25','AA','556'),('1987-10-25','AA','556'),('1987-10-25','AA','556'),('1987-10-25','AA','597'),('1987-10-25','AA','597'),('1987-10-25','AA','597'),('1987-10-25','AA','601'),('1987-10-25','AA','627'),('1987-10-25','AA','629'),('1987-10-25','AA','629'),('1987-10-25','AA','670'),('1987-10-25','AA','673'),('1987-10-25','AA','673'),('1987-10-25','AA','680'),('1987-10-25','AA','680'),('1987-10-25','AA','817'),('1987-10-25','AA','817'),('1987-10-25','AA','824'),('1987-10-25','AA','824'),('1987-10-25','AA','824'),('1987-10-25','AA','824'),('1987-10-25','AA','832'),('1987-10-25','AA','832'),('1987-10-25','AA','852'),('1987-10-25','AA','852'),('1987-10-25','AA','866'),('1987-10-25','AA','866'),('1987-10-25','AA','871'),('1987-10-25','AA','871'),('1987-10-25','AA','880'),('1987-10-25','AA','880'),('1987-10-25','AA','880'),('1987-10-25','AA','880'),('1987-10-25','AA','883'),('1987-10-25','AA','883'),('1987-10-25','AA','885'),('1987-10-25','AA','885'),('1987-10-25','AA','885'),('1987-10-25','AA','890'),('1987-10-25','AA','893'),('1987-10-25','AA','893'),('1987-10-25','AA','905'),('1987-10-25','AA','905'),('1987-10-25','AA','915'),('1987-10-25','AA','929'),('1987-10-25','AA','929'),('1987-10-25','AA','936'),('1987-10-25','AA','936'),('1987-10-25','AA','937'),('1987-10-25','AA','937'),('1987-10-25','AA','955'),('1987-10-25','AA','955'),('1987-10-25','AA','1002'),('1987-10-25','AA','1002'),('1987-10-25','AA','1004'),('1987-10-25','AA','1004'),('1987-10-25','AA','1015'),('1987-10-25','AA','1015'),('1987-10-25','AA','1021'),('1987-10-25','AA','1021'),('1987-10-25','AA','1041'),('1987-10-25','AA','1041'),('1987-10-25','AA','1046'),('1987-10-25','AA','1046'),('1987-10-25','AA','1048'),('1987-10-25','AA','1048'),('1987-10-25','AA','1061'),('1987-10-25','AA','1061'),('1987-10-25','AA','1088'),('1987-10-25','AA','1088'),('1987-10-25','AA','2033'),('1987-10-25','AA','2033'),('1987-10-25','AA','2050'),('1987-10-25','AA','2058'),('1987-10-25','AA','2071'),('1987-10-25','AA','2071'),('1987-10-25','AA','2086'),('1987-10-25','AA','2111'),('1987-10-25','AA','2123'),('1987-10-25','AA','2123'),('1987-10-25','AA','2147'),('1987-10-25','AA','2199'),('1987-10-25','AA','2199'),('1987-10-25','AA','2207'),('1987-10-25','AA','2207'),('1987-10-25','AA','2230'),('1987-10-25','AA','2245'),('1987-10-25','AA','2251'),('1987-10-25','AA','2251'),('1987-10-25','AA','2275'),('1987-10-25','AA','2278'),('1987-10-25','AA','2357'),('1987-10-25','AA','2361'),('1987-10-25','AA','2490'),('1987-10-25','AA','2528'),('1987-10-25','AA','2528'),('1987-10-25','AA','2735'),('1987-10-25','AA','2735'),('1987-10-25','AA','2751'),('1987-10-25','AL','2'),('1987-10-25','AL','2'),('1987-10-25','AL','7'),('1987-10-25','AL','7'),('1987-10-25','AL','26'),('1987-10-25','AL','26'),('1987-10-25','AL','34'),('1987-10-25','AL','34'),('1987-10-25','AL','36'),('1987-10-25','AL','36'),('1987-10-25','AL','45'),('1987-10-25','AL','45'),('1987-10-25','AL','45'),('1987-10-25','AL','91'),('1987-10-25','AL','91'),('1987-10-25','AL','104'),('1987-10-25','AL','104'),('1987-10-25','AL','104'),('1987-10-25','AL','112'),('1987-10-25','AL','123'),('1987-10-25','AL','149'),('1987-10-25','AL','160'),('1987-10-25','AL','160'),('1987-10-25','AL','165'),('1987-10-25','AL','171'),('1987-10-25','AL','171'),('1987-10-25','AL','176'),('1987-10-25','AL','176'),('1987-10-25','AL','179'),('1987-10-25','AL','215'),('1987-10-25','AL','231'),('1987-10-25','AL','263'),('1987-10-25','AL','263'),('1987-10-25','AL','281'),('1987-10-25','AL','281'),('1987-10-25','AL','309'),('1987-10-25','AL','309'),('1987-10-25','AL','341'),('1987-10-25','AL','344'),('1987-10-25','AL','344'),('1987-10-25','AL','357'),('1987-10-25','AL','357'),('1987-10-25','AL','368'),('1987-10-25','AL','396'),('1987-10-25','AL','416'),('1987-10-25','AL','416'),('1987-10-25','AL','417'),('1987-10-25','AL','438'),('1987-10-25','AL','438'),('1987-10-25','AL','446'),('1987-10-25','AL','451'),('1987-10-25','AL','491'),('1987-10-25','AL','523'),('1987-10-25','AL','523'),('1987-10-25','AL','523'),('1987-10-25','AL','525'),('1987-10-25','AL','525'),('1987-10-25','AL','533'),('1987-10-25','AL','533'),('1987-10-25','AL','546'),('1987-10-25','AL','546'),('1987-10-25','AL','556'),('1987-10-25','AL','556'),('1987-10-25','AL','601'),('1987-10-25','AL','601'),('1987-10-25','AL','627'),('1987-10-25','AL','629'),('1987-10-25','AL','670'),('1987-10-25','AL','670'),('1987-10-25','AL','670'),('1987-10-25','AL','673'),('1987-10-25','AL','680'),('1987-10-25','AL','937'),('1987-10-25','AL','937'),('1987-10-25','AL','955'),('1987-10-26','AA','2'),('1987-10-26','AA','2'),('1987-10-26','AA','2'),('1987-10-26','AA','7'),('1987-10-26','AA','7'),('1987-10-26','AA','26'),('1987-10-26','AA','34'),('1987-10-26','AA','36'),('1987-10-26','AA','91'),('1987-10-26','AA','101'),('1987-10-26','AA','101'),('1987-10-26','AA','109'),('1987-10-26','AA','109'),('1987-10-26','AA','112'),('1987-10-26','AA','123'),('1987-10-26','AA','123'),('1987-10-26','AA','160'),('1987-10-26','AA','165'),('1987-10-26','AA','165'),('1987-10-26','AA','165'),('1987-10-26','AA','176'),('1987-10-26','AA','176'),('1987-10-26','AA','176'),('1987-10-26','AA','176'),('1987-10-26','AA','179'),('1987-10-26','AA','179'),('1987-10-26','AA','215'),('1987-10-26','AA','215'),('1987-10-26','AA','231'),('1987-10-26','AA','231'),('1987-10-26','AA','263'),('1987-10-26','AA','263'),('1987-10-26','AA','268'),('1987-10-26','AA','268'),('1987-10-26','AA','281'),('1987-10-26','AA','287'),('1987-10-26','AA','287'),('1987-10-26','AA','309'),('1987-10-26','AA','309'),('1987-10-26','AA','309'),('1987-10-26','AA','341'),('1987-10-26','AA','344'),('1987-10-26','AA','344'),('1987-10-26','AA','347'),('1987-10-26','AA','347'),('1987-10-26','AA','368'),('1987-10-26','AA','381'),('1987-10-26','AA','381'),('1987-10-26','AA','381'),('1987-10-26','AA','396'),('1987-10-26','AA','396'),('1987-10-26','AA','397'),('1987-10-26','AA','397'),('1987-10-26','AA','417'),('1987-10-26','AA','417'),('1987-10-26','AA','446'),('1987-10-26','AA','451'),('1987-10-26','AA','451'),('1987-10-26','AA','491'),('1987-10-26','AA','504'),('1987-10-26','AA','504'),('1987-10-26','AA','519'),('1987-10-26','AA','523'),('1987-10-26','AA','523'),('1987-10-26','AA','525'),('1987-10-26','AA','525'),('1987-10-26','AA','525'),('1987-10-26','AA','533'),('1987-10-26','AA','533'),('1987-10-26','AA','533'),('1987-10-26','AA','546'),('1987-10-26','AA','546'),('1987-10-26','AA','546'),('1987-10-26','AA','546'),('1987-10-26','AA','556'),('1987-10-26','AA','556'),('1987-10-26','AA','556'),('1987-10-26','AA','597'),('1987-10-26','AA','597'),('1987-10-26','AA','597'),('1987-10-26','AA','601'),('1987-10-26','AA','601'),('1987-10-26','AA','627'),('1987-10-26','AA','629'),('1987-10-26','AA','629'),('1987-10-26','AA','670'),('1987-10-26','AA','673'),('1987-10-26','AA','673'),('1987-10-26','AA','680'),('1987-10-26','AA','680'),('1987-10-26','AA','817'),('1987-10-26','AA','817'),('1987-10-26','AA','824'),('1987-10-26','AA','824'),('1987-10-26','AA','832'),('1987-10-26','AA','832'),('1987-10-26','AA','852'),('1987-10-26','AA','852'),('1987-10-26','AA','866'),('1987-10-26','AA','866'),('1987-10-26','AA','871'),('1987-10-26','AA','871'),('1987-10-26','AA','880'),('1987-10-26','AA','880'),('1987-10-26','AA','880'),('1987-10-26','AA','880'),('1987-10-26','AA','883'),('1987-10-26','AA','883'),('1987-10-26','AA','885'),('1987-10-26','AA','885'),('1987-10-26','AA','885'),('1987-10-26','AA','890'),('1987-10-26','AA','890'),('1987-10-26','AA','893'),('1987-10-26','AA','893'),('1987-10-26','AA','905'),('1987-10-26','AA','905'),('1987-10-26','AA','915'),('1987-10-26','AA','929'),('1987-10-26','AA','929'),('1987-10-26','AA','936'),('1987-10-26','AA','936'),('1987-10-26','AA','937'),('1987-10-26','AA','937'),('1987-10-26','AA','955'),('1987-10-26','AA','955'),('1987-10-26','AA','966'),('1987-10-26','AA','1002'),('1987-10-26','AA','1002'),('1987-10-26','AA','1004'),('1987-10-26','AA','1004'),('1987-10-26','AA','1015'),('1987-10-26','AA','1015'),('1987-10-26','AA','1021'),('1987-10-26','AA','1021'),('1987-10-26','AA','1046'),('1987-10-26','AA','1046'),('1987-10-26','AA','1048'),('1987-10-26','AA','1048'),('1987-10-26','AA','1061'),('1987-10-26','AA','1061'),('1987-10-26','AA','1088'),('1987-10-26','AA','1088'),('1987-10-26','AA','2033'),('1987-10-26','AA','2033'),('1987-10-26','AA','2050'),('1987-10-26','AA','2058'),('1987-10-26','AA','2071'),('1987-10-26','AA','2071'),('1987-10-26','AA','2086'),('1987-10-26','AA','2105'),('1987-10-26','AA','2111'),('1987-10-26','AA','2123'),('1987-10-26','AA','2123'),('1987-10-26','AA','2147'),('1987-10-26','AA','2147'),('1987-10-26','AA','2199'),('1987-10-26','AA','2199'),('1987-10-26','AA','2207'),('1987-10-26','AA','2207'),('1987-10-26','AA','2230'),('1987-10-26','AA','2245'),('1987-10-26','AA','2251'),('1987-10-26','AA','2251'),('1987-10-26','AA','2275'),('1987-10-26','AA','2278'),('1987-10-26','AA','2351'),('1987-10-26','AA','2357'),('1987-10-26','AA','2361'),('1987-10-26','AA','2490'),('1987-10-26','AA','2528'),('1987-10-26','AA','2528'),('1987-10-26','AA','2735'),('1987-10-26','AA','2735'),('1987-10-26','AA','2751'),('1987-10-26','AL','2'),('1987-10-26','AL','2'),('1987-10-26','AL','7'),('1987-10-26','AL','7'),('1987-10-26','AL','26'),('1987-10-26','AL','26'),('1987-10-26','AL','34'),('1987-10-26','AL','34'),('1987-10-26','AL','36'),('1987-10-26','AL','36'),('1987-10-26','AL','45'),('1987-10-26','AL','45'),('1987-10-26','AL','45'),('1987-10-26','AL','91'),('1987-10-26','AL','91'),('1987-10-26','AL','104'),('1987-10-26','AL','104'),('1987-10-26','AL','104'),('1987-10-26','AL','109'),('1987-10-26','AL','112'),('1987-10-26','AL','112'),('1987-10-26','AL','123'),('1987-10-26','AL','149'),('1987-10-26','AL','160'),('1987-10-26','AL','160'),('1987-10-26','AL','165'),('1987-10-26','AL','171'),('1987-10-26','AL','171'),('1987-10-26','AL','176'),('1987-10-26','AL','176'),('1987-10-26','AL','179'),('1987-10-26','AL','215'),('1987-10-26','AL','231'),('1987-10-26','AL','263'),('1987-10-26','AL','263'),('1987-10-26','AL','268'),('1987-10-26','AL','268'),('1987-10-26','AL','268'),('1987-10-26','AL','281'),('1987-10-26','AL','281'),('1987-10-26','AL','287'),('1987-10-26','AL','287'),('1987-10-26','AL','309'),('1987-10-26','AL','309'),('1987-10-26','AL','341'),('1987-10-26','AL','344'),('1987-10-26','AL','357'),('1987-10-26','AL','357'),('1987-10-26','AL','368'),('1987-10-26','AL','381'),('1987-10-26','AL','396'),('1987-10-26','AL','397'),('1987-10-26','AL','397'),('1987-10-26','AL','416'),('1987-10-26','AL','416'),('1987-10-26','AL','417'),('1987-10-26','AL','438'),('1987-10-26','AL','438'),('1987-10-26','AL','446'),('1987-10-26','AL','451'),('1987-10-26','AL','451'),('1987-10-26','AL','491'),('1987-10-26','AL','491'),('1987-10-26','AL','523'),('1987-10-26','AL','523'),('1987-10-26','AL','523'),('1987-10-26','AL','525'),('1987-10-26','AL','533'),('1987-10-26','AL','533'),('1987-10-26','AL','546'),('1987-10-26','AL','546'),('1987-10-26','AL','556'),('1987-10-26','AL','556'),('1987-10-26','AL','601'),('1987-10-26','AL','601'),('1987-10-26','AL','627'),('1987-10-26','AL','629'),('1987-10-26','AL','670'),('1987-10-26','AL','670'),('1987-10-26','AL','670'),('1987-10-26','AL','673'),('1987-10-26','AL','680'),('1987-10-27','AA','2'),('1987-10-27','AA','2'),('1987-10-27','AA','2'),('1987-10-27','AA','7'),('1987-10-27','AA','26'),('1987-10-27','AA','34'),('1987-10-27','AA','36'),('1987-10-27','AA','91'),('1987-10-27','AA','101'),('1987-10-27','AA','101'),('1987-10-27','AA','109'),('1987-10-27','AA','109'),('1987-10-27','AA','112'),('1987-10-27','AA','123'),('1987-10-27','AA','123'),('1987-10-27','AA','160'),('1987-10-27','AA','165'),('1987-10-27','AA','165'),('1987-10-27','AA','165'),('1987-10-27','AA','176'),('1987-10-27','AA','176'),('1987-10-27','AA','176'),('1987-10-27','AA','176'),('1987-10-27','AA','179'),('1987-10-27','AA','179'),('1987-10-27','AA','215'),('1987-10-27','AA','215'),('1987-10-27','AA','231'),('1987-10-27','AA','263'),('1987-10-27','AA','263'),('1987-10-27','AA','268'),('1987-10-27','AA','268'),('1987-10-27','AA','281'),('1987-10-27','AA','287'),('1987-10-27','AA','287'),('1987-10-27','AA','309'),('1987-10-27','AA','309'),('1987-10-27','AA','309'),('1987-10-27','AA','341'),('1987-10-27','AA','344'),('1987-10-27','AA','344'),('1987-10-27','AA','347'),('1987-10-27','AA','347'),('1987-10-27','AA','368'),('1987-10-27','AA','381'),('1987-10-27','AA','381'),('1987-10-27','AA','381'),('1987-10-27','AA','396'),('1987-10-27','AA','396'),('1987-10-27','AA','397'),('1987-10-27','AA','397'),('1987-10-27','AA','417'),('1987-10-27','AA','417'),('1987-10-27','AA','446'),('1987-10-27','AA','451'),('1987-10-27','AA','451'),('1987-10-27','AA','460'),('1987-10-27','AA','460'),('1987-10-27','AA','491'),('1987-10-27','AA','504'),('1987-10-27','AA','504'),('1987-10-27','AA','519'),('1987-10-27','AA','519'),('1987-10-27','AA','523'),('1987-10-27','AA','523'),('1987-10-27','AA','525'),('1987-10-27','AA','525'),('1987-10-27','AA','525'),('1987-10-27','AA','533'),('1987-10-27','AA','533'),('1987-10-27','AA','533'),('1987-10-27','AA','546'),('1987-10-27','AA','546'),('1987-10-27','AA','546'),('1987-10-27','AA','546'),('1987-10-27','AA','556'),('1987-10-27','AA','556'),('1987-10-27','AA','556'),('1987-10-27','AA','597'),('1987-10-27','AA','597'),('1987-10-27','AA','597'),('1987-10-27','AA','601'),('1987-10-27','AA','601'),('1987-10-27','AA','627'),('1987-10-27','AA','629'),('1987-10-27','AA','629'),('1987-10-27','AA','670'),('1987-10-27','AA','673'),('1987-10-27','AA','673'),('1987-10-27','AA','680'),('1987-10-27','AA','680'),('1987-10-27','AA','817'),('1987-10-27','AA','817'),('1987-10-27','AA','824'),('1987-10-27','AA','824'),('1987-10-27','AA','824'),('1987-10-27','AA','824'),('1987-10-27','AA','832'),('1987-10-27','AA','832'),('1987-10-27','AA','852'),('1987-10-27','AA','852'),('1987-10-27','AA','866'),('1987-10-27','AA','866'),('1987-10-27','AA','871'),('1987-10-27','AA','871'),('1987-10-27','AA','880'),('1987-10-27','AA','880'),('1987-10-27','AA','880'),('1987-10-27','AA','880'),('1987-10-27','AA','883'),('1987-10-27','AA','883'),('1987-10-27','AA','885'),('1987-10-27','AA','885'),('1987-10-27','AA','885'),('1987-10-27','AA','890'),('1987-10-27','AA','890'),('1987-10-27','AA','893'),('1987-10-27','AA','893'),('1987-10-27','AA','905'),('1987-10-27','AA','905'),('1987-10-27','AA','915'),('1987-10-27','AA','929'),('1987-10-27','AA','929'),('1987-10-27','AA','936'),('1987-10-27','AA','936'),('1987-10-27','AA','937'),('1987-10-27','AA','937'),('1987-10-27','AA','955'),('1987-10-27','AA','955'),('1987-10-27','AA','966'),('1987-10-27','AA','1002'),('1987-10-27','AA','1002'),('1987-10-27','AA','1004'),('1987-10-27','AA','1004'),('1987-10-27','AA','1015'),('1987-10-27','AA','1015'),('1987-10-27','AA','1021'),('1987-10-27','AA','1021'),('1987-10-27','AA','1041'),('1987-10-27','AA','1041'),('1987-10-27','AA','1046'),('1987-10-27','AA','1046'),('1987-10-27','AA','1048'),('1987-10-27','AA','1061'),('1987-10-27','AA','1061'),('1987-10-27','AA','1088'),('1987-10-27','AA','1088'),('1987-10-27','AA','2033'),('1987-10-27','AA','2033'),('1987-10-27','AA','2050'),('1987-10-27','AA','2058'),('1987-10-27','AA','2071'),('1987-10-27','AA','2071'),('1987-10-27','AA','2086'),('1987-10-27','AA','2105'),('1987-10-27','AA','2111'),('1987-10-27','AA','2123'),('1987-10-27','AA','2123'),('1987-10-27','AA','2147'),('1987-10-27','AA','2147'),('1987-10-27','AA','2199'),('1987-10-27','AA','2199'),('1987-10-27','AA','2207'),('1987-10-27','AA','2207'),('1987-10-27','AA','2217'),('1987-10-27','AA','2230'),('1987-10-27','AA','2245'),('1987-10-27','AA','2251'),('1987-10-27','AA','2251'),('1987-10-27','AA','2275'),('1987-10-27','AA','2278'),('1987-10-27','AA','2357'),('1987-10-27','AA','2490'),('1987-10-27','AA','2528'),('1987-10-27','AA','2528'),('1987-10-27','AA','2735'),('1987-10-27','AA','2735'),('1987-10-27','AL','2'),('1987-10-27','AL','2'),('1987-10-27','AL','7'),('1987-10-27','AL','7'),('1987-10-27','AL','26'),('1987-10-27','AL','26'),('1987-10-27','AL','34'),('1987-10-27','AL','34'),('1987-10-27','AL','36'),('1987-10-27','AL','36'),('1987-10-27','AL','45'),('1987-10-27','AL','45'),('1987-10-27','AL','45'),('1987-10-27','AL','91'),('1987-10-27','AL','91'),('1987-10-27','AL','104'),('1987-10-27','AL','104'),('1987-10-27','AL','104'),('1987-10-27','AL','109'),('1987-10-27','AL','112'),('1987-10-27','AL','112'),('1987-10-27','AL','123'),('1987-10-27','AL','149'),('1987-10-27','AL','160'),('1987-10-27','AL','160'),('1987-10-27','AL','165'),('1987-10-27','AL','171'),('1987-10-27','AL','171'),('1987-10-27','AL','176'),('1987-10-27','AL','176'),('1987-10-27','AL','179'),('1987-10-27','AL','215'),('1987-10-27','AL','231'),('1987-10-27','AL','263'),('1987-10-27','AL','263'),('1987-10-27','AL','268'),('1987-10-27','AL','268'),('1987-10-27','AL','268'),('1987-10-27','AL','281'),('1987-10-27','AL','281'),('1987-10-27','AL','287'),('1987-10-27','AL','287'),('1987-10-27','AL','309'),('1987-10-27','AL','309'),('1987-10-27','AL','341'),('1987-10-27','AL','344'),('1987-10-27','AL','344'),('1987-10-27','AL','357'),('1987-10-27','AL','357'),('1987-10-27','AL','368'),('1987-10-27','AL','381'),('1987-10-27','AL','396'),('1987-10-27','AL','397'),('1987-10-27','AL','397'),('1987-10-27','AL','416'),('1987-10-27','AL','416'),('1987-10-27','AL','417'),('1987-10-27','AL','438'),('1987-10-27','AL','438'),('1987-10-27','AL','446'),('1987-10-27','AL','451'),('1987-10-27','AL','451'),('1987-10-27','AL','491'),('1987-10-27','AL','491'),('1987-10-27','AL','523'),('1987-10-27','AL','523'),('1987-10-27','AL','523'),('1987-10-27','AL','525'),('1987-10-27','AL','525'),('1987-10-27','AL','533'),('1987-10-27','AL','533'),('1987-10-27','AL','546'),('1987-10-27','AL','546'),('1987-10-27','AL','556'),('1987-10-27','AL','556'),('1987-10-27','AL','601'),('1987-10-27','AL','601'),('1987-10-27','AL','627'),('1987-10-27','AL','629'),('1987-10-27','AL','670'),('1987-10-27','AL','670'),('1987-10-27','AL','670'),('1987-10-27','AL','673'),('1987-10-27','AL','680'),('1987-10-28','AA','2'),('1987-10-28','AA','2'),('1987-10-28','AA','2'),('1987-10-28','AA','7'),('1987-10-28','AA','7'),('1987-10-28','AA','26'),('1987-10-28','AA','34'),('1987-10-28','AA','36'),('1987-10-28','AA','91'),('1987-10-28','AA','101'),('1987-10-28','AA','101'),('1987-10-28','AA','109'),('1987-10-28','AA','109'),('1987-10-28','AA','112'),('1987-10-28','AA','123'),('1987-10-28','AA','123'),('1987-10-28','AA','165'),('1987-10-28','AA','165'),('1987-10-28','AA','165'),('1987-10-28','AA','176'),('1987-10-28','AA','176'),('1987-10-28','AA','176'),('1987-10-28','AA','176'),('1987-10-28','AA','179'),('1987-10-28','AA','179'),('1987-10-28','AA','215'),('1987-10-28','AA','215'),('1987-10-28','AA','231'),('1987-10-28','AA','231'),('1987-10-28','AA','263'),('1987-10-28','AA','268'),('1987-10-28','AA','268'),('1987-10-28','AA','281'),('1987-10-28','AA','287'),('1987-10-28','AA','287'),('1987-10-28','AA','309'),('1987-10-28','AA','309'),('1987-10-28','AA','309'),('1987-10-28','AA','341'),('1987-10-28','AA','344'),('1987-10-28','AA','344'),('1987-10-28','AA','347'),('1987-10-28','AA','347'),('1987-10-28','AA','368'),('1987-10-28','AA','381'),('1987-10-28','AA','381'),('1987-10-28','AA','381'),('1987-10-28','AA','396'),('1987-10-28','AA','396'),('1987-10-28','AA','397'),('1987-10-28','AA','397'),('1987-10-28','AA','417'),('1987-10-28','AA','417'),('1987-10-28','AA','446'),('1987-10-28','AA','451'),('1987-10-28','AA','451'),('1987-10-28','AA','460'),('1987-10-28','AA','460'),('1987-10-28','AA','491'),('1987-10-28','AA','504'),('1987-10-28','AA','504'),('1987-10-28','AA','519'),('1987-10-28','AA','519'),('1987-10-28','AA','523'),('1987-10-28','AA','523'),('1987-10-28','AA','525'),('1987-10-28','AA','525'),('1987-10-28','AA','525'),('1987-10-28','AA','533'),('1987-10-28','AA','533'),('1987-10-28','AA','533'),('1987-10-28','AA','546'),('1987-10-28','AA','546'),('1987-10-28','AA','546'),('1987-10-28','AA','546'),('1987-10-28','AA','556'),('1987-10-28','AA','556'),('1987-10-28','AA','556'),('1987-10-28','AA','597'),('1987-10-28','AA','597'),('1987-10-28','AA','597'),('1987-10-28','AA','601'),('1987-10-28','AA','601'),('1987-10-28','AA','627'),('1987-10-28','AA','629'),('1987-10-28','AA','629'),('1987-10-28','AA','670'),('1987-10-28','AA','673'),('1987-10-28','AA','673'),('1987-10-28','AA','680'),('1987-10-28','AA','680'),('1987-10-28','AA','817'),('1987-10-28','AA','817'),('1987-10-28','AA','824'),('1987-10-28','AA','824'),('1987-10-28','AA','824'),('1987-10-28','AA','832'),('1987-10-28','AA','832'),('1987-10-28','AA','852'),('1987-10-28','AA','852'),('1987-10-28','AA','866'),('1987-10-28','AA','866'),('1987-10-28','AA','871'),('1987-10-28','AA','871'),('1987-10-28','AA','880'),('1987-10-28','AA','880'),('1987-10-28','AA','880'),('1987-10-28','AA','880'),('1987-10-28','AA','883'),('1987-10-28','AA','883'),('1987-10-28','AA','885'),('1987-10-28','AA','885'),('1987-10-28','AA','890'),('1987-10-28','AA','890'),('1987-10-28','AA','893'),('1987-10-28','AA','893'),('1987-10-28','AA','905'),('1987-10-28','AA','905'),('1987-10-28','AA','915'),('1987-10-28','AA','929'),('1987-10-28','AA','929'),('1987-10-28','AA','936'),('1987-10-28','AA','936'),('1987-10-28','AA','937'),('1987-10-28','AA','937'),('1987-10-28','AA','955'),('1987-10-28','AA','955'),('1987-10-28','AA','966'),('1987-10-28','AA','1002'),('1987-10-28','AA','1002'),('1987-10-28','AA','1004'),('1987-10-28','AA','1004'),('1987-10-28','AA','1015'),('1987-10-28','AA','1021'),('1987-10-28','AA','1021'),('1987-10-28','AA','1041'),('1987-10-28','AA','1041'),('1987-10-28','AA','1046'),('1987-10-28','AA','1046'),('1987-10-28','AA','1048'),('1987-10-28','AA','1048'),('1987-10-28','AA','1061'),('1987-10-28','AA','1061'),('1987-10-28','AA','1088'),('1987-10-28','AA','1088'),('1987-10-28','AA','2033'),('1987-10-28','AA','2033'),('1987-10-28','AA','2050'),('1987-10-28','AA','2058'),('1987-10-28','AA','2071'),('1987-10-28','AA','2071'),('1987-10-28','AA','2086'),('1987-10-28','AA','2105'),('1987-10-28','AA','2111'),('1987-10-28','AA','2123'),('1987-10-28','AA','2123'),('1987-10-28','AA','2147'),('1987-10-28','AA','2199'),('1987-10-28','AA','2199'),('1987-10-28','AA','2207'),('1987-10-28','AA','2207'),('1987-10-28','AA','2217'),('1987-10-28','AA','2230'),('1987-10-28','AA','2245'),('1987-10-28','AA','2251'),('1987-10-28','AA','2251'),('1987-10-28','AA','2275'),('1987-10-28','AA','2278'),('1987-10-28','AA','2351'),('1987-10-28','AA','2361'),('1987-10-28','AA','2490'),('1987-10-28','AA','2528'),('1987-10-28','AA','2528'),('1987-10-28','AA','2751'),('1987-10-28','AL','2'),('1987-10-28','AL','2'),('1987-10-28','AL','7'),('1987-10-28','AL','7'),('1987-10-28','AL','26'),('1987-10-28','AL','34'),('1987-10-28','AL','34'),('1987-10-28','AL','45'),('1987-10-28','AL','91'),('1987-10-28','AL','91'),('1987-10-28','AL','104'),('1987-10-28','AL','104'),('1987-10-28','AL','104'),('1987-10-28','AL','109'),('1987-10-28','AL','112'),('1987-10-28','AL','112'),('1987-10-28','AL','123'),('1987-10-28','AL','149'),('1987-10-28','AL','160'),('1987-10-28','AL','160'),('1987-10-28','AL','165'),('1987-10-28','AL','171'),('1987-10-28','AL','171'),('1987-10-28','AL','176'),('1987-10-28','AL','176'),('1987-10-28','AL','179'),('1987-10-28','AL','215'),('1987-10-28','AL','231'),('1987-10-28','AL','263'),('1987-10-28','AL','263'),('1987-10-28','AL','268'),('1987-10-28','AL','268'),('1987-10-28','AL','268'),('1987-10-28','AL','281'),('1987-10-28','AL','281'),('1987-10-28','AL','287'),('1987-10-28','AL','287'),('1987-10-28','AL','309'),('1987-10-28','AL','309'),('1987-10-28','AL','341'),('1987-10-28','AL','344'),('1987-10-28','AL','344'),('1987-10-28','AL','357'),('1987-10-28','AL','357'),('1987-10-28','AL','368'),('1987-10-28','AL','381'),('1987-10-28','AL','396'),('1987-10-28','AL','397'),('1987-10-28','AL','397'),('1987-10-28','AL','416'),('1987-10-28','AL','416'),('1987-10-28','AL','417'),('1987-10-28','AL','438'),('1987-10-28','AL','438'),('1987-10-28','AL','446'),('1987-10-28','AL','451'),('1987-10-28','AL','451'),('1987-10-28','AL','491'),('1987-10-28','AL','491'),('1987-10-28','AL','523'),('1987-10-28','AL','523'),('1987-10-28','AL','523'),('1987-10-28','AL','525'),('1987-10-28','AL','525'),('1987-10-28','AL','533'),('1987-10-28','AL','533'),('1987-10-28','AL','546'),('1987-10-28','AL','546'),('1987-10-28','AL','556'),('1987-10-28','AL','556'),('1987-10-28','AL','601'),('1987-10-28','AL','601'),('1987-10-28','AL','627'),('1987-10-28','AL','629'),('1987-10-28','AL','670'),('1987-10-28','AL','670'),('1987-10-28','AL','670'),('1987-10-28','AL','673'),('1987-10-28','AL','680'),('1987-10-29','AA','2'),('1987-10-29','AA','2'),('1987-10-29','AA','2'),('1987-10-29','AA','7'),('1987-10-29','AA','7'),('1987-10-29','AA','26'),('1987-10-29','AA','34'),('1987-10-29','AA','36'),('1987-10-29','AA','91'),('1987-10-29','AA','101'),('1987-10-29','AA','101'),('1987-10-29','AA','109'),('1987-10-29','AA','109'),('1987-10-29','AA','112'),('1987-10-29','AA','123'),('1987-10-29','AA','123'),('1987-10-29','AA','160'),('1987-10-29','AA','165'),('1987-10-29','AA','165'),('1987-10-29','AA','165'),('1987-10-29','AA','176'),('1987-10-29','AA','176'),('1987-10-29','AA','176'),('1987-10-29','AA','176'),('1987-10-29','AA','179'),('1987-10-29','AA','179'),('1987-10-29','AA','215'),('1987-10-29','AA','215'),('1987-10-29','AA','231'),('1987-10-29','AA','231'),('1987-10-29','AA','263'),('1987-10-29','AA','263'),('1987-10-29','AA','268'),('1987-10-29','AA','268'),('1987-10-29','AA','281'),('1987-10-29','AA','287'),('1987-10-29','AA','287'),('1987-10-29','AA','309'),('1987-10-29','AA','309'),('1987-10-29','AA','309'),('1987-10-29','AA','341'),('1987-10-29','AA','344'),('1987-10-29','AA','344'),('1987-10-29','AA','347'),('1987-10-29','AA','347'),('1987-10-29','AA','368'),('1987-10-29','AA','381'),('1987-10-29','AA','381'),('1987-10-29','AA','381'),('1987-10-29','AA','396'),('1987-10-29','AA','396'),('1987-10-29','AA','397'),('1987-10-29','AA','397'),('1987-10-29','AA','417'),('1987-10-29','AA','417'),('1987-10-29','AA','451'),('1987-10-29','AA','451'),('1987-10-29','AA','460'),('1987-10-29','AA','460'),('1987-10-29','AA','491'),('1987-10-29','AA','504'),('1987-10-29','AA','504'),('1987-10-29','AA','519'),('1987-10-29','AA','519'),('1987-10-29','AA','523'),('1987-10-29','AA','523'),('1987-10-29','AA','525'),('1987-10-29','AA','525'),('1987-10-29','AA','525'),('1987-10-29','AA','533'),('1987-10-29','AA','533'),('1987-10-29','AA','533'),('1987-10-29','AA','546'),('1987-10-29','AA','546'),('1987-10-29','AA','546'),('1987-10-29','AA','546'),('1987-10-29','AA','556'),('1987-10-29','AA','556'),('1987-10-29','AA','556'),('1987-10-29','AA','597'),('1987-10-29','AA','597'),('1987-10-29','AA','597'),('1987-10-29','AA','601'),('1987-10-29','AA','601'),('1987-10-29','AA','627'),('1987-10-29','AA','629'),('1987-10-29','AA','670'),('1987-10-29','AA','673'),('1987-10-29','AA','680'),('1987-10-29','AA','680'),('1987-10-29','AA','817'),('1987-10-29','AA','817'),('1987-10-29','AA','824'),('1987-10-29','AA','824'),('1987-10-29','AA','824'),('1987-10-29','AA','824'),('1987-10-29','AA','832'),('1987-10-29','AA','832'),('1987-10-29','AA','852'),('1987-10-29','AA','852'),('1987-10-29','AA','866'),('1987-10-29','AA','866'),('1987-10-29','AA','871'),('1987-10-29','AA','871'),('1987-10-29','AA','880'),('1987-10-29','AA','880'),('1987-10-29','AA','880'),('1987-10-29','AA','880'),('1987-10-29','AA','883'),('1987-10-29','AA','883'),('1987-10-29','AA','885'),('1987-10-29','AA','885'),('1987-10-29','AA','885'),('1987-10-29','AA','890'),('1987-10-29','AA','890'),('1987-10-29','AA','893'),('1987-10-29','AA','893'),('1987-10-29','AA','905'),('1987-10-29','AA','915'),('1987-10-29','AA','929'),('1987-10-29','AA','929'),('1987-10-29','AA','936'),('1987-10-29','AA','936'),('1987-10-29','AA','937'),('1987-10-29','AA','937'),('1987-10-29','AA','955'),('1987-10-29','AA','955'),('1987-10-29','AA','966'),('1987-10-29','AA','1002'),('1987-10-29','AA','1002'),('1987-10-29','AA','1004'),('1987-10-29','AA','1004'),('1987-10-29','AA','1015'),('1987-10-29','AA','1015'),('1987-10-29','AA','1021'),('1987-10-29','AA','1021'),('1987-10-29','AA','1041'),('1987-10-29','AA','1041'),('1987-10-29','AA','1046'),('1987-10-29','AA','1048'),('1987-10-29','AA','1048'),('1987-10-29','AA','1061'),('1987-10-29','AA','1061'),('1987-10-29','AA','1088'),('1987-10-29','AA','1088'),('1987-10-29','AA','2033'),('1987-10-29','AA','2033'),('1987-10-29','AA','2050'),('1987-10-29','AA','2058'),('1987-10-29','AA','2071'),('1987-10-29','AA','2071'),('1987-10-29','AA','2086'),('1987-10-29','AA','2105'),('1987-10-29','AA','2111'),('1987-10-29','AA','2123'),('1987-10-29','AA','2123'),('1987-10-29','AA','2147'),('1987-10-29','AA','2147'),('1987-10-29','AA','2199'),('1987-10-29','AA','2199'),('1987-10-29','AA','2207'),('1987-10-29','AA','2207'),('1987-10-29','AA','2217'),('1987-10-29','AA','2230'),('1987-10-29','AA','2251'),('1987-10-29','AA','2251'),('1987-10-29','AA','2275'),('1987-10-29','AA','2278'),('1987-10-29','AA','2351'),('1987-10-29','AA','2357'),('1987-10-29','AA','2361'),('1987-10-29','AA','2490'),('1987-10-29','AA','2528'),('1987-10-29','AA','2735'),('1987-10-29','AA','2735'),('1987-10-29','AA','2751'),('1987-10-29','AL','2'),('1987-10-29','AL','2'),('1987-10-29','AL','7'),('1987-10-29','AL','7'),('1987-10-29','AL','26'),('1987-10-29','AL','26'),('1987-10-29','AL','34'),('1987-10-29','AL','34'),('1987-10-29','AL','36'),('1987-10-29','AL','36'),('1987-10-29','AL','45'),('1987-10-29','AL','45'),('1987-10-29','AL','45'),('1987-10-29','AL','91'),('1987-10-29','AL','91'),('1987-10-29','AL','104'),('1987-10-29','AL','109'),('1987-10-29','AL','112'),('1987-10-29','AL','112'),('1987-10-29','AL','123'),('1987-10-29','AL','149'),('1987-10-29','AL','160'),('1987-10-29','AL','160'),('1987-10-29','AL','165'),('1987-10-29','AL','171'),('1987-10-29','AL','171'),('1987-10-29','AL','176'),('1987-10-29','AL','176'),('1987-10-29','AL','179'),('1987-10-29','AL','215'),('1987-10-29','AL','231'),('1987-10-29','AL','263'),('1987-10-29','AL','263'),('1987-10-29','AL','268'),('1987-10-29','AL','268'),('1987-10-29','AL','268'),('1987-10-29','AL','281'),('1987-10-29','AL','281'),('1987-10-29','AL','287'),('1987-10-29','AL','287'),('1987-10-29','AL','309'),('1987-10-29','AL','309'),('1987-10-29','AL','341'),('1987-10-29','AL','344'),('1987-10-29','AL','344'),('1987-10-29','AL','357'),('1987-10-29','AL','357'),('1987-10-29','AL','368'),('1987-10-29','AL','381'),('1987-10-29','AL','396'),('1987-10-29','AL','397'),('1987-10-29','AL','397'),('1987-10-29','AL','416'),('1987-10-29','AL','416'),('1987-10-29','AL','417'),('1987-10-29','AL','438'),('1987-10-29','AL','438'),('1987-10-29','AL','446'),('1987-10-29','AL','451'),('1987-10-29','AL','451'),('1987-10-29','AL','491'),('1987-10-29','AL','491'),('1987-10-29','AL','523'),('1987-10-29','AL','523'),('1987-10-29','AL','523'),('1987-10-29','AL','525'),('1987-10-29','AL','525'),('1987-10-29','AL','533'),('1987-10-29','AL','533'),('1987-10-29','AL','546'),('1987-10-29','AL','546'),('1987-10-29','AL','556'),('1987-10-29','AL','556'),('1987-10-29','AL','601'),('1987-10-29','AL','601'),('1987-10-29','AL','627'),('1987-10-29','AL','629'),('1987-10-29','AL','670'),('1987-10-29','AL','670'),('1987-10-29','AL','670'),('1987-10-29','AL','673'),('1987-10-29','AL','680'),('1987-10-30','AA','2'),('1987-10-30','AA','2'),('1987-10-30','AA','2'),('1987-10-30','AA','7'),('1987-10-30','AA','7'),('1987-10-30','AA','26'),('1987-10-30','AA','34'),('1987-10-30','AA','91'),('1987-10-30','AA','101'),('1987-10-30','AA','101'),('1987-10-30','AA','109'),('1987-10-30','AA','109'),('1987-10-30','AA','109'),('1987-10-30','AA','112'),('1987-10-30','AA','123'),('1987-10-30','AA','165'),('1987-10-30','AA','165'),('1987-10-30','AA','165'),('1987-10-30','AA','176'),('1987-10-30','AA','176'),('1987-10-30','AA','176'),('1987-10-30','AA','176'),('1987-10-30','AA','179'),('1987-10-30','AA','179'),('1987-10-30','AA','215'),('1987-10-30','AA','215'),('1987-10-30','AA','231'),('1987-10-30','AA','231'),('1987-10-30','AA','263'),('1987-10-30','AA','268'),('1987-10-30','AA','268'),('1987-10-30','AA','281'),('1987-10-30','AA','287'),('1987-10-30','AA','287'),('1987-10-30','AA','309'),('1987-10-30','AA','309'),('1987-10-30','AA','309'),('1987-10-30','AA','344'),('1987-10-30','AA','344'),('1987-10-30','AA','347'),('1987-10-30','AA','347'),('1987-10-30','AA','368'),('1987-10-30','AA','381'),('1987-10-30','AA','381'),('1987-10-30','AA','381'),('1987-10-30','AA','396'),('1987-10-30','AA','396'),('1987-10-30','AA','397'),('1987-10-30','AA','397'),('1987-10-30','AA','417'),('1987-10-30','AA','417'),('1987-10-30','AA','446'),('1987-10-30','AA','451'),('1987-10-30','AA','451'),('1987-10-30','AA','460'),('1987-10-30','AA','460'),('1987-10-30','AA','491'),('1987-10-30','AA','504'),('1987-10-30','AA','504'),('1987-10-30','AA','519'),('1987-10-30','AA','519'),('1987-10-30','AA','523'),('1987-10-30','AA','523'),('1987-10-30','AA','525'),('1987-10-30','AA','525'),('1987-10-30','AA','525'),('1987-10-30','AA','533'),('1987-10-30','AA','533'),('1987-10-30','AA','533'),('1987-10-30','AA','546'),('1987-10-30','AA','546'),('1987-10-30','AA','546'),('1987-10-30','AA','546'),('1987-10-30','AA','556'),('1987-10-30','AA','556'),('1987-10-30','AA','556'),('1987-10-30','AA','597'),('1987-10-30','AA','597'),('1987-10-30','AA','597'),('1987-10-30','AA','601'),('1987-10-30','AA','601'),('1987-10-30','AA','627'),('1987-10-30','AA','629'),('1987-10-30','AA','629'),('1987-10-30','AA','670'),('1987-10-30','AA','673'),('1987-10-30','AA','673'),('1987-10-30','AA','680'),('1987-10-30','AA','817'),('1987-10-30','AA','817'),('1987-10-30','AA','824'),('1987-10-30','AA','824'),('1987-10-30','AA','824'),('1987-10-30','AA','824'),('1987-10-30','AA','832'),('1987-10-30','AA','832'),('1987-10-30','AA','852'),('1987-10-30','AA','866'),('1987-10-30','AA','866'),('1987-10-30','AA','871'),('1987-10-30','AA','871'),('1987-10-30','AA','880'),('1987-10-30','AA','880'),('1987-10-30','AA','880'),('1987-10-30','AA','880'),('1987-10-30','AA','883'),('1987-10-30','AA','883'),('1987-10-30','AA','885'),('1987-10-30','AA','885'),('1987-10-30','AA','885'),('1987-10-30','AA','890'),('1987-10-30','AA','890'),('1987-10-30','AA','893'),('1987-10-30','AA','893'),('1987-10-30','AA','905'),('1987-10-30','AA','905'),('1987-10-30','AA','915'),('1987-10-30','AA','929'),('1987-10-30','AA','929'),('1987-10-30','AA','936'),('1987-10-30','AA','936'),('1987-10-30','AA','937'),('1987-10-30','AA','937'),('1987-10-30','AA','955'),('1987-10-30','AA','955'),('1987-10-30','AA','966'),('1987-10-30','AA','1002'),('1987-10-30','AA','1002'),('1987-10-30','AA','1004'),('1987-10-30','AA','1004'),('1987-10-30','AA','1015'),('1987-10-30','AA','1015'),('1987-10-30','AA','1021'),('1987-10-30','AA','1021'),('1987-10-30','AA','1041'),('1987-10-30','AA','1041'),('1987-10-30','AA','1046'),('1987-10-30','AA','1046'),('1987-10-30','AA','1048'),('1987-10-30','AA','1048'),('1987-10-30','AA','1061'),('1987-10-30','AA','1061'),('1987-10-30','AA','1088'),('1987-10-30','AA','1088'),('1987-10-30','AA','2033'),('1987-10-30','AA','2033'),('1987-10-30','AA','2050'),('1987-10-30','AA','2058'),('1987-10-30','AA','2071'),('1987-10-30','AA','2071'),('1987-10-30','AA','2086'),('1987-10-30','AA','2105'),('1987-10-30','AA','2111'),('1987-10-30','AA','2123'),('1987-10-30','AA','2123'),('1987-10-30','AA','2147'),('1987-10-30','AA','2147'),('1987-10-30','AA','2199'),('1987-10-30','AA','2199'),('1987-10-30','AA','2207'),('1987-10-30','AA','2207'),('1987-10-30','AA','2217'),('1987-10-30','AA','2230'),('1987-10-30','AA','2245'),('1987-10-30','AA','2251'),('1987-10-30','AA','2275'),('1987-10-30','AA','2278'),('1987-10-30','AA','2351'),('1987-10-30','AA','2357'),('1987-10-30','AA','2361'),('1987-10-30','AA','2490'),('1987-10-30','AA','2528'),('1987-10-30','AA','2528'),('1987-10-30','AA','2735'),('1987-10-30','AA','2735'),('1987-10-30','AA','2751'),('1987-10-30','AL','2'),('1987-10-30','AL','2'),('1987-10-30','AL','7'),('1987-10-30','AL','7'),('1987-10-30','AL','26'),('1987-10-30','AL','26'),('1987-10-30','AL','34'),('1987-10-30','AL','34'),('1987-10-30','AL','36'),('1987-10-30','AL','36'),('1987-10-30','AL','45'),('1987-10-30','AL','45'),('1987-10-30','AL','45'),('1987-10-30','AL','91'),('1987-10-30','AL','91'),('1987-10-30','AL','104'),('1987-10-30','AL','104'),('1987-10-30','AL','104'),('1987-10-30','AL','109'),('1987-10-30','AL','112'),('1987-10-30','AL','112'),('1987-10-30','AL','123'),('1987-10-30','AL','149'),('1987-10-30','AL','160'),('1987-10-30','AL','160'),('1987-10-30','AL','165'),('1987-10-30','AL','171'),('1987-10-30','AL','171'),('1987-10-30','AL','176'),('1987-10-30','AL','176'),('1987-10-30','AL','179'),('1987-10-30','AL','215'),('1987-10-30','AL','231'),('1987-10-30','AL','263'),('1987-10-30','AL','263'),('1987-10-30','AL','268'),('1987-10-30','AL','268'),('1987-10-30','AL','268'),('1987-10-30','AL','281'),('1987-10-30','AL','281'),('1987-10-30','AL','287'),('1987-10-30','AL','287'),('1987-10-30','AL','309'),('1987-10-30','AL','309'),('1987-10-30','AL','341'),('1987-10-30','AL','344'),('1987-10-30','AL','344'),('1987-10-30','AL','357'),('1987-10-30','AL','357'),('1987-10-30','AL','368'),('1987-10-30','AL','381'),('1987-10-30','AL','396'),('1987-10-30','AL','397'),('1987-10-30','AL','397'),('1987-10-30','AL','416'),('1987-10-30','AL','416'),('1987-10-30','AL','417'),('1987-10-30','AL','438'),('1987-10-30','AL','438'),('1987-10-30','AL','446'),('1987-10-30','AL','451'),('1987-10-30','AL','451'),('1987-10-30','AL','491'),('1987-10-30','AL','491'),('1987-10-30','AL','523'),('1987-10-30','AL','523'),('1987-10-30','AL','523'),('1987-10-30','AL','525'),('1987-10-30','AL','525'),('1987-10-30','AL','533'),('1987-10-30','AL','533'),('1987-10-30','AL','546'),('1987-10-30','AL','546'),('1987-10-30','AL','556'),('1987-10-30','AL','556'),('1987-10-30','AL','601'),('1987-10-30','AL','601'),('1987-10-30','AL','627'),('1987-10-30','AL','629'),('1987-10-30','AL','670'),('1987-10-30','AL','670'),('1987-10-30','AL','670'),('1987-10-30','AL','673'),('1987-10-30','AL','680'),('1987-10-31','AA','2'),('1987-10-31','AA','2'),('1987-10-31','AA','2'),('1987-10-31','AA','7'),('1987-10-31','AA','7'),('1987-10-31','AA','26'),('1987-10-31','AA','34'),('1987-10-31','AA','36'),('1987-10-31','AA','91'),('1987-10-31','AA','101'),('1987-10-31','AA','101'),('1987-10-31','AA','109'),('1987-10-31','AA','109'),('1987-10-31','AA','112'),('1987-10-31','AA','123'),('1987-10-31','AA','123'),('1987-10-31','AA','160'),('1987-10-31','AA','165'),('1987-10-31','AA','165'),('1987-10-31','AA','165'),('1987-10-31','AA','176'),('1987-10-31','AA','176'),('1987-10-31','AA','176'),('1987-10-31','AA','176'),('1987-10-31','AA','179'),('1987-10-31','AA','179'),('1987-10-31','AA','215'),('1987-10-31','AA','215'),('1987-10-31','AA','231'),('1987-10-31','AA','263'),('1987-10-31','AA','268'),('1987-10-31','AA','268'),('1987-10-31','AA','281'),('1987-10-31','AA','287'),('1987-10-31','AA','287'),('1987-10-31','AA','309'),('1987-10-31','AA','309'),('1987-10-31','AA','309'),('1987-10-31','AA','341'),('1987-10-31','AA','344'),('1987-10-31','AA','344'),('1987-10-31','AA','347'),('1987-10-31','AA','347'),('1987-10-31','AA','368'),('1987-10-31','AA','381'),('1987-10-31','AA','381'),('1987-10-31','AA','381'),('1987-10-31','AA','396'),('1987-10-31','AA','396'),('1987-10-31','AA','397'),('1987-10-31','AA','417'),('1987-10-31','AA','417'),('1987-10-31','AA','446'),('1987-10-31','AA','451'),('1987-10-31','AA','451'),('1987-10-31','AA','491'),('1987-10-31','AA','491'),('1987-10-31','AA','504'),('1987-10-31','AA','504'),('1987-10-31','AA','519'),('1987-10-31','AA','519'),('1987-10-31','AA','523'),('1987-10-31','AA','523'),('1987-10-31','AA','525'),('1987-10-31','AA','525'),('1987-10-31','AA','533'),('1987-10-31','AA','533'),('1987-10-31','AA','546'),('1987-10-31','AA','546'),('1987-10-31','AA','546'),('1987-10-31','AA','546'),('1987-10-31','AA','556'),('1987-10-31','AA','556'),('1987-10-31','AA','556'),('1987-10-31','AA','597'),('1987-10-31','AA','597'),('1987-10-31','AA','597'),('1987-10-31','AA','601'),('1987-10-31','AA','601'),('1987-10-31','AA','627'),('1987-10-31','AA','629'),('1987-10-31','AA','670'),('1987-10-31','AA','673'),('1987-10-31','AA','673'),('1987-10-31','AA','680'),('1987-10-31','AA','680'),('1987-10-31','AA','817'),('1987-10-31','AA','817'),('1987-10-31','AA','824'),('1987-10-31','AA','824'),('1987-10-31','AA','824'),('1987-10-31','AA','832'),('1987-10-31','AA','832'),('1987-10-31','AA','852'),('1987-10-31','AA','852'),('1987-10-31','AA','866'),('1987-10-31','AA','871'),('1987-10-31','AA','871'),('1987-10-31','AA','880'),('1987-10-31','AA','880'),('1987-10-31','AA','880'),('1987-10-31','AA','883'),('1987-10-31','AA','885'),('1987-10-31','AA','885'),('1987-10-31','AA','885'),('1987-10-31','AA','890'),('1987-10-31','AA','890'),('1987-10-31','AA','893'),('1987-10-31','AA','893'),('1987-10-31','AA','905'),('1987-10-31','AA','905'),('1987-10-31','AA','915'),('1987-10-31','AA','929'),('1987-10-31','AA','929'),('1987-10-31','AA','936'),('1987-10-31','AA','936'),('1987-10-31','AA','937'),('1987-10-31','AA','937'),('1987-10-31','AA','955'),('1987-10-31','AA','955'),('1987-10-31','AA','1002'),('1987-10-31','AA','1002'),('1987-10-31','AA','1004'),('1987-10-31','AA','1004'),('1987-10-31','AA','1015'),('1987-10-31','AA','1015'),('1987-10-31','AA','1021'),('1987-10-31','AA','1021'),('1987-10-31','AA','1041'),('1987-10-31','AA','1041'),('1987-10-31','AA','1046'),('1987-10-31','AA','1046'),('1987-10-31','AA','1048'),('1987-10-31','AA','1048'),('1987-10-31','AA','1061'),('1987-10-31','AA','1061'),('1987-10-31','AA','1088'),('1987-10-31','AA','1088'),('1987-10-31','AA','2033'),('1987-10-31','AA','2058'),('1987-10-31','AA','2086'),('1987-10-31','AA','2105'),('1987-10-31','AA','2123'),('1987-10-31','AA','2123'),('1987-10-31','AA','2147'),('1987-10-31','AA','2147'),('1987-10-31','AA','2199'),('1987-10-31','AA','2199'),('1987-10-31','AA','2207'),('1987-10-31','AA','2207'),('1987-10-31','AA','2217'),('1987-10-31','AA','2230'),('1987-10-31','AA','2251'),('1987-10-31','AA','2251'),('1987-10-31','AA','2275'),('1987-10-31','AA','2278'),('1987-10-31','AA','2351'),('1987-10-31','AA','2357'),('1987-10-31','AA','2361'),('1987-10-31','AA','2528'),('1987-10-31','AA','2528'),('1987-10-31','AA','2735'),('1987-10-31','AA','2735'),('1987-10-31','AL','2'),('1987-10-31','AL','2'),('1987-10-31','AL','7'),('1987-10-31','AL','7'),('1987-10-31','AL','26'),('1987-10-31','AL','26'),('1987-10-31','AL','34'),('1987-10-31','AL','34'),('1987-10-31','AL','36'),('1987-10-31','AL','36'),('1987-10-31','AL','91'),('1987-10-31','AL','91'),('1987-10-31','AL','104'),('1987-10-31','AL','104'),('1987-10-31','AL','109'),('1987-10-31','AL','112'),('1987-10-31','AL','112'),('1987-10-31','AL','149'),('1987-10-31','AL','160'),('1987-10-31','AL','160'),('1987-10-31','AL','165'),('1987-10-31','AL','171'),('1987-10-31','AL','171'),('1987-10-31','AL','176'),('1987-10-31','AL','176'),('1987-10-31','AL','179'),('1987-10-31','AL','215'),('1987-10-31','AL','231'),('1987-10-31','AL','263'),('1987-10-31','AL','268'),('1987-10-31','AL','268'),('1987-10-31','AL','268'),('1987-10-31','AL','287'),('1987-10-31','AL','287'),('1987-10-31','AL','309'),('1987-10-31','AL','309'),('1987-10-31','AL','344'),('1987-10-31','AL','344'),('1987-10-31','AL','357'),('1987-10-31','AL','357'),('1987-10-31','AL','381'),('1987-10-31','AL','396'),('1987-10-31','AL','397'),('1987-10-31','AL','397'),('1987-10-31','AL','397'),('1987-10-31','AL','416'),('1987-10-31','AL','417'),('1987-10-31','AL','438'),('1987-10-31','AL','438'),('1987-10-31','AL','451'),('1987-10-31','AL','451'),('1987-10-31','AL','491'),('1987-10-31','AL','491'),('1987-10-31','AL','523'),('1987-10-31','AL','523'),('1987-10-31','AL','525'),('1987-10-31','AL','525'),('1987-10-31','AL','533'),('1987-10-31','AL','546'),('1987-10-31','AL','546'),('1987-10-31','AL','556'),('1987-10-31','AL','556'),('1987-10-31','AL','601'),('1987-10-31','AL','601'),('1987-10-31','AL','627'),('1987-10-31','AL','670'),('1987-10-31','AL','673'),('1987-10-31','AL','680'),('1987-10-31','AL','745'),('1987-10-31','AL','797'),('1987-10-31','AL','905'),('1987-10-31','AL','936'),('1987-10-31','AL','966'),('1987-10-31','AL','982'); -SELECT finalizeAggregation(Users) FROM (SELECT FlightDate, Carrier, uniqState(FlightNum) AS Users FROM test.ontime GROUP BY FlightDate, Carrier LIMIT 1); +SELECT ignore(finalizeAggregation(Users)) FROM (SELECT FlightDate, Carrier, uniqState(FlightNum) AS Users FROM test.ontime GROUP BY FlightDate, Carrier LIMIT 1); DROP TABLE test.ontime; diff --git a/dbms/tests/queries/0_stateless/00502_custom_partitioning_local.reference b/dbms/tests/queries/0_stateless/00502_custom_partitioning_local.reference index 9efd2d8a965..f3811ddcf1d 100644 --- a/dbms/tests/queries/0_stateless/00502_custom_partitioning_local.reference +++ b/dbms/tests/queries/0_stateless/00502_custom_partitioning_local.reference @@ -7,6 +7,7 @@ tuple() all_1_2_1 Sum before DETACH PARTITION: 15 Sum after DETACH PARTITION: +0 *** Partitioned by week *** Parts before OPTIMIZE: \'1999-12-27\' 19991227_1_1_0 diff --git a/dbms/tests/queries/0_stateless/00502_custom_partitioning_replicated_zookeeper.reference b/dbms/tests/queries/0_stateless/00502_custom_partitioning_replicated_zookeeper.reference index ce412811db2..313e84db2d7 100644 --- a/dbms/tests/queries/0_stateless/00502_custom_partitioning_replicated_zookeeper.reference +++ b/dbms/tests/queries/0_stateless/00502_custom_partitioning_replicated_zookeeper.reference @@ -7,6 +7,7 @@ tuple() all_0_1_1 Sum before DETACH PARTITION: 15 Sum after DETACH PARTITION: +0 *** Partitioned by week *** Parts before OPTIMIZE: \'1999-12-27\' 19991227_0_0_0 diff --git a/dbms/tests/queries/0_stateless/00568_compile_catch_throw.sh b/dbms/tests/queries/0_stateless/00568_compile_catch_throw.sh index 949deff9784..27db57e8469 100755 --- a/dbms/tests/queries/0_stateless/00568_compile_catch_throw.sh +++ b/dbms/tests/queries/0_stateless/00568_compile_catch_throw.sh @@ -1,7 +1,13 @@ #!/usr/bin/env bash +[ -z "$CLICKHOUSE_CLIENT" ] && CLICKHOUSE_CLIENT="clickhouse-client" + SETTINGS="--compile=1 --min_count_to_compile=0 --max_threads=1 --max_memory_usage=8000000" -if ! $CLICKHOUSE_CLIENT -q "SELECT length(groupArray(number)) FROM (SELECT * FROM system.numbers LIMIT 1000000)" $SETTINGS 2>&1 | grep -Fc 'Memory limit (for query) exceeded' ; then - echo 'There is no expected exception "Memory limit (for query) exceeded: would use..."' +output=$($CLICKHOUSE_CLIENT -q "SELECT length(groupArray(number)) FROM (SELECT * FROM system.numbers LIMIT 1000000)" $SETTINGS 2>&1) + +[[ $? -eq 0 ]] && echo "Expected non-zero RC" +if ! echo "$output" | grep -Fc 'Memory limit (for query) exceeded' ; then + echo -e 'There is no expected exception "Memory limit (for query) exceeded: would use...". Got:' "\n$output" fi + $CLICKHOUSE_CLIENT -q "SELECT 1" diff --git a/dbms/tests/queries/0_stateless/00571_alter_nullable.reference b/dbms/tests/queries/0_stateless/00571_alter_nullable.reference new file mode 100644 index 00000000000..53e76b43a0f --- /dev/null +++ b/dbms/tests/queries/0_stateless/00571_alter_nullable.reference @@ -0,0 +1,8 @@ +hello +world +hello \N +world \N +hello \N +world \N +hello 0 +world 0 diff --git a/dbms/tests/queries/0_stateless/00571_alter_nullable.sql b/dbms/tests/queries/0_stateless/00571_alter_nullable.sql new file mode 100644 index 00000000000..66ad47b10af --- /dev/null +++ b/dbms/tests/queries/0_stateless/00571_alter_nullable.sql @@ -0,0 +1,13 @@ +DROP TABLE IF EXISTS test.nullable; +CREATE TABLE test.nullable (x String) ENGINE = MergeTree ORDER BY x; +INSERT INTO test.nullable VALUES ('hello'), ('world'); +SELECT * FROM test.nullable; +ALTER TABLE test.nullable ADD COLUMN n Nullable(UInt64); +SELECT * FROM test.nullable; +ALTER TABLE test.nullable DROP COLUMN n; +ALTER TABLE test.nullable ADD COLUMN n Nullable(UInt64) DEFAULT NULL; +SELECT * FROM test.nullable; +ALTER TABLE test.nullable DROP COLUMN n; +ALTER TABLE test.nullable ADD COLUMN n Nullable(UInt64) DEFAULT 0; +SELECT * FROM test.nullable; +DROP TABLE test.nullable; diff --git a/dbms/tests/queries/0_stateless/00572_aggregation_by_empty_set.reference b/dbms/tests/queries/0_stateless/00572_aggregation_by_empty_set.reference new file mode 100644 index 00000000000..5c89ff2983a --- /dev/null +++ b/dbms/tests/queries/0_stateless/00572_aggregation_by_empty_set.reference @@ -0,0 +1,6 @@ +0 +0 +1 +0 0 nan \N [] [] +0 0 nan \N [] [] +1 diff --git a/dbms/tests/queries/0_stateless/00572_aggregation_by_empty_set.sql b/dbms/tests/queries/0_stateless/00572_aggregation_by_empty_set.sql new file mode 100644 index 00000000000..8058605a715 --- /dev/null +++ b/dbms/tests/queries/0_stateless/00572_aggregation_by_empty_set.sql @@ -0,0 +1,21 @@ +CREATE TEMPORARY TABLE t (x UInt8); + +SET empty_result_for_aggregation_by_empty_set = 0; + +SELECT count() FROM system.one WHERE 0; +SELECT count() FROM system.one WHERE rand() < 0; +SELECT count() FROM system.one WHERE 1; + +SELECT count(), uniq(x), avg(x), avg(toNullable(x)), groupArray(x), groupUniqArray(x) FROM t; +SELECT count(), uniq(x), avg(x), avg(toNullable(x)), groupArray(x), groupUniqArray(x) FROM (SELECT * FROM t UNION ALL SELECT * FROM t); +SELECT x, count(), uniq(x), avg(x), avg(toNullable(x)), groupArray(x), groupUniqArray(x) FROM t GROUP BY x; + +SET empty_result_for_aggregation_by_empty_set = 1; + +SELECT count() FROM system.one WHERE 0; +SELECT count() FROM system.one WHERE rand() < 0; +SELECT count() FROM system.one WHERE 1; + +SELECT count(), uniq(x), avg(x), avg(toNullable(x)), groupArray(x), groupUniqArray(x) FROM t; +SELECT count(), uniq(x), avg(x), avg(toNullable(x)), groupArray(x), groupUniqArray(x) FROM (SELECT * FROM t UNION ALL SELECT * FROM t); +SELECT x, count(), uniq(x), avg(x), avg(toNullable(x)), groupArray(x), groupUniqArray(x) FROM t GROUP BY x; diff --git a/dbms/tests/queries/0_stateless/00573_shard_aggregation_by_empty_set.reference b/dbms/tests/queries/0_stateless/00573_shard_aggregation_by_empty_set.reference new file mode 100644 index 00000000000..dadb1e08170 --- /dev/null +++ b/dbms/tests/queries/0_stateless/00573_shard_aggregation_by_empty_set.reference @@ -0,0 +1 @@ +0 0 nan \N [] [] diff --git a/dbms/tests/queries/0_stateless/00573_shard_aggregation_by_empty_set.sql b/dbms/tests/queries/0_stateless/00573_shard_aggregation_by_empty_set.sql new file mode 100644 index 00000000000..8270b1eef44 --- /dev/null +++ b/dbms/tests/queries/0_stateless/00573_shard_aggregation_by_empty_set.sql @@ -0,0 +1,9 @@ +CREATE TEMPORARY TABLE t (x UInt8); + +SET empty_result_for_aggregation_by_empty_set = 0; +SELECT count(), uniq(x), avg(x), avg(toNullable(x)), groupArray(x), groupUniqArray(x) FROM remote('127.0.0.{1..10}', system.one) WHERE (rand() AS x) < 0; +SELECT count(), uniq(x), avg(x), avg(toNullable(x)), groupArray(x), groupUniqArray(x) FROM remote('127.0.0.{1..10}', system.one) WHERE (rand() AS x) < 0 GROUP BY x; + +SET empty_result_for_aggregation_by_empty_set = 1; +SELECT count(), uniq(x), avg(x), avg(toNullable(x)), groupArray(x), groupUniqArray(x) FROM remote('127.0.0.{1..10}', system.one) WHERE (rand() AS x) < 0; +SELECT count(), uniq(x), avg(x), avg(toNullable(x)), groupArray(x), groupUniqArray(x) FROM remote('127.0.0.{1..10}', system.one) WHERE (rand() AS x) < 0 GROUP BY x; diff --git a/dbms/tests/queries/0_stateless/00574_empty_strings_deserialization.reference b/dbms/tests/queries/0_stateless/00574_empty_strings_deserialization.reference new file mode 100644 index 00000000000..35101c0cba4 --- /dev/null +++ b/dbms/tests/queries/0_stateless/00574_empty_strings_deserialization.reference @@ -0,0 +1,3 @@ + 0 0 +aaa 0 0 +bbb 0 -0 diff --git a/dbms/tests/queries/0_stateless/00574_empty_strings_deserialization.sh b/dbms/tests/queries/0_stateless/00574_empty_strings_deserialization.sh new file mode 100755 index 00000000000..879f487c040 --- /dev/null +++ b/dbms/tests/queries/0_stateless/00574_empty_strings_deserialization.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +. $CURDIR/../shell_config.sh + +$CLICKHOUSE_CLIENT -q "DROP TABLE IF EXISTS test.empty_strings_deserialization" +$CLICKHOUSE_CLIENT -q "CREATE TABLE test.empty_strings_deserialization(s String, i Int32, f Float32) ENGINE Memory" + +echo ',,' | $CLICKHOUSE_CLIENT -q "INSERT INTO test.empty_strings_deserialization FORMAT CSV" +echo 'aaa,-,' | $CLICKHOUSE_CLIENT -q "INSERT INTO test.empty_strings_deserialization FORMAT CSV" +echo 'bbb,,-' | $CLICKHOUSE_CLIENT -q "INSERT INTO test.empty_strings_deserialization FORMAT CSV" + +$CLICKHOUSE_CLIENT -q "SELECT * FROM test.empty_strings_deserialization ORDER BY s" + +$CLICKHOUSE_CLIENT -q "DROP TABLE test.empty_strings_deserialization" diff --git a/dbms/tests/queries/0_stateless/00575_merge_and_index_with_frunction_in_in.reference b/dbms/tests/queries/0_stateless/00575_merge_and_index_with_frunction_in_in.reference new file mode 100644 index 00000000000..d00491fd7e5 --- /dev/null +++ b/dbms/tests/queries/0_stateless/00575_merge_and_index_with_frunction_in_in.reference @@ -0,0 +1 @@ +1 diff --git a/dbms/tests/queries/0_stateless/00575_merge_and_index_with_frunction_in_in.sql b/dbms/tests/queries/0_stateless/00575_merge_and_index_with_frunction_in_in.sql new file mode 100644 index 00000000000..8fc5b3faf16 --- /dev/null +++ b/dbms/tests/queries/0_stateless/00575_merge_and_index_with_frunction_in_in.sql @@ -0,0 +1,9 @@ +DROP TABLE IF EXISTS test.t; + +create table test.t(d Date) engine MergeTree(d, d, 8192); + +insert into test.t values ('2018-02-20'); + +select count() from test.t where toDayOfWeek(d) in (2); + +DROP TABLE test.t; diff --git a/dbms/tests/queries/0_stateless/00576_nested_and_prewhere.reference b/dbms/tests/queries/0_stateless/00576_nested_and_prewhere.reference new file mode 100644 index 00000000000..abc233c46f4 --- /dev/null +++ b/dbms/tests/queries/0_stateless/00576_nested_and_prewhere.reference @@ -0,0 +1,15 @@ +[0] +[0,0,0] +[0,0,0,0,0] +[0,0,0,0,0,0,0] +[0,0,0,0,0,0,0,0,0] +[0] +[0,2,4] +[0,2,4,6,8] +[0,2,4,6,8,10,12] +[0,2,4,6,8,10,12,14,16] +[0] [0] +[0,1,2] [0,2,4] +[0,1,2,3,4] [0,2,4,6,8] +[0,1,2,3,4,5,6] [0,2,4,6,8,10,12] +[0,1,2,3,4,5,6,7,8] [0,2,4,6,8,10,12,14,16] diff --git a/dbms/tests/queries/0_stateless/00576_nested_and_prewhere.sql b/dbms/tests/queries/0_stateless/00576_nested_and_prewhere.sql new file mode 100644 index 00000000000..5483086e8f6 --- /dev/null +++ b/dbms/tests/queries/0_stateless/00576_nested_and_prewhere.sql @@ -0,0 +1,13 @@ +DROP TABLE IF EXISTS test.nested; + +CREATE TABLE test.nested (x UInt64, filter UInt8, n Nested(a UInt64)) ENGINE = MergeTree ORDER BY x; +INSERT INTO test.nested SELECT number, number % 2, range(number % 10) FROM system.numbers LIMIT 100000; + +ALTER TABLE test.nested ADD COLUMN n.b Array(UInt64); +SELECT DISTINCT n.b FROM test.nested PREWHERE filter; + +ALTER TABLE test.nested ADD COLUMN n.c Array(UInt64) DEFAULT arrayMap(x -> x * 2, n.a); +SELECT DISTINCT n.c FROM test.nested PREWHERE filter; +SELECT DISTINCT n.a, n.c FROM test.nested PREWHERE filter; + +DROP TABLE test.nested; diff --git a/debian/changelog b/debian/changelog index 5fd9b9dbfe9..4365c1943ec 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,5 @@ -clickhouse (1.1.54352) unstable; urgency=low +clickhouse (1.1.54355) unstable; urgency=low * Modified source code - -- Wed, 14 Feb 2018 21:24:50 +0300 + -- Wed, 21 Feb 2018 10:35:08 +0300 diff --git a/debian/clickhouse-server.cron.d b/debian/clickhouse-server.cron.d index f45d4f4cb33..df2260b9e8b 100644 --- a/debian/clickhouse-server.cron.d +++ b/debian/clickhouse-server.cron.d @@ -1 +1 @@ -#*/10 * * * * root (which service && (service clickhouse-server condstart || true)) || /etc/init.d/clickhouse-server condstart 1>/dev/null 2>&1 +#*/10 * * * * root (which service > /dev/null && (service clickhouse-server condstart || true)) || /etc/init.d/clickhouse-server condstart 1>/dev/null 2>&1 diff --git a/docs/concatenate.py b/docs/concatenate.py index a43ef4387ac..0a964e8a54a 100755 --- a/docs/concatenate.py +++ b/docs/concatenate.py @@ -1,17 +1,17 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# - [-] Одностраничный документ. -# - Требования к исходникам: -# - [!] Не должно быть ссылко без якорей. Т.е. нельзя просто сослаться на файл, необходимо в начала файла поставить якорь и на него уже ссылаться. -# - [!] Якоря должны быть уникальными сквозь весь документ. -# - Реализация: -# - [+] Перечень файлов получаю из секции `pages` из `mkdocs.yml`. -# - [+] Файлы конкатенирутся встык c incrementing level of headers in all files except the first file -# - [+] Ссылки преобразуются во внутристраничные. -# - Ссылки, начинающиеся с http пропускаются -# - Не http-cсылки с якорем урезаются до якоря. -# - Не http-ссылки без якоря выводят ошибки в stdout и удаляются из документа. +# - Single-page document. +# - Requirements to the md-souces: +# - Don't use links without anchors. It means, that you can not just link file. You should specify an anchor at the top of the file and then link to this anchor +# - Anchors should be unique through whole document. +# - Implementation: +# - Script gets list of the file from the `pages` section of `mkdocs.yml`. It gets commented files too, and it right. +# - Files are concatenated by order with incrementing level of headers in all files except the first one +# - Script converts links to other files into inside page links. +# - Skipping links started with 'http' +# - Not http-links with anchor are cutted to the anchor sign (#). +# - For not http-links without anchor script logs an error and cuts them from the resulting single-page document. @@ -22,7 +22,7 @@ import os if len(sys.argv) < 2: print "Usage: concatenate.py language_dir" - print "Example: conatenate.py ru" + print "Example: concatenate.py ru" sys.exit(1) if not os.path.exists(sys.argv[1]): diff --git a/docs/en/functions/higher_order_functions.md b/docs/en/functions/higher_order_functions.md index 912d0c3f388..ab9bdc50786 100644 --- a/docs/en/functions/higher_order_functions.md +++ b/docs/en/functions/higher_order_functions.md @@ -71,3 +71,19 @@ Returns the first element in the 'arr1' array for which 'func' returns something Returns the index of the first element in the 'arr1' array for which 'func' returns something other than 0. +### arrayCumSum(\[func,\] arr1, ...) + +Returns the cumulative sum of the array obtained from the original application of the 'func' function to each element in the 'arr' array. + +Example: + +```sql +SELECT arrayCumSum([1, 1, 1, 1]) AS res +``` + +```text +┌─res──────────┐ +│ [1, 2, 3, 4] │ +└──────────────┘ +``` + diff --git a/docs/en/table_engines/distributed.md b/docs/en/table_engines/distributed.md index bdf0ba51ef6..b8643461fbb 100644 --- a/docs/en/table_engines/distributed.md +++ b/docs/en/table_engines/distributed.md @@ -1,6 +1,6 @@ -# Distributed (Sharding sheme) +# Distributed **The Distributed engine does not store data itself**, but allows distributed query processing on multiple servers. Reading is automatically parallelized. During a read, the table indexes on remote servers are used, if there are any. diff --git a/docs/en/table_engines/replication.md b/docs/en/table_engines/replication.md index 0ebd5ccfc51..1e58878c34e 100644 --- a/docs/en/table_engines/replication.md +++ b/docs/en/table_engines/replication.md @@ -2,11 +2,15 @@ # Data replication -## ReplicatedMergeTree +## ReplicatedAggregatingMergeTree ## ReplicatedCollapsingMergeTree -## ReplicatedAggregatingMergeTree +## ReplicatedGraphiteMergeTree + +## ReplicatedMergeTree + +## ReplicatedReplacingMergeTree ## ReplicatedSummingMergeTree diff --git a/docs/mkdocs-material-theme/assets/stylesheets/yandex_fonts.css b/docs/mkdocs-material-theme/assets/stylesheets/yandex_fonts.css new file mode 100644 index 00000000000..b6c81f611d4 --- /dev/null +++ b/docs/mkdocs-material-theme/assets/stylesheets/yandex_fonts.css @@ -0,0 +1,68 @@ +@font-face { + font-family: 'Yandex Sans Text Web'; + src: url(https://yastatic.net/adv-www/_/yy5JveR58JFkc97waf-xp0i6_jM.eot); + src: url(https://yastatic.net/adv-www/_/yy5JveR58JFkc97waf-xp0i6_jM.eot?#iefix) format('embedded-opentype'), + url(https://yastatic.net/adv-www/_/CYblzLEXzCqQIvrYs7QKQe2omRk.woff2) format('woff2'), + url(https://yastatic.net/adv-www/_/pUcnOdRwl83MvPPzrNomhyletnA.woff) format('woff'), + url(https://yastatic.net/adv-www/_/vNFEmXOcGYKJ4AAidUprHWoXrLU.ttf) format('truetype'), + url(https://yastatic.net/adv-www/_/0w7OcWZM_QLP8x-LQUXFOgXO6dE.svg#YandexSansTextWeb-Bold) format('svg'); + font-weight: 700; + font-style: normal; + font-stretch: normal +} + +@font-face { + font-family: 'Yandex Sans Text Web'; + src: url(https://yastatic.net/adv-www/_/LI6l3L2RqcgxBe2pXmuUha37czQ.eot); + src: url(https://yastatic.net/adv-www/_/LI6l3L2RqcgxBe2pXmuUha37czQ.eot?#iefix) format('embedded-opentype'), + url(https://yastatic.net/adv-www/_/z3MYElcut0R2MF_Iw1RDNrstgYs.woff2) format('woff2'), + url(https://yastatic.net/adv-www/_/1jvKJ_-hCXl3s7gmFl-y_-UHTaI.woff) format('woff'), + url(https://yastatic.net/adv-www/_/9nzjfpCR2QHvK1EzHpDEIoVFGuY.ttf) format('truetype'), + url(https://yastatic.net/adv-www/_/gwyBTpxSwkFCF1looxqs6JokKls.svg#YandexSansTextWeb-Regular) format('svg'); + font-weight: 400; + font-style: normal; + font-stretch: normal +} + +@font-face { + font-family: 'Yandex Sans Text Web'; + src: url(https://yastatic.net/adv-www/_/ayAFYoY8swgBLhq_I56tKj2JftU.eot); + src: url(https://yastatic.net/adv-www/_/ayAFYoY8swgBLhq_I56tKj2JftU.eot?#iefix) format('embedded-opentype'), + url(https://yastatic.net/adv-www/_/lGQcYklLVV0hyvz1HFmFsUTj8_0.woff2) format('woff2'), + url(https://yastatic.net/adv-www/_/f0AAJ9GJ4iiwEmhG-7PWMHk6vUY.woff) format('woff'), + url(https://yastatic.net/adv-www/_/4UDe4nlVvgEJ-VmLWNVq3SxCsA.ttf) format('truetype'), + url(https://yastatic.net/adv-www/_/EKLr1STNokPqxLAQa_RyN82pL98.svg#YandexSansTextWeb-Light) format('svg'); + font-weight: 300; + font-style: normal; + font-stretch: normal +} + +@font-face { + font-family: 'Yandex Sans Display Web'; + src: url(https://yastatic.net/adv-www/_/H63jN0veW07XQUIA2317lr9UIm8.eot); + src: url(https://yastatic.net/adv-www/_/H63jN0veW07XQUIA2317lr9UIm8.eot?#iefix) format('embedded-opentype'), + url(https://yastatic.net/adv-www/_/sUYVCPUAQE7ExrvMS7FoISoO83s.woff2) format('woff2'), + url(https://yastatic.net/adv-www/_/v2Sve_obH3rKm6rKrtSQpf-eB7U.woff) format('woff'), + url(https://yastatic.net/adv-www/_/PzD8hWLMunow5i3RfJ6WQJAL7aI.ttf) format('truetype'), + url(https://yastatic.net/adv-www/_/lF_KG5g4tpQNlYIgA0e77fBSZ5s.svg#YandexSansDisplayWeb-Regular) format('svg'); + font-weight: 400; + font-style: normal; + font-stretch: normal +} + +@font-face { + font-family: 'Yandex Sans Display Web'; + src: url(https://yastatic.net/adv-www/_/g8_MyyKVquSZ3xEL6tarK__V9Vw.eot); + src: url(https://yastatic.net/adv-www/_/g8_MyyKVquSZ3xEL6tarK__V9Vw.eot?#iefix) format('embedded-opentype'), + url(https://yastatic.net/adv-www/_/LGiRvlfqQHlWR9YKLhsw5e7KGNA.woff2) format('woff2'), + url(https://yastatic.net/adv-www/_/40vXwNl4eYYMgteIVgLP49dwmfc.woff) format('woff'), + url(https://yastatic.net/adv-www/_/X6zG5x_wO8-AtwJ-vDLJcKC5228.ttf) format('truetype'), + url(https://yastatic.net/adv-www/_/ZKhaR0m08c8CRRL77GtFKoHcLYA.svg#YandexSansDisplayWeb-Light) format('svg'); + font-weight: 300; + font-style: normal; + font-stretch: normal +} + +body { + font-family: 'Yandex Sans Text Web'; +} diff --git a/docs/mkdocs-material-theme/partials/nav.html b/docs/mkdocs-material-theme/partials/nav.html index 60b55284f08..0878f18ec80 100644 --- a/docs/mkdocs-material-theme/partials/nav.html +++ b/docs/mkdocs-material-theme/partials/nav.html @@ -7,16 +7,16 @@
  • diff --git a/docs/mkdocs_en.yml b/docs/mkdocs_en.yml index 2860049c174..59b500c6c98 100644 --- a/docs/mkdocs_en.yml +++ b/docs/mkdocs_en.yml @@ -8,6 +8,9 @@ repo_name: 'yandex/ClickHouse' repo_url: 'https://github.com/yandex/ClickHouse/' edit_uri: 'edit/master/docs/en' +extra_css: + - assets/stylesheets/yandex_fonts.css + theme: name: null custom_dir: 'mkdocs-material-theme' @@ -17,9 +20,9 @@ theme: palette: primary: 'white' accent: 'white' - font: - text: Roboto - code: Roboto Mono + font: false +# text: Roboto +# code: Roboto Mono logo: 'images/logo.svg' favicon: 'assets/images/favicon.ico' include_search_page: false diff --git a/docs/mkdocs_en_single_page.yml b/docs/mkdocs_en_single_page.yml index 4f8f8fbacc9..15088124fc3 100644 --- a/docs/mkdocs_en_single_page.yml +++ b/docs/mkdocs_en_single_page.yml @@ -1,12 +1,15 @@ site_name: ClickHouse docs docs_dir: en_single_page -site_dir: build/docs/en/single_page +site_dir: build/docs/en/single use_directory_urls: false repo_name: 'yandex/ClickHouse' repo_url: 'https://github.com/yandex/ClickHouse/' +extra_css: + - assets/stylesheets/yandex_fonts.css + theme: name: null custom_dir: 'mkdocs-material-theme' @@ -16,9 +19,9 @@ theme: palette: primary: 'white' accent: 'white' - font: - text: Roboto - code: Roboto Mono + font: false +# text: Roboto +# code: Roboto Mono logo: 'images/logo.svg' favicon: 'assets/images/favicon.ico' include_search_page: false diff --git a/docs/mkdocs_ru.yml b/docs/mkdocs_ru.yml index 4b2ff626919..3d16b0526ed 100644 --- a/docs/mkdocs_ru.yml +++ b/docs/mkdocs_ru.yml @@ -8,6 +8,9 @@ repo_name: 'yandex/ClickHouse' repo_url: 'https://github.com/yandex/ClickHouse/' edit_uri: 'edit/master/docs/ru' +extra_css: + - assets/stylesheets/yandex_fonts.css + theme: name: null custom_dir: 'mkdocs-material-theme' @@ -17,9 +20,9 @@ theme: palette: primary: 'white' accent: 'white' - font: - text: Roboto - code: Roboto Mono + font: false +# text: Roboto +# code: Roboto Mono logo: 'images/logo.svg' favicon: 'assets/images/favicon.ico' include_search_page: false diff --git a/docs/mkdocs_ru_single_page.yml b/docs/mkdocs_ru_single_page.yml index 4628753a3c6..9fefab45e0b 100644 --- a/docs/mkdocs_ru_single_page.yml +++ b/docs/mkdocs_ru_single_page.yml @@ -1,12 +1,15 @@ site_name: Документация ClickHouse docs_dir: ru_single_page -site_dir: build/docs/ru/single_page +site_dir: build/docs/ru/single use_directory_urls: false repo_name: 'yandex/ClickHouse' repo_url: 'https://github.com/yandex/ClickHouse/' +extra_css: + - assets/stylesheets/yandex_fonts.css + theme: name: null custom_dir: 'mkdocs-material-theme' @@ -16,9 +19,9 @@ theme: palette: primary: 'white' accent: 'white' - font: - text: Roboto - code: Roboto Mono + font: false +# text: Roboto +# code: Roboto Mono logo: 'images/logo.svg' favicon: 'assets/images/favicon.ico' include_search_page: false diff --git a/docs/ru/table_engines/distributed.md b/docs/ru/table_engines/distributed.md index 20d9bb40daa..3a0fbca5533 100644 --- a/docs/ru/table_engines/distributed.md +++ b/docs/ru/table_engines/distributed.md @@ -1,6 +1,6 @@ -# Distributed (Схема шардирования) +# Distributed **Движок Distributed не хранит данные самостоятельно**, а позволяет обрабатывать запросы распределённо, на нескольких серверах. Чтение автоматически распараллеливается. При чтении будут использованы индексы таблиц на удалённых серверах, если есть. diff --git a/docs/ru/table_engines/replication.md b/docs/ru/table_engines/replication.md index 99c37a8cfb3..f76f7644a77 100644 --- a/docs/ru/table_engines/replication.md +++ b/docs/ru/table_engines/replication.md @@ -2,16 +2,18 @@ # Репликация данных -## ReplicatedMergeTree +## ReplicatedAggregatingMergeTree ## ReplicatedCollapsingMergeTree -## ReplicatedAggregatingMergeTree +## ReplicatedGraphiteMergeTree + +## ReplicatedMergeTree + +## ReplicatedReplacingMergeTree ## ReplicatedSummingMergeTree -## ReplicatedGraphiteMergeTree - Репликация поддерживается только для таблиц семейства MergeTree. Репликация работает на уровне отдельных таблиц, а не всего сервера. То есть, на сервере могут быть расположены одновременно реплицируемые и не реплицируемые таблицы. Реплицируются INSERT, ALTER (см. подробности в описании запроса ALTER). Реплицируются сжатые данные, а не тексты запросов. diff --git a/libs/libcommon/CMakeLists.txt b/libs/libcommon/CMakeLists.txt index 0b150dd4413..ee6e6af543e 100644 --- a/libs/libcommon/CMakeLists.txt +++ b/libs/libcommon/CMakeLists.txt @@ -20,7 +20,7 @@ endif () add_library (common ${SPLIT_SHARED} src/DateLUT.cpp src/DateLUTImpl.cpp - src/exp10.c + src/preciseExp10.c src/shift10.cpp src/mremap.cpp src/JSON.cpp @@ -34,7 +34,7 @@ add_library (common ${SPLIT_SHARED} include/common/LocalDate.h include/common/LocalDateTime.h include/common/ErrorHandlers.h - include/common/exp10.h + include/common/preciseExp10.h include/common/shift10.h include/common/intExp.h include/common/mremap.h diff --git a/libs/libcommon/include/common/iostream_debug_helpers.h b/libs/libcommon/include/common/iostream_debug_helpers.h index e590f8e2ff6..09ab4de83e6 100644 --- a/libs/libcommon/include/common/iostream_debug_helpers.h +++ b/libs/libcommon/include/common/iostream_debug_helpers.h @@ -15,13 +15,14 @@ #include // TODO: https://stackoverflow.com/questions/16464032/how-to-enhance-this-variable-dumping-debug-macro-to-be-variadic -#define DUMPS(VAR) #VAR " = " << VAR +#define DUMPS(VAR) #VAR " = " << (VAR) #define DUMPHEAD std::cerr << __FILE__ << ":" << __LINE__ << " " #define DUMP(V1) DUMPHEAD << DUMPS(V1) << "\n"; #define DUMP2(V1, V2) DUMPHEAD << DUMPS(V1) << ", " << DUMPS(V2) << "\n"; #define DUMP3(V1, V2, V3) DUMPHEAD << DUMPS(V1) << ", " << DUMPS(V2) << ", " << DUMPS(V3) << "\n"; #define DUMP4(V1, V2, V3, V4) DUMPHEAD << DUMPS(V1) << ", " << DUMPS(V2) << ", " << DUMPS(V3)<< ", " << DUMPS(V4) << "\n"; #define DUMP5(V1, V2, V3, V4, V5) DUMPHEAD << DUMPS(V1) << ", " << DUMPS(V2) << ", " << DUMPS(V3)<< ", " << DUMPS(V4) << ", " << DUMPS(V5) << "\n"; +#define DUMP6(V1, V2, V3, V4, V5, V6) DUMPHEAD << DUMPS(V1) << ", " << DUMPS(V2) << ", " << DUMPS(V3)<< ", " << DUMPS(V4) << ", " << DUMPS(V5) << ", " << DUMPS(V6) << "\n"; namespace std diff --git a/libs/libcommon/include/common/exp10.h b/libs/libcommon/include/common/preciseExp10.h similarity index 61% rename from libs/libcommon/include/common/exp10.h rename to libs/libcommon/include/common/preciseExp10.h index 9ed3c4765eb..9b757a3a57d 100644 --- a/libs/libcommon/include/common/exp10.h +++ b/libs/libcommon/include/common/preciseExp10.h @@ -4,6 +4,8 @@ * For example, exp10(3) gives 1000.0000000000001 * despite the fact that 1000 is exactly representable in double and float. * Better to always use implementation from MUSL. + * + * Note: the function names are different to avoid confusion with symbols from the system libm. */ #include /// for __THROW @@ -16,9 +18,9 @@ extern "C" { -double exp10(double x) __THROW; -double pow10(double x) __THROW; -float exp10f(float x) __THROW; -float pow10f(float x) __THROW; +double preciseExp10(double x) __THROW; +double precisePow10(double x) __THROW; +float preciseExp10f(float x) __THROW; +float precisePow10f(float x) __THROW; } diff --git a/libs/libcommon/src/JSON.cpp b/libs/libcommon/src/JSON.cpp index ab8e71f22fe..818dfccece6 100644 --- a/libs/libcommon/src/JSON.cpp +++ b/libs/libcommon/src/JSON.cpp @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include @@ -147,7 +147,7 @@ static double readFloatText(const char * buf, const char * end) { ++buf; Int32 exponent = readIntText(buf, end); - x *= exp10(exponent); + x *= preciseExp10(exponent); run = false; break; diff --git a/libs/libcommon/src/exp10.c b/libs/libcommon/src/preciseExp10.c similarity index 97% rename from libs/libcommon/src/exp10.c rename to libs/libcommon/src/preciseExp10.c index 887d543bdda..62793ff66bb 100644 --- a/libs/libcommon/src/exp10.c +++ b/libs/libcommon/src/preciseExp10.c @@ -172,7 +172,7 @@ obstacle to adoption, that text has been removed. #include #include -double exp10(double x) +double preciseExp10(double x) { static const double p10[] = { 1e-15, 1e-14, 1e-13, 1e-12, 1e-11, 1e-10, @@ -191,7 +191,7 @@ double exp10(double x) return pow(10.0, x); } -float exp10f(float x) +float preciseExp10f(float x) { static const float p10[] = { 1e-7f, 1e-6f, 1e-5f, 1e-4f, 1e-3f, 1e-2f, 1e-1f, @@ -208,12 +208,12 @@ float exp10f(float x) return exp2(3.32192809488736234787031942948939 * x); } -double pow10(double x) +double precisePow10(double x) { - return exp10(x); + return preciseExp10(x); } -float pow10f(float x) +float precisePow10f(float x) { - return exp10f(x); + return preciseExp10f(x); } diff --git a/libs/libmysqlxx/include/mysqlxx/Value.h b/libs/libmysqlxx/include/mysqlxx/Value.h index 581153b9e90..04944088208 100644 --- a/libs/libmysqlxx/include/mysqlxx/Value.h +++ b/libs/libmysqlxx/include/mysqlxx/Value.h @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include diff --git a/libs/libmysqlxx/src/Value.cpp b/libs/libmysqlxx/src/Value.cpp index 9492d4398ca..87cc0d15f0f 100644 --- a/libs/libmysqlxx/src/Value.cpp +++ b/libs/libmysqlxx/src/Value.cpp @@ -127,7 +127,7 @@ double Value::readFloatText(const char * buf, size_t length) const { ++buf; Int32 exponent = readIntText(buf, end - buf); - x *= exp10(exponent); + x *= preciseExp10(exponent); if (negative) x = -x; return x; diff --git a/website/nginx/default.conf b/website/nginx/default.conf index 671b86bcd56..e4e1bb297b6 100644 --- a/website/nginx/default.conf +++ b/website/nginx/default.conf @@ -1,6 +1,6 @@ server { listen 80 default; - listen [::]:80 default ipv6only=on; + listen [::]:80 default ipv6only=on; server_name localhost clickhouse.yandex test.clickhouse.yandex; root /usr/share/nginx/html; @@ -16,6 +16,10 @@ server { rewrite ^/docs/$ https://clickhouse.yandex/docs/en/ permanent; rewrite ^/reference_en.html$ https://clickhouse.yandex/docs/en/single/ permanent; rewrite ^/reference_ru.html$ https://clickhouse.yandex/docs/ru/single/ permanent; + + if ( $uri !~ .*/index.html ){ + rewrite ^/docs/(.*)/(.+)\.html$ /docs/$1/$2/ permanent; + } } server {