File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
x-pack/plugin/esql-core/src/main/java/org/elasticsearch/xpack/esql/core/type Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change 1515import org .elasticsearch .index .IndexMode ;
1616import org .elasticsearch .index .mapper .SourceFieldMapper ;
1717import org .elasticsearch .index .mapper .TimeSeriesIdFieldMapper ;
18+ import org .elasticsearch .xpack .esql .core .QlIllegalArgumentException ;
1819import org .elasticsearch .xpack .esql .core .util .PlanStreamInput ;
1920import org .elasticsearch .xpack .esql .core .util .PlanStreamOutput ;
2021
@@ -759,13 +760,9 @@ public DataType counter() {
759760 public void writeTo (StreamOutput out ) throws IOException {
760761 if (supportedVersion .supportedOn (out .getTransportVersion (), Build .current ().isSnapshot ()) == false ) {
761762 /*
762- * TODO when we implement version aware planning flip this to an IllegalStateException
763- * so we throw a 500 error. It'll be our bug then. Right now it's a sign that the user
764- * tried to do something like `KNN(dense_vector_field, [1, 2])` against an old node.
765- * Like, during the rolling upgrade that enables KNN or to a remote cluster that has
766- * not yet been upgraded.
763+ * Throw a 500 error - this is a bug, we failed to account for an old node during planning.
767764 */
768- throw new IllegalArgumentException (
765+ throw new QlIllegalArgumentException (
769766 "remote node at version [" + out .getTransportVersion () + "] doesn't understand data type [" + this + "]"
770767 );
771768 }
You can’t perform that action at this time.
0 commit comments