Skip to content

Commit acc308c

Browse files
chenjian2664wendigo
authored andcommitted
Simplify LazyLoadedProtobufSchemaProvider
Simplify `LazyLoadedProtobufSchemaProvider` by removing redundant method overrides
1 parent 256f156 commit acc308c

File tree

1 file changed

+0
-32
lines changed

1 file changed

+0
-32
lines changed

plugin/trino-kafka/src/main/java/io/trino/plugin/kafka/schema/confluent/ConfluentModule.java

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
import io.confluent.kafka.schemaregistry.client.CachedSchemaRegistryClient;
3131
import io.confluent.kafka.schemaregistry.client.SchemaRegistryClient;
3232
import io.confluent.kafka.schemaregistry.client.rest.entities.Schema;
33-
import io.confluent.kafka.schemaregistry.client.rest.entities.SchemaReference;
3433
import io.confluent.kafka.schemaregistry.protobuf.ProtobufSchemaProvider;
3534
import io.trino.decoder.DispatchingRowDecoderFactory;
3635
import io.trino.decoder.RowDecoderFactory;
@@ -60,7 +59,6 @@
6059

6160
import java.util.List;
6261
import java.util.Map;
63-
import java.util.Optional;
6462
import java.util.Set;
6563
import java.util.concurrent.atomic.AtomicReference;
6664
import java.util.function.Supplier;
@@ -192,43 +190,13 @@ public String schemaType()
192190
return "PROTOBUF";
193191
}
194192

195-
@Override
196-
public Optional<ParsedSchema> parseSchema(Schema schema, boolean isNew)
197-
{
198-
return SchemaProvider.super.parseSchema(schema, isNew);
199-
}
200-
201-
@Override
202-
public Optional<ParsedSchema> parseSchema(Schema schema, boolean isNew, boolean normalize)
203-
{
204-
return SchemaProvider.super.parseSchema(schema, isNew, normalize);
205-
}
206-
207193
@Override
208194
public void configure(Map<String, ?> configuration)
209195
{
210196
Map<String, ?> oldConfiguration = this.configuration.getAndSet(ImmutableMap.copyOf(configuration));
211197
checkState(oldConfiguration == null, "ProtobufSchemaProvider is already configured");
212198
}
213199

214-
@Override
215-
public Optional<ParsedSchema> parseSchema(String schema, List<SchemaReference> references, boolean isNew)
216-
{
217-
return delegate.get().parseSchema(schema, references, isNew);
218-
}
219-
220-
@Override
221-
public Optional<ParsedSchema> parseSchema(String schemaString, List<SchemaReference> references, boolean isNew, boolean normalize)
222-
{
223-
return SchemaProvider.super.parseSchema(schemaString, references, isNew, normalize);
224-
}
225-
226-
@Override
227-
public Optional<ParsedSchema> parseSchema(String schemaString, List<SchemaReference> references)
228-
{
229-
return SchemaProvider.super.parseSchema(schemaString, references);
230-
}
231-
232200
@Override
233201
public ParsedSchema parseSchemaOrElseThrow(Schema schema, boolean isNew, boolean normalize)
234202
{

0 commit comments

Comments
 (0)