mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-05 14:02:21 +00:00
rm unused
This commit is contained in:
parent
62d33f93c0
commit
06cc361075
@ -115,9 +115,6 @@ std::pair<bool, bool> ComparisonGraph::findPath(const size_t start, const size_t
|
|||||||
return {false, false};
|
return {false, false};
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//Poco::Logger::get("dists found").information(std::to_string(start) + " " + std::to_string(finish) + " : " + std::to_string(static_cast<int>(it->second)));
|
|
||||||
//Poco::Logger::get("dists found").information(graph.vertexes[start].asts.back()->dumpTree());
|
|
||||||
//Poco::Logger::get("dists found").information(graph.vertexes[finish].asts.back()->dumpTree());
|
|
||||||
return {true, it->second == Path::LESS || not_equal.contains({start, finish})};
|
return {true, it->second == Path::LESS || not_equal.contains({start, finish})};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -135,10 +132,6 @@ ComparisonGraph::CompareResult ComparisonGraph::compare(const ASTPtr & left, con
|
|||||||
Poco::Logger::get("Graph").information("not found");
|
Poco::Logger::get("Graph").information("not found");
|
||||||
Poco::Logger::get("Graph").information(std::to_string(left->getTreeHash().second));
|
Poco::Logger::get("Graph").information(std::to_string(left->getTreeHash().second));
|
||||||
Poco::Logger::get("Graph").information(std::to_string(right->getTreeHash().second));
|
Poco::Logger::get("Graph").information(std::to_string(right->getTreeHash().second));
|
||||||
/*for (const auto & [hash, id] : graph.ast_hash_to_component)
|
|
||||||
{
|
|
||||||
Poco::Logger::get("Graph MAP").information(std::to_string(hash.second) + " " + std::to_string(id));
|
|
||||||
}*/
|
|
||||||
{
|
{
|
||||||
const auto left_bound = getConstLowerBound(left);
|
const auto left_bound = getConstLowerBound(left);
|
||||||
const auto right_bound = getConstUpperBound(right);
|
const auto right_bound = getConstUpperBound(right);
|
||||||
@ -521,22 +514,6 @@ ComparisonGraph::Graph ComparisonGraph::BuildGraphFromAstsGraph(const Graph & as
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*for (size_t v = 0; v < result.vertexes.size(); ++v)
|
|
||||||
{
|
|
||||||
std::stringstream s;
|
|
||||||
for (const auto & atom : result.vertexes[v].asts)
|
|
||||||
{
|
|
||||||
s << atom->getTreeHash().second << " ";
|
|
||||||
}
|
|
||||||
s << "|";
|
|
||||||
for (const auto & atom : result.ast_hash_to_component)
|
|
||||||
{
|
|
||||||
s << atom.first.second << " -" << atom.second << " ";
|
|
||||||
}
|
|
||||||
|
|
||||||
Poco::Logger::get("Graph").information(s.str());
|
|
||||||
}*/
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -87,37 +87,6 @@ bool checkIfGroupAlwaysTrueFullMatch(const CNFQuery::OrGroup & group, const std:
|
|||||||
|
|
||||||
ComparisonGraph::CompareResult getExpectedCompare(const CNFQuery::AtomicFormula & atom)
|
ComparisonGraph::CompareResult getExpectedCompare(const CNFQuery::AtomicFormula & atom)
|
||||||
{
|
{
|
||||||
/*static const std::map<std::string, std::string> inverse_relations = {
|
|
||||||
{"equals", "notEquals"},
|
|
||||||
{"less", "greaterOrEquals"},
|
|
||||||
{"lessOrEquals", "greater"},
|
|
||||||
{"notEquals", "equals"},
|
|
||||||
{"greaterOrEquals", "less"},
|
|
||||||
{"greater", "lessOrEquals"},
|
|
||||||
};
|
|
||||||
|
|
||||||
static const std::map<std::string, ComparisonGraph::CompareResult> relation_to_compare = {
|
|
||||||
{"equals", ComparisonGraph::CompareResult::EQUAL},
|
|
||||||
{"less", ComparisonGraph::CompareResult::LESS},
|
|
||||||
{"lessOrEquals", ComparisonGraph::CompareResult::LESS_OR_EQUAL},
|
|
||||||
{"notEquals", ComparisonGraph::CompareResult::UNKNOWN},
|
|
||||||
{"greaterOrEquals", ComparisonGraph::CompareResult::GREATER_OR_EQUAL},
|
|
||||||
{"greater", ComparisonGraph::CompareResult::GREATER},
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
const auto * func = atom.ast->as<ASTFunction>();
|
|
||||||
if (func && inverse_relations.count(func->name))
|
|
||||||
{
|
|
||||||
std::string function_name = func->name;
|
|
||||||
if (atom.negative)
|
|
||||||
{
|
|
||||||
function_name = inverse_relations.at(func->name);
|
|
||||||
}
|
|
||||||
return relation_to_compare.at(function_name);
|
|
||||||
}
|
|
||||||
return ComparisonGraph::CompareResult::UNKNOWN;*/
|
|
||||||
|
|
||||||
const auto * func = atom.ast->as<ASTFunction>();
|
const auto * func = atom.ast->as<ASTFunction>();
|
||||||
if (func)
|
if (func)
|
||||||
{
|
{
|
||||||
|
@ -89,34 +89,6 @@ namespace
|
|||||||
|
|
||||||
ComparisonGraph::CompareResult getExpectedCompare(const CNFQuery::AtomicFormula & atom)
|
ComparisonGraph::CompareResult getExpectedCompare(const CNFQuery::AtomicFormula & atom)
|
||||||
{
|
{
|
||||||
/*static const std::map<std::string, std::string> inverse_relations = {
|
|
||||||
{"equals", "notEquals"},
|
|
||||||
{"less", "greaterOrEquals"},
|
|
||||||
{"lessOrEquals", "greater"},
|
|
||||||
{"notEquals", "equals"},
|
|
||||||
{"greaterOrEquals", "less"},
|
|
||||||
{"greater", "lessOrEquals"},
|
|
||||||
};
|
|
||||||
|
|
||||||
static const std::map<std::string, ComparisonGraph::CompareResult> relation_to_compare = {
|
|
||||||
{"equals", ComparisonGraph::CompareResult::EQUAL},
|
|
||||||
{"less", ComparisonGraph::CompareResult::LESS},
|
|
||||||
{"lessOrEquals", ComparisonGraph::CompareResult::LESS_OR_EQUAL},
|
|
||||||
{"notEquals", ComparisonGraph::CompareResult::UNKNOWN},
|
|
||||||
{"greaterOrEquals", ComparisonGraph::CompareResult::GREATER_OR_EQUAL},
|
|
||||||
{"greater", ComparisonGraph::CompareResult::GREATER},
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
const auto * func = atom.ast->as<ASTFunction>();
|
|
||||||
if (func && inverse_relations.count(func->name))
|
|
||||||
{
|
|
||||||
std::string function_name = func->name;
|
|
||||||
if (atom.negative)
|
|
||||||
function_name = inverse_relations.at(func->name);
|
|
||||||
return relation_to_compare.at(function_name);
|
|
||||||
}
|
|
||||||
return ComparisonGraph::CompareResult::UNKNOWN;*/
|
|
||||||
const auto * func = atom.ast->as<ASTFunction>();
|
const auto * func = atom.ast->as<ASTFunction>();
|
||||||
if (func)
|
if (func)
|
||||||
{
|
{
|
||||||
@ -212,23 +184,6 @@ bool MergeTreeIndexMergedCondition::mayBeTrueOnGranule(const MergeTreeIndexGranu
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*for (auto atom : or_group)
|
|
||||||
{
|
|
||||||
pushNotIn(atom);
|
|
||||||
for (size_t i = 0; i < values.size(); ++i)
|
|
||||||
if (values[i])
|
|
||||||
for (const auto & hypothesis_or_group : index_to_atomic_hypotheses[i])
|
|
||||||
{
|
|
||||||
if (hypothesis_or_group.size() == 1)
|
|
||||||
{
|
|
||||||
const auto & hypothesis_atom = *std::begin(hypothesis_or_group);
|
|
||||||
if (atom.ast->getTreeHash() == hypothesis_atom.ast->getTreeHash())
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
always_false = true;
|
always_false = true;
|
||||||
});
|
});
|
||||||
return !always_false;
|
return !always_false;
|
||||||
|
Loading…
Reference in New Issue
Block a user