Skip to content

Jelly-RDF test cases

This page lists the conformance test cases defined for the Jelly-RDF 1.2 format (version tag 3, the column layout), along with instructions for running them.

Machine-readable definitions of the test cases are available in the jelly-protobuf repository.

Jelly-RDF 1.0 and 1.1 streams

A consumer of Jelly-RDF 1.2 must also be able to read streams with version tags 1 and 2 (Jelly-RDF 1.0 and 1.1). These are tested by a separate test suite, listed on the Jelly-RDF 1.1 test cases page. Its "to Jelly" tests apply only to producers that write Jelly-RDF 1.1.

See also instructions on reporting conformance and the page listing conformance reports of implementations page.

Test categories

Categories indicate supported features:

Category Physical type RDF terms mf:requires
triples_rdf_1_1 TRIPLES IRIs, blank nodes, literals jellyt:requirementPhysicalTypeTriples
quads_rdf_1_1 QUADS IRIs, blank nodes, literals jellyt:requirementPhysicalTypeQuads
triples_rdf_1_2_basic TRIPLES also literals with a base direction also jellyt:requirementRdf12Basic
quads_rdf_1_2_basic QUADS also literals with a base direction also jellyt:requirementRdf12Basic
triples_rdf_1_2 TRIPLES also triple terms also jellyt:requirementRdf12
quads_rdf_1_2 QUADS also triple terms also jellyt:requirementRdf12
messages either IRIs, blank nodes, literals jellyt:requirementMessages, and the requirement of the physical type

The tests in the messages category use streams of RDF Messages (stream type MESSAGES), which implementations are not required to support. Most tests of the rules shared by all streams (stream options, lookups, columns) are in the triples_rdf_1_1 category.

If your implementation does not support a given feature, you should skip the corresponding tests.

Running tests

  • Test cases beginning with pos_ are positive tests, and those beginning with neg_ are negative tests.
    • A positive test is expected to succeed. The test case is successful when the implementation returns the expected result specified in mf:result.
    • A negative test is expected to fail. The test case is successful when the implementation returns an error. Currently, the test cases do not specify the expected error code.
  • There are two types of tests:
    • From Jelly (parse) tests – jellyt:TestRdf12FromJelly. The goal of the test is to convert the Jelly-RDF input specified in mf:action to RDF.
      • The input (mf:action) MUST be an RDF IRI pointing to a .jelly file.
      • If the test is positive, the output (mf:result) depends on the stream type. For a FLAT stream, it MUST be an RDF IRI pointing to one N-Triples or N-Quads file with all statements of the stream. For a stream of RDF Messages, it MUST be an rdf:List of N-Triples or N-Quads files, one per message, in order. The file of an empty message is empty.
      • This class MUST be combined with either jellyt:TestPositive or jellyt:TestNegative. When combined with jellyt:TestPositive, the test succeeds when the input is read without errors, and its statements are equivalent to the expected ones (see below). For a stream of RDF Messages, the implementation must read the same number of messages, and each must be equivalent to the expected file at the same position.
    • To Jelly (serialize) tests – jellyt:TestRdf12ToJelly. The goal of the test is to convert the RDF input specified in mf:action to a Jelly-RDF file.
      • The input (mf:action) MUST be an rdf:List of two or more elements. The first element is a Jelly-RDF file with one frame, containing only the stream options to be used by the producer. The remaining elements are N-Triples or N-Quads files with the statements to be converted: one file for a FLAT stream, or one file per message, in order, for a stream of RDF Messages.
      • If the test is positive, the output (mf:result) MUST be an RDF IRI pointing to a .jelly file with one valid serialization of the input. If the test is negative, mf:result is not set.
      • This class MUST be combined with either jellyt:TestPositive or jellyt:TestNegative. When combined with jellyt:TestPositive, the test succeeds when the resulting file is a valid Jelly-RDF 1.2 stream, its first non-empty frame has the expected stream options, and reading it back gives statements equivalent to the input. If the input has no statements, an output without any non-empty frame (for example, an empty file) is also correct.
  • Two lists of statements are equivalent when they have the same statements in the same order, and there is a bijection between their blank node labels under which the statements are pairwise equal (ordered RDF dataset isomorphism). A simple literal and an xsd:string literal with the same lexical form are the same term.
  • Blank node labels are scoped as in the specification: a FLAT stream, and its N-Triples or N-Quads file, is one scope. In a stream of RDF Messages, each message, and its file, is its own scope.
  • The N-Triples and N-Quads files use the RDF 1.2 syntax.
  • The test cases use the delimited variant of Jelly-RDF. If a non-delimited file is used, the test is marked with the jellyt:featureNonDelimited feature (mf:notable property).
  • Tests of rules that the specification states with SHOULD rather than MUST are marked with the jellyt:featureShouldLevel feature (mf:notable property). An implementation may fail them and still conform to the specification.

See also the test manifest vocabulary for details on how the test cases are defined in RDF. The vocabulary is a LinkML schema, and it is also published in RDFS and SHACL with every release of jelly-protobuf.

Test summary

Manifests used to generate this page: from_jelly · to_jelly

  • All tests: 257
  • From Jelly: 226 (positive: 130, negative: 96)
  • To Jelly: 31 (positive: 27, negative: 4)

From Jelly (parse)

Jump to category

