fixes to TableQueryResult and test_big_tables