Functional Dependency 2021-11
Functional Dependency 2021-11
For the technical design doc authors:
  • It’s recommended to write docs in English. But if you feel it is more efficient to write it in your mother language, like 中文, go ahead.
  • As part of the move to community-first work for the company, it’s strongly encouraged to use the RFC/Proposal process in GitHub rather than Google docs.
Introduction
One para explanation of the proposal. It’s recommended to write this section in English to help others get the brief info of this design doc.
This design's body can be roughly split into three part:
  1. What is functional dependency and how we infer it from the plan operator.
  1. How we maintain it in TiDB and how we use it.
  1. The possible refactor to make it work better with TiDB.
Our goal:
  1. Solving the most common cases of mysql's only_full_group_by checking. Maybe something left for the future such as:
  1. Group by expression.
  1. Group by subquery.
  1. Let the functional dependency can be used not only in the resolver's checking phase, but also can be used to eliminate aggregation, eliminate the sort or other useful optimizations in the future.
Motivation or Background
What’s the background and the problem being solved by this design doc? What use cases does it support? What is the expected outcome?