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

Improve IllegalArgumentException message in RelBuilder#field

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 1.23.0
    • Fix Version/s: 1.24.0
    • Component/s: core

      Description

      The RelBuilder#field method that creates a RexNode based on alias + fieldName throws an IllegalArgumentException if the corresponding field is not found:

        public RexNode field(int inputCount, String alias, String fieldName) {
          ...
          throw new IllegalArgumentException("no aliased field found; fields are: " + fields);
        }
      

      However, the exception message does not include the requested alias & fieldName, which is relevant information, definitively useful for troubleshooting.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                rubenql Ruben Q L
                Reporter:
                rubenql Ruben Q L
              • Votes:
                0 Vote for this issue
                Watchers:
                2 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 - 50m
                  50m