MSQ: Preserve original ParseException when writing frames. (#14122)

This commit is contained in:
Gian Merlino 2023-04-24 23:17:15 -07:00 committed by GitHub
parent cade80b582
commit 73f050027b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -19,6 +19,7 @@
package org.apache.druid.frame.write;
import com.google.common.base.Throwables;
import com.google.common.primitives.Ints;
import org.apache.datasketches.memory.Memory;
import org.apache.datasketches.memory.WritableMemory;
@ -125,6 +126,7 @@ public class RowBasedFrameWriter implements FrameWriter
}
}
catch (Exception e) {
Throwables.propagateIfInstanceOf(e, ParseException.class);
throw new ParseException("", e, "Unable to add the row to the frame. Type conversion might be required.");
}

View File

@ -19,6 +19,7 @@
package org.apache.druid.frame.write.columnar;
import com.google.common.base.Throwables;
import org.apache.datasketches.memory.WritableMemory;
import org.apache.druid.frame.Frame;
import org.apache.druid.frame.FrameType;
@ -83,6 +84,7 @@ public class ColumnarFrameWriter implements FrameWriter
}
}
catch (Exception e) {
Throwables.propagateIfInstanceOf(e, ParseException.class);
throw new ParseException("", e, "Unable to add the row to the frame. Type conversion might be required.");
}