Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-1684

Change default precision of VARCHAR and VARBINARY from 1 to "unspecified"

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.11.0
    • Fix Version/s: 1.12.0
    • Component/s: core
    • Labels:
      None

      Description

      The behavior for Calcite (and SQL Server) is to set VARCHAR precision to 1 when not specified whereas Phoenix sets the max integer value of 2147483647.

      It doesn't really make sense to create a VARCHAR for a max length of 1 (it takes more bytes to store the length of each row than the actual value) and it shouldn't be the default behavior. I think we should adopt the Phoenix behavior. Do we need to make this configurable via SqlConformance or other?

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                julianhyde Julian Hyde
                Reporter:
                kliew Kevin Liew
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: