Jelly-SPARQL test cases
This page lists the conformance test cases defined for the Jelly-SPARQL format, along with instructions for running them.
Machine-readable definitions of the test cases are available in the jelly-protobuf repository.
See also instructions on reporting conformance and the page listing conformance reports of implementations.
Test categories
Categories indicate supported features: select_rdf_1_1 (solution sequences with IRIs, blank nodes, and literals), ask (boolean results), select_rdf_1_2_basic (literals with a base direction, RDF 1.2 Basic), select_rdf_1_2 (triple terms, RDF 1.2), punctuated (streams with a sequence of result sets, the PUNCTUATED stream type).
Tests in the select_rdf_1_2_basic category are marked with mf:requires jellyt:requirementRdf12Basic, tests in the select_rdf_1_2 category with mf:requires jellyt:requirementRdf12, and tests in the punctuated category with mf:requires jellyt:requirementPunctuated. 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 withneg_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.
- A positive test is expected to succeed. The test case is successful when the implementation returns the expected result specified in
- There are two types of tests:
- From Jelly (parse) tests –
jellyt:TestSparqlFromJelly. The goal of the test is to convert the Jelly-SPARQL input specified inmf:actionto a SPARQL result.- The input (
mf:action) MUST be an RDF IRI pointing to a.jellysfile. - If the test is positive, the output (
mf:result) MUST be an RDF IRI pointing to a.srjfile with the expected result. For aPUNCTUATEDstream, it MUST instead be anrdf:Listof.srjfiles, one per result set, in order. The implementation must then read the same number of result sets, and each must be equivalent to the expected one at the same position. - This class MUST be combined with either
jellyt:TestPositiveorjellyt:TestNegative. When combined withjellyt:TestPositive, the test succeeds when the input is read without errors, and the result is equivalent to the expected result specified inmf:result.
- The input (
- To Jelly (serialize) tests –
jellyt:TestSparqlToJelly. The goal of the test is to convert the SPARQL result specified inmf:actionto a Jelly-SPARQL file.- The input (
mf:action) MUST be anrdf:Listof two or more elements. The first element is a Jelly-SPARQL file with one frame, containing only the stream options to be used by the producer. This file is not a valid Jelly-SPARQL stream on its own – it only contains the options. The remaining elements are.srjfiles with the SPARQL results to be converted: one file, or, for aPUNCTUATEDstream, one file per result set, in order. - If the test is positive, the output (
mf:result) MUST be an RDF IRI pointing to a.jellysfile with one valid serialization of the result. If the test is negative,mf:resultis not set. - This class MUST be combined with either
jellyt:TestPositiveorjellyt:TestNegative. When combined withjellyt:TestPositive, the test succeeds when the resulting file is a valid Jelly-SPARQL stream, its first frame has the expected stream options, its last frame has a trailer without an error, and reading the file back gives a result equivalent to the input. For aPUNCTUATEDstream, reading it back must give the same number of result sets, each equivalent to the input at the same position. Jelly-SPARQL is not byte-level canonical, so the resulting file SHOULD NOT be compared with the file inmf:resultbyte by byte.
- The input (
- From Jelly (parse) tests –
- Two SPARQL results are equivalent when both are boolean results with the same value, or when they have the same variables in the same order, the same number of solutions in the same order, and there is a bijection between their blank node labels under which the solutions are pairwise equal. A simple literal and an
xsd:stringliteral with the same lexical form are the same term. Links (head.link) are not compared. - The
.srjfiles use the SPARQL 1.2 Query Results JSON Format:"its:dir"for base directions, and{"type": "triple", ...}for triple terms. - The test cases use the delimited variant of Jelly-SPARQL.
- Some positive tests have no stream trailer. The implementation may report such a stream as possibly truncated, but it must not fail these tests because of that.
- Tests of rules that the specification states with SHOULD rather than MUST are marked with the
jellyt:featureShouldLevelfeature (mf:notableproperty). 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: 230
- From Jelly: 201 (positive: 115, negative: 86)
- To Jelly: 29 (positive: 25, negative: 4)
From Jelly (parse)
Jump to category
ask
4 positive, 6 negative
Positive
| Name | Description | Input(s) | Expected output |
|---|---|---|---|
| pos_001 | Boolean result true. | in.jellys | out.srj |
| pos_002 | Boolean result false (an empty SparqlAskResult message: value defaults to false). | in.jellys | out.srj |
| pos_003 | Boolean result with metadata and a trailer in the same frame (neither is result content). | in.jellys | out.srj |
| pos_004 | Boolean result without a trailer. | in.jellys | out.srj |
Negative
| Name | Description | Input(s) | Expected output |
|---|---|---|---|
| neg_001 | A boolean result frame that declares a variable. | in.jellys | — |
| neg_002 | A boolean result frame that contains a column. | in.jellys | — |
| neg_003 | A boolean result frame with row_count 1. | in.jellys | — |
| neg_004 | A frame follows the boolean result. | in.jellys | — |
| neg_005 | A second boolean result stream concatenated after the first. Boolean results cannot be concatenated. | in.jellys | — |
| neg_006 | A boolean result with an error trailer. Implementations may deliver the boolean value, but must signal the error to the caller. | in.jellys | — |
punctuated
11 positive, 8 negative
Positive
| Name | Description | Input(s) | Expected output |
|---|---|---|---|
| pos_001 | A single result set in a PUNCTUATED stream. | in.jellys | out_000.srj |
| pos_002 | Two result sets with different variables. The second one starts without the stream options and refers to names defined in the first one: the lookups are kept between result sets. | in.jellys | out_000.srj out_001.srj |
| pos_003 | A result set over three frames, in which the variable changes term type, followed by another result set. | in.jellys | out_000.srj out_001.srj |
| pos_004 | Boolean results and a solution sequence mixed in one stream. | in.jellys | out_000.srj out_001.srj out_002.srj |
| pos_005 | A frame with a boolean result also has lookup entries, which the next result set uses. | in.jellys | out_000.srj out_001.srj |
| pos_006 | The same blank node label in two result sets. Blank node labels are scoped to a single result set, so the two cells are different blank nodes. Result sets are compared one at a time, so this test does not check that a consumer keeps them apart. | in.jellys | out_000.srj out_001.srj |
| pos_007 | Stream options repeated in the first frame of a result set: the lookups are emptied, and their identifiers restart from 1. | in.jellys | out_000.srj out_001.srj |
| pos_008 | A zero-variable result set and an empty result set between two others. An empty header in the first frame of a result set declares zero variables. | in.jellys | out_000.srj out_001.srj out_002.srj out_003.srj |
| pos_009 | The last result set has no trailer. Consumers may report the last result set as possibly truncated, but must not fail this test. | in.jellys | out_000.srj out_001.srj |
| pos_010 | Links in two result sets: each applies only to its own result set. The equivalence of result sets does not cover links. Implementations that expose links should check that each result set has only its own link. | in.jellys | out_000.srj out_001.srj |
| pos_011 | Two PUNCTUATED streams concatenated: the result sets of both, in order. | in.jellys | out_000.srj out_001.srj out_002.srj |
Negative
| Name | Description | Input(s) | Expected output |
|---|---|---|---|
| neg_001 | The stream options in a frame that is not the first frame of a result set. | in.jellys | — |
| neg_002 | The first frame of the second result set has a column, but no header. An empty header there declares zero variables. | in.jellys | — |
| neg_003 | A boolean result in the second frame of a result set. | in.jellys | — |
| neg_004 | A frame follows a boolean result that has no trailer. | in.jellys | — |
| neg_005 | A header in the second frame of the second result set. | in.jellys | — |
| neg_006 | The stream type changes from FLAT to PUNCTUATED when the stream options are repeated. | in.jellys | — |
| neg_007 | The stream type changes from PUNCTUATED to FLAT when the stream options are repeated. | in.jellys | — |
| neg_008 | An error trailer in the first of two result sets. The error applies only to the first result set. Implementations may go on with the next result set, but must signal the error to the caller. | in.jellys | — |
select_rdf_1_1
79 positive, 58 negative
Positive
| Name | Description | Input(s) | Expected output |
|---|---|---|---|
| pos_001 | Typical SELECT result: IRIs, language-tagged and typed literals. Prefix and datatype lookups enabled. Single frame. | in.jellys | out.srj |
| pos_002 | Typical SELECT result with the prefix lookup disabled – names hold whole IRIs. | in.jellys | out.srj |
| pos_003 | Typical SELECT result split into frames of 3 rows. Lookup entries are kept between frames. | in.jellys | out.srj |
| pos_004 | 1000 rows with over 1000 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.jellys | out.srj |
| pos_005 | Sparse result, as produced by OPTIONAL: many unbound cells and values repeated in consecutive rows (repeat and unbound runs). | in.jellys | out.srj |
| pos_006 | A variable whose values change term type between frames: IRIs, then literals, then blank nodes, then a mix. Only the column of the last frame needs kinds. | in.jellys | out.srj |
| pos_007 | Non-ASCII IRIs and literals (Polish, Japanese, Arabic, emoji, combining marks), characters that need escaping in text formats, and an empty literal. | in.jellys | out.srj |
| pos_008 | Blank nodes whose labels repeat across rows and across frames. Equal labels are the same blank node in the whole stream. | in.jellys | out.srj |
| pos_009 | An empty result set with three variables: one frame with the options and the header, no rows. | in.jellys | out.srj |
| pos_010 | 2000 rows of a single integer variable, in frames of 256 rows. Columns of literals with a single literal kind. | in.jellys | out.srj |
| pos_011 | Every row in its own frame. | in.jellys | out.srj |
| pos_012 | Sequence layout example from the specification: A B B B _ _ C C, layouts = [33, 17, 0]. | in.jellys | out.srj |
| pos_013 | Every cell bound, no value repeated in consecutive rows: layouts is empty. | in.jellys | out.srj |
| pos_014 | A column shorter than row_count is padded with unbound cells. | in.jellys | out.srj |
| pos_015 | An explicit trailing unbound run (producers should omit it, but it is valid). | in.jellys | out.srj |
| pos_016 | Leading unbound run. | in.jellys | out.srj |
| pos_017 | An unbound run and a repeat run at the same position: the unbound run comes first. | in.jellys | out.srj |
| pos_018 | Two repeat runs in a row (skip = 0 between them), then the implicit tail. | in.jellys | out.srj |
| pos_019 | Repeat run followed by an unbound run, then a single value. | in.jellys | out.srj |
| pos_020 | 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.jellys | out.srj |
| pos_021 | 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.jellys | out.srj |
| pos_022 | Long runs with multi-byte extension varints: a repeat run of 1000 cells and an unbound run of 5000 cells. | in.jellys | out.srj |
| pos_023 | Tokens that take more than one byte: skip = 4 and skip = 300. | in.jellys | out.srj |
| pos_024 | The sequence layout in columns of blank nodes, of literals (no literal kinds), of literals (a literal kind per value), and of values of several term types. Cells: b = x x _ _ y _; l = _ 1 1 1 1 2; f = hi _ _ _ hej _; p = a x x x z _. | in.jellys | out.srj |
| pos_025 | Equal values in consecutive rows stored as separate run values, without a repeat run. Both rows must be kept – consumers must not deduplicate. Producers should merge equal adjacent run values into one run, so they usually do not write this. The consumer must still decode it. | in.jellys | out.srj |
| pos_026 | Duplicate solutions within a frame and across frames are all preserved, in order. | in.jellys | out.srj |
| pos_027 | IRI example from the specification: name_ids [0, 0, 1, 3], prefix_ids [1, 0, 0, 2]. | in.jellys | out.srj |
| pos_028 | prefix_ids with a single entry: every value uses that prefix. | in.jellys | out.srj |
| pos_029 | Empty prefix_ids with the prefix lookup enabled: no value has a prefix, the names hold whole IRIs. | in.jellys | out.srj |
| pos_030 | prefix_ids with one entry per value, starting with 0: the prefix inference state starts from "no prefix". | in.jellys | out.srj |
| pos_031 | name_ids mixing explicit identifiers and 0 (previous + 1): [5, 0, 0, 2, 0] is 5, 6, 7, 2, 3. | in.jellys | out.srj |
| pos_032 | The name_id and prefix_id inference state resets at the start of every column. The first column ends at name 3 with prefix 2. The second 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.jellys | out.srj |
| pos_033 | The name_id inference state resets at the start of every frame. | in.jellys | out.srj |
| pos_034 | An empty name: the IRI is equal to its prefix. | in.jellys | out.srj |
| pos_035 | Lookup identifiers continue across frames: an entry with id 0 in the second frame takes the next identifier. | in.jellys | out.srj |
| pos_036 | Packed entries with explicit identifiers: id 10 with two values, then id 0 continuing at 12. | in.jellys | out.srj |
| pos_037 | An entry overwritten in a later frame: the later frame sees the new value. | in.jellys | out.srj |
| pos_038 | All lookup entries of a frame are applied before its columns: a name overwritten twice in one frame decodes to the last value. A producer must not write such a frame if it means the first value (the working set rule), but a consumer has to decode it this way. | in.jellys | out.srj |
| pos_039 | A name lookup entry at the largest identifier the table allows. | in.jellys | out.srj |
| pos_040 | 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.jellys | out.srj |
| pos_041 | The columns are in the order of the variables, whatever the term types of their values. | in.jellys | out.srj |
| pos_042 | Columns with values of different term types in one frame: blank nodes and literals mixed, literals, blank nodes, and IRIs. | in.jellys | out.srj |
| pos_043 | Variables unbound in every row, each encoded as an empty column message, next to a variable bound in every row. | in.jellys | out.srj |
| pos_044 | A variable whose term types change from frame to frame: IRIs only (no kinds), then a literal, then an IRI and a literal (with kinds). | in.jellys | out.srj |
| pos_045 | Columns whose values are all of one term type need no kinds: a column of blank nodes and a column of literals. | in.jellys | out.srj |
| pos_046 | kinds set for a column whose values are all of one term type (allowed, producers should leave it empty). | in.jellys | out.srj |
| pos_047 | A frame with no rows and no columns in the middle of a stream, with only lookup entries for the next frame. | in.jellys | out.srj |
| pos_048 | A frame with no rows and one empty column per variable. | in.jellys | out.srj |
| pos_049 | An empty result set whose first frame has one empty column per variable. | in.jellys | out.srj |
| pos_050 | A zero-variable result set with one empty solution (e.g., SELECT * WHERE {}). | in.jellys | out.srj |
| pos_051 | A zero-variable result set with three empty solutions over two frames. | in.jellys | out.srj |
| pos_052 | A zero-variable result set with no solutions. | in.jellys | out.srj |
| pos_053 | Two zero-variable streams concatenated: the repeated options come with an empty header, which declares zero variables again. | in.jellys | out.srj |
| pos_054 | A column of simple literals: literal_kinds is empty. | in.jellys | out.srj |
| pos_055 | 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.jellys | out.srj |
| pos_056 | A column of literals with a single literal kind for the whole column: xsd:integer, then xsd:dateTime. | in.jellys | out.srj |
| pos_057 | A column of literals with one language tag for the whole column: a single literal kind of 2. | in.jellys | out.srj |
| pos_058 | A column of literals with one literal kind per value, mixing simple, typed, and language-tagged literals with different tags. | in.jellys | out.srj |
| pos_059 | 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.jellys | out.srj |
| pos_060 | Empty lexical forms, with a single literal kind and with one literal kind per value. | in.jellys | out.srj |
| pos_061 | 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.jellys | out.srj |
| pos_062 | A 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, 5, 0]: names 1, 2, 5, 6. | in.jellys | out.srj |
| pos_063 | A column with exactly four values of several term types: kinds is one full byte. | in.jellys | out.srj |
| pos_064 | The IRI inference state of a column with several term types resets at the start of every frame. | in.jellys | out.srj |
| pos_065 | A column with literals and an IRI: the literal kinds and language tags apply to the literals. | in.jellys | out.srj |
| pos_066 | 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.jellys | out.srj |
| pos_067 | 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.jellys | out.srj |
| pos_068 | 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.jellys | out.srj |
| pos_069 | The well-known link metadata key with two IRIs, mapped to head.link. The equivalence of result sets does not cover links. Implementations that expose links should check them against head.link. | in.jellys | out.srj |
| pos_070 | 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.jellys | out.srj |
| pos_071 | The link metadata key with a value that is not valid UTF-8. Consumers should ignore it. | in.jellys | out.srj |
| pos_072 | Stream options with a stream name. | in.jellys | out.srj |
| pos_073 | A trailer-only final frame (row_count 0, no columns, only the trailer). | in.jellys | out.srj |
| pos_074 | A stream without a trailer. The result set is valid; consumers should report that it may be truncated. Consumers may warn or report the missing trailer, but must not fail this test. | in.jellys | out.srj |
| pos_075 | Two streams of the same query concatenated. The second segment repeats the options (with other table sizes) and the header, and its lookup identifiers restart from 1. Blank node labels are not reset by the repeated options: the label x in both segments is one blank node. | in.jellys | out.srj |
| pos_076 | Concatenated streams in which the same variables hold values of other term types in each segment. | in.jellys | out.srj |
| pos_077 | Options repeated without a trailer before them (a producer that did not write trailers). | in.jellys | out.srj |
| pos_078 | Five streams of the same query concatenated: different table sizes, term types, and frame counts in each segment, an empty segment, and a segment without a trailer. Lookup identifiers restart from 1 in every segment. The label x in the first and last segments is one blank node. | in.jellys | out.srj |
| pos_079 | 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.jellys | out.srj |
Negative
| Name | Description | Input(s) | Expected output |
|---|---|---|---|
| neg_001 | An empty file: a result stream must contain at least one frame. | in.jellys | — |
| neg_002 | The last frame is truncated: the length prefix promises more bytes than the file has. | in.jellys | — |
| neg_003 | Version tag 0. | in.jellys | — |
| neg_004 | Version tag 2, newer than version 1 of the format. | in.jellys | — |
| neg_005 | max_name_table_size 127, below the minimum of 128. | in.jellys | — |
| neg_006 | max_name_table_size not set (0). | in.jellys | — |
| neg_007 | max_name_table_size 10000000. Consumers should reject lookup sizes larger than their limit (recommended default 16384). | in.jellys | — |
| neg_008 | max_prefix_table_size 10000000. Consumers should reject lookup sizes larger than their limit (recommended default 4096). | in.jellys | — |
| neg_009 | max_datatype_table_size 10000000. Consumers should reject lookup sizes larger than their limit (recommended default 256). | in.jellys | — |
| neg_010 | Unknown rdf_version value 4. | in.jellys | — |
| neg_011 | A prefix lookup entry when the prefix lookup is disabled (max_prefix_table_size 0). | in.jellys | — |
| neg_012 | A datatype lookup entry when the datatype lookup is disabled (max_datatype_table_size 0). | in.jellys | — |
| neg_013 | A name lookup entry with an identifier larger than the table size. | in.jellys | — |
| neg_014 | A packed name entry whose last value falls outside the table (ids 127, 128, 129 in a table of 128). | in.jellys | — |
| neg_015 | A prefix lookup entry with an identifier larger than the table size. | in.jellys | — |
| neg_016 | A column refers to a prefix identifier outside the prefix table. | in.jellys | — |
| neg_017 | 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.jellys | — |
| neg_018 | A column refers to a name identifier outside the name table. | in.jellys | — |
| neg_019 | A column uses prefix_ids while the prefix lookup is disabled. | in.jellys | — |
| neg_020 | prefix_ids with 2 entries for 3 values. The length must be 0, 1, or the number of values. | in.jellys | — |
| neg_021 | A literal kind refers to a datatype identifier outside the datatype table. | in.jellys | — |
| neg_022 | A literal kind refers to a datatype while the datatype lookup is disabled. | in.jellys | — |
| neg_023 | A literal kind refers to a datatype entry holding rdf:langString. | in.jellys | — |
| neg_024 | literal_kinds with 2 entries for 3 values. The length must be 0, 1, or the number of values. | in.jellys | — |
| neg_025 | A literal kind refers to a language tag index past the end of langtags. | in.jellys | — |
| neg_026 | A literal kind refers to a language tag, but the column has no language tags. | in.jellys | — |
| neg_027 | A literal kind in a column with several term types refers to a language tag that is not there. | in.jellys | — |
| neg_028 | kinds is too short: one byte for five values. | in.jellys | — |
| neg_029 | kinds is too long: two bytes for two values. | in.jellys | — |
| neg_030 | kinds is empty, but the column has values of two term types: a literal and a blank node. | in.jellys | — |
| neg_031 | 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.jellys | — |
| neg_032 | 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.jellys | — |
| neg_033 | row_count of 2^27, larger than the maximum of 2^27 - 1. The stream has zero variables, so the frame needs no columns and the row count is the only problem. | in.jellys | — |
| neg_034 | A frame with more columns than the header declares variables. | in.jellys | — |
| neg_035 | A frame with fewer columns than the header declares variables (but not zero). | in.jellys | — |
| neg_036 | A frame with rows but no columns, in a stream with variables. | in.jellys | — |
| neg_037 | A zero-variable result set with a column. | in.jellys | — |
| neg_038 | A header in the second frame of the result set, identical to the first header. The header may only be in the first frame of a result set, or in a frame with the stream options. | in.jellys | — |
| neg_039 | 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.jellys | — |
| neg_040 | kinds refers to more blank nodes than the column has: two blank nodes, but bnodes has one. | in.jellys | — |
| neg_041 | 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.jellys | — |
| neg_042 | 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.jellys | — |
| neg_043 | The stream options are repeated, but the frame does not repeat the header. An empty header next to the options declares zero variables, which does not match the first header. | in.jellys | — |
| neg_044 | The stream options are repeated with a header declaring other variables than the first header. | in.jellys | — |
| neg_045 | The repeated stream options are not valid on their own (max_name_table_size 10). | in.jellys | — |
| neg_046 | After the options are repeated, a column refers to a name defined only before the reset. The lookups are emptied by the reset. | in.jellys | — |
| neg_047 | Corrupt layout: skip runs past the last run value. | in.jellys | — |
| neg_048 | Corrupt layout: a repeat run starts after the last run value. | in.jellys | — |
| neg_049 | Corrupt layout: len_code 15 is the last token, with no extension varint after it. | in.jellys | — |
| neg_050 | Corrupt layout: a repeat run makes the column longer than row_count. | in.jellys | — |
| neg_051 | Corrupt layout: an unbound run makes the column longer than row_count. | in.jellys | — |
| neg_052 | A column with more run values than row_count, and no layouts. | in.jellys | — |
| neg_053 | Corrupt layout: an extension varint of 2^32 - 1 (a run far longer than the frame). Consumers should check the run length against row_count before writing any cells (see the security considerations). | in.jellys | — |
| neg_054 | A trailer with an error. The rows before it are valid, but the result set is incomplete and the consumer must signal an error. Implementations may deliver the two rows before the error, but must signal the error to the caller. | in.jellys | — |
| neg_055 | Concatenated streams: the first segment ends with an error trailer, the second with a trailer without an error. Repeating the stream options does not cancel the error. Implementations may deliver the rows, but must signal the error to the caller. | in.jellys | — |
| neg_056 | A frame without the stream options after a frame with a trailer. | in.jellys | — |
| neg_057 | A boolean result in the second frame of a stream of solutions. | in.jellys | — |
| neg_058 | An unknown stream_type value. | in.jellys | — |
select_rdf_1_2
16 positive, 10 negative
Positive
| Name | Description | Input(s) | Expected output |
|---|---|---|---|
| pos_001 | A triple term of three IRIs. | in.jellys | out.srj |
| pos_002 | A triple term with a blank node subject and a directional literal object. | in.jellys | out.srj |
| pos_003 | Triple terms nested three levels deep (in the object position). | in.jellys | out.srj |
| 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.jellys | out.srj |
| 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.jellys | out.srj |
| pos_006 | The IRI inference state of the triple terms resets at the start of every column and every frame. All name_ids are 0. Without the reset, the second column and the second frame would go on from name 4 (d, e, f). | in.jellys | out.srj |
| 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.jellys | out.srj |
| pos_008 | A triple term with a blank node object. | in.jellys | out.srj |
| 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.jellys | out.srj |
| pos_010 | A blank node inside a triple term and the same label in another column are the same blank node. | in.jellys | out.srj |
| pos_011 | A triple term in a stream that declares no RDF version (allowed: no version is announced). | in.jellys | out.srj |
| pos_012 | The same triple term in consecutive rows, as a repeat run. | in.jellys | out.srj |
| pos_013 | Concatenated streams: the first segment declares RDF 1.1, the second declares RDF 1.2 and has a triple term. | in.jellys | out.srj |
| pos_014 | Directional literals in a stream that declares RDF 1.2 (which includes RDF 1.2 Basic). | in.jellys | out.srj |
| pos_015 | Common usage: an annotation query returning statements as triple terms, with IRIs, literals, and nested triple terms, over several frames. | in.jellys | out.srj |
| pos_016 | A column of triple terms only, with no kinds. kinds may be empty when all run values are of one term type. | in.jellys | out.srj |
Negative
| Name | Description | Input(s) | Expected output |
|---|---|---|---|
| neg_001 | A triple term without a subject. | in.jellys | — |
| neg_002 | A triple term without a predicate. | in.jellys | — |
| neg_003 | A triple term without an object. | in.jellys | — |
| neg_004 | A literal in a triple term with datatype 0, which is invalid. | in.jellys | — |
| neg_005 | A literal in a triple term with a direction but no language tag. | in.jellys | — |
| neg_006 | A literal in a triple term with a direction and a datatype. | in.jellys | — |
| neg_007 | A literal in a triple term with an unknown direction value (3). | in.jellys | — |
| neg_008 | A literal in a triple term whose datatype is rdf:langString. | in.jellys | — |
| neg_009 | A literal in a triple term whose datatype is rdf:dirLangString. | in.jellys | — |
| neg_010 | kinds is empty, but the column has values of two term types: an IRI and a triple term. | in.jellys | — |
select_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.jellys | out.srj |
| pos_002 | A column of literals with a single literal kind: one language tag and base direction for the whole column. | in.jellys | out.srj |
| pos_003 | Directional literals in a stream that declares no RDF version (allowed: no version is announced). | in.jellys | out.srj |
| pos_004 | A directional literal in a column with several term types. | in.jellys | out.srj |
| pos_005 | Common usage: labels in several languages and directions, over several frames. | in.jellys | out.srj |
Negative
| Name | Description | Input(s) | Expected output |
|---|---|---|---|
| neg_001 | langtag_directions with 2 entries for 1 language tag. | in.jellys | — |
| neg_002 | langtag_directions set in a column with no language tags. | in.jellys | — |
| neg_003 | langtag_directions with an unknown direction value (7). | in.jellys | — |
| neg_004 | A literal kind refers to a datatype entry holding rdf:dirLangString. | in.jellys | — |
To Jelly (serialize)
Jump to category
ask
2 positive, 0 negative
Positive
| Name | Description | Input(s) | Expected output |
|---|---|---|---|
| pos_001 | Boolean result true. Stream options are: max-name-table-size=128, max-prefix-table-size=0, max-datatype-table-size=0, rdf-version=unspecified. | stream_options.jellys in.srj |
out.jellys |
| pos_002 | Boolean result false. Stream options are: max-name-table-size=128, max-prefix-table-size=0, max-datatype-table-size=0, rdf-version=unspecified. | stream_options.jellys in.srj |
out.jellys |
punctuated
3 positive, 0 negative
Positive
| Name | Description | Input(s) | Expected output |
|---|---|---|---|
| pos_001 | Three result sets: a solution sequence, a boolean result, and a solution sequence that uses the IRIs of the first one again. Stream options are: stream-type=punctuated, max-name-table-size=128, max-prefix-table-size=8, max-datatype-table-size=4, rdf-version=unspecified. | stream_options.jellys in_000.srj in_001.srj in_002.srj |
out.jellys |
| pos_002 | Result sets with different variables, and the same blank node label in two of them. Stream options are: stream-type=punctuated, max-name-table-size=128, max-prefix-table-size=0, max-datatype-table-size=0, rdf-version=unspecified. | stream_options.jellys in_000.srj in_001.srj in_002.srj |
out.jellys |
| pos_003 | A result set larger than one frame, followed by a small one. Stream options are: stream-type=punctuated, max-name-table-size=128, max-prefix-table-size=8, max-datatype-table-size=0, rdf-version=unspecified. | stream_options.jellys in_000.srj in_001.srj |
out.jellys |
select_rdf_1_1
15 positive, 4 negative
Positive
| Name | Description | Input(s) | Expected output |
|---|---|---|---|
| pos_001 | IRIs only, prefix lookup enabled. Stream options are: max-name-table-size=128, max-prefix-table-size=8, max-datatype-table-size=0, rdf-version=unspecified. | stream_options.jellys in.srj |
out.jellys |
| pos_002 | IRIs only, prefix lookup disabled. Stream options are: max-name-table-size=128, max-prefix-table-size=0, max-datatype-table-size=0, rdf-version=unspecified. | stream_options.jellys in.srj |
out.jellys |
| pos_003 | Simple, typed, and language-tagged literals, including in one variable. Stream options are: max-name-table-size=128, max-prefix-table-size=0, max-datatype-table-size=8, rdf-version=unspecified. | stream_options.jellys in.srj |
out.jellys |
| pos_004 | Blank nodes, repeated in consecutive rows and across frames. Stream options are: max-name-table-size=128, max-prefix-table-size=0, max-datatype-table-size=0, rdf-version=unspecified. | stream_options.jellys in.srj |
out.jellys |
| pos_005 | Sparse result with unbound cells and repeated values (OPTIONAL). Stream options are: max-name-table-size=128, max-prefix-table-size=16, max-datatype-table-size=0, rdf-version=unspecified. | stream_options.jellys in.srj |
out.jellys |
| pos_006 | A variable whose values mix IRIs, blank nodes, and literals. Stream options are: max-name-table-size=128, max-prefix-table-size=16, max-datatype-table-size=0, rdf-version=unspecified. | stream_options.jellys in.srj |
out.jellys |
| pos_007 | An empty result set with three variables. Stream options are: max-name-table-size=128, max-prefix-table-size=0, max-datatype-table-size=0, rdf-version=unspecified. | stream_options.jellys in.srj |
out.jellys |
| pos_008 | A zero-variable result set with one empty solution. Stream options are: max-name-table-size=128, max-prefix-table-size=0, max-datatype-table-size=0, rdf-version=unspecified. | stream_options.jellys in.srj |
out.jellys |
| pos_009 | A zero-variable result set with no solutions. Stream options are: max-name-table-size=128, max-prefix-table-size=0, max-datatype-table-size=0, rdf-version=unspecified. | stream_options.jellys in.srj |
out.jellys |
| pos_010 | 1000 rows with over 1000 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: max-name-table-size=128, max-prefix-table-size=16, max-datatype-table-size=4, rdf-version=unspecified. | stream_options.jellys in.srj |
out.jellys |
| pos_011 | One row that needs exactly 128 names, with a name lookup of 128 entries and the prefix lookup disabled. The row fits. Stream options are: max-name-table-size=128, max-prefix-table-size=0, max-datatype-table-size=0, rdf-version=unspecified. | stream_options.jellys in.srj |
out.jellys |
| pos_012 | Non-ASCII IRIs and literals, and characters that need escaping in text formats. Stream options are: max-name-table-size=128, max-prefix-table-size=16, max-datatype-table-size=0, rdf-version=unspecified. | stream_options.jellys in.srj |
out.jellys |
| pos_013 | Duplicate solutions: all of them must be preserved, in order. Stream options are: max-name-table-size=128, max-prefix-table-size=0, max-datatype-table-size=0, rdf-version=unspecified. | stream_options.jellys in.srj |
out.jellys |
| pos_014 | A variable that is never bound, next to one that always is. Stream options are: max-name-table-size=128, max-prefix-table-size=0, max-datatype-table-size=0, rdf-version=unspecified. | stream_options.jellys in.srj |
out.jellys |
| pos_015 | Variables in a non-alphabetical projection order, each unbound in some rows. The order of the variables must be kept. Stream options are: max-name-table-size=128, max-prefix-table-size=0, max-datatype-table-size=0, rdf-version=unspecified. | stream_options.jellys in.srj |
out.jellys |
Negative
| Name | Description | Input(s) | Expected output |
|---|---|---|---|
| neg_001 | One row that needs 129 distinct names, with a name lookup of 128 entries and the prefix lookup disabled. The row cannot be encoded even in an empty frame, so the producer must throw an error. Stream options are: max-name-table-size=128, max-prefix-table-size=0, max-datatype-table-size=0, rdf-version=unspecified. | stream_options.jellys in.srj |
— |
| neg_002 | A typed literal, with the datatype lookup disabled. Stream options are: max-name-table-size=128, max-prefix-table-size=0, max-datatype-table-size=0, rdf-version=unspecified. | stream_options.jellys in.srj |
— |
| neg_003 | One row with two different datatypes, with a datatype lookup of one entry. Stream options are: max-name-table-size=128, max-prefix-table-size=0, max-datatype-table-size=1, rdf-version=unspecified. | stream_options.jellys in.srj |
— |
| neg_004 | A variable with an empty name. Stream options are: max-name-table-size=128, max-prefix-table-size=0, max-datatype-table-size=0, rdf-version=unspecified. | stream_options.jellys in.srj |
— |
select_rdf_1_2
2 positive, 0 negative
Positive
| Name | Description | Input(s) | Expected output |
|---|---|---|---|
| pos_001 | Triple terms, including nested ones, stream options declaring RDF 1.2. Stream options are: max-name-table-size=128, max-prefix-table-size=8, max-datatype-table-size=4, rdf-version=1.2. | stream_options.jellys in.srj |
out.jellys |
| pos_002 | Triple terms, stream options declaring no RDF version. Stream options are: max-name-table-size=128, max-prefix-table-size=8, max-datatype-table-size=4, rdf-version=unspecified. | stream_options.jellys in.srj |
out.jellys |
select_rdf_1_2_basic
3 positive, 0 negative
Positive
| Name | Description | Input(s) | Expected output |
|---|---|---|---|
| pos_001 | Directional language-tagged strings, stream options declaring RDF 1.2 Basic. Stream options are: max-name-table-size=128, max-prefix-table-size=0, max-datatype-table-size=0, rdf-version=1.2-basic. | stream_options.jellys in.srj |
out.jellys |
| pos_002 | Directional language-tagged strings, stream options declaring no RDF version. Stream options are: max-name-table-size=128, max-prefix-table-size=0, max-datatype-table-size=0, rdf-version=unspecified. | stream_options.jellys in.srj |
out.jellys |
| pos_003 | One language tag and direction for a whole variable (a single literal kind). Stream options are: max-name-table-size=128, max-prefix-table-size=0, max-datatype-table-size=0, rdf-version=1.2-basic. | stream_options.jellys in.srj |
out.jellys |