messages

16 positive, 4 negative

Positive

Name Description Input(s) Expected output
pos_001 Ten messages of three statements each, in one frame. in.jelly out_000.nt
out_001.nt
out_002.nt
out_003.nt
out_004.nt
out_005.nt
out_006.nt
out_007.nt
out_008.nt
out_009.nt
pos_002 Messages larger than a frame: each message spans several frames. in.jelly out_000.nt
out_001.nt
out_002.nt
pos_003 Messages with blank nodes, using the same labels in every message. Blank node labels are scoped to one message, so the label x in each message is a different blank node. Messages are compared one at a time, so this test does not check that a consumer keeps them apart. in.jelly out_000.nt
out_001.nt
out_002.nt
out_003.nt
pos_004 Messages that are RDF datasets: quads in the default graph and in named graphs. in.jelly out_000.nq
out_001.nq
out_002.nq
pos_005 Example from the specification: a statement left over from the previous frame, and message_lengths [2, 0, 1] in a batch of 5 statements. The first message is 0, 1, 2. The value 0 then ends an empty message. The value 1 adds statement 3 and ends that message. Statements 4 and 5 start the next message, and the last frame adds 6 and ends it. in.jelly out_000.nt
out_001.nt
out_002.nt
out_003.nt
pos_006 One message per frame: message_lengths is [row_count] in every frame. in.jelly out_000.nt
out_001.nt
pos_007 Empty messages: a value of 0 at the start of a batch and two in a row. in.jelly out_000.nt
out_001.nt
out_002.nt
out_003.nt
pos_008 A batch with row_count 0 and message_lengths [0]: an empty message. in.jelly out_000.nt
out_001.nt
out_002.nt
pos_009 A batch with row_count 0 and message_lengths [0] ends a message started in the previous frame. in.jelly out_000.nt
out_001.nt
pos_010 The last message has no boundary: it ends at the end of the stream. in.jelly out_000.nt
out_001.nt
pos_011 The stream ends right after a boundary: no further message is added. in.jelly out_000.nt
pos_012 Restated stream options end the current message. The statement b has no boundary after it, but the restated options end its message. in.jelly out_000.nt
out_001.nt
out_002.nt
pos_013 Restated stream options right after a boundary: no empty message is added. in.jelly out_000.nt
out_001.nt
pos_014 Lookup entries are kept from one message to the next. in.jelly out_000.nt
out_001.nt
pos_015 A blank node label used in two frames of the same message: the same blank node. in.jelly out_000.nt
pos_016 Empty frames between the frames of a message. in.jelly out_000.nt

Negative

Name Description Input(s) Expected output
neg_001 message_lengths add up to more than row_count. in.jelly —
neg_002 message_lengths with a value larger than row_count. in.jelly —
neg_003 The stream type changes from MESSAGES to FLAT when the stream options are restated. in.jelly —
neg_004 The stream type changes from FLAT to MESSAGES when the stream options are restated. in.jelly —

quads_rdf_1_1

18 positive, 2 negative

Positive

Name Description Input(s) Expected output
pos_001 Typical dataset: quads in the default graph, in named graphs with IRI names, and in a named graph with a blank node name. Single frame. in.jelly out.nq
pos_002 Typical dataset split into frames of 5 statements. in.jelly out.nq
pos_003 Quads that are all in the default graph: the batches have no graphs column. in.jelly out.nq
pos_004 Quads grouped by graph: the graphs column is a few long repeat runs. in.jelly out.nq
pos_005 The graphs column is an empty message: every quad is in the default graph. in.jelly out.nq
pos_006 Sequence layout example from the specification, in the graphs column: A B B B _ _ C C, layouts = [33, 17, 0]. in.jelly out.nq
pos_007 A graphs column shorter than row_count is padded with unbound cells (the default graph). in.jelly out.nq
pos_008 An explicit trailing unbound run (producers should omit it, but it is valid). in.jelly out.nq
pos_009 Leading unbound run. in.jelly out.nq
pos_010 An unbound run and a repeat run at the same position: the unbound run comes first. in.jelly out.nq
pos_011 Repeat run followed by an unbound run, then a single value. in.jelly out.nq
pos_012 Largest runs that fit in one token: a repeat run of 16 cells (len_code 14) and an unbound run of 15 cells (len_code 14). in.jelly out.nq
pos_013 Smallest runs that need an extension varint: a repeat run of 17 cells and an unbound run of 16 cells (len_code 15, extension 0). in.jelly out.nq
pos_014 Long runs with multi-byte extension varints: a repeat run of 1000 cells and an unbound run of 5000 cells. in.jelly out.nq
pos_015 Tokens that take more than one byte, with unbound runs: skip = 4 and skip = 300. All name_ids are 0: names 1 to 306, which are g0 to g305. in.jelly out.nq
pos_016 Two unbound runs next to each other (skip = 0 between them), not merged into one. Producers should not write two unbound runs with skip = 0 between them, but the consumer must still decode it. in.jelly out.nq
pos_017 A graphs column mixing IRIs and blank nodes, with unbound cells. in.jelly out.nq
pos_018 A blank node graph name with the same label as a blank node subject: the same blank node. in.jelly out.nq

Negative

Name Description Input(s) Expected output
neg_001 A literal in the graphs column. in.jelly —
neg_002 The physical type changes from QUADS to TRIPLES when the stream options are restated. in.jelly —

