Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-10745

SQL: jdbc metadata's getColumns returns wrong value for "ORDINAL_POSITION"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • jdbc, sql

    Description

      Affected both thin and jdbc v2 drivers.
      jdbc spec says :

      ORDINAL_POSITION int => index of column in table (starting at 1)
      

      but in fact it is a position in the metadata table itself, not position in the original table.
      For example we have table

      Person(id int primary key, val1 int, val2 bigint, val3 int)
      

      Oridinal number for val3 is 4, but if we specified patterns that leave only 1 result (PUBLIC.Person.val3) returned value will be 1. If we select 2 columns by pattern - 2 or 1 and so on.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              pkouznet Pavel Kuznetsov
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: