small changes

This commit is contained in:
Sabyanin Maxim 2018-11-13 22:17:40 +03:00
parent 6296f58186
commit 3e4c981db2
3 changed files with 9 additions and 4 deletions

View File

@ -385,7 +385,7 @@ ColumnsDescription InterpreterCreateQuery::getColumnsDescription(const ASTCreate
{
FillColumnPresenceInTableDeclaration(res.presences, storage_def->order_by, PresenceType::InOrderKey);
FillColumnPresenceInTableDeclaration(res.presences, storage_def->partition_by, PresenceType::InPartitionKey);
FillColumnPresenceInTableDeclaration(res.presences, storage_def->sample_by, PresenceType::InSamplingKey);
FillColumnPresenceInTableDeclaration(res.presences, storage_def->sample_by, PresenceType::InSampleKey);
}
if (res.ordinary.size() + res.materialized.size() == 0)

View File

@ -22,9 +22,9 @@ enum class PresenceType : int32_t
class ColumnPresence
{
public:
bool Get(PresenceType type)
bool Get(PresenceType type) const
{
return static_cast<bool>(presenceMask & static_cast<int32_t>(type));
return (presenceMask & static_cast<int32_t>(type)) != 0;
}
void Set(PresenceType type)
@ -32,6 +32,11 @@ public:
presenceMask |= static_cast<int32_t>(type);
}
void Remove(PresenceType type)
{
presenceMask &= ~static_cast<int32_t>(type);
}
private:
int32_t presenceMask = 0;
};

View File

@ -252,7 +252,7 @@ protected:
}
else
{
src_index += 2;
src_index += 2; // TODO: подумать над этим
}
const auto table_it = context.getTable(database_name, table_name);