Repository navigation
Description
Summary
A result whose rows have no properties (a vertex or document created with none, SELECT FROM V over such records) has N rows in to_list(), to_json_list() and count(), but no rows in to_dataframe(), to_arrow(), to_columns() and to_polars(). The rows disappear without a message, on both wheels.
Reproduction
import tempfile
import arcadedb
print(arcadedb.__backend__, arcadedb.__version__)
with arcadedb.create_database(tempfile.mkdtemp() + "/db") as db:
db.command("sql", "CREATE VERTEX TYPE V")
with db.transaction():
for _ in range(3):
db.command("sql", "CREATE VERTEX V")
q = "SELECT FROM V"
print("to_list rows :", len(db.query("sql", q).to_list()))
print("count() :", db.query("sql", q).count())
print("to_dataframe shape:", db.query("sql", q).to_dataframe().shape)
print("to_columns :", db.query("sql", q).to_columns())
table = db.query("sql", q).to_arrow()
print("to_arrow :", table.num_rows, "rows,", table.num_columns, "columns")Output, identical on both wheels (arcadedb-jvm 26.12.1.dev0 built from main at 0c3c7ec, and arcadedb 26.11.1.post4; macOS arm64, Python 3.12):
to_list rows : 3
count() : 3
to_dataframe shape: (0, 0)
to_columns : {}
to_arrow : 0 rows, 0 columns
Cause
The readers learn the column names from the frames, and merge_columns and merge_arrow (src/arcadedb/_columnar.py) start with if not batches or not names: return empty_columns(columns) or empty_arrow(columns). A frame of N rows with no property reports count=N and no column, so the row count is dropped with the names.
Expected
to_dataframe() has N rows and no columns, (3, 0) here, as pandas.DataFrame([{}, {}, {}]) has. to_arrow() can carry N rows with no column (pa.RecordBatch.from_struct_array(pa.array([{}] * 3, pa.struct([]))) has 3 rows).
to_columns() returns a dict of columns and to_polars() a frame built from them, and neither can show a row count without a column. For those two I see no change that is not a decision about the contract (for example a documented note), so I would like your preference before writing a patch: fix to_dataframe() and to_arrow() and document the other two, or something else.
Activity
Tests for #429: the Polars assertion moves to the file that needs Polars
Rows without properties keep their count in to_arrow, to_polars and t…
Tests for #429: the Polars assertion moves to the file that needs Polars
Rows without properties keep their count in to_arrow, to_polars and t…
Tests for #429: the Polars assertion moves to the file that needs Polars
tae898 commentedon Nov 22, 2026
Thanks for the report, the repro made this quick to find. It is fixed in #435: rows that have no property now keep their count in
to_arrow(),to_polars()andto_dataframe()(a table or frame of that many rows and no column).to_columns()still returns{}for such a result, because a dict of columns has no place for a row count, and the docs say so now. It will be in26.12.1.