zabetak opened a new pull request, #4089:
URL: https://github.com/apache/calcite/pull/4089

   For certain query patterns `RelMdUniqueKeys` handler generates an 
exponentially large number of unique keys that results into crashes and OOM 
errors. The limit guards against the combinatoric explosion that may appear for 
such use-cases and provides the users of a way to tune further the upper bound 
if needed.
   
   For more info check: CALCITE-6704
   
   Diff outline:
   1. Add limit parameter in `RelMdUniqueKeys` handler, document it, and use it 
to bound the output of supported relational expressions.
   2. Replace `ImmutableSet` with `HashSet` since the former does not allow to 
easily check the current size of the collection.
   3. Enhance `RelMetadataFixture` to be able to test the uniqueKeys API with 
different values for `ignoreNulls`.
   4. Modify `RelMetadataFixture#checkUniqueConsistent` to enforce consistency 
only for the keys returned `RelMetadataQuery#getUniqueKeys` method and not for 
every combination of columns since due to the limit the results may necessarily 
differ.
   5. Add unit tests `RelMetadataTest` for each relational expression that is 
handled by `RelMdUniqueKeys` handler.
   7. Document behavior changes regarding the default limit in `history.md`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to