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

NameSet.contains wrongly returns false when element in set is upper-case and seek is lower-case

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.18.0
    • Component/s: core
    • Labels:
      None

      Description

        @Test public void testNameSetContains() {
          final NameSet names = new NameSet();
          names.add("COUNT");
          names.add("COVAR_POP");
          assertThat(names.contains("count", true), is(false));
          assertNsContains(names, "count", false, true);
        }
      
        private void assertNsContains(NameSet names, String item, boolean caseSensitive, boolean result) {
          assertEquals(names + ", contains(" + item + (caseSensitive ? ", caseSensitive" : "")
                  + ")",
              result, names.contains(item, caseSensitive));
        }

      Output

      java.lang.AssertionError: [COUNT, COVAR_POP], contains(count) 
      Expected :true
      Actual   :false

        Attachments

          Activity

            People

            • Assignee:
              julianhyde Julian Hyde
              Reporter:
              vladimirsitnikov Vladimir Sitnikov
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: