-
Notifications
You must be signed in to change notification settings - Fork 2.4k
[CALCITE-7261] DiffRepository generation xml does not respect alphabetical order
#4612
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| final List<String> names = Pair.left(map); | ||
| for (String s : names) { | ||
| if (s.compareToIgnoreCase(testCaseName) <= 0) { | ||
| if (s.compareTo(testCaseName) <= 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as here lexicographical order with respect of case is used
calcite/testkit/src/main/java/org/apache/calcite/test/DiffRepository.java
Lines 643 to 645 in 67e5bfc
| // Make sure that there are no duplicate test cases, and count how many | |
| // tests are out of order. | |
| final SortedMap<String, Node> testCases = new TreeMap<>(); |
| ~ See the License for the specific language governing permissions and | ||
| ~ limitations under the License. | ||
| --> | ||
| <Root></Root> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dummy xml in order to generate and test actual
|
| /** | ||
| * Tests checking generated actual XML version. | ||
| */ | ||
| public class DiffRepositoryGeneratedFileTest { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minior:add jira link



The issue is that from one side there is already existing validation of test cases present in xml, from another side if an xml is generated from scratch (
_actual.xml) then the generated version might contain test cases in wrong order