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

Use the fields order from the struct type for 'ITEM(STRUCT, INDEX)' access

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.27.0
    • Fix Version/s: 1.27.0
    • Component/s: core

      Description

      The index-based access via the "ITEM" operator for operands of row/struct type is currently experimental and disabled by default (introduced in CALCITE-4354).

      Its implementation uses the fields order from `getDeclaredFields()`, a JVM-specific feature, this might lead to silent data corruption (see PR-2230).

      The aim of the ticket is to improve the feature by relying on the safer fields order
      from the struct field type itself (i.e., `relType.getFields()[index]`) so that we can enable it by default.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                asolimando Alessandro Solimando
                Reporter:
                asolimando Alessandro Solimando
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 40m
                  1h 40m