This is an archive of the discontinued LLVM Phabricator instance.

[LNT] Invalid field being used on the samples graph API
ClosedPublic

Authored by leandron on Aug 31 2017, 8:50 AM.

Details

Reviewers
cmatthews
MatzeB
Summary

Fixes the way field_index is generated for a given field_name.

Make sure it uses the same list as the graph api will use to recover the information afterwards.

Diff Detail

Event Timeline

leandron created this revision.Aug 31 2017, 8:50 AM
cmatthews accepted this revision.Aug 31 2017, 11:14 AM

My bad. Thank you!

This revision is now accepted and ready to land.Aug 31 2017, 11:14 AM

Also, need to modify the if not field_index, because now field_index can be 0, which is Falsey.

MatzeB edited edge metadata.Aug 31 2017, 12:41 PM

Ah yeah I had to abandon field.index in r312059; it can usually be replaced by TestSuiteDB.get_field_index(field). Doing it like proposed here is fine too (except for the if not field_index test being bad now as Chris already mentioned).

I've used ts.sample_fields just because is the same list the v4_graph will use to grab the value back.
Sending a new version in a minute.

leandron updated this revision to Diff 113517.Sep 1 2017, 1:25 AM
leandron closed this revision.Sep 1 2017, 1:42 AM

Commited as r312314