#[repr(i32)]pub enum OutputFormat {
Unspecified = 0,
ArrowLegacy = 2,
JsonLegacyDict = 3,
ArrowLegacyIpc = 4,
ArrowIpc = 5,
JsonArray = 6,
}Expand description
The output formats currently supported by HyperService
Since Hyper’s protocol went through multiple iterations, we have a few deprecated, non-recommend formats.
Only ARROW_IPC and JSON_ARRAY should be used for new workloads.
The other formats will likely be removed in the future. Many of the other
formats only support the SYNC transfer mode and are not fully supported
for all HyperService methods.
Variants§
Unspecified = 0
Encode the result chunk in a text-based format intended for debugging gRPC
on the command line. Currently, this format is the same as
JSON_LEGACY_DICT, which encodes the result as a JSON array. However, this
format might change in the future. JSON_ARRAY or ARROW_IPC is strictly
preferable. Not supported by GetQueryResult
ArrowLegacy = 2
Encode the result chunk in a proprietary variant similar to the open-source “Arrow IPC” format.
Do not use this format when onboarding any new workloads. Not supported by
GetQueryResult. ARROW_IPC is strictly preferable.
Each result chunk consists of a schema and a record batch message. This is the original format of the gRPC proxy. For the JDBC Tableau connector, this format is passed through directly to a public Data Cloud API endpoint. As such, we cannot just drop support.
JsonLegacyDict = 3
Encode the result chunk as a JSON array of objects using the Query Service
V1 SQL API convention. Not supported by GetQueryResult.
Do not use this format when onboarding any new workloads. Not supported by
GetQueryResult. ARROW_IPC and JSON_ARRAY are strictly preferable.
ArrowLegacyIpc = 4
Encode the result chunk as part of a single Arrow IPC stream that
encompasses all result chunks of a query. The first returned message will
be a QueryResultHeader describing the schema, or a successful command.
Only the first result chunk will contain an ARROW schema message. The
following result chunks contain one or more record batch messages.
Do not use this format when onboarding any new workloads. Not supported by
GetQueryResult. ARROW_IPC is strictly preferable.
ArrowIpc = 5
The first message in the response stream is the QueryStatus with the
query id. The result is encoded in multiple QueryResultPartString
messages. In concatenation, these form one single Arrow IPC stream, with
one Arrow schema message and one or more Arrow RecordBatches. Unlike
ARROW_LEGACY_IPC, does not return QueryResultHeader.
JsonArray = 6
The first message in the response stream is the QueryStatus with the query
id. Each following QueryResultPartString message is a JSON object. The
first result message contains a columns array describing the column names
and types. E.g.
{"columns":\[{"name":"IntCol","type":"numeric","precision":38,"scale":18,"nullable":false},{"name":"TextCol","type":"varchar","nullable": true}\]} The following messages contain the result rows encoded as an array
of array of JSON types. Each tuple is encoded as one array. E.g.
{"data":\[[42, "Foo"\], \[1.4, null]\]}
Implementations§
Source§impl OutputFormat
impl OutputFormat
Source§impl OutputFormat
impl OutputFormat
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Clone for OutputFormat
impl Clone for OutputFormat
Source§fn clone(&self) -> OutputFormat
fn clone(&self) -> OutputFormat
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for OutputFormat
impl Debug for OutputFormat
Source§impl Default for OutputFormat
impl Default for OutputFormat
Source§fn default() -> OutputFormat
fn default() -> OutputFormat
Source§impl From<OutputFormat> for i32
impl From<OutputFormat> for i32
Source§fn from(value: OutputFormat) -> i32
fn from(value: OutputFormat) -> i32
Source§impl Hash for OutputFormat
impl Hash for OutputFormat
Source§impl Ord for OutputFormat
impl Ord for OutputFormat
Source§fn cmp(&self, other: &OutputFormat) -> Ordering
fn cmp(&self, other: &OutputFormat) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for OutputFormat
impl PartialEq for OutputFormat
Source§fn eq(&self, other: &OutputFormat) -> bool
fn eq(&self, other: &OutputFormat) -> bool
self and other values to be equal, and is used by ==.Source§impl PartialOrd for OutputFormat
impl PartialOrd for OutputFormat
Source§impl TryFrom<i32> for OutputFormat
impl TryFrom<i32> for OutputFormat
Source§type Error = UnknownEnumValue
type Error = UnknownEnumValue
Source§fn try_from(value: i32) -> Result<OutputFormat, UnknownEnumValue>
fn try_from(value: i32) -> Result<OutputFormat, UnknownEnumValue>
impl Copy for OutputFormat
impl Eq for OutputFormat
impl StructuralPartialEq for OutputFormat
Auto Trait Implementations§
impl Freeze for OutputFormat
impl RefUnwindSafe for OutputFormat
impl Send for OutputFormat
impl Sync for OutputFormat
impl Unpin for OutputFormat
impl UnsafeUnpin for OutputFormat
impl UnwindSafe for OutputFormat
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request