mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-28 20:50:49 +00:00
review fixes
This commit is contained in:
parent
2ee49c9d68
commit
d15d6e1661
@ -9,11 +9,6 @@
|
||||
namespace DB
|
||||
{
|
||||
|
||||
Field IColumn::get(size_t n) const
|
||||
{
|
||||
return (*this)[n];
|
||||
}
|
||||
|
||||
String IColumn::dumpStructure() const
|
||||
{
|
||||
WriteBufferFromOwnString res;
|
||||
|
@ -70,7 +70,6 @@ public:
|
||||
/// Returns value of n-th element in universal Field representation.
|
||||
/// Is used in rare cases, since creation of Field instance is expensive usually.
|
||||
virtual Field operator[](size_t n) const = 0;
|
||||
Field get(size_t n) const;
|
||||
|
||||
/// Like the previous one, but avoids extra copying if Field is in a container, for example.
|
||||
virtual void get(size_t n, Field & res) const = 0;
|
||||
|
@ -617,7 +617,7 @@ void ActionsMatcher::visit(const ASTLiteral & literal, const ASTPtr & /* ast */,
|
||||
&& existing_column->column
|
||||
&& isColumnConst(*existing_column->column)
|
||||
&& existing_column->column->size() == 1
|
||||
&& existing_column->column->get(0) == value)
|
||||
&& existing_column->column->operator[](0) == value)
|
||||
{
|
||||
const_cast<ASTLiteral &>(literal).unique_column_name = default_name;
|
||||
}
|
||||
|
@ -875,8 +875,7 @@ void SelectQueryExpressionAnalyzer::appendProjectResult(ExpressionActionsChain &
|
||||
* names and identifiers for columns. This code is a workaround for
|
||||
* a particular subclass of problems, and not a proper solution.
|
||||
*/
|
||||
if (auto as_literal = ast->as<ASTLiteral>();
|
||||
as_literal)
|
||||
if (auto as_literal = ast->as<ASTLiteral>())
|
||||
{
|
||||
source_name = as_literal->unique_column_name;
|
||||
assert(!source_name.empty());
|
||||
|
Loading…
Reference in New Issue
Block a user