Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interpreter: Remove Optimize query. #4589

Merged
merged 3 commits into from
May 11, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions dbms/src/Interpreters/InterpreterFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include <Interpreters/InterpreterInsertQuery.h>
#include <Interpreters/InterpreterKillQueryQuery.h>
#include <Interpreters/InterpreterManageQuery.h>
#include <Interpreters/InterpreterOptimizeQuery.h>
#include <Interpreters/InterpreterRenameQuery.h>
#include <Interpreters/InterpreterSelectQuery.h>
#include <Interpreters/InterpreterSelectWithUnionQuery.h>
Expand All @@ -45,7 +44,6 @@
#include <Parsers/ASTInsertQuery.h>
#include <Parsers/ASTKillQueryQuery.h>
#include <Parsers/ASTManageQuery.h>
#include <Parsers/ASTOptimizeQuery.h>
#include <Parsers/ASTRenameQuery.h>
#include <Parsers/ASTSelectQuery.h>
#include <Parsers/ASTSelectWithUnionQuery.h>
Expand Down Expand Up @@ -126,11 +124,6 @@ std::unique_ptr<IInterpreter> InterpreterFactory::get(ASTPtr & query, Context &
/// readonly is checked inside InterpreterSetQuery
return std::make_unique<InterpreterSetQuery>(query, context);
}
else if (typeid_cast<ASTOptimizeQuery *>(query.get()))
{
throwIfReadOnly(context);
return std::make_unique<InterpreterOptimizeQuery>(query, context);
}
else if (typeid_cast<ASTExistsQuery *>(query.get()))
{
return std::make_unique<InterpreterExistsQuery>(query, context);
Expand Down
43 changes: 0 additions & 43 deletions dbms/src/Interpreters/InterpreterOptimizeQuery.cpp

This file was deleted.

46 changes: 0 additions & 46 deletions dbms/src/Interpreters/InterpreterOptimizeQuery.h

This file was deleted.

76 changes: 0 additions & 76 deletions dbms/src/Parsers/ASTOptimizeQuery.h

This file was deleted.

86 changes: 0 additions & 86 deletions dbms/src/Parsers/ParserOptimizeQuery.cpp

This file was deleted.

33 changes: 0 additions & 33 deletions dbms/src/Parsers/ParserOptimizeQuery.h

This file was deleted.

21 changes: 8 additions & 13 deletions dbms/src/Parsers/ParserQuery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,23 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include <Parsers/ParserQuery.h>
#include <Parsers/ParserQueryWithOutput.h>
#include <Parsers/ParserAlterQuery.h>
#include <Parsers/ParserCreateQuery.h>
#include <Parsers/ParserInsertQuery.h>
#include <Parsers/ParserDeleteQuery.h>
#include <Parsers/ParserDBGInvokeQuery.h>
#include <Parsers/ParserDeleteQuery.h>
#include <Parsers/ParserDropQuery.h>
#include <Parsers/ParserInsertQuery.h>
#include <Parsers/ParserManageQuery.h>
#include <Parsers/ParserQuery.h>
#include <Parsers/ParserQueryWithOutput.h>
#include <Parsers/ParserRenameQuery.h>
#include <Parsers/ParserOptimizeQuery.h>
#include <Parsers/ParserUseQuery.h>
#include <Parsers/ParserSetQuery.h>
#include <Parsers/ParserAlterQuery.h>
#include <Parsers/ParserSystemQuery.h>
#include <Parsers/ParserTruncateQuery.h>
#include <Parsers/ParserManageQuery.h>
#include <Parsers/ParserUseQuery.h>

namespace DB
{


bool ParserQuery::parseImpl(Pos & pos, ASTPtr & node, Expected & expected)
{
ParserQueryWithOutput query_with_output_p;
Expand All @@ -40,7 +37,6 @@ bool ParserQuery::parseImpl(Pos & pos, ASTPtr & node, Expected & expected)
ParserSetQuery set_p;
ParserDeleteQuery delete_p;
ParserDBGInvokeQuery dbginvoke_p;
ParserOptimizeQuery optimize_p;
ParserSystemQuery system_p;
ParserTruncateQuery truncate_p;
ParserManageQuery manage_p;
Expand All @@ -51,12 +47,11 @@ bool ParserQuery::parseImpl(Pos & pos, ASTPtr & node, Expected & expected)
|| set_p.parse(pos, node, expected)
|| delete_p.parse(pos, node, expected)
|| dbginvoke_p.parse(pos, node, expected)
|| optimize_p.parse(pos, node, expected)
|| system_p.parse(pos, node, expected)
|| truncate_p.parse(pos, node, expected)
|| manage_p.parse(pos, node, expected);

return res;
}

}
} // namespace DB