forked from elastic/elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b2df331
commit 54611b5
Showing
42 changed files
with
270 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
.../esql/compute/src/main/java/org/elasticsearch/compute/operator/ThrowingDriverContext.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
package org.elasticsearch.compute.operator; | ||
|
||
import org.elasticsearch.common.util.BigArrays; | ||
import org.elasticsearch.common.util.ByteArray; | ||
import org.elasticsearch.common.util.DoubleArray; | ||
import org.elasticsearch.common.util.FloatArray; | ||
import org.elasticsearch.common.util.IntArray; | ||
import org.elasticsearch.common.util.LongArray; | ||
import org.elasticsearch.core.Releasable; | ||
|
||
public class ThrowingDriverContext extends DriverContext { | ||
public ThrowingDriverContext() { | ||
super(new ThrowingBigArrays()); | ||
} | ||
|
||
@Override | ||
public BigArrays bigArrays() { | ||
throw new AssertionError("should not reach here"); | ||
} | ||
|
||
@Override | ||
public boolean addReleasable(Releasable releasable) { | ||
throw new AssertionError("should not reach here"); | ||
} | ||
|
||
static class ThrowingBigArrays extends BigArrays { | ||
|
||
ThrowingBigArrays() { | ||
super(null, null, "fake"); | ||
} | ||
|
||
@Override | ||
public ByteArray newByteArray(long size, boolean clearOnResize) { | ||
throw new AssertionError("should not reach here"); | ||
} | ||
|
||
@Override | ||
public IntArray newIntArray(long size, boolean clearOnResize) { | ||
throw new AssertionError("should not reach here"); | ||
} | ||
|
||
@Override | ||
public LongArray newLongArray(long size, boolean clearOnResize) { | ||
throw new AssertionError("should not reach here"); | ||
} | ||
|
||
@Override | ||
public FloatArray newFloatArray(long size, boolean clearOnResize) { | ||
throw new AssertionError("should not reach here"); | ||
} | ||
|
||
@Override | ||
public DoubleArray newDoubleArray(long size, boolean clearOnResize) { | ||
throw new AssertionError("should not reach here"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.