Reimplement export_rows to make testing infrastructure work