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

Improve IllegalArgumentException message in RelBuilder#field

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 1.23.0
    • 1.24.0
    • 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

              rubenql Ruben Q L
              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