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

Include statement attributes in EXPLAIN PLAN output #14074

Merged
merged 17 commits into from
Apr 17, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
import org.apache.druid.sql.calcite.run.EngineFeature;
import org.apache.druid.sql.calcite.run.QueryMaker;

import javax.annotation.Nullable;
import java.util.List;
import java.util.regex.Pattern;

Expand Down Expand Up @@ -280,6 +281,7 @@ public String statementKind()
return DruidSqlInsert.OPERATOR.getName();
}

@Nullable
abhishekrb19 marked this conversation as resolved.
Show resolved Hide resolved
@Override
public SqlNode targetDataSource()
{
Expand Down Expand Up @@ -350,6 +352,7 @@ public String statementKind()
return DruidSqlReplace.OPERATOR.getName();
}

@Nullable
abhishekrb19 marked this conversation as resolved.
Show resolved Hide resolved
@Override
public SqlNode targetDataSource()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -513,14 +513,15 @@ public String getStatementKind()
return this.statementKind;
}

public void setStatementKind(String sqlKind)
public void setStatementKind(String statementKind)
{
if (this.statementKind != null) {
throw new ISE("StatementKind has already been set");
}
this.statementKind = sqlKind;
this.statementKind = statementKind;
}

@Nullable
public SqlNode getTargetDataSource()
abhishekrb19 marked this conversation as resolved.
Show resolved Hide resolved
{
return this.targetDataSource;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ public String statementKind()
return "SELECT";
}

@Nullable
@Override
public SqlNode targetDataSource()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import org.apache.druid.sql.calcite.run.SqlEngine;
import org.joda.time.DateTimeZone;

import javax.annotation.Nullable;
import java.util.Map;
import java.util.Set;

Expand All @@ -43,7 +44,7 @@ public interface SqlStatementHandler
PrepareResult prepareResult();
PlannerResult plan() throws ValidationException;
String statementKind();
SqlNode targetDataSource();
@Nullable SqlNode targetDataSource();
abhishekrb19 marked this conversation as resolved.
Show resolved Hide resolved

/**
* Context available to statement handlers.
Expand Down