Uploaded image for project: 'Teiid'
  1. Teiid
  2. TEIID-3722

Add an option to not widen comparisons to string

    Details

    • Type: Quality Risk
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 8.12
    • Component/s: Query Engine
    • Labels:
      None

      Description

      Our resolving logic considers anything with an implicit conversion to string to be a valid widening conversion in a comparison. For example:

      int_col = '1a'

      will effectively become cast(int_col as string) = '1a'

      Or with timestamps:

      timestamp_col = '1970-01-01'

      becomes cast(timestamp_col as string) = '1970-01-01'

      In equality cases the optimizer will infer that the predicate is simply false, but when used with greater/less than comparison we'll still attempt the query with the widening conversion.

      This is most likely not the intent of the user. It would be best to provide an option that would allow an exception to be thrown rather than assuming a query that may not match the user's expectations.

        Gliffy Diagrams

          Attachments

            Issue Links

            No reviews matched the request. Check your Options in the drop-down menu of this sections header.

              Activity

                People

                • Assignee:
                  shawkins Steven Hawkins
                  Reporter:
                  shawkins Steven Hawkins
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: