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

[Core][Flink] optimize method name #7372

Merged
merged 1 commit into from
Aug 13, 2024
Merged
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public final class SeaTunnelRow implements Serializable {
/** Table identifier. */
private String tableId = "";
/** The kind of change that a row describes in a changelog. */
private RowKind kind = RowKind.INSERT;
private RowKind rowKind = RowKind.INSERT;
/** The array to store the actual internal format values. */
private final Object[] fields;

Expand All @@ -50,17 +50,8 @@ public void setTableId(String tableId) {
this.tableId = tableId;
}

/**
* The method will be removed in the future, please use {@link #setKind(RowKind)} instanced of
* it.
*/
@Deprecated
public void setRowKind(RowKind kind) {
setKind(kind);
}

public void setKind(RowKind kind) {
this.kind = kind;
public void setRowKind(RowKind rowKind) {
this.rowKind = rowKind;
}

public int getArity() {
Expand All @@ -71,14 +62,8 @@ public String getTableId() {
return tableId;
}

/** The method will be removed in the future, please use {@link #getKind()} instanced of it. */
@Deprecated
public RowKind getRowKind() {
return getKind();
}

public RowKind getKind() {
return this.kind;
return this.rowKind;
}

public Object[] getFields() {
Expand Down Expand Up @@ -335,13 +320,13 @@ public boolean equals(Object o) {
}
SeaTunnelRow that = (SeaTunnelRow) o;
return Objects.equals(tableId, that.tableId)
&& kind == that.kind
&& rowKind == that.rowKind
&& Arrays.deepEquals(fields, that.fields);
}

@Override
public int hashCode() {
int result = Objects.hash(tableId, kind);
int result = Objects.hash(tableId, rowKind);
result = 31 * result + Arrays.deepHashCode(fields);
return result;
}
Expand All @@ -352,7 +337,7 @@ public String toString() {
+ "tableId="
+ tableId
+ ", kind="
+ kind.shortString()
+ rowKind.shortString()
+ ", fields="
+ Arrays.toString(fields)
+ '}';
Expand Down
Loading