Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion presto-native-execution/presto_cpp/main/common/Exception.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,57 +50,71 @@ class VeloxToPrestoExceptionTranslator {
{0x00020007,
"EXCEEDED_LOCAL_MEMORY_LIMIT",
protocol::ErrorType::INSUFFICIENT_RESOURCES}},

{velox::error_code::kMemAborted,
{0x00020000,
"GENERIC_INSUFFICIENT_RESOURCES",
protocol::ErrorType::INSUFFICIENT_RESOURCES}},

{velox::error_code::kSpillLimitExceeded,
{0x00020006,
"EXCEEDED_SPILL_LIMIT",
protocol::ErrorType::INSUFFICIENT_RESOURCES}},

{velox::error_code::kMemArbitrationFailure,
{0x00020000,
"GENERIC_INSUFFICIENT_RESOURCES",
"MEMORY_ARBITRATION_FAILURE",
protocol::ErrorType::INSUFFICIENT_RESOURCES}},

{velox::error_code::kMemArbitrationTimeout,
{0x00020000,
"GENERIC_INSUFFICIENT_RESOURCES",
protocol::ErrorType::INSUFFICIENT_RESOURCES}},

{velox::error_code::kMemAllocError,
{0x00020000,
"GENERIC_INSUFFICIENT_RESOURCES",
protocol::ErrorType::INSUFFICIENT_RESOURCES}},

{velox::error_code::kInvalidState,
{0x00010000,
"GENERIC_INTERNAL_ERROR",
protocol::ErrorType::INTERNAL_ERROR}},

{velox::error_code::kGenericSpillFailure,
{0x00010023,
"GENERIC_SPILL_FAILURE",
protocol::ErrorType::INTERNAL_ERROR}},

{velox::error_code::kUnreachableCode,
{0x00010000,
"GENERIC_INTERNAL_ERROR",
protocol::ErrorType::INTERNAL_ERROR}},

{velox::error_code::kNotImplemented,
{0x00010000,
"GENERIC_INTERNAL_ERROR",
protocol::ErrorType::INTERNAL_ERROR}},

{velox::error_code::kUnknown,
{0x00010000,
"GENERIC_INTERNAL_ERROR",
protocol::ErrorType::INTERNAL_ERROR}}}},

{velox::error_source::kErrorSourceUser,
{{velox::error_code::kInvalidArgument,
{0x00000000,
"GENERIC_USER_ERROR",
protocol::ErrorType::USER_ERROR}},

{velox::error_code::kUnsupported,
{0x0000000D, "NOT_SUPPORTED", protocol::ErrorType::USER_ERROR}},

{velox::error_code::kArithmeticError,
{0x00000000,
"GENERIC_USER_ERROR",
protocol::ErrorType::USER_ERROR}}}},

{velox::error_source::kErrorSourceSystem, {}}};
return kTranslateMap;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ public enum StandardErrorCode
NO_CPP_SIDECARS(0x0002_0014, INTERNAL_ERROR),
HEADER_MODIFICATION_ATTEMPT(0x0002_0015, INTERNAL_ERROR),
DUPLICATE_FUNCTION_ERROR(0x0002_0016, INTERNAL_ERROR),
MEMORY_ARBITRATION_FAILURE(0x0002_0017, INSUFFICIENT_RESOURCES),
/**/;

// Error code range 0x0003 is reserved for Presto-on-Spark
Expand Down
Loading