Github user fhueske commented on the pull request:
https://github.com/apache/incubator-flink/pull/147#issuecomment-59699366
I also thought about adding ``getMinimumLength()`` to the type info but
decided for the seriailzers because they define how much data is actually
written out (e.g., length info for strings or size info for arrays). On the
other hand, these few bytes are probably negligible compared to the actual size
of var-length data types.
In fact, ``getMinLength()`` does not delegate to ``getLength()`` for var
length data types (if there's no bug). Forwarding -1 wouldn't make any sense.
You're right, for CollectionDataSource sampling some elements would give
better estimates, but I though the ``getMinLength()`` could also be used for
size estimation during optimization.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---