[CALCITE-6027] Simplify the cardinality on map_keys and map_values functions - #5037
[CALCITE-6027] Simplify the cardinality on map_keys and map_values functions#5037xuzifu666 wants to merge 1 commit into
Conversation
|
|
|
||
| // Simplify CARDINALITY(MAP_KEYS(m)) -> CARDINALITY(m) | ||
| // and CARDINALITY(MAP_VALUES(m)) -> CARDINALITY(m) | ||
| if (e.getOperator().getName().equals("CARDINALITY") |
There was a problem hiding this comment.
Do you expect people write such programs?
There's potentially an infinite number of such optimizations we can consider, but are they useful in practice?
There was a problem hiding this comment.
You are right. This is indeed an overly restrictive optimization, with little value; I currently share this view. Perhaps the value of Jira needs further discussion.
There was a problem hiding this comment.
I had moved the discussion to jira.
|
This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 90 days if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@calcite.apache.org list. Thank you for your contributions. |



jira: https://issues.apache.org/jira/browse/CALCITE-6027