[ https://issues.apache.org/jira/browse/GEODE-8179?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17116582#comment-17116582 ]
Alberto Bustamante Reyes edited comment on GEODE-8179 at 6/15/20, 1:34 PM: --------------------------------------------------------------------------- -Hi [~eshu]- -I have been investigating and it seems this problem is a bug from spring-shell. I did this simple test with other string attribute to confirm it:- {noformat} gfsh>start locator --name="a=1" Starting a Geode Locator in /home/alb3rtobr/test/a=1... ...... {noformat} {noformat} gfsh>start locator --name "a=1" Starting a Geode Locator in /home/alb3rtobr/test/a 1... ...... {noformat} -See how in the second case, the folder name is wrong because the "=" was removed from the attribute value.- -Taking into account that the [spring-shell project seems dead|https://github.com/spring-projects/spring-shell/issues/304], I think its something we have to live with. In the Geode documentation all the gfsh parameters always have the "=" between the attribute name and the value, so for me thats the official way to use gfsh. Anyway, I think we could include a note on the query command documentation stating that using "=" after "--query" is important for this command.- was (Author: alberto.bustamante.reyes): Hi [~eshu] I have been investigating and it seems this problem is a bug from spring-shell. I did this simple test with other string attribute to confirm it: {noformat} gfsh>start locator --name="a=1" Starting a Geode Locator in /home/alb3rtobr/test/a=1... ...... {noformat} {noformat} gfsh>start locator --name "a=1" Starting a Geode Locator in /home/alb3rtobr/test/a 1... ...... {noformat} See how in the second case, the folder name is wrong because the "=" was removed from the attribute value. Taking into account that the [spring-shell project seems dead|https://github.com/spring-projects/spring-shell/issues/304], I think its something we have to live with. In the Geode documentation all the gfsh parameters always have the "=" between the attribute name and the value, so for me thats the official way to use gfsh. Anyway, I think we could include a note on the query command documentation stating that using "=" after "--query" is important for this command. > gfsh query command returns incorrect results if '=' sign is missing for query > option > ------------------------------------------------------------------------------------ > > Key: GEODE-8179 > URL: https://issues.apache.org/jira/browse/GEODE-8179 > Project: Geode > Issue Type: Bug > Components: gfsh > Reporter: Eric Shu > Assignee: Alberto Bustamante Reyes > Priority: Major > Labels: pull-request-available > > gfsh returns correct result when "=" is there for the query option: > gfsh>query --query="Select ID from /portfolio where ID = 3" > Result : true > Limit : 100 > Rows : 1 > Result > ------ > 3 > It returns wrong result when "=" is missing for the query option. > gfsh>query --query "Select ID from /portfolio where ID <= 3 " > Result : true > Limit : 100 > Rows : 3 > Result > ------ > 0 > 1 > 2 > gfsh>query --query "<trace> Select ID from /portfolio where ID = 3 " > Result : false > Message : Query is invalid due to error : <Syntax error in query: unexpected > token: ID> > gfsh>query --query "<trace> Select ID from /portfolio where ID == 3 " > Result : true > Limit : 100 > Rows : 1 > Query Trace : Query Executed in 0.968059 ms; indexesUsed(0) > Result > ------ > 3 > gfsh>query --query "<trace> Select ID from /portfolio where ID =<= 3 " > Result : true > Limit : 100 > Rows : 4 > Query Trace : Query Executed in 1.427194 ms; indexesUsed(0) > Result > ------ > 0 > 1 > 2 > 3 > Seems that first '=' in the query string is discarded by gfsh. > Either fail the query if the query option'=' is missing or gfsh should return > correct result from the query string. -- This message was sent by Atlassian Jira (v8.3.4#803005)