Skip to content

Split follow-up from #31158: unresolved issue components #32829

Closed

Description

@gouhongshen

Split from #31158.

The selector classified that parent issue as partially fixed because:

Merged PR #31088, commit 66c9e76, adds arithmetic precision tracking and integerSchemaType conversion in genAsSelectCols. For 1+1, the precision calculation produces display length 3, below the direct-CTAS INT cutoff of 11. Proof artifacts include TestIntegerPrecisionLiteralPlan and TestIntegerPrecisionGroupingSchemaRoots in pkg/sql/plan/integer_precision_test.go, plus TestIntegerArithmeticWidth in pkg/tests/sqlintegration/integer_arithmetic_width_test.go. These cover literal arithmetic precision and persisted arithmetic CTAS types. The changes remain in current remote main f491aaa; subsequent changes do not alter these inference paths. Tests were inspected, not executed.

Remaining unresolved subproblems:

  1. CTAS bare integer literals still infer BIGINT: CREATE TABLE ct1 AS SELECT 1 AS a should produce INT according to the supplied MySQL control. bindNumVal creates an int64 expression; captureIntegerPrecisionOutputs publishes precision metadata only for arithmetic, and integerSchemaType explicitly excludes non-arithmetic roots. Preserve genuine BIGINT columns and expressions while correcting literal schema inference.

Activity

  1. added
    kind/bug
    on Nov 16, 2026
  2. self-assigned this
    on Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/bugneeds-triage

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions