@@ -2980,7 +2980,7 @@ void from_json(const json& j, CacheQuotaRequirement& p) {
29802980}
29812981} // namespace facebook::presto::protocol
29822982namespace facebook ::presto::protocol {
2983- // Loosly copied this here from NLOHMANN_JSON_SERIALIZE_ENUM()
2983+ // Loosely copied this here from NLOHMANN_JSON_SERIALIZE_ENUM()
29842984
29852985// NOLINTNEXTLINE: cppcoreguidelines-avoid-c-arrays
29862986static const std::pair<ExchangeEncoding, json> ExchangeEncoding_enum_table[] =
@@ -5312,261 +5312,6 @@ void from_json(const json& j, ExchangeNodeType& e) {
53125312}
53135313} // namespace facebook::presto::protocol
53145314namespace facebook ::presto::protocol {
5315- // Loosely copied this here from NLOHMANN_JSON_SERIALIZE_ENUM()
5316-
5317- // NOLINTNEXTLINE: cppcoreguidelines-avoid-c-arrays
5318- static const std::pair<ExchangeEncoding, json> ExchangeEncoding_enum_table[] =
5319- { // NOLINT: cert-err58-cpp
5320- {ExchangeEncoding::COLUMNAR, " COLUMNAR" },
5321- {ExchangeEncoding::ROW_WISE, " ROW_WISE" }};
5322- void to_json (json& j, const ExchangeEncoding& e) {
5323- static_assert (
5324- std::is_enum<ExchangeEncoding>::value,
5325- " ExchangeEncoding must be an enum!" );
5326- const auto * it = std::find_if (
5327- std::begin (ExchangeEncoding_enum_table),
5328- std::end (ExchangeEncoding_enum_table),
5329- [e](const std::pair<ExchangeEncoding, json>& ej_pair) -> bool {
5330- return ej_pair.first == e;
5331- });
5332- j = ((it != std::end (ExchangeEncoding_enum_table))
5333- ? it
5334- : std::begin (ExchangeEncoding_enum_table))
5335- ->second ;
5336- }
5337- void from_json (const json& j, ExchangeEncoding& e) {
5338- static_assert (
5339- std::is_enum<ExchangeEncoding>::value,
5340- " ExchangeEncoding must be an enum!" );
5341- const auto * it = std::find_if (
5342- std::begin (ExchangeEncoding_enum_table),
5343- std::end (ExchangeEncoding_enum_table),
5344- [&j](const std::pair<ExchangeEncoding, json>& ej_pair) -> bool {
5345- return ej_pair.second == j;
5346- });
5347- e = ((it != std::end (ExchangeEncoding_enum_table))
5348- ? it
5349- : std::begin (ExchangeEncoding_enum_table))
5350- ->first ;
5351- }
5352- } // namespace facebook::presto::protocol
5353- namespace facebook ::presto::protocol {
5354- void to_json (json& j, const std::shared_ptr<ConnectorPartitioningHandle>& p) {
5355- if (p == nullptr ) {
5356- return ;
5357- }
5358- String type = p->_type ;
5359-
5360- if (type == " $remote" ) {
5361- j = *std::static_pointer_cast<SystemPartitioningHandle>(p);
5362- return ;
5363- }
5364- getConnectorProtocol (type).to_json (j, p);
5365- }
5366-
5367- void from_json (const json& j, std::shared_ptr<ConnectorPartitioningHandle>& p) {
5368- String type;
5369- try {
5370- type = p->getSubclassKey (j);
5371- } catch (json::parse_error& e) {
5372- throw ParseError (std::string (e.what ()) + " ConnectorPartitioningHandle" );
5373- }
5374-
5375- if (type == " $remote" ) {
5376- auto k = std::make_shared<SystemPartitioningHandle>();
5377- j.get_to (*k);
5378- p = k;
5379- return ;
5380- }
5381- getConnectorProtocol (type).from_json (j, p);
5382- }
5383- } // namespace facebook::presto::protocol
5384- namespace facebook ::presto::protocol {
5385-
5386- void to_json (json& j, const PartitioningHandle& p) {
5387- j = json::object ();
5388- to_json_key (
5389- j,
5390- " connectorId" ,
5391- p.connectorId ,
5392- " PartitioningHandle" ,
5393- " ConnectorId" ,
5394- " connectorId" );
5395- to_json_key (
5396- j,
5397- " transactionHandle" ,
5398- p.transactionHandle ,
5399- " PartitioningHandle" ,
5400- " ConnectorTransactionHandle" ,
5401- " transactionHandle" );
5402- to_json_key (
5403- j,
5404- " connectorHandle" ,
5405- p.connectorHandle ,
5406- " PartitioningHandle" ,
5407- " ConnectorPartitioningHandle" ,
5408- " connectorHandle" );
5409- }
5410-
5411- void from_json (const json& j, PartitioningHandle& p) {
5412- from_json_key (
5413- j,
5414- " connectorId" ,
5415- p.connectorId ,
5416- " PartitioningHandle" ,
5417- " ConnectorId" ,
5418- " connectorId" );
5419- from_json_key (
5420- j,
5421- " transactionHandle" ,
5422- p.transactionHandle ,
5423- " PartitioningHandle" ,
5424- " ConnectorTransactionHandle" ,
5425- " transactionHandle" );
5426- from_json_key (
5427- j,
5428- " connectorHandle" ,
5429- p.connectorHandle ,
5430- " PartitioningHandle" ,
5431- " ConnectorPartitioningHandle" ,
5432- " connectorHandle" );
5433- }
5434- } // namespace facebook::presto::protocol
5435- namespace facebook ::presto::protocol {
5436-
5437- void to_json (json& j, const Partitioning& p) {
5438- j = json::object ();
5439- to_json_key (
5440- j, " handle" , p.handle , " Partitioning" , " PartitioningHandle" , " handle" );
5441- to_json_key (
5442- j,
5443- " arguments" ,
5444- p.arguments ,
5445- " Partitioning" ,
5446- " List<std::shared_ptr<RowExpression>>" ,
5447- " arguments" );
5448- }
5449-
5450- void from_json (const json& j, Partitioning& p) {
5451- from_json_key (
5452- j, " handle" , p.handle , " Partitioning" , " PartitioningHandle" , " handle" );
5453- from_json_key (
5454- j,
5455- " arguments" ,
5456- p.arguments ,
5457- " Partitioning" ,
5458- " List<std::shared_ptr<RowExpression>>" ,
5459- " arguments" );
5460- }
5461- } // namespace facebook::presto::protocol
5462- namespace facebook ::presto::protocol {
5463-
5464- void to_json (json& j, const PartitioningScheme& p) {
5465- j = json::object ();
5466- to_json_key (
5467- j,
5468- " partitioning" ,
5469- p.partitioning ,
5470- " PartitioningScheme" ,
5471- " Partitioning" ,
5472- " partitioning" );
5473- to_json_key (
5474- j,
5475- " outputLayout" ,
5476- p.outputLayout ,
5477- " PartitioningScheme" ,
5478- " List<VariableReferenceExpression>" ,
5479- " outputLayout" );
5480- to_json_key (
5481- j,
5482- " hashColumn" ,
5483- p.hashColumn ,
5484- " PartitioningScheme" ,
5485- " VariableReferenceExpression" ,
5486- " hashColumn" );
5487- to_json_key (
5488- j,
5489- " replicateNullsAndAny" ,
5490- p.replicateNullsAndAny ,
5491- " PartitioningScheme" ,
5492- " bool" ,
5493- " replicateNullsAndAny" );
5494- to_json_key (
5495- j,
5496- " scaleWriters" ,
5497- p.scaleWriters ,
5498- " PartitioningScheme" ,
5499- " bool" ,
5500- " scaleWriters" );
5501- to_json_key (
5502- j,
5503- " encoding" ,
5504- p.encoding ,
5505- " PartitioningScheme" ,
5506- " ExchangeEncoding" ,
5507- " encoding" );
5508- to_json_key (
5509- j,
5510- " bucketToPartition" ,
5511- p.bucketToPartition ,
5512- " PartitioningScheme" ,
5513- " List<int>" ,
5514- " bucketToPartition" );
5515- }
5516-
5517- void from_json (const json& j, PartitioningScheme& p) {
5518- from_json_key (
5519- j,
5520- " partitioning" ,
5521- p.partitioning ,
5522- " PartitioningScheme" ,
5523- " Partitioning" ,
5524- " partitioning" );
5525- from_json_key (
5526- j,
5527- " outputLayout" ,
5528- p.outputLayout ,
5529- " PartitioningScheme" ,
5530- " List<VariableReferenceExpression>" ,
5531- " outputLayout" );
5532- from_json_key (
5533- j,
5534- " hashColumn" ,
5535- p.hashColumn ,
5536- " PartitioningScheme" ,
5537- " VariableReferenceExpression" ,
5538- " hashColumn" );
5539- from_json_key (
5540- j,
5541- " replicateNullsAndAny" ,
5542- p.replicateNullsAndAny ,
5543- " PartitioningScheme" ,
5544- " bool" ,
5545- " replicateNullsAndAny" );
5546- from_json_key (
5547- j,
5548- " scaleWriters" ,
5549- p.scaleWriters ,
5550- " PartitioningScheme" ,
5551- " bool" ,
5552- " scaleWriters" );
5553- from_json_key (
5554- j,
5555- " encoding" ,
5556- p.encoding ,
5557- " PartitioningScheme" ,
5558- " ExchangeEncoding" ,
5559- " encoding" );
5560- from_json_key (
5561- j,
5562- " bucketToPartition" ,
5563- p.bucketToPartition ,
5564- " PartitioningScheme" ,
5565- " List<int>" ,
5566- " bucketToPartition" );
5567- }
5568- } // namespace facebook::presto::protocol
5569- namespace facebook ::presto::protocol {
55705315ExchangeNode::ExchangeNode () noexcept {
55715316 _type = " com.facebook.presto.sql.planner.plan.ExchangeNode" ;
55725317}
@@ -5659,7 +5404,6 @@ void from_json(const json& j, ExchangeNode& p) {
56595404}
56605405} // namespace facebook::presto::protocol
56615406namespace facebook ::presto::protocol {
5662- // Loosely copied this here from NLOHMANN_JSON_SERIALIZE_ENUM()
56635407ExecuteProcedureHandle::ExecuteProcedureHandle () noexcept {
56645408 _type = " ExecuteProcedureHandle" ;
56655409}
@@ -5716,7 +5460,7 @@ void from_json(const json& j, ExecuteProcedureHandle& p) {
57165460}
57175461} // namespace facebook::presto::protocol
57185462namespace facebook ::presto::protocol {
5719- // Loosly copied this here from NLOHMANN_JSON_SERIALIZE_ENUM()
5463+ // Loosely copied this here from NLOHMANN_JSON_SERIALIZE_ENUM()
57205464
57215465// NOLINTNEXTLINE: cppcoreguidelines-avoid-c-arrays
57225466static const std::pair<ErrorCause, json> ErrorCause_enum_table[] =
0 commit comments