-
Notifications
You must be signed in to change notification settings - Fork 819
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
Stateless Row Conversion #4811
Comments
I personally think this proposal is very compelling because using high cardinality dictionaries has caused us significant pain in IOx due to the memory accumulated in the row converters. We have several non trivial PRs to properly account for and try to avoid using dictionary encoding for these cases -- see apache/datafusion#7130 and apache/datafusion#7401 for example Also, a stateful row converter has caused other operations like apache/datafusion#7379 from @wiedld become significantly more complicatated as it can't be shared between threads Thus, in my mind the ideal outcome would be that we can remove the stateful row conversion and minimize the performance penalty for relatively low cardinality dictionaries. I am hopeful that @tustvold 's ideas to make string encoding more efficient (e.g. #4812) could be part of this answer |
The one case I can think of where a stafeful row converter is likely to have massive benefit is with low cardinality dictionaries that have very large individual values (e.g. 2MB strings for each entry). I have no idea how common that type of data is in practice. |
|
|
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
Currently row conversion is stateful, relying on a separate
RowConverter
to maintain this global state.This has a number of drawbacks:
CardinalityAwareRowConverter
while doing streaming merge datafusion#7401Describe the solution you'd like
I would like to propose removing the dictionary preservation logic, instead always hydrating the dictionaries values when encoding. This in turn would allow simplifying the API to no longer have a notion of a stateful RowConverter.
This may represent a performance regression for dictionaries with small number of values. We should definitely quantify this, but it is my expectation that this will only occur for dictionaries with a very low number of values. It is currently the case that even arrays with low numbers of distinct values may contain non-trivial number of values as a result of the way dictionaries are handled by the various kernels and readers, and so I'm inclined to not weigh this very highly.
Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered: