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

Improve error when planning rule produces a relational expression with wrong row type

    XMLWordPrintableJSON

    Details

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

      Description

      Current code in VolcanoPlanner:

            assert RelOptUtil.equal(
                "rel rowtype",
                rel.getRowType(),
                "equivRel rowtype",
                equivRel.getRowType(),
                Litmus.THROW);
            equivRel = ensureRegistered(equivRel, null);
      

      The suggested changes:
      1) Use regular error IllegalArgumentException rather than an assertion
      2) Make sure the exception message contains fine-grained information on what went wrong. For instance: name: non nullable -> nullable; description: character -> int; ...

        Attachments

          Activity

            People

            • Assignee:
              Chunwei Lei Chunwei Lei
              Reporter:
              vladimirsitnikov Vladimir Sitnikov
            • Votes:
              0 Vote for this issue
              Watchers:
              5 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 - 5h 40m
                5h 40m