Skip to content

fix: remove XFAIL from GroupByQuery test (now supported in zvec v0.4.0) #32

Description

@s2x

Summary

tests/bug_0002.phpt is marked --XFAIL-- because zvec v0.2 had GroupByQuery as "Coming Soon" (returned all docs in a single group with empty group_by_value). In zvec v0.4.0, the implementation exists — CollectionImpl::GroupByQuery() calls sql_engine_->execute_group_by(). The test should now pass.

What to do

  1. Remove --XFAIL-- lines (3-4) from tests/bug_0002.phpt
  2. Run the test: php run-tests.php tests/bug_0002.phpt
  3. If it passes — done
  4. If it still fails — investigate and fix

Files affected

  • tests/bug_0002.phpt — remove --XFAIL-- section

Existing test content

The test creates a collection with category and name string fields and an FP32 vector field, inserts 5 documents across 3 categories, then calls:

$groups = $c->groupByQuery(
    'v', [0.5, 0.5, 0.5, 0.5],
    groupByField: 'category',
    groupCount: 2,
    groupTopk: 3,
);

Expects multiple groups with non-empty group_value.

Expected result

Test passes — GroupByQuery returns properly grouped results with correct group_by_value strings.

Dependencies

None — no code changes, just test annotation change and verification.

Rebuild

Only if the FFI library is stale:

./build_zvec.sh

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions