Repository navigation
Conversation
…ET (BYT-10301)
Oracle-shipped PL/SQL that ANTLR parsed and omni rejected came down to
the clauses of subprogram and package headings. Each rule below was
checked on Oracle 23ai:
- ACCESSIBLE BY ( [unit_kind] [schema.]name, ... ) on procedures,
functions, package specifications, and package and local subprograms;
a unit kind word is always the kind, and an accessor takes no dblink.
- AGGREGATE USING type and PIPELINED ... USING type: the type implements
the function, the clause list ends there, and there is no IS | AS body.
Split ends such a function at its ';' like a call spec.
- PIPELINED { ROW | TABLE } POLYMORPHIC, PARALLEL_ENABLE ( PARTITION arg
BY { ANY | HASH | RANGE | VALUE } ... ), the ORDER and CLUSTER
streaming clauses, RESULT_CACHE RELIES_ON, and SQL_MACRO ( [TYPE =>]
SCALAR | TABLE ).
- Every heading clause at most once (PLS-00371).
- CHARACTER SET { name | item%CHARSET } after a PL/SQL datatype. ANY_CS
stands only on a subprogram parameter (PLS-00551), a record field or
collection element takes neither ANY_CS nor %CHARSET (PLS-00552), and
built-in non-character types take none (PLS-00550, PLS-00554).
- Parameter and function result types are unconstrained: p VARCHAR2(10)
and RETURN NUMBER(5) are PLS-00103, as are constrained cursor
parameters and REF CURSOR RETURN types.
The dictionary manifest drops from 101 to 34 units, with none newly
failing; units ANTLR parsed and omni did not drop from 38 to 9.
Reference rows ref_147 to ref_165.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e6d65ec8b3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
… SET (BYT-10301) Review follow-up, each checked on Oracle 23ai: - Split ends a function at USING only after RETURN and AGGREGATE or PIPELINED: a function or parameter named USING compiles, and its unit ran on to END. - CHARACTER SET is rejected on the PL/SQL predefined non-character types too (BOOLEAN, PLS_INTEGER, BINARY_INTEGER, SIMPLE_INTEGER, NATURAL, POSITIVE, SIGNTYPE, INT, REAL, DEC, BINARY_*, SIMPLE_*, SYS_REFCURSOR, UROWID, BFILE, MLSLABEL, VECTOR: PLS-00550); STRING and CHARACTER take one. - %CHARSET must be unquoted: a%"CHARSET" is PLS-00103. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: de7f539ac8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
… (BYT-10301) Review follow-up, each checked on Oracle 23ai: - AUTHID stands only on a schema-level unit (PLS-00157 on packaged, nested, and type method subprograms), ACCESSIBLE BY not on a type method (PLS-00262), and DEFAULT COLLATION only on a schema-level unit (documented). The local-subprogram AUTHID over-accept is retired. - Clause keywords are unquoted words: "ACCESSIBLE" BY and "AUTHID" are PLS-00103. - RELIES_ON (t1,) and USING impl. or impl@ are PLS-00103; USING takes a dotted database link. - Split skips the result datatype's first word and name parts after '.' before looking for PIPELINED or AGGREGATE: RETURN pipelined.using names a type. A polymorphic table function with an IS body compiles on Oracle, so it stays accepted. Reference rows ref_166 to ref_170. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5c58d1228e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…it names (BYT-10301) Review follow-up, each checked on Oracle 23ai: - A polymorphic table function takes no DETERMINISTIC, PARALLEL_ENABLE, ORDER BY, CLUSTER BY, or AUTHID (PLS-00760) and no RESULT_CACHE (PLS-00999, from its TABLE parameter), before or after PIPELINED ... POLYMORPHIC. ACCESSIBLE BY and an IS body compile. - ACCESSIBLE BY accessors, RELIES_ON data sources, and implementation type names are not PL/SQL reserved words: (SELECT), (BEGIN), and (sys.select) are PLS-00103; (loop) and "SELECT" compile. - DEFAULT COLLATION is recorded on procedure, function, and package statements. Reference rows ref_171 to ref_173. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 56e084dedb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…arity (BYT-10301) Review follow-up, each checked on Oracle 23ai: - ACCESSIBLE BY stands on schema-level and package subprograms only; a nested one is PLS-00262 or PLS-00263. - A SQL macro takes no DETERMINISTIC, PARALLEL_ENABLE, RESULT_CACHE, AUTHID, or streaming clause (PLS-00778) and no PIPELINED (PLS-00630), and returns a character type: NUMBER, LONG, or %ROWTYPE is PLS-00776, NVARCHAR2, CLOB, CHAR, and STRING compile. - An aggregate needs a parameter (PLS-00652); several, or IN OUT, compile against a real ODCIAggregate type. - %ROWTYPE takes no CHARACTER SET (PLS-00550). - DEFAULT COLLATION takes USING_NLS_COMP unquoted, as documented. Reference rows ref_174 and ref_175. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0b01856e17
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…s (BYT-10301) Review follow-up, each checked on Oracle 23ai: - PIPELINED and AGGREGATE exclude each other (PLS-00371) unless the function is polymorphic: PIPELINED ROW POLYMORPHIC AGGREGATE USING and SQL_MACRO AGGREGATE USING compile. - An object type method is not polymorphic (PLS-00765); a nested polymorphic table function compiles, in a stored unit and an anonymous block alike. PIPELINED POLYMORPHIC without ROW or TABLE stays rejected (PLS-00103). Reference rows ref_176 to ref_178. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3eced1a412
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…od macros (BYT-10301) Review follow-up, each checked on Oracle 23ai with real types behind the names (a strong REF CURSOR, a collection, a PTF implementation package): - The PARALLEL_ENABLE partition argument is an IN parameter of the function (PLS-00626, PLS-00625). An ORDER or CLUSTER BY clause needs PARALLEL_ENABLE with PARTITION BY (PLS-00654, PLS-00665) on the same argument (PLS-00631). An earlier probe masked by an unresolved return type had suggested the streaming clause stood alone. - The TABLE pseudo-type stands only in a polymorphic table function (PLS-00765): not in a procedure, an ordinary function, or a SQL macro. - An object type method is not a SQL macro (PLS-00781). A nested function may be an aggregate (it compiles), so it stays accepted. ref_152 now partitions a declared parameter. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 78b65a75b1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…, Split (BYT-10301) Review follow-up, each checked on Oracle 23ai with real types behind the names: - A polymorphic table function returns TABLE (PLS-00767) and takes one TABLE parameter (PLS-00773, PLS-00766). - The PARALLEL_ENABLE argument is a REF CURSOR: a predefined non-cursor type, or SYS_REFCURSOR with HASH, RANGE, VALUE, or a streaming clause, is PLS-00627; SYS_REFCURSOR BY ANY compiles, and a named type is left to the engine. - item%CHARSET naming a parameter of the same heading needs a character parameter (PLS-00550 for NUMBER or DATE); VARCHAR2 without ANY_CS and NVARCHAR2 qualify, and items outside the heading are left to the engine. - Split ends a stored unit at a ';' in its head before IS|AS, so a malformed bodyless heading (AGGREGATE without USING) no longer runs on into the next statement. Fixtures that partitioned a weak cursor by HASH now use a strong one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8c2c339ab7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…-10301) Review follow-up, each checked on Oracle 23ai: - PARTITION BY VALUE takes one column (PLS-00757); HASH and RANGE take several. - A quoted "TABLE" names a user type, which a procedure or function parameter may have; only the unquoted word is the PTF pseudo-type. - BOOL, the 23ai alias of BOOLEAN, takes no CHARACTER SET (PLS-00550). A quoted "POLYMORPHIC" or "COLLATION" was already rejected, as Oracle does (PLS-00103); reference rows ref_179 to ref_181 pin these. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ef953c213c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…10301) Review follow-up, each checked on Oracle 23ai: - COLUMNS, like TABLE, stands only in a polymorphic table function (PLS-00765). No type can be named COLUMNS unquoted (CREATE TYPE columns is PLS-00103), so the unquoted word is always the pseudo-type; a quoted "COLUMNS" names a user type. - TIMESTAMP WITH [LOCAL] TIME ZONE, INTERVAL ... TO ..., and LONG RAW are predefined non-character types: a SQL macro cannot return one (PLS-00776), CHARACTER SET is not allowed on one (PLS-00550), and none is a partitionable REF CURSOR (PLS-00627). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fa2b93bc88
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…-10301) Review follow-up, each checked on Oracle 23ai: - Object type procedure methods and ALTER TYPE method signatures take the heading checks of other subprograms: no TABLE or COLUMNS pseudo-type (PLS-00765), item%CHARSET from a character parameter (PLS-00550), and an ALTER TYPE method result is unconstrained like a CREATE TYPE one. - RESULT_CACHE takes no OUT or IN OUT parameter (PLS-00999), standalone and in a package specification alike. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: db99faefb7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
… columns (BYT-10301) Review follow-up, each checked on Oracle 23ai: - A polymorphic table function's TABLE parameter takes no default (PLS-00768); a COLUMNS one defaults to NULL if at all (PLS-00769). - RESULT_CACHE takes no parameter or result of a LOB, BFILE, or SYS_REFCURSOR type (PLS-00999); object types are left to the engine. - AUTHID CURRENT_USER is one word: AUTHID CURRENT and AUTHID CURRENT USER are PLS-00103 (a quoted "CURRENT_USER" compiles). - PARALLEL_ENABLE and streaming items are simple column names (PLS-00670): no expression, qualified name, or literal. Reference rows ref_182 and ref_183. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bb4997f097
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…(BYT-10301) Review follow-up, checked on Oracle 23ai: a package with SUBTYPE "NUMBER" IS VARCHAR2(100) as a SQL macro result, TYPE "SYS_REFCURSOR" IS REF CURSOR as a hash-partitioned argument, and SUBTYPE "CLOB" IS NUMBER as a RESULT_CACHE result compiles without errors. A quoted name is a user type, so the predefined-type checks (CHARACTER SET, SQL macro result, RESULT_CACHE, partition argument) now leave it to the engine. A polymorphic USING pkg@link compiles over a loopback link, so it stays accepted. Reference row ref_184. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 88f2fa2be0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
… packages (BYT-10301) Review follow-up, each checked on Oracle 23ai: - An ordinary pipelined function returns a collection: a predefined scalar or %ROWTYPE result is PLS-00630, with or without USING; a named result type is left to the engine. - A pipelined function is not result-cached (PLS-00999). - A package holding a SQL macro cannot be AUTHID CURRENT_USER (PLS-00782). Nested SQL macros and nested RESULT_CACHE functions compile, so they stay accepted. Two fixtures that returned NUMBER from a pipelined function now return a collection type. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8f1030233e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…lt cache (BYT-10301)
Review follow-up, each checked on Oracle 23ai:
- A dotted %CHARSET source names an item outside the heading: a function
with a quoted NUMBER formal "K.C" and a k.c%CHARSET result compiles.
- A quoted "*" names a column: PARTITION BY HASH ("*") over such a
column compiles; only the unquoted * is the wildcard.
- RESULT_CACHE takes no %ROWTYPE record parameter (PLS-00999); a
%ROWTYPE result compiles, so it stays accepted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d671057928
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…s (BYT-10301) Review follow-up, each checked on Oracle 23ai: - A single quoted %CHARSET source such as "K.C" names the formal of that spelling (PLS-00550 when it is numeric); only a qualified k.c source names an item outside the heading. The parser records which it was. - No subprogram in a top-level anonymous block is result-cached (PLS-00999, at any nesting depth); a DECLARE block or nested function inside a stored unit compiles, so those stay accepted. ORDER BY and CLUSTER BY together compile with HASH, RANGE, and ANY partitioning, so they stay accepted. Reference row ref_185. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c2edb488fb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
… functions (BYT-10301) Review follow-up, each checked on Oracle 23ai: - CHARACTER SET is not allowed on the TABLE or COLUMNS pseudo-type, parameter or result (PLS-00550). - A nested function is not parallel-enabled (PLS-00712); a private package body function, and nested DETERMINISTIC, PIPELINED, and polymorphic functions, compile. A nested aggregate compiles, in a stored unit and an anonymous block, so it stays accepted. Reference row ref_186. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 29a5f40ebb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…301) Review follow-up, checked on Oracle 23ai: a cursor parameter whose character set comes from a NUMBER or DATE cursor parameter is PLS-00550 in an anonymous block and a stored unit alike, while a VARCHAR2 source compiles. checkCharsetSources now takes cursor parameters as well as subprogram parameters. Reference rows ref_187 and ref_188. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ca834a8e83
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…BYT-10301) Oracle 23ai rejects a parenthesized NULL default on a polymorphic table function's COLUMNS parameter with PLS-00769, as it does any default but a bare NULL. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dd0a5938d9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…in Split (BYT-10301) Review follow-up, each checked on Oracle 23ai: - A declaration in a subprogram body's own declaration section whose item%CHARSET source is a formal, or a preceding local variable, of a non-character type is PLS-00550; a VARCHAR2 local source compiles. Nested blocks are left to the engine. - An aggregate's implementation type cannot be reached over a database link (PLS-00331); a polymorphic function's package can. - Split no longer reads a streaming argument named USING (ORDER using BY ...) as the implementation-type marker. A scalar result with PARALLEL_ENABLE (PARTITION ...) compiles, so it stays accepted; DBMS_TF.TABLE_T and COLUMNS_T rules need the name resolved and are left to the engine. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 25272c6a4e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Check an item%CHARSET source against every declaration scope Oracle 23ai resolves it through: package items, enclosing blocks and subprograms, anonymous blocks, simple trigger bodies, and type-body methods, with an inner declaration shadowing an outer one. A source of a non-character type is PLS-00550. The walk visits each unit once and fills each scope's map as its declarations are read, replacing the per-declaration rescan that made long declaration sections quadratic. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 56c28e40f6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…pe shadowing (BYT-10301) The %CHARSET scope walk now also checks subprogram headings, with or without a body, and cursor formals against the enclosing scopes, and resolves a source qualified by an enclosing subprogram, package, labeled block, or type-body method (p.a%CHARSET). Oracle 23ai rejects each with PLS-00550 when the source has a non-character type. A TYPE or SUBTYPE may redeclare any predefined type name but DOUBLE, NUMBER and SYS_REFCURSOR included, and the name then denotes the user's type. The predefined-type checks (RESULT_CACHE, PIPELINED, SQL_MACRO, PARALLEL_ENABLE, CHARACTER SET, %CHARSET sources) now skip a spelling shadowed by a declaration in scope, and every predefined spelling in a package body, whose specification may shadow it out of sight. A schema-level type does not shadow STANDARD's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Next step of the BYT-10301 plan, after #447. The PL/SQL that ships with Oracle still had 101 units omni could not parse. 38 of them parsed under the ANTLR parser that Bytebase used up to 3.18, so they are regressions users can hit. Almost all came down to clauses in subprogram and package headings. This PR parses those clauses strictly; every rule below was checked on Oracle 23ai.
Heading clauses
ACCESSIBLE BY[FUNCTION|PROCEDURE|PACKAGE|TRIGGER|TYPE] [schema.]name. An unquoted kind word is always read as the kind, so(PACKAGE)is PLS-00103, as are(), a missing parenthesis, and an accessor with@dblink. Before, the unit kind failed to parse, procedures and package subprograms did not accept the clause at all, and it had to come beforeAUTHIDAGGREGATE USING type,PIPELINED ... USING typeIS | ASbody. Oracle rejects a followingISor clause,USINGwithoutPIPELINED(PLS-00624), andAGGREGATEnot followed byUSINGPIPELINED { ROW | TABLE } POLYMORPHICUSING packagePARALLEL_ENABLE ( PARTITION arg BY ... )ANY, orHASH/RANGE/VALUE (expr, ...).LIST, an empty list, and a missingBYare rejectedORDER arg BY (...),CLUSTER arg BY (...)PARALLEL_ENABLE. The argument is a plain parameter nameRESULT_CACHE RELIES_ON (...)SQL_MACRO ( [TYPE =>] SCALAR | TABLE )SQL_MACRO ()andSQL_MACRO (foo)are rejectedORDER BYandCLUSTER BYas wellSplit. A function that a type implements has noEND, soSplitused to swallow every statement after it, up to the nextEND;or/. It now ends the function at its;, as it already does for call specs. SQL*Plus buffers both forms up to the next/line;Splitfollows the grammar here, as it does for call specs.PL/SQL datatypes
CHARACTER SET { name | item%CHARSET }ANY_CSis allowed only on a subprogram parameter (PLS-00551). A record field or collection element takes neitherANY_CSnor%CHARSET(PLS-00552). A built-in non-character type takes none: PLS-00550 forNUMBER, PLS-00554 forNCHAR/NVARCHAR2/NCLOB/LONG. Whether a name is a known character set is left to the engine. SQL (CREATE TABLE) still has noCHARACTER SETp VARCHAR2(10),p TIMESTAMP(3),RETURN NUMBER(5), a constrained cursor parameter, and a constrainedREF CURSOR RETURNtype are all PLS-00103 on Oracle, in standalone, package, local, and object type subprograms alike. omni accepted them; it now rejects themEngine evidence
.., the package initialization section, and others).ref_147toref_165are checked against the pinned Oracle image.TestSubprogramHeadingClausescovers every probed form, including the errors Oracle reports from the text alone after parsing (PLS-00371, -00550, -00551, -00552, -00554, -00624). The reference harness counts only PLS-00103 as a syntax rejection, so those can't be reference rows.AGGREGATE USINGwith anISbody, which Oracle rejects; it now ends at the;.Verification
make test-oraclepasses.TestOracleCompatibilityReferenceReportoutcome counts are identical to main.go vetreports one finding fewer than main: the unreachable code in the oldparseFunctionPropertiesis gone.go generate ./oracle/ast/...is in sync, andgofmtis clean.Next
CREATE TYPEheading. It accepts none ofAUTHID,ACCESSIBLE BY,FORCE,OIDorSHARING, and treatsAS/ISas optional. The dictionary gate does not cover type specifications yet, so that PR will add them.CALLwith arguments (3).🤖 Generated with Claude Code