From 07f0f0c1dcb28fec70edc5c422cfa24e41e9b1b1 Mon Sep 17 00:00:00 2001 From: dtenwolde Date: Tue, 4 Jul 2023 10:56:13 +0200 Subject: [PATCH] Format fix Adding alter table test --- .../duckdb/common/compressed_sparse_row.hpp | 2 +- .../parsed_data/create_property_graph_info.hpp | 4 ++-- src/parser/parser.cpp | 14 +++++++------- .../statement/transform_create_property_graph.cpp | 5 +++-- src/planner/logical_operator.cpp | 10 +++++----- src/planner/planner.cpp | 2 +- 6 files changed, 19 insertions(+), 18 deletions(-) diff --git a/src/include/duckdb/common/compressed_sparse_row.hpp b/src/include/duckdb/common/compressed_sparse_row.hpp index aa7776db34b0..a9a442da916a 100644 --- a/src/include/duckdb/common/compressed_sparse_row.hpp +++ b/src/include/duckdb/common/compressed_sparse_row.hpp @@ -24,6 +24,6 @@ class CSR { bool initialized_e = false; bool initialized_w = false; - size_t vsize; + size_t vsize; }; } // namespace duckdb diff --git a/src/include/duckdb/parser/parsed_data/create_property_graph_info.hpp b/src/include/duckdb/parser/parsed_data/create_property_graph_info.hpp index 43803c0d7b6c..120dc8e3c6b3 100644 --- a/src/include/duckdb/parser/parsed_data/create_property_graph_info.hpp +++ b/src/include/duckdb/parser/parsed_data/create_property_graph_info.hpp @@ -37,11 +37,11 @@ struct CreatePropertyGraphInfo : public CreateInfo { public: // string ToString() const; // bool Equals(const BaseExpression *other_p) const; -// void SerializeInternal(Serializer &serializer) const override; + // void SerializeInternal(Serializer &serializer) const override; unique_ptr Copy() const override; //! Serializes a blob into a CreatePropertyGraphInfo - void SerializeInternal(Serializer &serializer) const override; + void SerializeInternal(Serializer &serializer) const override; //! Deserializes a blob back into a CreatePropertyGraphInfo static unique_ptr Deserialize(FieldReader &reader); }; diff --git a/src/parser/parser.cpp b/src/parser/parser.cpp index 170fded4b709..3b5b58f52af6 100644 --- a/src/parser/parser.cpp +++ b/src/parser/parser.cpp @@ -193,8 +193,8 @@ void Parser::ParseQuery(const string &query) { auto query_statements = SplitQueryStringIntoStatements(query); for (auto const &query_statement : query_statements) { bool parse_success = false; - string another_parser_error; - int another_parser_error_location; + string another_parser_error; + int another_parser_error_location; { PostgresParser another_parser; another_parser.Parse(query_statement); @@ -208,9 +208,9 @@ void Parser::ParseQuery(const string &query) { } transformer.TransformParseTree(another_parser.parse_tree, statements); } else { - another_parser_error = another_parser.error_message; - another_parser_error_location = another_parser.error_location; - } + another_parser_error = another_parser.error_message; + another_parser_error_location = another_parser.error_location; + } } if (!parse_success) { // let extensions parse the statement which DuckDB failed to parse @@ -233,8 +233,8 @@ void Parser::ParseQuery(const string &query) { } } if (!parsed_single_statement) { - parser_error = QueryErrorContext::Format(query, - another_parser_error,another_parser_error_location - 1); + parser_error = + QueryErrorContext::Format(query, another_parser_error, another_parser_error_location - 1); throw ParserException(parser_error); } } diff --git a/src/parser/transform/statement/transform_create_property_graph.cpp b/src/parser/transform/statement/transform_create_property_graph.cpp index 00aeb6f4da19..9f38520a90b8 100644 --- a/src/parser/transform/statement/transform_create_property_graph.cpp +++ b/src/parser/transform/statement/transform_create_property_graph.cpp @@ -32,8 +32,9 @@ Transformer::TransformPropertyGraphTable(duckdb_libpgquery::PGPropertyGraphTable all_columns = true; continue; } -// auto column_alias __attribute__((unused)) = -// reinterpret_cast(column_optional_as->head->next->data.ptr_value); + // auto column_alias __attribute__((unused)) = + // reinterpret_cast(column_optional_as->head->next->data.ptr_value); // TODO // - Change this to support the optional as // Looking at the next element of column_optional_as, which is a linked list diff --git a/src/planner/logical_operator.cpp b/src/planner/logical_operator.cpp index c3fc2f4e9ed2..d1d3462336b0 100644 --- a/src/planner/logical_operator.cpp +++ b/src/planner/logical_operator.cpp @@ -344,11 +344,11 @@ unique_ptr LogicalOperator::Deserialize(Deserializer &deseriali case LogicalOperatorType::LOGICAL_TRANSACTION: case LogicalOperatorType::LOGICAL_DROP: case LogicalOperatorType::LOGICAL_DETACH: - result = LogicalSimple::Deserialize(state, reader); - break; - case LogicalOperatorType::LOGICAL_EXTENSION_OPERATOR: - result = LogicalExtensionOperator::Deserialize(state, reader); - break; + result = LogicalSimple::Deserialize(state, reader); + break; + case LogicalOperatorType::LOGICAL_EXTENSION_OPERATOR: + result = LogicalExtensionOperator::Deserialize(state, reader); + break; case LogicalOperatorType::LOGICAL_PIVOT: result = LogicalPivot::Deserialize(state, reader); break; diff --git a/src/planner/planner.cpp b/src/planner/planner.cpp index 607535d93c2c..bec13c631c5d 100644 --- a/src/planner/planner.cpp +++ b/src/planner/planner.cpp @@ -70,7 +70,7 @@ void Planner::CreatePlan(SQLStatement &statement) { throw; } } catch (std::exception &ex) { - throw; + throw; } this->properties = binder->properties; this->properties.parameter_count = parameter_count;