-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: expose execution plans from the ksql engine API
This patch adds interfaces to build and execute plans in the KSQL engine API, and changes StatementExecutor to use these interfaces to run statements. It also exposes a method executeQuery that the query endpoint can use to build transient queries.
- Loading branch information
Showing
19 changed files
with
362 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
ksql-engine/src/main/java/io/confluent/ksql/planner/plan/ConfiguredKsqlPlan.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/* | ||
* Copyright 2019 Confluent Inc. | ||
* | ||
* Licensed under the Confluent Community License (the "License"); you may not use | ||
* this file except in compliance with the License. You may obtain a copy of the | ||
* License at | ||
* | ||
* http://www.confluent.io/confluent-community-license | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OF ANY KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations under the License. | ||
*/ | ||
|
||
package io.confluent.ksql.planner.plan; | ||
|
||
import io.confluent.ksql.engine.KsqlPlan; | ||
import io.confluent.ksql.util.KsqlConfig; | ||
import java.util.Map; | ||
import java.util.Objects; | ||
|
||
public final class ConfiguredKsqlPlan { | ||
private final KsqlPlan plan; | ||
private final Map<String, Object> overrides; | ||
private final KsqlConfig config; | ||
|
||
public static ConfiguredKsqlPlan of( | ||
final KsqlPlan plan, | ||
final Map<String, Object> overrides, | ||
final KsqlConfig config | ||
) { | ||
return new ConfiguredKsqlPlan(plan, overrides, config); | ||
} | ||
|
||
private ConfiguredKsqlPlan( | ||
final KsqlPlan plan, | ||
final Map<String, Object> overrides, | ||
final KsqlConfig config | ||
) { | ||
this.plan = Objects.requireNonNull(plan, "plan"); | ||
this.overrides = Objects.requireNonNull(overrides, "overrides"); | ||
this.config = Objects.requireNonNull(config, "config"); | ||
} | ||
|
||
public KsqlPlan getPlan() { | ||
return plan; | ||
} | ||
|
||
public Map<String, Object> getOverrides() { | ||
return overrides; | ||
} | ||
|
||
public KsqlConfig getConfig() { | ||
return config; | ||
} | ||
} |
Oops, something went wrong.