-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
66845: storage: add Reader method to pin iterators at current engine state r=sumeerbhola a=sumeerbhola This is relevant for read evaluation cases where we want to release latches before evaluation. The new Reader.PinEngineStateForIterators method would be called before releasing latches. This pinning does not apply to iterators with timestamp hints, similar to how ConsistentIterators does not apply to them. So this does not help ExportRequest evaluation for incremental backups. To address this we would want a guarantee from the caller that the timestamp hints will not change for the lifetime of the Reader that is making a promise of ConsistentIterators. Informs #55461,#66485 Release note: None 66885: sql: add ReType to resolveAndRequireType to fix vector engine panic r=cucaroach a=cucaroach Fixes #66708 The vector engine needs exact type coercion, specifically when piping computed column values into downstream operators. Without this fix the computed column was left as an int64 instead of cast back to the required int16 type. Exposed by sqlsmith, kudos to @michae2 for the reduce help Release note: None Co-authored-by: sumeerbhola <[email protected]> Co-authored-by: Tommy Reilly <[email protected]>
- Loading branch information
Showing
12 changed files
with
185 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
exec-ddl | ||
create table t (a int2, b int2, c int2 as (a + b) virtual) | ||
---- | ||
|
||
build format=show-types | ||
update t set a = (with cte as (select 1:::int8) select t.c from cte limit 1) | ||
---- | ||
with &1 (cte) | ||
├── project | ||
│ ├── columns: int8:13(int!null) | ||
│ ├── values | ||
│ │ └── () [type=tuple] | ||
│ └── projections | ||
│ └── 1 [as=int8:13, type=int] | ||
└── update t | ||
├── columns: <none> | ||
├── fetch columns: a:7(int2) b:8(int2) t.c:9(int2) rowid:10(int) | ||
├── update-mapping: | ||
│ ├── a_new:16 => a:1 | ||
│ └── c_comp:17 => t.c:3 | ||
└── project | ||
├── columns: c_comp:17(int2) a:7(int2) b:8(int2) t.c:9(int2) rowid:10(int!null) crdb_internal_mvcc_timestamp:11(decimal) tableoid:12(oid) a_new:16(int2) | ||
├── project | ||
│ ├── columns: a_new:16(int2) a:7(int2) b:8(int2) t.c:9(int2) rowid:10(int!null) crdb_internal_mvcc_timestamp:11(decimal) tableoid:12(oid) | ||
│ ├── project | ||
│ │ ├── columns: t.c:9(int2) a:7(int2) b:8(int2) rowid:10(int!null) crdb_internal_mvcc_timestamp:11(decimal) tableoid:12(oid) | ||
│ │ ├── scan t | ||
│ │ │ ├── columns: a:7(int2) b:8(int2) rowid:10(int!null) crdb_internal_mvcc_timestamp:11(decimal) tableoid:12(oid) | ||
│ │ │ └── computed column expressions | ||
│ │ │ └── t.c:9 | ||
│ │ │ └── (a:7::INT8 + b:8::INT8)::INT2 [type=int2] | ||
│ │ └── projections | ||
│ │ └── (a:7::INT8 + b:8::INT8)::INT2 [as=t.c:9, type=int2] | ||
│ └── projections | ||
│ └── subquery [as=a_new:16, type=int2] | ||
│ └── max1-row | ||
│ ├── columns: c:15(int2) | ||
│ └── limit | ||
│ ├── columns: c:15(int2) | ||
│ ├── project | ||
│ │ ├── columns: c:15(int2) | ||
│ │ ├── limit hint: 1.00 | ||
│ │ ├── with-scan &1 (cte) | ||
│ │ │ ├── columns: int8:14(int!null) | ||
│ │ │ ├── mapping: | ||
│ │ │ │ └── int8:13(int) => int8:14(int) | ||
│ │ │ └── limit hint: 1.00 | ||
│ │ └── projections | ||
│ │ └── t.c:9 [as=c:15, type=int2] | ||
│ └── 1 [type=int] | ||
└── projections | ||
└── (a_new:16::INT8 + b:8::INT8)::INT2 [as=c_comp:17, type=int2] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.