Skip to content

Commit

Permalink
Remove methods that override identical methods in the superclass
Browse files Browse the repository at this point in the history
  • Loading branch information
elharo committed Apr 18, 2024
1 parent 7e03528 commit 219196b
Show file tree
Hide file tree
Showing 28 changed files with 2 additions and 356 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
import com.facebook.presto.spi.function.FunctionMetadataManager;
import com.facebook.presto.spi.relation.CallExpression;
import com.facebook.presto.spi.relation.ConstantExpression;
import com.facebook.presto.spi.relation.LambdaDefinitionExpression;
import com.facebook.presto.spi.relation.SpecialFormExpression;
import com.facebook.presto.spi.relation.VariableReferenceExpression;
import com.google.common.base.Joiner;
Expand Down Expand Up @@ -90,12 +89,6 @@ public TranslatedExpression<JdbcExpression> translateVariable(VariableReferenceE
ImmutableList.of());
}

@Override
public TranslatedExpression<JdbcExpression> translateLambda(LambdaDefinitionExpression lambda, Map<VariableReferenceExpression, ColumnHandle> context, RowExpressionTreeTranslator<JdbcExpression, Map<VariableReferenceExpression, ColumnHandle>> rowExpressionTreeTranslator)
{
return untranslated(lambda);
}

@Override
public TranslatedExpression<JdbcExpression> translateCall(CallExpression call, Map<VariableReferenceExpression, ColumnHandle> context, RowExpressionTreeTranslator<JdbcExpression, Map<VariableReferenceExpression, ColumnHandle>> rowExpressionTreeTranslator)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -416,12 +416,6 @@ public List<Object> getBootstrapArguments()
return bootstrapArguments;
}

@Override
public List<BytecodeNode> getChildNodes()
{
return ImmutableList.of();
}

@Override
public <T> T accept(BytecodeNode parent, BytecodeVisitor<T> visitor)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
import com.facebook.presto.spi.function.FunctionMetadataManager;
import com.facebook.presto.spi.relation.CallExpression;
import com.facebook.presto.spi.relation.ConstantExpression;
import com.facebook.presto.spi.relation.LambdaDefinitionExpression;
import com.facebook.presto.spi.relation.SpecialFormExpression;
import com.facebook.presto.spi.relation.VariableReferenceExpression;
import com.google.common.base.Joiner;
Expand Down Expand Up @@ -90,12 +89,6 @@ public TranslatedExpression<ClickHouseExpression> translateVariable(VariableRefe
ImmutableList.of());
}

@Override
public TranslatedExpression<ClickHouseExpression> translateLambda(LambdaDefinitionExpression lambda, Map<VariableReferenceExpression, ColumnHandle> context, RowExpressionTreeTranslator<ClickHouseExpression, Map<VariableReferenceExpression, ColumnHandle>> rowExpressionTreeTranslator)
{
return untranslated(lambda);
}

@Override
public TranslatedExpression<ClickHouseExpression> translateCall(CallExpression call, Map<VariableReferenceExpression, ColumnHandle> context, RowExpressionTreeTranslator<ClickHouseExpression, Map<VariableReferenceExpression, ColumnHandle>> rowExpressionTreeTranslator)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public static DistributedQueryRunner createElasticsearchQueryRunner(
queryRunner.installPlugin(new TpchPlugin());
queryRunner.createCatalog("tpch", "tpch");

TestingElasticsearchConnectorFactory testFactory = new TestingElasticsearchConnectorFactory();
ElasticsearchConnectorFactory testFactory = new ElasticsearchConnectorFactory();

installElasticsearchPlugin(address, queryRunner, testFactory, extraConnectorProperties);

Expand All @@ -91,7 +91,7 @@ public static DistributedQueryRunner createElasticsearchQueryRunner(
private static void installElasticsearchPlugin(
HostAndPort address,
QueryRunner queryRunner,
TestingElasticsearchConnectorFactory factory,
ElasticsearchConnectorFactory factory,
Map<String, String> extraConnectorProperties)
{
queryRunner.installPlugin(new ElasticsearchPlugin(factory));
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -208,12 +208,6 @@ public ConnectorAccessControl getAccessControl()
return accessControl;
}

@Override
public boolean isSingleStatementWritesOnly()
{
return false;
}

@Override
public ConnectorTransactionHandle beginTransaction(IsolationLevel isolationLevel, boolean readOnly)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
*/
package com.facebook.presto.hive.pagefile;

import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.mapred.FileInputFormat;
import org.apache.hadoop.mapred.InputSplit;
Expand All @@ -30,9 +28,4 @@ public RecordReader<NullWritable, NullWritable> getRecordReader(InputSplit input
{
throw new UnsupportedOperationException();
}

protected boolean isSplitable(FileSystem fs, Path file)
{
return true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,6 @@ public long getValidationCpuNanos()
return 0;
}

@Override
public Optional<Runnable> getVerificationTask()
{
return Optional.empty();
}

@Override
public long getFileSizeInBytes()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import com.facebook.presto.spi.eventlistener.QueryCompletedEvent;
import com.facebook.presto.spi.eventlistener.QueryCreatedEvent;
import com.facebook.presto.spi.eventlistener.QueryMetadata;
import com.facebook.presto.spi.eventlistener.SplitCompletedEvent;
import com.facebook.presto.tests.DistributedQueryRunner;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
Expand Down Expand Up @@ -219,11 +218,6 @@ public void queryCompleted(QueryCompletedEvent queryCompletedEvent)
{
eventsBuilder.addQueryCompleted(queryCompletedEvent);
}

@Override
public void splitCompleted(SplitCompletedEvent splitCompletedEvent)
{
}
}

static class EventsBuilder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,12 +252,6 @@ public FormatWriter createFileFormatWriter(
}
return new PrestoPageFormatWriter(targetFile, compressionCodec);
}

@Override
public boolean supportsDate()
{
return true;
}
},

PRESTO_PARQUET {
Expand Down
13 changes: 0 additions & 13 deletions presto-hudi/src/main/java/com/facebook/presto/hudi/HudiSplit.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@

import java.util.List;
import java.util.Optional;
import java.util.OptionalLong;

import static com.facebook.presto.spi.schedule.NodeSelectionStrategy.SOFT_AFFINITY;
import static com.google.common.base.MoreObjects.toStringHelper;
Expand Down Expand Up @@ -121,18 +120,6 @@ public Object getInfo()
return this;
}

@Override
public Object getSplitIdentifier()
{
return this;
}

@Override
public OptionalLong getSplitSizeInBytes()
{
return OptionalLong.empty();
}

@JsonProperty
@Override
public SplitWeight getSplitWeight()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,10 +339,6 @@ public void testConnectionProperties()
public static class TestNoopQueryInterceptor
implements QueryInterceptor
{
@Override
public void init(Map<String, String> properties)
{
}
}

private Connection createConnection()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import com.facebook.presto.spi.ConnectorTableLayoutHandle;
import com.facebook.presto.spi.ConnectorTableLayoutResult;
import com.facebook.presto.spi.ConnectorTableMetadata;
import com.facebook.presto.spi.ConnectorViewDefinition;
import com.facebook.presto.spi.Constraint;
import com.facebook.presto.spi.SchemaTableName;
import com.facebook.presto.spi.SchemaTablePrefix;
Expand All @@ -39,8 +38,6 @@
import static com.facebook.presto.common.type.VarcharType.createUnboundedVarcharType;
import static com.facebook.presto.localfile.LocalFileColumnHandle.SERVER_ADDRESS_COLUMN_NAME;
import static com.facebook.presto.localfile.LocalFileColumnHandle.SERVER_ADDRESS_ORDINAL_POSITION;
import static java.util.Collections.emptyList;
import static java.util.Collections.emptyMap;
import static java.util.Objects.requireNonNull;

public class LocalFileMetadata
Expand Down Expand Up @@ -144,18 +141,6 @@ public Map<SchemaTableName, List<ColumnMetadata>> listTableColumns(ConnectorSess
return columns.build();
}

@Override
public List<SchemaTableName> listViews(ConnectorSession session, String schemaNameOrNull)
{
return emptyList();
}

@Override
public Map<SchemaTableName, ConnectorViewDefinition> getViews(ConnectorSession session, SchemaTablePrefix prefix)
{
return emptyMap();
}

private List<SchemaTableName> listTables(ConnectorSession session, SchemaTablePrefix prefix)
{
if (prefix.getSchemaName() == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,11 +257,6 @@ public void onFailure(Throwable thrown)
responseExecutor);
}

@Override
public void destroy()
{
}

@Managed
@Nested
public TimeStat getReadFromOutputBufferTime()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@
public class PowerOfTwoValidator
implements ConstraintValidator<PowerOfTwo, Integer>
{
@Override
public void initialize(PowerOfTwo powerOfTwo)
{
}

@Override
public boolean isValid(Integer value, ConstraintValidatorContext context)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,6 @@ protected boolean isAlignedLongAccessSupported()
return true;
}

@Override
protected boolean isSliceAccessSupported()
{
return true;
}

@Override
protected void assertSlicePosition(Block block, int position, Slice expectedSliceValue)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,6 @@ protected boolean isByteAccessSupported()
return false;
}

@Override
protected boolean isShortAccessSupported()
{
return true;
}

@Override
protected boolean isIntAccessSupported()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,10 @@
import com.facebook.presto.metadata.ColumnPropertyManager;
import com.facebook.presto.metadata.FunctionAndTypeManager;
import com.facebook.presto.metadata.TablePropertyManager;
import com.facebook.presto.spi.ColumnHandle;
import com.facebook.presto.spi.ColumnMetadata;
import com.facebook.presto.spi.ConnectorId;
import com.facebook.presto.spi.ConnectorTableMetadata;
import com.facebook.presto.spi.PrestoException;
import com.facebook.presto.spi.TableHandle;
import com.facebook.presto.spi.connector.ConnectorCapabilities;
import com.facebook.presto.spi.constraints.TableConstraint;
import com.facebook.presto.spi.security.AllowAllAccessControl;
Expand Down Expand Up @@ -317,12 +315,6 @@ public List<ConnectorTableMetadata> getReceivedTableMetadata()
return tables;
}

@Override
public void dropColumn(Session session, TableHandle tableHandle, ColumnHandle column)
{
throw new UnsupportedOperationException();
}

@Override
public Set<ConnectorCapabilities> getConnectorCapabilities(Session session, ConnectorId catalogName)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -499,17 +499,6 @@ public boolean equals(Object obj)
}
}),
new ConnectorPartitioningHandle() {
@Override
public boolean isSingleNode()
{
return false;
}

@Override
public boolean isCoordinatorOnly()
{
return false;
}
});
PartitionFunction partitionFunction = createPartitionFunction(partitioningProviderManager, session, partitioningHandle, 600, ImmutableList.of(), false);

Expand Down
Loading

0 comments on commit 219196b

Please sign in to comment.