Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DF] Check column types in GetColumnReadersImpl() #17221

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

ferdymercury
Copy link
Contributor

@ferdymercury ferdymercury commented Dec 6, 2024

This Pull request:

Changes or fixes:

This is just an untested / rebased version of @jblomer 's PR #6548, just rebased here, now that the blocking issue has been solved in master. Feel free to take over or close.

Fixes #10749

Checklist:

  • tested changes locally
  • updated the docs (if necessary)

Fixes root-project#10749

Commit by jblomer, just rebased here
Copy link

github-actions bot commented Dec 6, 2024

Test Results

    10 files      10 suites   1d 17h 8m 18s ⏱️
 2 620 tests  2 619 ✅ 0 💤  1 ❌
25 956 runs  25 946 ✅ 0 💤 10 ❌

For more details on these failures, see this check.

Results for commit 2d2066e.

♻️ This comment has been updated with latest results.

@dpiparo
Copy link
Member

dpiparo commented Dec 6, 2024

I stopped the builds since the code deserves a try, but after correcting a typo...

@dpiparo dpiparo closed this Dec 7, 2024
@dpiparo dpiparo reopened this Dec 7, 2024
it was detected in CI with new checking code of normalized types
@ferdymercury ferdymercury requested a review from couet as a code owner December 7, 2024 09:09
@ferdymercury
Copy link
Contributor Author

Somehow, EXPECT_THROW is not working as expected.

@dpiparo
Copy link
Member

dpiparo commented Dec 7, 2024

We are missing something here... The code seems to throw an exception with the right type, the log event shows that, but EXPECT_THROW does not catch the exception...

Copy link
Contributor

@jblomer jblomer left a comment

Choose a reason for hiding this comment

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

Many thanks! Please let us know if you can continue to work on this, otherwise we can also take it from here.

EXPECT_EQ(1U, df.Take<UInt_t>("nevent").GetValue()[0]);
// jets is currently exposed as std::vector<float> and thus not usable as ROOT::RVec<float>
EXPECT_ANY_THROW(df.Sum<ROOT::RVec<float>>("jets"));
// EXPECT_THROW(df.Sum<ROOT::RVec<float>>("jets"), std::runtime_error); // This does not work directly, maybe due to jitting ?
Copy link
Contributor

Choose a reason for hiding this comment

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

We should understand this before merging.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, the test is still failing even after that change, so the attempt was not useful

Comment on lines +280 to +284
const auto typeName = cardinalityField->GetTypeName();
fColumnTypes.emplace_back(typeName);
std::string normalized;
TClassEdit::GetNormalizedName(normalized, typeName);
fNormalizedColumnTypes.emplace_back(normalized);
Copy link
Contributor

Choose a reason for hiding this comment

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

This and further down: I wonder if instead of adding the normalized type name everywhere where we append to fColumnTypes, perhaps we should loop once over all the column types when they are fully build, i.e. at the end of the constructor.

@ferdymercury
Copy link
Contributor Author

Many thanks! Please let us know if you can continue to work on this, otherwise we can also take it from here.

Please take it from here ;) thanks!

@jblomer jblomer assigned jblomer and vepadulano and unassigned vepadulano and martamaja10 Dec 10, 2024
@enirolf enirolf self-assigned this Jan 31, 2025
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.

RNTupleDS should check for column type mismatches
6 participants