Skip to content

Distinguish Array and Tuple field types when creating from array of Fields.#7179

Merged
akuzm merged 1 commit intomasterfrom
aku/msan-field
Oct 18, 2019
Merged

Distinguish Array and Tuple field types when creating from array of Fields.#7179
akuzm merged 1 commit intomasterfrom
aku/msan-field

Conversation

@akuzm
Copy link
Copy Markdown
Contributor

@akuzm akuzm commented Oct 3, 2019

Category (leave one):

  • Build/Testing/Packaging Improvement

Short description (up to few sentences):
Fix some issues in Fields found by MemorySanitizer.

Requires #7212
Fixes #7176

@akuzm akuzm added the pr-build Pull request with build/testing/packaging improvement label Oct 3, 2019

class Field;
using Array = std::vector<Field>;
using TupleBackend = std::vector<Field>;
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.

Why we needed this before? It seems very confusing and bug-prone.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

TupleBackend definition looks redundant, but otherwise it's the same thing that I'm doing: have strong typedefs for Array and Tuple fields so that the correct type is deduced by the Field constructor. Actually I'm not even changing this, just renaming: the only place where I changed behavior is in convertFieldToTypeImpl: it won't return Array fields for a Tuple type anymore. Had to re-read this PR to realize what is going on :)

Not sure, maybe it's better to throw away these types and just specify the Field type explicitly.

@akuzm akuzm changed the title [wip] more Field fixes Distinguish Array and Tuple field types when creating from array of Fields. Oct 9, 2019
@akuzm akuzm marked this pull request as ready for review October 9, 2019 14:53
@akuzm akuzm force-pushed the aku/msan-field branch 4 times, most recently from 777b06b to 5039f92 Compare October 14, 2019 13:51
@akuzm
Copy link
Copy Markdown
Contributor Author

akuzm commented Oct 14, 2019

Can't reproduce the ubsan failure locally even on the deb package from the CI. Rebased to master hoping that it'll go away.

@akuzm akuzm merged commit 5e2cc37 into master Oct 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-build Pull request with build/testing/packaging improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tuples can be used in ORDER BY but cannot be directly compared when engine is MergeTree

2 participants