mirror of https://github.com/apache/cassandra
don't declare throwing exceptions that aren't
This commit is contained in:
parent
105360cb14
commit
ce2a99d433
|
|
@ -21,7 +21,6 @@ import java.nio.ByteBuffer;
|
|||
|
||||
import org.apache.cassandra.cql3.selection.Selection.ResultSetBuilder;
|
||||
import org.apache.cassandra.db.marshal.AbstractType;
|
||||
import org.apache.cassandra.exceptions.InvalidRequestException;
|
||||
|
||||
public final class SimpleSelector extends Selector
|
||||
{
|
||||
|
|
@ -34,16 +33,19 @@ public final class SimpleSelector extends Selector
|
|||
{
|
||||
return new Factory()
|
||||
{
|
||||
@Override
|
||||
protected String getColumnName()
|
||||
{
|
||||
return columnName;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected AbstractType<?> getReturnType()
|
||||
{
|
||||
return type;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Selector newInstance()
|
||||
{
|
||||
return new SimpleSelector(columnName, idx, type);
|
||||
|
|
@ -51,21 +53,25 @@ public final class SimpleSelector extends Selector
|
|||
};
|
||||
}
|
||||
|
||||
public void addInput(ResultSetBuilder rs) throws InvalidRequestException
|
||||
@Override
|
||||
public void addInput(ResultSetBuilder rs)
|
||||
{
|
||||
current = rs.current.get(idx);
|
||||
}
|
||||
|
||||
public ByteBuffer getOutput() throws InvalidRequestException
|
||||
@Override
|
||||
public ByteBuffer getOutput()
|
||||
{
|
||||
return current;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reset()
|
||||
{
|
||||
current = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbstractType<?> getType()
|
||||
{
|
||||
return type;
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ public final class DropFunctionStatement extends SchemaAlteringStatement
|
|||
this.ifExists = ifExists;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void prepareKeyspace(ClientState state) throws InvalidRequestException
|
||||
{
|
||||
if (!functionName.hasKeyspace() && state.getRawKeyspace() != null)
|
||||
|
|
@ -64,6 +65,7 @@ public final class DropFunctionStatement extends SchemaAlteringStatement
|
|||
ThriftValidation.validateKeyspaceNotSystem(functionName.keyspace);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkAccess(ClientState state) throws UnauthorizedException, InvalidRequestException
|
||||
{
|
||||
// TODO CASSANDRA-7557 (function DDL permission)
|
||||
|
|
@ -75,18 +77,19 @@ public final class DropFunctionStatement extends SchemaAlteringStatement
|
|||
* The <code>CqlParser</code> only goes as far as extracting the keyword arguments
|
||||
* from these statements, so this method is responsible for processing and
|
||||
* validating.
|
||||
*
|
||||
* @throws org.apache.cassandra.exceptions.InvalidRequestException if arguments are missing or unacceptable
|
||||
*/
|
||||
public void validate(ClientState state) throws RequestValidationException
|
||||
@Override
|
||||
public void validate(ClientState state)
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public Event.SchemaChange changeEvent()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean announceMigration(boolean isLocalOnly) throws RequestValidationException
|
||||
{
|
||||
List<Function> olds = Functions.find(functionName);
|
||||
|
|
|
|||
Loading…
Reference in New Issue