Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
50457: geo: coerce invalid geography coordinates into geometry r=otan a=Arun4rangan This commit resolves: #50219 Previously geometry did not convert out of range lat-lngs into correct range. This commit mimics the behavior found in PostGIS. It converts out of range lat-lngs into correct range. Release note (sql change): Geometry now coerce invalid geography coordinates into correct geometry. 50560: sql: add support for aggregations and values in the new factory r=yuzefovich a=yuzefovich **sql: remove some unnecessary things around aggregations** Release note: None **sql: add support for aggregations in the new factory** This commit implements `ConstructGroupBy` and `ConstructScalarGroupBy` methods in the new factory by populating the specs upfront and reusing DistSQLPlanner to do the actual planning. Fixes: #50290. Release note: None **sql: minor cleanup of planNodeToRowSource** This commit cleans up `planNodeToRowSource` to be properly closed (similar to other processors). Release note: None **sql: implement ConstructValues in the new factory** This commit adds implementation of `ConstructValues` in the new factory. In some cases, a valuesNode is the only way to "construct values" - when the node must be wrapped (see createPhysPlanForValuesNode for more details). In other cases, a valuesNode is used to construct the values processor spec. The latter usage is refactored to avoid valuesNode creation. This decision also prompts us to add a separate "side" list of `planNode`s that are part of the physical plan and need to be closed when the whole plan is closed. This is done by introducing a utility wrapper around `PhysicalPlan`. This approach was chosen after considering an alternative in which `planNodeToRowSource` adapter would be the one closing the `planNode` it is wrapping because `planNode.Close` contract currently prohibits the execution from closing any of the `planNode`s, and changined that would be quite invasive at this point. We might reevaluate this decision later, once we've made more progress on the distsql spec work. Addresses: #47473. Release note: None **logictest: add spec-planning configs to the default ones** We have now implemented noticeable chunk of methods in the new factory, so I think it makes to run all logic tests with the spec-planning configs by default. The only logic test that is currently skipped is `interleaved_join` because the new factory doesn't plan interleaved joins yet. Release note: None **sql: enhance unsupported error message in the new factory** Release note: None **sql: support simple projection on top of planNode in the new factory** The new factory still constructs some of the `planNode`s (for example, explain variants), and we should be able to handle simple projections on top of those. This is handled by reusing the logic from the old factory. The issue was hidden by the fallback to the old factory since EXPLAIN statements don't have "SELECT" statement tag. Release note: None **sql: implement ConstructLimit in the new factory** This commit additionally removes the requirement that `limitExpr` and `offsetExpr` must be distributable in order for the whole plan to be distributable in the old path because those expressions are evaluated during the physical planning, locally. Release note: None Co-authored-by: Arun Ranganathan <arun.ranga@hotmail.ca> Co-authored-by: Yahor Yuzefovich <yahor@cockroachlabs.com>
- Loading branch information