Skip to main content

Crate rdf_fusion_encoding

Crate rdf_fusion_encoding 

Source
Expand description

Contains the RDF Funion’s term encodings.

§Overview

RDF term encodings allow us to bridge the gap between the Resource Description Framework and the Arrow type system. Because there is no single best way to represent RDF terms in Arrow, RDF Fusion supports multiple encodings. The documentation of the main crate provides some further details on this aspect.

The following table provides an overview of the supported encodings.

Suitable ForRequirementsTerm IdentityComment
String EncodingSimplicity-Yes
Plain TermProcessing literal terms-YesResult visible to users
Object IDJoining solution setsObject ID MappingYesMust be decoded at some point
Typed FamilyArithmetic and comparisons-No

§Encoding Trait

All of the above encodings must implement the TermEncoding trait. As a result, each encoding must provide an EncodingArray and an EncodingScalar. These two types wrap regular Arrow arrays (or scalars) that adhere to a particular encoding. If you want to pass an array to a function that is guaranteed to be of a certain encoding, use these data types.

Modules§

compute
Contains computations that mostly map between different encodings.
object_id
plain_term
string
typed_family

Structs§

QuadStorageEncodingNameParserError
RdfFusionEncodings
Holds a configuration instance for each RDF Fusion encoding.

Enums§

DowncastEncodingArgs
Represents a list of arrays that share the same encoding.
EncodingDatum
Represents either an array or a scalar for a given encoding.
EncodingName
Represents the name of a single TermEncoding.
QuadStorageEncoding
Defines which encoding is used for retrieving quads from the storage.
QuadStorageEncodingName
A version of QuadStorageEncoding that only reflects the name of the encoding.

Traits§

EncodingArray
Represents an Arrow Array with a specific TermEncoding.
EncodingScalar
Represents an Arrow ScalarValue with a specific TermEncoding.
ScalarEncoder
Is responsible for encoding RDF terms (or NULL) in a particular encoding.
TermDecoder
Allows extracting an iterator of a type from an EncodingArray.
TermEncoder
Allows encoding an iterator of a type into an EncodingArray.
TermEncoding
A term encoding defines how RDF terms are represented in Arrow arrays.

Functions§

detect_encoding_from_types
Detects the encoding of the given argument types.
quads_to_plain_term_dataframe
Creates a DataFrame from the given quads using the plain term encoding.
quads_to_plain_term_record_batch
Creates a RecordBatch from the given quads using the plain term encoding.