Skip to content

MDEV-39602: Document the join_type enumeration#5182

Open
DaveGosselin-MariaDB wants to merge 1 commit into
mainfrom
mdev-39602-doc-join-type
Open

MDEV-39602: Document the join_type enumeration#5182
DaveGosselin-MariaDB wants to merge 1 commit into
mainfrom
mdev-39602-doc-join-type

Conversation

@DaveGosselin-MariaDB
Copy link
Copy Markdown
Member

Replace the one line comment on join_type in sql_select.h with a comment on each value. Each comment explains what the access method is, the conditions under which the optimizer chooses it, and what EXPLAIN will show for it.

Replace the one line comment on join_type in sql_select.h with a
comment on each value.  Each comment explains what the access method
is, the conditions under which the optimizer chooses it, and what
EXPLAIN will show for it.
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds detailed documentation comments to the join_type enum in sql/sql_select.h, explaining the meaning and EXPLAIN output representation of each join type. The review feedback suggests minor grammatical improvements to resolve comma splices in the newly added comments for JT_SYSTEM and JT_ALL to enhance readability.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread sql/sql_select.h
Comment on lines +213 to +217
row count statistics. The row is read once and kept in the record
buffer for the rest of the query, the remaining conditions treat
its columns as constants, and the table becomes part of the
constant prefix of the join order, so the join order search only
covers the remaining tables.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This sentence contains a comma splice ('the query, the remaining conditions...'). Splitting it into two sentences improves readability and grammatical correctness.

    row count statistics.  The row is read once and kept in the record
    buffer for the rest of the query. The remaining conditions treat
    its columns as constants, and the table becomes part of the
    constant prefix of the join order, so the join order search only
    covers the remaining tables.

Comment thread sql/sql_select.h
Comment on lines +277 to +280
alternatives. At execution this type is also used for range and
index merge access; the JOIN_TAB keeps JT_ALL, the attached
quick select supplies the actual access method, and the EXPLAIN
type is derived from the quick select. A "Range checked for
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This sentence contains a comma splice ('keeps JT_ALL, the attached quick select...'). Using 'while' to connect the clauses makes the sentence flow better and improves grammatical correctness.

    alternatives.  At execution this type is also used for range and
    index merge access; the JOIN_TAB keeps JT_ALL, while the attached
    quick select supplies the actual access method and the EXPLAIN
    type is derived from the quick select.  A "Range checked for

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

1 participant