Skip to content

[df] Consider quoted strings in collection size short syntax - #23804

Merged
vepadulano merged 2 commits into
root-project:masterfrom
vepadulano:gh-23790
Oct 24, 2026
Merged

vepadulano merged 2 commits into
root-project:masterfrom
vepadulano:gh-23790

Conversation

@vepadulano

Copy link
Copy Markdown
Member

The regex pattern present before was not refined enough to consider the case where the target #varname could happen to be within a quoted string. Improve the regex pattern in ParseRDFExpression and add a more complicated test case in dataframe_interface.cxx

Fixes #23790

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Test Results

    24 files      24 suites   3d 21h 45m 8s ⏱️
 3 896 tests  3 895 ✅ 0 💤 1 ❌
83 416 runs  83 415 ✅ 0 💤 1 ❌

For more details on these failures, see this check.

Results for commit 55eb492.

♻️ This comment has been updated with latest results.

@dpiparo dpiparo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. To be backported to 6.40?

@dpiparo dpiparo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. To be backported to 6.40?

vepadulano and others added 2 commits October 23, 2026 15:54
The regex pattern present before was not refined enough to consider the
case where the target #varname could happen to be within a quoted
string. Improve the regex pattern in ParseRDFExpression and add a more
complicated test case in dataframe_interface.cxx

Fixes root-project#23790
Also add a test where the user defines a column of type std::string with
a value that could be ambiguous w.r.t. the short syntax for collection
sizes. RDataFrame should not substitute the string value in this case,
it should be returned as-is to downstream actions.

Co-authored-by: muntasir-396 <muntasirmamun396@gmail.com>
@bgrube

bgrube commented Oct 23, 2026

Copy link
Copy Markdown

Many tanks for providing a patch do quickly! Is there any chance this could be also backported to 6.32?

@vepadulano

Copy link
Copy Markdown
Member Author

Many tanks for providing a patch do quickly! Is there any chance this could be also backported to 6.32?

6.32 is a few releases back already, and we don't backport unless necessary as shown here https://root.cern/install/all_releases/ . Can you elaborate on how this issue impacts your workflow and in what area, so we can gauge the urgency? If possible it would be anyway better to upgrade to a more recent version of ROOT.

@bgrube

bgrube commented Oct 23, 2026

Copy link
Copy Markdown

I agree that my use case is likely a fringe scenario, given that no one has reported this issue since the feature was introduced. That said, the change is quite localized, and the relevant code hasn’t been modified in the last five years. So there should be no side effects. Ultimately, it's your call whether backporting to 5.32 is worth the effort.

@vepadulano

Copy link
Copy Markdown
Member Author

@bgrube that's why I asked. Backporting is just one ingredient. If we merge this commit in the 6.32 patches branch, that doesn't mean you will get it immediately in ROOT. A new release must be tagged, the various package processes have to be started, and they all differ in length and complexity. Knowing your use case better, how you obtain ROOT, how much you're impacted by this, would help the project gauge the relevance and urgency of such a move.

@bgrube

bgrube commented Oct 23, 2026

Copy link
Copy Markdown

I have a workaround by reverting to ROOT 6.24 for the affected data processing step. The only drawback is that none of the 6.24 releases includes the patch to read 6.30 trees without error messages. But things seem to work nevertheless.

@vepadulano
vepadulano merged commit c4011b2 into root-project:master Oct 24, 2026
34 of 36 checks passed
@vepadulano

Copy link
Copy Markdown
Member Author

/backport to 6.40

@root-project-bot

Copy link
Copy Markdown

Preparing to backport PR #23804 to branch 6.40 requested by vepadulano

@root-project-bot

Copy link
Copy Markdown

This PR has been backported to branch 6.40: #23826

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RDataFrame] Code that transforms #var alias to R_rdf_sizeof_var does not respect string literals

4 participants