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

Validator accepts comparisons between arrays, multisets, maps without regard to element types

    XMLWordPrintableJSON

Details

    Description

      The validator rejects this comparison (taken from SqlValidatorTest):

         expr("^x'a4'=1^")
             .fails("(?s).*Cannot apply '=' to arguments of type '<BINARY.1.> = <INTEGER>'.*");
      

      But happily accepts this comparison:

         expr("array[x'e4'] <> array[1]")
             .ok();
      

      The validator should reject comparisons between arrays whose element types are not comparable.

      Attachments

        Issue Links

          Activity

            People

              mbudiu Mihai Budiu
              mbudiu Mihai Budiu
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: