OmniSciDB  95562058bd
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SqlKillQuery.java
Go to the documentation of this file.
1 package com.mapd.parser.extension.ddl;
2 import static java.util.Objects.requireNonNull;
3 
4 import com.google.gson.annotations.Expose;
5 import com.mapd.parser.extension.ddl.omnisql.*;
6 
7 import org.apache.calcite.sql.*;
8 import org.apache.calcite.sql.parser.SqlParserPos;
9 
10 import java.util.List;
11 
12 public class SqlKillQuery extends SqlDdl implements JsonSerializableDdl {
13  private static final SqlOperator OPERATOR =
14  new SqlSpecialOperator("KILL_QUERY", SqlKind.OTHER_DDL);
15  @Expose
16  private String command;
17  @Expose
18  private String querySession;
19 
20  public SqlKillQuery(final SqlParserPos pos, final String querySession) {
21  super(OPERATOR, pos);
22  requireNonNull(querySession);
23  this.command = OPERATOR.getName();
24  OmniSqlSanitizedString sanitizedSession = new OmniSqlSanitizedString(querySession);
25  this.querySession = sanitizedSession.toString();
26  }
27 
28  @Override
29  public List<SqlNode> getOperandList() {
30  return null;
31  }
32 
33  @Override
34  public String toString() {
35  return toJsonString();
36  }
37 }
SqlKillQuery(final SqlParserPos pos, final String querySession)