[
https://issues.apache.org/jira/browse/GEODE-8179?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17119009#comment-17119009
]
ASF GitHub Bot commented on GEODE-8179:
---------------------------------------
agingade commented on a change in pull request #5178:
URL: https://github.com/apache/geode/pull/5178#discussion_r432044428
##########
File path: geode-docs/tools_modules/gfsh/command-pages/query.html.md.erb
##########
@@ -42,11 +42,36 @@ query --query=value [--file=path/to/results/file]
[--member=member-name]
<a id="concept_89A129F729DF4D3B9056C8D9016AA760__table_ocr_gcg_2w"></a>
-| Name | Description
|
-|--------------------------|----------------------------------------------------------------|
-| <span class="keyword parmname">‑‑query </span> |
*Required.* The OQL string |
-| <span class="keyword parmname">‑‑file</span> | When specified,
all query results are written to the specified file. An error is issued if the
file already exists. |
-| <span class="keyword parmname">‑‑member </span> | Name/Id of
the member on which to execute the query (as shown in the output of the gfsh
`describe region` command, for example) |
+<table>
+<colgroup>
+<col width="33%" />
+<col width="*" />
+</colgroup>
+<thead>
+<tr class="header">
+<th>Name</th>
+<th>Description</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td><span class="keyword parmname">\-\-query</span></td>
+<td><b>Required.</b> The OQL string.
+
+<div class="note note">
+<b>Note:</b> It is important not to forget the `=` sign and follow the pattern
`\-\-query=value`. `gfsh` automatically removes the `=` so if it is not
introduced, the first `=` in the query (if any) will be removed changing the
query statement.
Review comment:
Instead of updating the doc; my request will be fixing the issue. You
mentioned that we can't upgrade, the "spring shell", is the reason for that is,
it is not active anymore. Have we tried requesting change with spring-shell
team...
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> 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
>
> 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)