From 1a494de262b8acea8366f996a787eca318f4cb16 Mon Sep 17 00:00:00 2001 From: Liang Zhang Date: Wed, 23 Oct 2024 00:01:33 +0800 Subject: [PATCH] Remove useless PrimaryKeyIngestPosition.convert() (#33353) --- .../ingest/position/type/pk/PrimaryKeyIngestPosition.java | 7 ------- .../type/pk/type/IntegerPrimaryKeyIngestPosition.java | 5 ----- .../type/pk/type/StringPrimaryKeyIngestPosition.java | 5 ----- .../type/pk/type/UnsupportedKeyIngestPosition.java | 5 ----- 4 files changed, 22 deletions(-) diff --git a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/ingest/position/type/pk/PrimaryKeyIngestPosition.java b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/ingest/position/type/pk/PrimaryKeyIngestPosition.java index 503594a4b296c..1a07b3fdf617a 100644 --- a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/ingest/position/type/pk/PrimaryKeyIngestPosition.java +++ b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/ingest/position/type/pk/PrimaryKeyIngestPosition.java @@ -40,13 +40,6 @@ public interface PrimaryKeyIngestPosition extends IngestPosition { */ T getEndValue(); - /** - * Convert value. - * @param value value to be converted - * @return converted value - */ - T convert(String value); - /** * Get type. * diff --git a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/ingest/position/type/pk/type/IntegerPrimaryKeyIngestPosition.java b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/ingest/position/type/pk/type/IntegerPrimaryKeyIngestPosition.java index 65fe71fd22159..f235759e42c00 100644 --- a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/ingest/position/type/pk/type/IntegerPrimaryKeyIngestPosition.java +++ b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/ingest/position/type/pk/type/IntegerPrimaryKeyIngestPosition.java @@ -43,11 +43,6 @@ public Long getEndValue() { return endValue; } - @Override - public Long convert(final String value) { - return Long.parseLong(value); - } - @Override public char getType() { return 'i'; diff --git a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/ingest/position/type/pk/type/StringPrimaryKeyIngestPosition.java b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/ingest/position/type/pk/type/StringPrimaryKeyIngestPosition.java index a10017fd3f0c3..96cf79ae70892 100644 --- a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/ingest/position/type/pk/type/StringPrimaryKeyIngestPosition.java +++ b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/ingest/position/type/pk/type/StringPrimaryKeyIngestPosition.java @@ -36,11 +36,6 @@ public StringPrimaryKeyIngestPosition(final String beginValue, final String endV this.endValue = Strings.emptyToNull(endValue); } - @Override - public String convert(final String value) { - return value; - } - @Override public char getType() { return 's'; diff --git a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/ingest/position/type/pk/type/UnsupportedKeyIngestPosition.java b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/ingest/position/type/pk/type/UnsupportedKeyIngestPosition.java index d8563ac1e4144..8406c07518d72 100644 --- a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/ingest/position/type/pk/type/UnsupportedKeyIngestPosition.java +++ b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/ingest/position/type/pk/type/UnsupportedKeyIngestPosition.java @@ -34,11 +34,6 @@ public Void getEndValue() { return null; } - @Override - public Void convert(final String value) { - throw new UnsupportedOperationException(""); - } - @Override public char getType() { return 'u';