-
Notifications
You must be signed in to change notification settings - Fork 591
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(frontend): manually implement reader for
pg_type
to ensure…
… `oid` is the primary key (#15290) Signed-off-by: Bugen Zhao <[email protected]>
- Loading branch information
Showing
8 changed files
with
173 additions
and
63 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
14 changes: 14 additions & 0 deletions
14
src/frontend/planner_test/tests/testdata/input/atlasgo.yaml
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,14 @@ | ||
- sql: | | ||
SELECT | ||
( | ||
SELECT | ||
t.typtype | ||
FROM | ||
pg_catalog.pg_type AS t | ||
WHERE | ||
t.oid = t4.typelem | ||
) AS elemtyp | ||
FROM | ||
pg_catalog.pg_type AS t4; | ||
expected_outputs: | ||
- batch_plan |
21 changes: 21 additions & 0 deletions
21
src/frontend/planner_test/tests/testdata/output/atlasgo.yaml
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,21 @@ | ||
# This file is automatically generated. See `src/frontend/planner_test/README.md` for more information. | ||
- sql: | | ||
SELECT | ||
( | ||
SELECT | ||
t.typtype | ||
FROM | ||
pg_catalog.pg_type AS t | ||
WHERE | ||
t.oid = t4.typelem | ||
) AS elemtyp | ||
FROM | ||
pg_catalog.pg_type AS t4; | ||
batch_plan: |- | ||
BatchExchange { order: [], dist: Single } | ||
└─BatchHashJoin { type: LeftOuter, predicate: pg_type.typelem = pg_type.oid, output: [pg_type.typtype] } | ||
├─BatchExchange { order: [], dist: HashShard(pg_type.typelem) } | ||
│ └─BatchScan { table: pg_type, columns: [pg_type.typelem], distribution: Single } | ||
└─BatchExchange { order: [], dist: HashShard(pg_type.oid) } | ||
└─BatchProject { exprs: [pg_type.typtype, pg_type.oid] } | ||
└─BatchScan { table: pg_type, columns: [pg_type.oid, pg_type.typtype], distribution: Single } |
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.