File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
server/src/main/java/org/elasticsearch/ingest Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 2020import org .elasticsearch .xcontent .XContentString ;
2121
2222import java .io .IOException ;
23+ import java .nio .charset .StandardCharsets ;
2324import java .util .AbstractCollection ;
2425import java .util .AbstractList ;
2526import java .util .AbstractMap ;
@@ -143,8 +144,12 @@ yield switch (numberType) {
143144 bytes .writeDouble (parser .doubleValue ());
144145 yield new FixedValue ((int ) position , ValueType .DOUBLE );
145146 }
146- // TODO: BIG_INTEGER, BIG_DECIMAL
147- default -> throw new IllegalArgumentException ("Unexpected number type: " + numberType );
147+ case BIG_INTEGER , BIG_DECIMAL -> {
148+ String numberString = parser .text ();
149+ byte [] numberBytes = numberString .getBytes (StandardCharsets .UTF_8 );
150+ bytes .write (numberBytes );
151+ yield new VariableValue ((int ) position , numberBytes .length , ValueType .STRING );
152+ }
148153 };
149154 }
150155 case VALUE_BOOLEAN -> {
You can’t perform that action at this time.
0 commit comments