def test_nullable(sqlite3_connection, test_session, warehouse):
    """
    Verify that a column containing a sequence of NULL values is handled correctly
    when the number of leading NULLs is less than `infer_schema_length`.
    """
    sqlite3_connection.execute("CREATE TABLE tbl (id INTEGER PRIMARY KEY, value TEXT)")
    sqlite3_connection.executemany(
        "INSERT INTO tbl(value) VALUES(?)",
        [(None if i < 50 else str(i),) for i in range(1, 1000)],
    )
    sqlite3_connection.commit()

    chain = read_database("select * from tbl", sqlite3_connection, session=test_session)
    assert chain.schema == {"id": int, "value": str}
    default_value = None if isinstance(warehouse, SQLiteWarehouse) else ""
    assert sorted(chain.to_records(), key=lambda r: r["id"]) == [
        {"id": i, "value": default_value if i < 50 else str(i)} for i in range(1, 1000)
    ]

    Verify that a column containing a sequence of NULL values is handled correctly
    when the number of leading NULLs is less than `infer_schema_length`.
    
tests/func/test_read_database.py