quads_rdf_1_2

1 positive, 1 negative

Positive

Name Description Input(s) Expected output
pos_001 Common usage: triple terms in named graphs and in the default graph, over several frames. in.jelly out.nq

Negative

Name Description Input(s) Expected output
neg_001 A triple term in the graphs column. in.jelly —

quads_rdf_1_2_basic

1 positive, 0 negative

Positive

Name Description Input(s) Expected output
pos_001 Common usage: directional labels in named graphs, over several frames. in.jelly out.nq

triples_rdf_1_1

73 positive, 71 negative

Positive

Name Description Input(s) Expected output
pos_001 Typical graph: IRIs, language-tagged and typed literals. Prefix and datatype lookups enabled. Single frame. in.jelly out.nt
pos_002 Typical graph with the prefix lookup disabled. The names hold whole IRIs. in.jelly out.nt
pos_003 Typical graph split into frames of 3 statements. Lookup entries are kept between frames. in.jelly out.nt
pos_004 1000 statements with over 600 distinct IRIs, name lookup of size 128. The name lookup entries are overwritten many times (LRU), and frames end early when the working set would not fit. in.jelly out.nt
pos_005 Non-ASCII IRIs and literals (Polish, Japanese, Arabic, emoji, combining marks), characters that need escaping in text formats, and an empty literal. in.jelly out.nt
pos_006 Blank nodes whose labels repeat across statements and across frames. Equal labels are the same blank node in the whole stream. in.jelly out.nt
pos_007 2000 statements about one subject, in frames of 256 statements. Columns of literals with a single literal kind, and subjects and predicates as one repeat run. in.jelly out.nt
pos_008 Every statement in its own frame. in.jelly out.nt
pos_009 Statements grouped by subject: the subjects column is a few long repeat runs. in.jelly out.nt
pos_010 The example from the specification: two frames, the second restating the stream options. in.jelly out.nt
pos_011 An empty file: a stream with no frames. It is a valid, empty RDF graph. in.jelly out.nt
pos_012 A stream of two empty frames (no rows, no column batch). It is a valid, empty RDF graph. in.jelly out.nt
pos_013 Empty frames before the first frame with the stream options, between frames, and at the end. in.jelly out.nt
pos_014 A frame with only the stream options, followed by a frame with a column batch and no options. in.jelly out.nt
pos_015 A stream with only the stream options: an empty RDF graph. in.jelly out.nt
pos_016 A column batch with row_count 0 and only lookup entries, used by the next frame. in.jelly out.nt
pos_017 Metadata with an implementation-defined key whose value is not valid UTF-8. Consumers must not assume that the value is valid UTF-8, and should ignore the key. in.jelly out.nt
pos_018 Metadata in an empty frame. in.jelly out.nt
pos_019 Stream options with a stream name. in.jelly out.nt
pos_020 Stream options that declare RDF 1.1. in.jelly out.nt
pos_021 A single non-delimited frame. Producers must write files in the delimited variant, but consumers should be able to read this. in.jelly out.nt
pos_022 Two streams concatenated. The second segment restates the stream options (with other table sizes), and its lookup identifiers restart from 1. Blank node labels are not reset by the restated options: the label x in both segments is one blank node. in.jelly out.nt
pos_023 Concatenated streams with other lookup settings: the first segment has no prefix lookup, the second has prefix and datatype lookups, and the third declares RDF 1.1. in.jelly out.nt
pos_024 The stream options restated in a frame without a column batch, and then in a frame with one. in.jelly out.nt
pos_025 Namespace declarations do not change the statements: two declarations, the second with its IRI inferred from the first (prefix_id 0 and name_id 0), an empty namespace name, and a name declared again. The IRIs of the namespace declarations are one IRI sequence: ex: is http://example.org/, the empty name is http://example.org/ns/ (prefix 1, name 9), and ex: is then http://example.org/a. in.jelly out.nt
pos_026 A column batch with only namespace declarations (row_count 0), between two batches with statements. in.jelly out.nt
pos_027 Namespace declarations without the prefix lookup: the IRI of the namespace is a whole name. in.jelly out.nt
pos_028 Lookup identifiers continue across frames: an entry with id 0 in the second frame takes the next identifier. in.jelly out.nt
pos_029 Packed entries with explicit identifiers: id 10 with two values, then id 0 continuing at 12. in.jelly out.nt
pos_030 An entry overwritten in a later frame: the later frame sees the new value. in.jelly out.nt
pos_031 All lookup entries of a batch are applied before its columns: a name overwritten twice in one batch decodes to the last value. A producer must not write such a batch if the column is meant to refer to the first value (see the working set rule). A consumer must still decode it this way. in.jelly out.nt
pos_032 A name lookup entry at the largest identifier the table allows. in.jelly out.nt
pos_033 Lookup table sizes at the recommended default consumer limits: 16384 names, 4096 prefixes, 256 datatypes. Consumers may set lower limits than the recommended defaults, and then reject this stream. in.jelly out.nt
pos_034 IRI example from the specification: name_ids [0, 0, 1, 3], prefix_ids [1, 0, 0, 2]. in.jelly out.nt
pos_035 prefix_ids with a single entry: every value uses that prefix. in.jelly out.nt
pos_036 Empty prefix_ids with the prefix lookup enabled: no value has a prefix, the names hold whole IRIs. in.jelly out.nt
pos_037 prefix_ids with one entry per value, starting with 0: the prefix inference state starts from "no prefix". in.jelly out.nt
pos_038 name_ids mixing explicit identifiers and 0 (previous + 1): [5, 0, 0, 2, 0] is 5, 6, 7, 2, 3. in.jelly out.nt
pos_039 The name_id and prefix_id inference state resets at the start of every column. The subjects column ends at name 3 with prefix 2. The objects column still starts from name 0 and no prefix: its first name_id of 0 means name 1, and its first prefix_id of 0 means no prefix, not the prefix of the previous column. in.jelly out.nt
pos_040 The name_id inference state resets at the start of every batch. in.jelly out.nt
pos_041 An empty name: the IRI is equal to its prefix. in.jelly out.nt
pos_042 Subjects, predicates, and objects with different prefixes, all IRIs inferred from 0. in.jelly out.nt
pos_043 A column of simple literals: literal_kinds is empty. in.jelly out.nt
pos_044 xsd:string literals encoded three ways: no literal kinds, a single literal kind referring to an xsd:string datatype entry, and one literal kind per value mixing 0 and that entry. All are the same simple literal. in.jelly out.nt
pos_045 A column of literals with a single literal kind for the whole column: xsd:integer, then xsd:dateTime. in.jelly out.nt
pos_046 A column of literals with one language tag for the whole column: a single literal kind of 2. in.jelly out.nt
pos_047 A column of literals with one literal kind per value, mixing simple, typed, and language-tagged literals with different tags. in.jelly out.nt
pos_048 Literal kind values: 0 is a simple literal, odd values 1, 3, 5 are datatypes 1, 2, 3, and even values 2, 4, 6 are language tags 0, 1, 2. in.jelly out.nt
pos_049 Empty lexical forms, with a single literal kind and with one literal kind per value. in.jelly out.nt
pos_050 langtag_directions with only 0 entries (no base direction) in a stream that declares RDF 1.1. Producers should leave langtag_directions empty instead, but a list of zeros is valid. in.jelly out.nt
pos_051 An objects column with values of several term types: kinds says which list holds each run value. Six values need two bytes of kinds. kinds = [0x18, 0x00]: IRI, blank node, literal, IRI in the first byte, then IRI, IRI. The IRIs are decoded from name_ids [0, 0, 4, 0]: names 1, 2, 4, 5. in.jelly out.nt
pos_052 An objects column with exactly four values of several term types: kinds is one full byte. in.jelly out.nt
pos_053 The IRI inference state of a column with several term types resets at the start of every batch. in.jelly out.nt
pos_054 A column with literals and an IRI: the literal kinds and language tags apply to the literals. in.jelly out.nt
pos_055 prefix_ids with one entry per IRI in a column with several term types: it has one entry per IRI, not per run value, and its inference runs along the IRIs only. in.jelly out.nt
pos_056 literal_kinds with one entry per literal in a column with several term types: it has one entry per literal, not per run value. in.jelly out.nt
pos_057 Columns whose values are all of one term type need no kinds: an objects column of blank nodes, and one of literals. in.jelly out.nt
pos_058 kinds set for a column whose values are all of one term type (allowed, producers should leave it empty). in.jelly out.nt
pos_059 A subjects column mixing IRIs and blank nodes. in.jelly out.nt
pos_060 A column of IRIs only, with no kinds, and a repeat run. kinds may be empty when all run values are of one term type. in.jelly out.nt
pos_061 Every cell bound, no value repeated in consecutive rows: layouts is empty. in.jelly out.nt
pos_062 Two repeat runs in a row (skip = 0 between them), then the implicit tail. in.jelly out.nt
pos_063 Second example of the sequence layout from the specification: A, then B repeated 40 times, then C. layouts = [47, 23]. in.jelly out.nt
pos_064 The largest repeat run that fits in one token: 16 cells (len_code 14). in.jelly out.nt
pos_065 The smallest repeat run that needs an extension varint: 17 cells (len_code 15, extension 0). in.jelly out.nt
pos_066 A long repeat run with a multi-byte extension varint: 1000 cells. in.jelly out.nt
pos_067 Tokens that take more than one byte: skip = 4 and skip = 300. in.jelly out.nt
pos_068 The subjects and predicates columns as one repeat run each, and an objects column without layouts. in.jelly out.nt
pos_069 Equal values in consecutive rows stored as separate run values, without a repeat run. All statements must be kept. Consumers must not remove duplicates. Producers should merge equal adjacent run values into one run, so they usually do not write this. The consumer must still decode it. in.jelly out.nt
pos_070 Two repeat runs of the same value next to each other, not merged into one. Producers should merge adjacent runs, so they usually do not write this. The consumer must still decode it. in.jelly out.nt
pos_071 Duplicate statements within a frame and across frames are all kept, in order. in.jelly out.nt
pos_072 Blank node labels are scoped to the whole stream: the same label in different frames and in different columns is the same blank node. in.jelly out.nt
pos_073 Prefix and datatype lookup identifiers continue across frames: entries with id 0 in the second frame take the next identifiers. in.jelly out.nt

Negative

Name Description Input(s) Expected output
neg_001 The last frame is truncated: the length prefix is larger than the rest of the file. The length prefix 127 (0x7F) cannot be read as the start of a non-delimited frame: it would be field 15 with the invalid wire type 7. in.jelly —
neg_002 Version tag 0. in.jelly —
neg_003 Version tag 4, newer than version 3 of the format. in.jelly —
neg_004 generalized_statements set in the stream options. The field is used only in Jelly-RDF 1.0.x and 1.1.x. in.jelly —
neg_005 rdf_star set in the stream options. The field is used only in Jelly-RDF 1.0.x and 1.1.x. in.jelly —
neg_006 logical_type set in the stream options. The field is used only in Jelly-RDF 1.0.x and 1.1.x. in.jelly —
neg_007 physical_type not set (PHYSICAL_STREAM_TYPE_UNSPECIFIED). in.jelly —
neg_008 physical_type GRAPHS, which is used only in Jelly-RDF 1.0.x and 1.1.x. in.jelly —
neg_009 Unknown physical_type value 4. in.jelly —
neg_010 Unknown stream_type value 2. in.jelly —
neg_011 Unknown rdf_version value 4. in.jelly —
neg_012 max_name_table_size 127, below the minimum of 128. in.jelly —
neg_013 max_name_table_size not set (0), in a frame with only the stream options. in.jelly —
neg_014 max_name_table_size 10000000. Consumers should reject lookup sizes larger than their limit (recommended default 16384). in.jelly —
neg_015 max_prefix_table_size 10000000. Consumers should reject lookup sizes larger than their limit (recommended default 4096). in.jelly —
neg_016 max_datatype_table_size 10000000. Consumers should reject lookup sizes larger than their limit (recommended default 256). in.jelly —
neg_017 A frame with two rows: the stream options twice. in.jelly —
neg_018 A frame with two rows: the stream options, and a name entry row of the row layout (Jelly-RDF 1.1). in.jelly —
neg_019 A row with a triple (row layout, Jelly-RDF 1.1) in a stream with version tag 3. in.jelly —
neg_020 A row with a namespace declaration (row layout, Jelly-RDF 1.1) in a stream with version tag 3. in.jelly —
neg_021 A prefix lookup entry when the prefix lookup is disabled (max_prefix_table_size 0). in.jelly —
neg_022 A datatype lookup entry when the datatype lookup is disabled (max_datatype_table_size 0). in.jelly —
neg_023 A name lookup entry with an identifier larger than the table size. in.jelly —
neg_024 A packed name entry whose last value falls outside the table (ids 127, 128, 129 in a table of 128). in.jelly —
neg_025 A prefix lookup entry with an identifier larger than the table size. in.jelly —
neg_026 A column refers to a prefix identifier outside the prefix table. in.jelly —
neg_027 A column refers to a name that was never defined (name_id 0 at the start of a column means 1, and the name table is empty). in.jelly —
neg_028 A column refers to a name identifier outside the name table. in.jelly —
neg_029 A column uses prefix_ids while the prefix lookup is disabled. in.jelly —
neg_030 A namespace declaration refers to a name that was never defined. in.jelly —
neg_031 prefix_ids with 2 entries for 3 values. The length must be 0, 1, or the number of values. in.jelly —
neg_032 A literal kind refers to a datatype identifier outside the datatype table. in.jelly —
neg_033 A literal kind refers to a datatype while the datatype lookup is disabled. in.jelly —
neg_034 A literal kind refers to a datatype entry holding rdf:langString. in.jelly —
neg_035 literal_kinds with 2 entries for 3 values. The length must be 0, 1, or the number of values. in.jelly —
neg_036 A literal kind refers to a language tag index past the end of langtags. in.jelly —
neg_037 A literal kind refers to a language tag, but the column has no language tags. in.jelly —
neg_038 A literal kind in a column with several term types refers to a language tag that is not there. in.jelly —
neg_039 kinds is too short: one byte for five values. in.jelly —
neg_040 kinds is too long: two bytes for two values. in.jelly —
neg_041 kinds is empty, but the column has values of two term types: a literal and a blank node. in.jelly —
neg_042 The unused bits of the last byte of kinds are not 0. kinds = 0x15: literal, literal, and then a third literal in the bits of a value that does not exist. in.jelly —
neg_043 kinds refers to more IRIs than the column has: two IRIs, but name_ids has one. The number of kinds matches the total number of values (2), but not the number of values of each type. in.jelly —
neg_044 kinds refers to more literals than the column has: two literals, but lex_values has one. The number of kinds matches the total number of values (2), but not the number of values of each type. in.jelly —
neg_045 kinds refers to more blank nodes than the column has: two blank nodes, but bnodes has one. in.jelly —
neg_046 prefix_ids with one entry per run value, in a column with two IRIs and a literal. The list must have 0, 1, or one entry per IRI. in.jelly —
neg_047 literal_kinds with one entry per run value, in a column with two literals and an IRI. The list must have 0, 1, or one entry per literal. in.jelly —
neg_048 row_count of 2^27, larger than the maximum of 2^27 - 1. Each column is one repeat run of 2^27 cells, so the columns match row_count, and the row count is the only problem. in.jelly —
neg_049 The subjects column is shorter than row_count: its last cell is unbound. in.jelly —
neg_050 The predicates column is not set (all its cells are unbound). in.jelly —
neg_051 The objects column has an unbound run. in.jelly —
neg_052 The objects column is an empty message, with row_count 1. in.jelly —
neg_053 A literal in the subjects column. in.jelly —
neg_054 A blank node in the predicates column. in.jelly —
neg_055 A literal in the predicates column. in.jelly —
neg_056 A graphs column in a stream of physical type TRIPLES. in.jelly —
neg_057 An empty graphs column in a stream of physical type TRIPLES. An empty column message is still a set graphs field. in.jelly —
neg_058 message_lengths in a FLAT stream. in.jelly —
neg_059 The physical type changes from TRIPLES to QUADS when the stream options are restated. in.jelly —
neg_060 The restated stream options are not valid on their own (max_name_table_size 10). in.jelly —
neg_061 After the stream options are restated, a column refers to a name defined only before. The lookups are emptied by the restated options. in.jelly —
neg_062 Corrupt layout: skip runs past the last run value. in.jelly —
neg_063 Corrupt layout: a repeat run starts after the last run value. in.jelly —
neg_064 Corrupt layout: len_code 15 is the last token, with no extension varint after it. in.jelly —
neg_065 Corrupt layout: a repeat run makes the column longer than row_count. in.jelly —
neg_066 Corrupt layout: an unbound run makes the column longer than row_count. in.jelly —
neg_067 A column with more run values than row_count, and no layouts. in.jelly —
neg_068 Corrupt layout: an extension varint of 2^32 - 1 (a run far longer than the batch). Consumers should check the run length against row_count before writing any cells (see the security considerations). in.jelly —
neg_069 A datatype lookup entry with an identifier larger than the table size. in.jelly —
neg_070 The restated stream options have version tag 0. in.jelly —
neg_071 The restated stream options set generalized_statements, which is used only in Jelly-RDF 1.0.x and 1.1.x. in.jelly —

triples_rdf_1_2

16 positive, 14 negative

Positive

Name Description Input(s) Expected output
pos_001 A triple term of three IRIs. in.jelly out.nt
pos_002 A triple term with a blank node subject and a directional literal object. in.jelly out.nt
pos_003 Triple terms nested three levels deep (in the object position). in.jelly out.nt
pos_004 The IRIs inside the triple terms of a column have their own IRI inference state, separate from the other IRIs of the column. All name_ids are 0. The IRIs of the column (name_ids) give names 1 and 2. The triple term starts from name 0 again: its subject, predicate, and object are names 1, 2, and 3. in.jelly out.nt
pos_005 The IRI inference state of the triple terms runs through all triple terms of the column, in subject, predicate, object order. All name_ids are 0: the second triple term continues from name 3, and keeps the prefix of the first. in.jelly out.nt
pos_006 The IRI inference state of the triple terms resets at the start of every batch. All name_ids are 0. Without the reset, the triple term in the second batch would continue from name 4 (d, e, f). in.jelly out.nt
pos_007 The name_id inference of the triple terms goes on into a nested triple term. All name_ids are 0: subject and predicate of the outer triple term are names 1 and 2, then the nested triple term gives names 3, 4, and 5. in.jelly out.nt
pos_008 A triple term with a blank node object. in.jelly out.nt
pos_009 A prefix_id of 0 in the first IRI of the triple terms of a column means no prefix, even after the other IRIs of the column used a prefix. The IRIs of the column use prefix 1. The triple terms have their own state, so the subject, with prefix_id 0, has no prefix: its name holds the whole IRI. in.jelly out.nt
pos_010 A blank node inside a triple term and the same label in the subjects column are the same blank node. in.jelly out.nt
pos_011 A triple term in a stream that declares no RDF version (allowed: no version is announced). in.jelly out.nt
pos_012 The same triple term in consecutive rows, as a repeat run. in.jelly out.nt
pos_013 Concatenated streams: the first segment declares RDF 1.1, the second declares RDF 1.2 and has a triple term. in.jelly out.nt
pos_014 A column of triple terms only, with no kinds. kinds may be empty when all run values are of one term type. The second triple term has name_id 4 for its subject, and name_id 2 for its predicate. in.jelly out.nt
pos_015 Directional literals in a stream that declares RDF 1.2 (which includes RDF 1.2 Basic). in.jelly out.nt
pos_016 Common usage: reifiers with rdf:reifies and triple terms, with IRIs, literals, and nested triple terms, over several frames. in.jelly out.nt

Negative

Name Description Input(s) Expected output
neg_001 A triple term without a subject. in.jelly —
neg_002 A triple term without a predicate. in.jelly —
neg_003 A triple term without an object. in.jelly —
neg_004 A literal in a triple term with datatype 0, which is invalid. in.jelly —
neg_005 A literal in a triple term with a direction but no language tag. in.jelly —
neg_006 A literal in a triple term with a direction and a datatype. in.jelly —
neg_007 A literal in a triple term with an unknown direction value (3). in.jelly —
neg_008 A literal in a triple term whose datatype is rdf:langString. in.jelly —
neg_009 A literal in a triple term whose datatype is rdf:dirLangString. in.jelly —
neg_010 kinds is empty, but the column has values of two term types: an IRI and a triple term. in.jelly —
neg_011 A triple term in the subjects column. in.jelly —
neg_012 A triple term in the predicates column. in.jelly —
neg_013 A triple term refers to a name that was never defined. in.jelly —
neg_014 A literal in a triple term refers to a datatype that was never defined. in.jelly —

triples_rdf_1_2_basic

5 positive, 4 negative

Positive

Name Description Input(s) Expected output
pos_001 A column of directional language-tagged strings (ltr and rtl) and a language-tagged string without a direction. The tag en is listed twice in langtags, with different directions. in.jelly out.nt
pos_002 A column of literals with a single literal kind: one language tag and base direction for the whole column. in.jelly out.nt
pos_003 Directional literals in a stream that declares no RDF version (allowed: no version is announced). in.jelly out.nt
pos_004 A directional literal in a column with several term types. in.jelly out.nt
pos_005 Common usage: labels in several languages and directions, over several frames. in.jelly out.nt

Negative

Name Description Input(s) Expected output
neg_001 langtag_directions with 2 entries for 1 language tag. in.jelly —
neg_002 langtag_directions set in a column with no language tags. in.jelly —
neg_003 langtag_directions with an unknown direction value (7). in.jelly —
neg_004 A literal kind refers to a datatype entry holding rdf:dirLangString. in.jelly —

To Jelly (serialize)

Jump to category

messages

5 positive, 0 negative

Positive

Name Description Input(s) Expected output
pos_001 Several messages of a few statements each. Stream options are: physical-type=triples, stream-type=messages, max-name-table-size=128, max-prefix-table-size=8, max-datatype-table-size=0, rdf-version=unspecified. stream_options.jelly
in_000.nt
in_001.nt
in_002.nt
in_003.nt
in_004.nt
in_005.nt
out.jelly
pos_002 Messages with an empty message among them. Stream options are: physical-type=triples, stream-type=messages, max-name-table-size=128, max-prefix-table-size=0, max-datatype-table-size=0, rdf-version=unspecified. stream_options.jelly
in_000.nt
in_001.nt
in_002.nt
out.jelly
pos_003 Messages larger than a frame. Stream options are: physical-type=triples, stream-type=messages, max-name-table-size=128, max-prefix-table-size=8, max-datatype-table-size=0, rdf-version=unspecified. stream_options.jelly
in_000.nt
in_001.nt
in_002.nt
out.jelly
pos_004 Messages with blank nodes, using the same labels in every message. Stream options are: physical-type=triples, stream-type=messages, max-name-table-size=128, max-prefix-table-size=0, max-datatype-table-size=0, rdf-version=unspecified. Each input file is one message, and its blank node labels are scoped to that message. stream_options.jelly
in_000.nt
in_001.nt
in_002.nt
out.jelly
pos_005 Messages that are RDF datasets. Stream options are: physical-type=quads, stream-type=messages, max-name-table-size=128, max-prefix-table-size=8, max-datatype-table-size=0, rdf-version=unspecified. stream_options.jelly
in_000.nq
in_001.nq
in_002.nq
out.jelly

quads_rdf_1_1

4 positive, 0 negative

Positive

Name Description Input(s) Expected output
pos_001 Quads in the default graph, in named graphs with IRI names, and in a named graph with a blank node name. Stream options are: physical-type=quads, max-name-table-size=128, max-prefix-table-size=16, max-datatype-table-size=8, rdf-version=unspecified. stream_options.jelly
in.nq
out.jelly
pos_002 Quads that are all in the default graph. Stream options are: physical-type=quads, max-name-table-size=128, max-prefix-table-size=8, max-datatype-table-size=0, rdf-version=unspecified. stream_options.jelly
in.nq
out.jelly
pos_003 Quads grouped by graph, over several frames. Stream options are: physical-type=quads, max-name-table-size=128, max-prefix-table-size=8, max-datatype-table-size=0, rdf-version=unspecified. stream_options.jelly
in.nq
out.jelly
pos_004 A blank node that is a graph name and a subject. Stream options are: physical-type=quads, max-name-table-size=128, max-prefix-table-size=0, max-datatype-table-size=0, rdf-version=unspecified. stream_options.jelly
in.nq
out.jelly

quads_rdf_1_2

1 positive, 0 negative

Positive

Name Description Input(s) Expected output
pos_001 Triple terms in named graphs. Stream options are: physical-type=quads, max-name-table-size=128, max-prefix-table-size=8, max-datatype-table-size=0, rdf-version=1.2. stream_options.jelly
in.nq
out.jelly

quads_rdf_1_2_basic

1 positive, 0 negative

Positive

Name Description Input(s) Expected output
pos_001 Directional language-tagged strings in named graphs. Stream options are: physical-type=quads, max-name-table-size=128, max-prefix-table-size=0, max-datatype-table-size=0, rdf-version=1.2-basic. stream_options.jelly
in.nq
out.jelly

triples_rdf_1_1

11 positive, 1 negative

Positive

Name Description Input(s) Expected output
pos_001 IRIs only, prefix lookup enabled. Stream options are: physical-type=triples, max-name-table-size=128, max-prefix-table-size=8, max-datatype-table-size=0, rdf-version=unspecified. stream_options.jelly
in.nt
out.jelly
pos_002 IRIs only, prefix lookup disabled. Stream options are: physical-type=triples, max-name-table-size=128, max-prefix-table-size=0, max-datatype-table-size=0, rdf-version=unspecified. stream_options.jelly
in.nt
out.jelly
pos_003 Simple, typed, and language-tagged literals. Stream options are: physical-type=triples, max-name-table-size=128, max-prefix-table-size=0, max-datatype-table-size=8, rdf-version=unspecified. stream_options.jelly
in.nt
out.jelly
pos_004 Blank nodes as subjects and objects, repeated across frames. Stream options are: physical-type=triples, max-name-table-size=128, max-prefix-table-size=0, max-datatype-table-size=0, rdf-version=unspecified. stream_options.jelly
in.nt
out.jelly
pos_005 A typical graph with prefix and datatype lookups. Stream options are: physical-type=triples, max-name-table-size=128, max-prefix-table-size=16, max-datatype-table-size=8, rdf-version=unspecified. stream_options.jelly
in.nt
out.jelly
pos_006 1000 statements with over 600 distinct IRIs and a name lookup of 128 entries. The producer has to evict lookup entries and end frames before their working set overflows the tables. Stream options are: physical-type=triples, max-name-table-size=128, max-prefix-table-size=16, max-datatype-table-size=4, rdf-version=unspecified. stream_options.jelly
in.nt
out.jelly
pos_007 Non-ASCII IRIs and literals, and characters that need escaping in text formats. Stream options are: physical-type=triples, max-name-table-size=128, max-prefix-table-size=16, max-datatype-table-size=0, rdf-version=unspecified. stream_options.jelly
in.nt
out.jelly
pos_008 Duplicate statements: all of them must be kept, in order. Stream options are: physical-type=triples, max-name-table-size=128, max-prefix-table-size=0, max-datatype-table-size=0, rdf-version=unspecified. stream_options.jelly
in.nt
out.jelly
pos_009 An empty graph. Stream options are: physical-type=triples, max-name-table-size=128, max-prefix-table-size=0, max-datatype-table-size=0, rdf-version=unspecified. The expected output has a frame with the stream options and no statements. An output without any non-empty frame, such as an empty file, is also correct. stream_options.jelly
in.nt
out.jelly
pos_010 Statements grouped by subject. Stream options are: physical-type=triples, max-name-table-size=128, max-prefix-table-size=8, max-datatype-table-size=0, rdf-version=unspecified. stream_options.jelly
in.nt
out.jelly
pos_011 Stream options that declare RDF 1.1. Stream options are: physical-type=triples, max-name-table-size=128, max-prefix-table-size=0, max-datatype-table-size=0, rdf-version=1.1. stream_options.jelly
in.nt
out.jelly

Negative

Name Description Input(s) Expected output
neg_001 A typed literal, with the datatype lookup disabled. Stream options are: physical-type=triples, max-name-table-size=128, max-prefix-table-size=0, max-datatype-table-size=0, rdf-version=unspecified. stream_options.jelly
in.nt
—

triples_rdf_1_2

2 positive, 2 negative

Positive

Name Description Input(s) Expected output
pos_001 Triple terms, including nested ones, stream options declaring RDF 1.2. Stream options are: physical-type=triples, max-name-table-size=128, max-prefix-table-size=8, max-datatype-table-size=4, rdf-version=1.2. stream_options.jelly
in.nt
out.jelly
pos_002 Triple terms, stream options declaring no RDF version. Stream options are: physical-type=triples, max-name-table-size=128, max-prefix-table-size=8, max-datatype-table-size=4, rdf-version=unspecified. stream_options.jelly
in.nt
out.jelly

Negative

Name Description Input(s) Expected output
neg_001 A triple term, with stream options declaring RDF 1.2 Basic. Stream options are: physical-type=triples, max-name-table-size=128, max-prefix-table-size=8, max-datatype-table-size=4, rdf-version=1.2-basic. stream_options.jelly
in.nt
—
neg_002 A triple term, with stream options declaring RDF 1.1. Stream options are: physical-type=triples, max-name-table-size=128, max-prefix-table-size=8, max-datatype-table-size=4, rdf-version=1.1. stream_options.jelly
in.nt
—

triples_rdf_1_2_basic

3 positive, 1 negative

Positive

Name Description Input(s) Expected output
pos_001 Directional language-tagged strings, stream options declaring RDF 1.2 Basic. Stream options are: physical-type=triples, max-name-table-size=128, max-prefix-table-size=0, max-datatype-table-size=0, rdf-version=1.2-basic. stream_options.jelly
in.nt
out.jelly
pos_002 Directional language-tagged strings, stream options declaring no RDF version. Stream options are: physical-type=triples, max-name-table-size=128, max-prefix-table-size=0, max-datatype-table-size=0, rdf-version=unspecified. stream_options.jelly
in.nt
out.jelly
pos_003 One language tag and direction for a whole column (a single literal kind). Stream options are: physical-type=triples, max-name-table-size=128, max-prefix-table-size=0, max-datatype-table-size=0, rdf-version=1.2-basic. stream_options.jelly
in.nt
out.jelly

Negative

Name Description Input(s) Expected output
neg_001 A directional language-tagged string, with stream options declaring RDF 1.1. Stream options are: physical-type=triples, max-name-table-size=128, max-prefix-table-size=0, max-datatype-table-size=0, rdf-version=1.1. stream_options.jelly
in.nt
—