Skip to content

Commit

Permalink
[FLINK-20968][table-planner-blink] Rename ExecNode#getDesc to ExecNod…
Browse files Browse the repository at this point in the history
…e#getDescription

This closes apache#14733
  • Loading branch information
godfreyhe committed Jan 26, 2021
1 parent 5ed569f commit e6e9c7a
Show file tree
Hide file tree
Showing 52 changed files with 56 additions and 59 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,8 @@
*/
public interface ExecNode<T> {

/**
* Returns a string which describes this node. TODO rename to `getDescription` once all
* ExecNodes do not extend from FlinkPhysicalRel, because RelNode already has `getDescription`
* method.
*/
String getDesc();
/** Returns a string which describes this node. */
String getDescription();

/**
* Returns the output {@link LogicalType} of this node, this type should be consistent with the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ protected ExecNodeBase(List<ExecEdge> inputEdges, LogicalType outputType, String
}

@Override
public String getDesc() {
public String getDescription() {
return description;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public void setRequiredShuffleMode(@Nullable ShuffleMode requiredShuffleMode) {
}

@Override
public String getDesc() {
public String getDescription() {
// make sure the description be consistent with before, update this once plan is stable
ExecEdge.RequiredShuffle requiredShuffle = getInputEdges().get(0).getRequiredShuffle();
StringBuilder sb = new StringBuilder();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ protected Transformation<RowData> translateToPlanInternal(PlannerBase planner) {

return ExecNodeUtil.createOneInputTransformation(
inputTransform,
getDesc(),
getDescription(),
new CodeGenOperatorFactory<>(generatedOperator),
InternalTypeInfo.of(outputRowType),
inputTransform.getParallelism(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ protected Transformation<RowData> translateToPlanInternal(PlannerBase planner) {
ExecNodeUtil.createTwoInputTransformation(
buildTransform,
probeTransform,
getDesc(),
getDescription(),
operator,
InternalTypeInfo.of(getOutputType()),
probeTransform.getParallelism(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ protected Transformation<RowData> translateToPlanInternal(PlannerBase planner) {
.getBytes();
return ExecNodeUtil.createOneInputTransformation(
inputTransform,
getDesc(),
getDescription(),
new CodeGenOperatorFactory<>(generatedOperator),
InternalTypeInfo.of(getOutputType()),
inputTransform.getParallelism(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ protected Transformation<RowData> translateToPlanInternal(PlannerBase planner) {
Transformation<RowData> transformation =
ExecNodeUtil.createOneInputTransformation(
input,
getDesc(),
getDescription(),
SimpleOperatorFactory.of(operator),
input.getOutputType(),
input.getParallelism(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ protected Transformation<RowData> translateToPlanInternal(PlannerBase planner) {

final MultipleInputTransformation<RowData> multipleInputTransform =
new MultipleInputTransformation<>(
getDesc(),
getDescription(),
new BatchMultipleInputStreamOperatorFactory(
inputTransformAndInputSpecPairs.stream()
.map(Pair::getValue)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ protected Transformation<RowData> translateToPlanInternal(PlannerBase planner) {
ExecNodeUtil.createTwoInputTransformation(
leftInputTransform,
rightInputTransform,
getDesc(),
getDescription(),
operator,
InternalTypeInfo.of(getOutputType()),
parallelism,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ protected Transformation<RowData> translateToPlanInternal(PlannerBase planner) {
}
return ExecNodeUtil.createOneInputTransformation(
inputTransform,
getDesc(),
getDescription(),
SimpleOperatorFactory.of(operator),
InternalTypeInfo.of(getOutputType()),
inputTransform.getParallelism(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ private OneInputTransformation<RowData, RowData> createPythonOneInputTransformat
pythonFunctionInfos);
return new OneInputTransformation(
inputTransform,
getDesc(),
getDescription(),
pythonOperator,
InternalTypeInfo.of(outputRowType),
inputTransform.getParallelism());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ private OneInputTransformation<RowData, RowData> createPythonOneInputTransformat
pythonFunctionInfos);
return new OneInputTransformation<>(
inputTransform,
getDesc(),
getDescription(),
pythonOperator,
InternalTypeInfo.of(outputRowType),
inputTransform.getParallelism());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ private OneInputTransformation<RowData, RowData> createPythonOneInputTransformat
pythonFunctionInfos);
return new OneInputTransformation<>(
inputTransform,
getDesc(),
getDescription(),
pythonOperator,
InternalTypeInfo.of(outputRowType),
inputTransform.getParallelism());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ protected Transformation<RowData> translateToPlanInternal(PlannerBase planner) {
OneInputTransformation<RowData, RowData> transform =
new OneInputTransformation<>(
inputTransform,
getDesc(),
getDescription(),
SimpleOperatorFactory.of(operator),
InternalTypeInfo.of((RowType) getOutputType()),
inputTransform.getParallelism());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ protected Transformation<RowData> translateToPlanInternal(PlannerBase planner) {
OneInputTransformation<RowData, RowData> transform =
ExecNodeUtil.createOneInputTransformation(
inputTransform,
getDesc(),
getDescription(),
SimpleOperatorFactory.of(operator),
InternalTypeInfo.of((RowType) getOutputType()),
inputTransform.getParallelism(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ protected Transformation<RowData> translateToPlanInternal(PlannerBase planner) {

return new OneInputTransformation<>(
inputTransform,
getDesc(),
getDescription(),
new CodeGenOperatorFactory<>(generatedOperator),
InternalTypeInfo.of(outputRowType),
inputTransform.getParallelism());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ protected Transformation<RowData> translateToPlanInternal(PlannerBase planner) {
OneInputTransformation<RowData, RowData> transform =
new OneInputTransformation<>(
inputTransform,
getDesc(),
getDescription(),
SimpleOperatorFactory.of(operator),
InternalTypeInfo.of(inputType),
inputTransform.getParallelism());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ protected Transformation<RowData> translateToPlanInternal(PlannerBase planner) {
ExecNodeUtil.createTwoInputTransformation(
leftInputTransform,
rightInputTransform,
getDesc(),
getDescription(),
SimpleOperatorFactory.of(operator),
InternalTypeInfo.of(getOutputType()),
rightInputTransform.getParallelism(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ protected Transformation<RowData> translateToPlanInternal(PlannerBase planner) {

return new OneInputTransformation<>(
inputTransform,
getDesc(),
getDescription(),
new CodeGenOperatorFactory<>(generatedOperator),
InternalTypeInfo.of(getOutputType()),
inputTransform.getParallelism());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ protected Transformation<RowData> translateToPlanInternal(PlannerBase planner) {
final Transformation<RowData> transformation =
new OneInputTransformation<>(
inputTransform,
getDesc(),
getDescription(),
substituteStreamOperator,
InternalTypeInfo.of(getOutputType()),
inputTransform.getParallelism());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ protected Transformation<RowData> translateToPlanInternal(PlannerBase planner) {
inputTransform.getParallelism(),
retainHeader,
getClass().getSimpleName(),
getDesc());
getDescription());

if (inputsContainSingleton()) {
transform.setParallelism(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ protected Transformation<RowData> translateToPlanInternal(PlannerBase planner) {
final Transformation<RowData> transform =
new OneInputTransformation<>(
inputTransform,
getDesc(),
getDescription(),
operatorFactory,
InternalTypeInfo.of(getOutputType()),
inputTransform.getParallelism());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ public Transformation<RowData> translateToPlanInternal(PlannerBase planner) {
OneInputTransformation<RowData, RowData> transform =
new OneInputTransformation<>(
inputTransformation,
getDesc(),
getDescription(),
operatorFactory,
InternalTypeInfo.of(resultRowType),
inputTransformation.getParallelism());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ protected Transformation<RowData> translateToPlanInternal(PlannerBase planner) {
final Configuration config =
CommonPythonUtil.getMergedConfig(planner.getExecEnv(), planner.getTableConfig());
OneInputTransformation<RowData, RowData> ret =
createPythonOneInputTransformation(inputTransform, calcProgram, getDesc(), config);
createPythonOneInputTransformation(
inputTransform, calcProgram, getDescription(), config);
if (inputsContainSingleton()) {
ret.setParallelism(1);
ret.setMaxParallelism(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ private OneInputTransformation<RowData, RowData> createPythonOneInputTransformat
pythonUdtfInputOffsets);
return new OneInputTransformation<>(
inputTransform,
getDesc(),
getDescription(),
pythonOperator,
pythonOperatorOutputRowType,
inputTransform.getParallelism());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ protected Transformation<Object> createSinkTransformation(
}
return new LegacySinkTransformation<>(
finalInputTransform,
getDesc(),
getDescription(),
SimpleOperatorFactory.of(operator),
parallelism);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ protected CommonExecTableSourceScan(
@Override
protected Transformation<RowData> translateToPlanInternal(PlannerBase planner) {
final StreamExecutionEnvironment env = planner.getExecEnv();
final String operatorName = getDesc();
final String operatorName = getDescription();
InternalTypeInfo<RowData> outputTypeInfo = InternalTypeInfo.of((RowType) getOutputType());
ScanTableSource.ScanRuntimeProvider provider =
tableSource.getScanRuntimeProvider(ScanRuntimeProviderContext.INSTANCE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ protected Transformation<RowData> translateToPlanInternal(PlannerBase planner) {
planner.getExecEnv()
.createInput(inputFormat, inputFormat.getProducedType())
.getTransformation();
transformation.setName(getDesc());
transformation.setName(getDescription());
transformation.setParallelism(1);
transformation.setMaxParallelism(1);
return transformation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ protected Transformation<RowData> translateToPlanInternal(PlannerBase planner) {
final OneInputTransformation<RowData, RowData> transform =
new OneInputTransformation<>(
inputTransform,
getDesc(),
getDescription(),
operator,
rowTypeInfo,
inputTransform.getParallelism());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ protected Transformation<RowData> translateToPlanInternal(PlannerBase planner) {
final OneInputTransformation<RowData, RowData> transform =
new OneInputTransformation<>(
inputTransform,
getDesc(),
getDescription(),
operator,
rowTypeInfo,
inputTransform.getParallelism());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ protected Transformation<RowData> translateToPlanInternal(PlannerBase planner) {

return new OneInputTransformation<>(
inputTransform,
getDesc(),
getDescription(),
operator,
inputTransform.getOutputType(),
inputTransform.getParallelism());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ protected Transformation<RowData> translateToPlanInternal(PlannerBase planner) {
final OneInputTransformation<RowData, RowData> transform =
new OneInputTransformation<>(
inputTransform,
getDesc(),
getDescription(),
operator,
InternalTypeInfo.of(getOutputType()),
inputTransform.getParallelism());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ protected Transformation<RowData> translateToPlanInternal(PlannerBase planner) {
final OneInputTransformation<RowData, RowData> transform =
new OneInputTransformation<>(
inputTransform,
getDesc(),
getDescription(),
operator,
InternalTypeInfo.of(getOutputType()),
inputTransform.getParallelism());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ protected Transformation<RowData> translateToPlanInternal(PlannerBase planner) {
final OneInputTransformation<RowData, RowData> transform =
new OneInputTransformation<>(
inputTransform,
getDesc(),
getDescription(),
operator,
InternalTypeInfo.of(getOutputType()),
inputTransform.getParallelism());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ protected Transformation<RowData> translateToPlanInternal(PlannerBase planner) {
final OneInputTransformation<RowData, RowData> transform =
new OneInputTransformation<>(
inputTransform,
getDesc(),
getDescription(),
operator,
InternalTypeInfo.of(getOutputType()),
inputTransform.getParallelism());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ private TwoInputTransformation<RowData, RowData, RowData> createProcTimeJoin(
return new TwoInputTransformation<>(
leftInputTransform,
rightInputTransform,
getDesc(),
getDescription(),
new KeyedCoProcessOperator<>(procJoinFunc),
returnTypeInfo,
leftInputTransform.getParallelism());
Expand Down Expand Up @@ -350,7 +350,7 @@ private TwoInputTransformation<RowData, RowData, RowData> createRowTimeJoin(
return new TwoInputTransformation<>(
leftInputTransform,
rightInputTransform,
getDesc(),
getDescription(),
new KeyedCoProcessOperatorWithWatermarkDelay<>(
rowJoinFunc, rowJoinFunc.getMaxOutputDelay()),
returnTypeInfo,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ protected Transformation<RowData> translateToPlanInternal(PlannerBase planner) {
new TwoInputTransformation<>(
leftTransform,
rightTransform,
getDesc(),
getDescription(),
operator,
InternalTypeInfo.of(returnType),
leftTransform.getParallelism());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ protected Transformation<RowData> translateToPlanInternal(PlannerBase planner) {
final OneInputTransformation<RowData, RowData> transform =
new OneInputTransformation<>(
inputTransform,
getDesc(),
getDescription(),
operator,
InternalTypeInfo.of(getOutputType()),
inputTransform.getParallelism());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ protected Transformation<RowData> translateToPlanInternal(PlannerBase planner) {
final OneInputTransformation<RowData, RowData> transform =
new OneInputTransformation<>(
timestampedInputTransform,
getDesc(),
getDescription(),
operator,
InternalTypeInfo.of(getOutputType()),
timestampedInputTransform.getParallelism());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ protected Transformation<RowData> translateToPlanInternal(PlannerBase planner) {

return new OneInputTransformation<>(
inputTransform,
getDesc(),
getDescription(),
operator,
InternalTypeInfo.of(getOutputType()),
inputTransform.getParallelism());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ protected Transformation<RowData> translateToPlanInternal(PlannerBase planner) {
OneInputTransformation<RowData, RowData> transform =
new OneInputTransformation<>(
inputTransform,
getDesc(),
getDescription(),
operator,
InternalTypeInfo.of(getOutputType()),
inputTransform.getParallelism());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ protected Transformation<RowData> translateToPlanInternal(PlannerBase planner) {
OneInputTransformation transform =
new OneInputTransformation(
inputTransform,
getDesc(),
getDescription(),
operator,
InternalTypeInfo.of(getOutputType()),
inputTransform.getParallelism());
Expand Down
Loading

0 comments on commit e6e9c7a

Please sign in to comment.