Giter Club home page Giter Club logo

Comments (5)

Unforgettable631 avatar Unforgettable631 commented on August 14, 2024

When this issue occurs for you, are you sure the resultset (output of the query) is not empty?
I believe when the output is empty you will get that error.

If so you can try to extend public int compare in StringListComparator.java with something like

for (int i = 0; i < _SortKeys1.size(); i++) {
     if (!a1.isEmpty() && !a2.isEmpty() {
     .....
     } else if....

Otherwise you can also write your test differently (with run) and explicitly check on a rowcount.
If above is helping more people I can also create a PR for that. Or maybe @six42 has a better approach for your isse?

from jdbcslim.

Gertray13 avatar Gertray13 commented on August 14, 2024

@Unforgettable631, you are right. IndexOutOfBoundsException only occurs when the query is empty at that moment. I would like to see that the expected values are missing when the query gives an empty result.

from jdbcslim.

Unforgettable631 avatar Unforgettable631 commented on August 14, 2024

Something like this?

!|SQLCommand|TestDatabase|select ID,Name from TestData where Name in('notThere', 'unknown')|SORT|
|ID?|NAME?>|
|1|notThere|
|2|unknown|

!|SQLCommand|TestDatabase|select ID,Name from TestData where Name in('notThere', 'unknown')|SORT|
|ID?|NAME?>|
|=~/\A\z/|=~/\A\z/|

Before:
image

image

After adjustment:
image

from jdbcslim.

six42 avatar six42 commented on August 14, 2024

Thanks @Gertray13 for reporting this and thanks @Unforgettable631 for finding a soution and writing a test case to confirm it.

from jdbcslim.

Unforgettable631 avatar Unforgettable631 commented on August 14, 2024

@six42, no problem. Your fix is more robust I think. Do you have any intentions to release the latest version?

from jdbcslim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.