AnzoGraph: first SELECT on a newly created empty graph throws an exception "bad request (400)"
02:34 16 Oct 2026

I’m using AnzoGraph DB (Altair Graph Lakehouse) version 3.1. While testing, I noticed unexpected behavior when querying an empty graph.

Steps to reproduce

  1. Create a new graph named DemoGraph from the UI. It contains no triples.

  2. Run a SELECT query against it:

PREFIX rdf: 
PREFIX xsd: 
SELECT ?s (IRI() AS ?labels)  ?attr2 ?attr3  
FROM 
WHERE {?s rdf:type  .
OPTIONAL{?s  ?attr2 } .
OPTIONAL{?s  ?attr3 } .
FILTER(?attr3 = "77"^^) }

Actual result

The query fails with the following exception:

"bad request (400) with below error - Error - m_type == row->a_field_type(m_colnum):Invalid system state type mismatch for var(?attr3) vartype(21): rowtype(22)"

Expected result

The query returns an empty result set with no error, as it would for any valid query that matches nothing.

Now lets consider, we insert some data into DemoGraph with below query:

INSERT DATA { GRAPH   {  rdf:type  .
  "New_Vertex"^^.
  "70"^^.
} }

Now we try to execute same query again, but now, it returns zero rows, instead of exception, which is correct.

Questions

  1. Running a SELECT on an empty graph should return 0 rows, since there is no data. Is throwing an exception on the first execution the intended behavior?

  2. Does a graph need to contain data (or have had at least one write) before it can be queried without errors?

  3. How can I run a SELECT against a newly created empty graph without errors? Is there a configuration setting, or should I run something first (for example, checking that the graph exists)?

  4. What does this error mean? Does it means datatype mismatch or graph not found or something different?

Any help will be appreciated.

sparql rdf altair triplestore anzograph