Fix incorrect assertions and javadoc
Original commit: elastic/x-pack-elasticsearch@0e6ebc0a69
This commit is contained in:
parent
9a0b43cd17
commit
c8eb883c47
|
@ -36,7 +36,7 @@ public final class Proto extends AbstractProto {
|
|||
META_COLUMN(MetaColumnRequest::new),
|
||||
QUERY_INIT(QueryInitRequest::new),
|
||||
QUERY_PAGE(QueryPageRequest::new),
|
||||
// QUERY_CLOSE(QueryClosenRequest::new), NOCOMMIT implement me
|
||||
// QUERY_CLOSE(QueryClosenRequest::new), TODO implement me
|
||||
;
|
||||
|
||||
private final RequestReader reader;
|
||||
|
|
|
@ -5,10 +5,6 @@
|
|||
*/
|
||||
package org.elasticsearch.xpack.sql.session;
|
||||
|
||||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.xpack.sql.type.Schema;
|
||||
import org.elasticsearch.xpack.sql.execution.PlanExecutor;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
|
||||
/**
|
||||
|
@ -27,7 +23,7 @@ public interface RowSet extends RowView {
|
|||
void reset();
|
||||
|
||||
/**
|
||||
* The key used by {@link PlanExecutor#nextPage(Cursor, ActionListener)} to fetch the next page.
|
||||
* The key used by PlanExecutor#nextPage to fetch the next page.
|
||||
*/
|
||||
Cursor nextPageCursor();
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ public class ReflectionUtils {
|
|||
}
|
||||
if (t instanceof ParameterizedType) {
|
||||
Type[] typeArguments = ((ParameterizedType) t).getActualTypeArguments();
|
||||
if (typeArguments.length == 1) {
|
||||
if (typeArguments.length != 1) {
|
||||
throw new SqlIllegalArgumentException("Unexpected number of type arguments %s for %s", Arrays.toString(typeArguments), t);
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@ public class ReflectionUtils {
|
|||
}
|
||||
Type[] upperBounds = wt.getUpperBounds();
|
||||
|
||||
if (upperBounds.length == 1) {
|
||||
if (upperBounds.length != 1) {
|
||||
throw new SqlIllegalArgumentException("Unexpected number of upper bounds %s for %s", Arrays.toString(upperBounds), t);
|
||||
}
|
||||
|
||||
|
@ -54,7 +54,7 @@ public class ReflectionUtils {
|
|||
for (Type type = clazz.getGenericSuperclass(); clazz != Object.class; type = clazz.getGenericSuperclass()) {
|
||||
if (type instanceof ParameterizedType) {
|
||||
Type[] typeArguments = ((ParameterizedType) type).getActualTypeArguments();
|
||||
if (typeArguments.length == 2 || typeArguments.length == 1) {
|
||||
if (typeArguments.length != 2 && typeArguments.length != 1) {
|
||||
throw new SqlIllegalArgumentException("Unexpected number of type arguments %s for %s", Arrays.toString(typeArguments),
|
||||
c);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue