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

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.18.0
    • core
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: