فهرست منبع

HPCC-8453 Add dictionary tests to regression suite

Make dict15b.ecl run faster.

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 12 سال پیش
والد
کامیت
9b5c2da91a
2فایلهای تغییر یافته به همراه2 افزوده شده و 10 حذف شده
  1. 2 2
      testing/ecl/dict15b.ecl
  2. 0 8
      testing/ecl/key/dict15b.xml

+ 2 - 2
testing/ecl/dict15b.ecl

@@ -18,7 +18,7 @@
 //UseStandardFiles
 //Find all anagrams of a word, that match the list of known words
 
-allWordsDs := DEDUP(SORTED(TS_wordIndex), word);
+allWordsDs := DEDUP(SORTED(TS_wordIndex(word[1]='t'), word), word);  // Restrict to words starting T for speed
 
 knownWords := DICTIONARY(allWordsDs, { word });
 
@@ -43,7 +43,7 @@ findAnagrams(string searchWord) := FUNCTION
   RETURN uniqueAnagrams(Word in knownWords);
 END;
 
-shortWords := TABLE(allWordsDs, { Word })(LENGTH(TRIM(Word)) <= 6); 
+shortWords := TABLE(allWordsDs, { Word })(LENGTH(TRIM(Word)) <= 5);
 
 //BUG: Without the NOFOLD the code generator merges the projects, and introduces an ambiguous dataset
 moreThanOne := NOFOLD(shortWords)(count(findAnagrams(Word))>1);

+ 0 - 8
testing/ecl/key/dict15b.xml

@@ -1,12 +1,4 @@
 <Dataset name='Result 1'>
- <Row><word>course              </word></Row>
- <Row><word>gch01               </word></Row>
- <Row><word>gch02               </word></Row>
- <Row><word>gch10               </word></Row>
- <Row><word>gch20               </word></Row>
- <Row><word>how                 </word></Row>
- <Row><word>source              </word></Row>
  <Row><word>there               </word></Row>
  <Row><word>three               </word></Row>
- <Row><word>who                 </word></Row>
 </Dataset>