pentaho / mondrian

Mondrian is an Online Analytical Processing (OLAP) server that enables business users to analyze large quantities of data in real-time.
http://mondrian.pentaho.com/
Other
1.14k stars 724 forks source link

[PSW-278] - List of dialects not sorted correctly #1382

Closed joana-fb closed 4 months ago

joana-fb commented 5 months ago

@pentaho/tatooine_dev

buildguy commented 5 months ago

:white_check_mark: Build finished in 4m 34s

Build command:

mvn clean verify -B -e -Daudit -Djs.no.sandbox -DrunITs -pl workbench

:exclamation: No tests found!

:information_source: This is an automatic message

befc commented 5 months ago

The change looks good, and would fix the current bug, but it's not a good practice to rely on the order of the items in a configuration file to be displayed to the user. If the expected order is sorted, why not sort it before it's displayed, or even better, wherever the list of values is being stored in memory upon read? This will avoid us dealing with this kind of bugs again.

Edit: I was looking for the place where the combo box is defined, and I think I found it: https://github.com/pentaho/mondrian/blob/8e8072da607a89ee5e02a69f0e8b4a893f03b618/workbench/src/main/java/mondrian/gui/SchemaPropertyCellEditor.java#L330 Something like this could work (⚠️ needs to be tested):

List<String> dialects = new ArrayList(MondrianGuiDef.SQL._dialect_values)
Collections.sort(dialects);
listEditor.setModel(new DefaultComboBoxModel(dialects);
hitachivantarasonarqube[bot] commented 5 months ago

SonarQube Quality Gate

Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

0.0% 0.0% Coverage
0.0% 0.0% Duplication

buildguy commented 5 months ago
[![👍 Frogbot scanned this pull request and found that it did not add vulnerable dependencies.](https://raw.githubusercontent.com/jfrog/frogbot/master/resources/v2/noVulnerabilityBannerPR.png)](https://docs.jfrog-applications.jfrog.io/jfrog-applications/frogbot)
Note: ---
**Frogbot** also supports **Contextual Analysis, Secret Detection, IaC and SAST Vulnerabilities Scanning**. This features are included as part of the [JFrog Advanced Security](https://jfrog.com/advanced-security) package, which isn't enabled on your system.

[🐸 JFrog Frogbot](https://docs.jfrog-applications.jfrog.io/jfrog-applications/frogbot)
buildguy commented 5 months ago

:white_check_mark: Build finished in 3m 1s

Build command:

mvn clean verify -B -e -Daudit -Djs.no.sandbox -DrunITs -pl workbench

:exclamation: No tests found!

:information_source: This is an automatic message