Skip to content

The unit test case for Iceberg failed #5863

@huleilei

Description

@huleilei

Describe the bug

self = <tests.integration.iceberg.test_iceberg_reads.TestIcebergCountPushdown object at 0x7f10fdd64050>, table_name = 'test_overlapping_deletes', local_iceberg_catalog = ('_local_iceberg_catalog', local (<class 'pyiceberg.catalog.rest.RestCatalog'>))
capsys = <_pytest.capture.CaptureFixture object at 0x7f10b55091d0>

    @pytest.mark.integration()
    @pytest.mark.parametrize(
        "table_name",
        [
            "test_positional_mor_deletes",
            "test_positional_mor_double_deletes",
            "test_overlapping_deletes",
            "test_mixed_delete_types",
        ],
    )
    def test_count_pushdown_with_delete_files(self, table_name, local_iceberg_catalog, capsys):
        """Test count with delete files, should not use pushdown optimization."""
        catalog_name, pyiceberg_catalog = local_iceberg_catalog
        tab = pyiceberg_catalog.load_table(f"default.{table_name}")
    
        # Test Daft count with pushdown on partitioned table
        df = daft.read_table(f"{catalog_name}.default.{table_name}").count()
        _ = capsys.readouterr()
        df.explain(True)
        actual = capsys.readouterr()
>       assert "daft.io.iceberg.iceberg_scan:_iceberg_count_result_function" not in actual.out
E       AssertionError: assert 'daft.io.ice...ult_function' not in '== Unoptimi... 131072]\n\n'
E         'daft.io.iceberg.ic...unt_result_function' is contained here:
E           == Unoptimized Logical Plan ==
E           
E           * Project: col(id) as count
E           |
E           * Aggregation: count(col(id), All)
E           |   Output schema = id#UInt64...
E         
E         ...Full output truncated (53 lines hidden), use '-vv' to show

tests/integration/iceberg/test_iceberg_reads.py:309: AssertionError

To Reproduce

No response

Expected behavior

No response

Component(s)

Data Sources & Sinks

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions