Skip to content

Added index support in data collector#675

Merged
Zayadul-huq-afnan merged 1 commit intodevfrom
add-index-support-collector
Mar 12, 2026
Merged

Added index support in data collector#675
Zayadul-huq-afnan merged 1 commit intodevfrom
add-index-support-collector

Conversation

@mahbd
Copy link
Collaborator

@mahbd mahbd commented Mar 12, 2026

PR Type

Feature

PR Checklist

  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.
  • A changelog entry has been made.
  • Version number has been updated.
  • Required modules have been added to respective "requirements*.txt" files.
  • Relevant Test Cases added to this description (below).
  • (Team) Label with affected action categories and semver status.

Overview

This PR introduces support for post-indexing data collector results using square bracket notation ([index]) immediately following the collector patterns (curly braces {} or parentheses ()).

Previously, data collectors returned their result set, which could be a list of values (for multiple patterns) or a single value. This change allows users to directly access a specific element from the collected result set using trailing indices, enabling the retrieval of a single value directly without intermediate variable assignment.

For pattern collection (var{p1}{p2}), post-indexing like var{p1}{p2}[0] now accesses the first element of the zipped result set. For key collection (var(k1)(k2)), post-indexing like var(k1)(k2)[0] accesses the indexed element of the resulting structure. Error handling is added for invalid indices or types during post-indexing application.

Test Cases

  • [TEST-0000] (Placeholder for specific test case reference if available)

@mahbd
Copy link
Collaborator Author

mahbd commented Mar 12, 2026

📚 $\text{Stack Overview}$

Pulls submitted in this stack:

This comment was automatically generated by st.

@mahbd mahbd marked this pull request as ready for review March 12, 2026 04:48
@mahbd mahbd self-assigned this Mar 12, 2026
@mahbd mahbd requested a review from Zayadul-huq-afnan March 12, 2026 04:50
@Zayadul-huq-afnan Zayadul-huq-afnan merged commit e335676 into dev Mar 12, 2026
7 checks passed
@Zayadul-huq-afnan Zayadul-huq-afnan deleted the add-index-support-collector branch March 12, 2026 06:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants