You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "lidavidm (via GitHub)" <gi...@apache.org> on 2023/03/13 13:41:53 UTC
[GitHub] [arrow] lidavidm opened a new issue, #34544: [Docs][FlightRPC] Document Flight error status mappings
lidavidm opened a new issue, #34544:
URL: https://github.com/apache/arrow/issues/34544
### Describe the enhancement requested
We should document which error statuses correspond to which other error statuses in different languages. There's a rough outline here:
<details>
<summary>Diagram (Arrow C++, Flight, gRPC, ADBC, DBAPI)</summary>
```mermaid
flowchart LR
subgraph Arrow
direction TB
ArrowOK[OK]
ArrowOutOfMemory[OutOfMemory]
ArrowKeyError[KeyError]
ArrowTypeError[TypeError]
ArrowInvalid[Invalid]
ArrowIOError[IOError]
ArrowCapacityError[CapacityError]
ArrowIndexError[IndexError]
ArrowCancelled[Cancelled]
ArrowUnknownError[UnknownError]
ArrowNotImplemented[NotImplemented]
ArrowSerializationError[SerializationError]
ArrowRError[RError]
ArrowCodeGenError[CodeGenError]
ArrowExpressionValidationError[ExpressionValidationError]
ArrowExecutionError[ExecutionError]
ArrowAlreadyExists[AlreadyExists]
end
subgraph Flight
direction TB
FlightOk[Ok]
FlightUnknown[Unknown]
FlightInternal[Internal]
FlightInvalidArgument[InvalidArgument]
FlightTimedOut[TimedOut]
FlightNotFound[NotFound]
FlightAlreadyExists[AlreadyExists]
FlightCancelled[Cancelled]
FlightUnauthenticated[Unauthenticated]
FlightUnauthorized[Unauthorized]
FlightUnimplemented[Unimplemented]
FlightUnavailable[Unavailable]
end
subgraph gRPC
direction TB
GrpcOK[OK]
GrpcCANCELLED[CANCELLED]
GrpcUNKNOWN[UNKNOWN]
GrpcINVALID_ARGUMENT[INVALID_ARGUMENT]
GrpcDEADLINE_EXCEEDED[DEADLINE_EXCEEDED]
GrpcNOT_FOUND[NOT_FOUND]
GrpcALREADY_EXISTS[ALREADY_EXISTS]
GrpcPERMISSION_DENIED[PERMISSION_DENIED]
GrpcRESOURCE_EXHAUSTED[RESOURCE_EXHAUSTED]
GrpcFAILED_PRECONDITION[FAILED_PRECONDITION]
GrpcABORTED[ABORTED]
GrpcOUT_OF_RANGE[OUT_OF_RANGE]
GrpcUNIMPLEMENTED[UNIMPLEMENTED]
GrpcINTERNAL[INTERNAL]
GrpcUNAVAILABLE[UNAVAILABLE]
GrpcDATA_LOSS[DATA_LOSS]
GrpcUNAUTHENTICATED[UNAUTHENTICATED]
end
subgraph ADBC
direction TB
AdbcOK[OK]
AdbcUNKNOWN[UNKNOWN]
AdbcNOT_IMPLEMENTED[NOT_IMPLEMENTED]
AdbcNOT_FOUND[NOT_FOUND]
AdbcALREADY_EXISTS[ALREADY_EXISTS]
AdbcINVALID_ARGUMENT[INVALID_ARGUMENT]
AdbcINVALID_STATE[INVALID_STATE]
AdbcINVALID_DATA[INVALID_DATA]
AdbcINTEGRITY[INTEGRITY]
AdbcINTERNAL[INTERNAL]
AdbcIO[IO]
AdbcCANCELLED[CANCELLED]
AdbcTIMEOUT[TIMEOUT]
AdbcUNAUTHENTICATED[UNAUTHENTICATED]
AdbcUNAUTHORIZED[UNAUTHORIZED]
end
subgraph DBAPI
direction TB
DbapiNoError["(no error)"]
DbapiError[Error]
DbapiDataError[DataError]
DbapiOperationalError[OperationalError]
DbapiIntegrityError[IntegrityError]
DbapiInternalError[InternalError]
DbapiProgrammingError[ProgrammingError]
DbapiNotSupportedError[NotSupportedError]
end
ArrowOK --> FlightOk
ArrowOutOfMemory --> FlightUnknown
ArrowKeyError --> FlightNotFound
ArrowInvalid --> FlightInvalidArgument
ArrowCancelled --> FlightCancelled
ArrowNotImplemented --> FlightUnimplemented
ArrowAlreadyExists --> FlightAlreadyExists
ArrowTypeError --> FlightUnknown
ArrowIOError --> FlightUnknown
ArrowCapacityError --> FlightUnknown
ArrowIndexError --> FlightUnknown
ArrowUnknownError --> FlightUnknown
ArrowSerializationError --> FlightUnknown
ArrowRError --> FlightUnknown
ArrowCodeGenError --> FlightUnknown
ArrowExpressionValidationError --> FlightUnknown
ArrowExecutionError --> FlightUnknown
FlightOk --> GrpcOK
FlightUnknown --> GrpcUNKNOWN
FlightInternal --> GrpcINTERNAL
FlightInvalidArgument --> GrpcINVALID_ARGUMENT
FlightTimedOut --> GrpcDEADLINE_EXCEEDED
FlightNotFound --> GrpcNOT_FOUND
FlightAlreadyExists --> GrpcALREADY_EXISTS
FlightCancelled --> GrpcCANCELLED
FlightUnauthenticated --> GrpcUNAUTHENTICATED
FlightUnauthorized --> GrpcPERMISSION_DENIED
FlightUnimplemented --> GrpcUNIMPLEMENTED
FlightUnavailable --> GrpcUNAVAILABLE
GrpcOK --> AdbcOK
GrpcCANCELLED --> AdbcCANCELLED
GrpcUNKNOWN --> AdbcUNKNOWN
GrpcINVALID_ARGUMENT --> AdbcINVALID_ARGUMENT
GrpcDEADLINE_EXCEEDED --> AdbcTIMEOUT
GrpcNOT_FOUND --> AdbcNOT_FOUND
GrpcALREADY_EXISTS --> AdbcALREADY_EXISTS
GrpcPERMISSION_DENIED --> AdbcUNAUTHORIZED
GrpcRESOURCE_EXHAUSTED --> AdbcUNKNOWN
GrpcFAILED_PRECONDITION --> AdbcUNKNOWN
GrpcABORTED --> AdbcUNKNOWN
GrpcOUT_OF_RANGE --> AdbcUNKNOWN
GrpcUNIMPLEMENTED --> AdbcNOT_IMPLEMENTED
GrpcINTERNAL --> AdbcINTERNAL
GrpcUNAVAILABLE --> AdbcIO
GrpcDATA_LOSS --> AdbcUNKNOWN
GrpcUNAUTHENTICATED --> AdbcUNAUTHENTICATED
AdbcOK --> DbapiNoError
AdbcUNKNOWN --> DbapiError
AdbcNOT_IMPLEMENTED --> DbapiNotSupportedError
AdbcNOT_FOUND --> DbapiError
AdbcALREADY_EXISTS --> DbapiProgrammingError
AdbcINVALID_ARGUMENT --> DbapiProgrammingError
AdbcINVALID_STATE --> DbapiProgrammingError
AdbcINVALID_DATA --> DbapiDataError
AdbcINTEGRITY --> DbapiIntegrityError
AdbcINTERNAL --> DbapiInternalError
AdbcIO --> DbapiOperationalError
AdbcCANCELLED --> DbapiOperationalError
AdbcTIMEOUT --> DbapiOperationalError
AdbcUNAUTHENTICATED --> DbapiProgrammingError
AdbcUNAUTHORIZED --> DbapiProgrammingError
```
</details>
- Java/Python should be included too
- We should document the semantics of each Flight error status (similar to how gRPC does it)
- We should consider adding an extra error code for Flight to indicate server-internal errors that are not unexpected (as INTERNAL is), possibly like gRPC FAILED_PRECONDITION or ABORTED (I don't think this is a format change?)
### Component(s)
Documentation, FlightRPC
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] zeroshade commented on issue #34544: [Docs][FlightRPC] Document Flight error status mappings
Posted by "zeroshade (via GitHub)" <gi...@apache.org>.
zeroshade commented on issue #34544:
URL: https://github.com/apache/arrow/issues/34544#issuecomment-1466381160
I can definitely agree with the sentiment here, would it make more sense for this to be in the flight website docs or in the individual language docs for each implementation of flight?
The advantage of the latter is that it can use the language specific ways to reference the explicit values of the error codes, and will show up immediately for anyone looking at the language docs for their implementation language. the drawback is the duplication of effort to reproduce this diagram and write something up for each language....
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] wjones127 commented on issue #34544: [Docs][FlightRPC] Document Flight error status mappings
Posted by "wjones127 (via GitHub)" <gi...@apache.org>.
wjones127 commented on issue #34544:
URL: https://github.com/apache/arrow/issues/34544#issuecomment-1466432275
I like the idea of having a general diagram (that is part of the format?) and then language implementations having helpers for converting between these errors.
I worry documentation for each language would be a lot of work.
In Rust, this could be implemented as conversion traits for the various errors. Not sure what the convenient way is to convert errors in exception-based languages.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] lidavidm commented on issue #34544: [Docs][FlightRPC] Document Flight error status mappings
Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on issue #34544:
URL: https://github.com/apache/arrow/issues/34544#issuecomment-1642487659
Related issue: #36722
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org