Skip to content

Commit 7ead747

Browse files
committed
Fix getting name of Object type and fix style check
1 parent 38cb5d7 commit 7ead747

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

src/DataTypes/DataTypeObject.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include <Interpreters/Context.h>
2525
#include <Core/Settings.h>
2626
#include <IO/Operators.h>
27+
#include <boost/algorithm/string.hpp>
2728

2829
#include "config.h"
2930

@@ -195,7 +196,11 @@ String DataTypeObject::doGetName() const
195196
for (const auto & path : sorted_typed_paths)
196197
{
197198
write_separator();
198-
out << backQuoteIfNeed(path) << " " << typed_paths.at(path)->getName();
199+
/// We must quote path "SKIP" to avoid its confusion with SKIP keyword.
200+
if (boost::to_upper_copy(path) == "SKIP")
201+
out << backQuote(path) << " " << typed_paths.at(path)->getName();
202+
else
203+
out << backQuoteIfNeed(path) << " " << typed_paths.at(path)->getName();
199204
}
200205

201206
std::vector<String> sorted_skip_paths;

src/Parsers/ASTObjectTypeArgument.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ void ASTObjectTypedPathArgument::formatImpl(
3434
type->format(ostr, settings, state, frame);
3535
}
3636

37-
38-
3937
ASTPtr ASTObjectTypeArgument::clone() const
4038
{
4139
auto res = std::make_shared<ASTObjectTypeArgument>(*this);

0 commit comments

Comments
 (0)