[jira] [Commented] (GEODE-744) Incorrect use of APP_FETCH_SIZE in GFSH

2016-06-08 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15321800#comment-15321800
 ] 

ASF subversion and git services commented on GEODE-744:
---

Commit ec466fc38e8cc5fc65450362b8d313c35e6ea14f in incubator-geode's branch 
refs/heads/feature/GEODE-837 from [~kduling]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-geode.git;h=ec466fc ]

GEODE-744: Incorrect use of APP_FETCH_SIZE in GFSH

This closes #151


> Incorrect use of APP_FETCH_SIZE in GFSH
> ---
>
> Key: GEODE-744
> URL: https://issues.apache.org/jira/browse/GEODE-744
> Project: Geode
>  Issue Type: Bug
>  Components: gfsh
>Reporter: Jens Deppe
>Assignee: Kevin Duling
> Attachments: workspace (1).zip
>
>
> A customer is facing an easily reproducible issue when executing queries from 
> GFSH. It appears that the APP_FETCH_SIZE is being set only when parts of the 
> query are in lower case. It happens in 7.0.X, 8.0.X and 8.1.X.
> Attached to the TRAC is the reproducible scenario, steps to reproduce:
> Uncompress the file.
> Modify variables "GEMFIRE" and "JAVA_HOME" in file setenv.txt.
> Execute "./start_cluster.sh".
> Exceute "./run.sh". This script inserts 1500 entries in the region and, 
> afterwards, executes two queries, one using lower case and other using upper 
> case. You can see from the console that ouput is different, one returns the 
> actual size (1500) and the other one returns the default APP_FETCH_SIZE 
> (1000).
> Exceute "./stop_cluster.sh".
> The fix seems pretty easy to implement, the method "addLimit" of the inner 
> class "SelectExecStep?" in "DataCommandFunction?" class should be modified to 
> compare strings without using the actual word case. Is not enough to add more 
> "or" to the comparison like we are currently doing with since keywords like 
> "Count" or "coUn" will still break the functionallity. We should compare 
> everything using lower case or upper case, it doesn't matter which one, or at 
> least make sure that gfsh converts the query to upper/lower case before 
> actually executing them.
> The actual code with the problem is below:
> {noformat}
> private String addLimit(String query) {
> boolean containsLimitOrAggregate = query.contains(" limit")
> query.contains(" LIMIT")  query.contains("count(*)");
> if (!containsLimitOrAggregate){
> String limitQuery = query + " limit " + getFetchSize();
> return limitQuery;
> } else {
> return query;
> }
> }
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (GEODE-744) Incorrect use of APP_FETCH_SIZE in GFSH

2016-06-07 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15319743#comment-15319743
 ] 

ASF subversion and git services commented on GEODE-744:
---

Commit ec466fc38e8cc5fc65450362b8d313c35e6ea14f in incubator-geode's branch 
refs/heads/feature/GEODE-835 from [~kduling]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-geode.git;h=ec466fc ]

GEODE-744: Incorrect use of APP_FETCH_SIZE in GFSH

This closes #151


> Incorrect use of APP_FETCH_SIZE in GFSH
> ---
>
> Key: GEODE-744
> URL: https://issues.apache.org/jira/browse/GEODE-744
> Project: Geode
>  Issue Type: Bug
>  Components: gfsh
>Reporter: Jens Deppe
>Assignee: Kevin Duling
> Attachments: workspace (1).zip
>
>
> A customer is facing an easily reproducible issue when executing queries from 
> GFSH. It appears that the APP_FETCH_SIZE is being set only when parts of the 
> query are in lower case. It happens in 7.0.X, 8.0.X and 8.1.X.
> Attached to the TRAC is the reproducible scenario, steps to reproduce:
> Uncompress the file.
> Modify variables "GEMFIRE" and "JAVA_HOME" in file setenv.txt.
> Execute "./start_cluster.sh".
> Exceute "./run.sh". This script inserts 1500 entries in the region and, 
> afterwards, executes two queries, one using lower case and other using upper 
> case. You can see from the console that ouput is different, one returns the 
> actual size (1500) and the other one returns the default APP_FETCH_SIZE 
> (1000).
> Exceute "./stop_cluster.sh".
> The fix seems pretty easy to implement, the method "addLimit" of the inner 
> class "SelectExecStep?" in "DataCommandFunction?" class should be modified to 
> compare strings without using the actual word case. Is not enough to add more 
> "or" to the comparison like we are currently doing with since keywords like 
> "Count" or "coUn" will still break the functionallity. We should compare 
> everything using lower case or upper case, it doesn't matter which one, or at 
> least make sure that gfsh converts the query to upper/lower case before 
> actually executing them.
> The actual code with the problem is below:
> {noformat}
> private String addLimit(String query) {
> boolean containsLimitOrAggregate = query.contains(" limit")
> query.contains(" LIMIT")  query.contains("count(*)");
> if (!containsLimitOrAggregate){
> String limitQuery = query + " limit " + getFetchSize();
> return limitQuery;
> } else {
> return query;
> }
> }
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (GEODE-744) Incorrect use of APP_FETCH_SIZE in GFSH

2016-06-07 Thread Kevin Duling (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15319711#comment-15319711
 ] 

Kevin Duling commented on GEODE-744:


I saw a problem with the queries and consulted [~huynhja].  After talking with 
him, I've a followup change.  The issue is that there are more varieties of 
count than simply * within the count().  Specifically, one can do:  
{{count(distinct(field))}} or {{count(field)}}

This makes checking for only {{count( * )}} incorrect.  My proposed solution is 
to search for {{" count("}} like we now search for {{" limit"}}

> Incorrect use of APP_FETCH_SIZE in GFSH
> ---
>
> Key: GEODE-744
> URL: https://issues.apache.org/jira/browse/GEODE-744
> Project: Geode
>  Issue Type: Bug
>  Components: gfsh
>Reporter: Jens Deppe
>Assignee: Kevin Duling
> Attachments: workspace (1).zip
>
>
> A customer is facing an easily reproducible issue when executing queries from 
> GFSH. It appears that the APP_FETCH_SIZE is being set only when parts of the 
> query are in lower case. It happens in 7.0.X, 8.0.X and 8.1.X.
> Attached to the TRAC is the reproducible scenario, steps to reproduce:
> Uncompress the file.
> Modify variables "GEMFIRE" and "JAVA_HOME" in file setenv.txt.
> Execute "./start_cluster.sh".
> Exceute "./run.sh". This script inserts 1500 entries in the region and, 
> afterwards, executes two queries, one using lower case and other using upper 
> case. You can see from the console that ouput is different, one returns the 
> actual size (1500) and the other one returns the default APP_FETCH_SIZE 
> (1000).
> Exceute "./stop_cluster.sh".
> The fix seems pretty easy to implement, the method "addLimit" of the inner 
> class "SelectExecStep?" in "DataCommandFunction?" class should be modified to 
> compare strings without using the actual word case. Is not enough to add more 
> "or" to the comparison like we are currently doing with since keywords like 
> "Count" or "coUn" will still break the functionallity. We should compare 
> everything using lower case or upper case, it doesn't matter which one, or at 
> least make sure that gfsh converts the query to upper/lower case before 
> actually executing them.
> The actual code with the problem is below:
> {noformat}
> private String addLimit(String query) {
> boolean containsLimitOrAggregate = query.contains(" limit")
> query.contains(" LIMIT")  query.contains("count(*)");
> if (!containsLimitOrAggregate){
> String limitQuery = query + " limit " + getFetchSize();
> return limitQuery;
> } else {
> return query;
> }
> }
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (GEODE-744) Incorrect use of APP_FETCH_SIZE in GFSH

2016-06-07 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15319689#comment-15319689
 ] 

ASF GitHub Bot commented on GEODE-744:
--

Github user asfgit closed the pull request at:

https://github.com/apache/incubator-geode/pull/151


> Incorrect use of APP_FETCH_SIZE in GFSH
> ---
>
> Key: GEODE-744
> URL: https://issues.apache.org/jira/browse/GEODE-744
> Project: Geode
>  Issue Type: Bug
>  Components: gfsh
>Reporter: Jens Deppe
>Assignee: Kevin Duling
> Attachments: workspace (1).zip
>
>
> A customer is facing an easily reproducible issue when executing queries from 
> GFSH. It appears that the APP_FETCH_SIZE is being set only when parts of the 
> query are in lower case. It happens in 7.0.X, 8.0.X and 8.1.X.
> Attached to the TRAC is the reproducible scenario, steps to reproduce:
> Uncompress the file.
> Modify variables "GEMFIRE" and "JAVA_HOME" in file setenv.txt.
> Execute "./start_cluster.sh".
> Exceute "./run.sh". This script inserts 1500 entries in the region and, 
> afterwards, executes two queries, one using lower case and other using upper 
> case. You can see from the console that ouput is different, one returns the 
> actual size (1500) and the other one returns the default APP_FETCH_SIZE 
> (1000).
> Exceute "./stop_cluster.sh".
> The fix seems pretty easy to implement, the method "addLimit" of the inner 
> class "SelectExecStep?" in "DataCommandFunction?" class should be modified to 
> compare strings without using the actual word case. Is not enough to add more 
> "or" to the comparison like we are currently doing with since keywords like 
> "Count" or "coUn" will still break the functionallity. We should compare 
> everything using lower case or upper case, it doesn't matter which one, or at 
> least make sure that gfsh converts the query to upper/lower case before 
> actually executing them.
> The actual code with the problem is below:
> {noformat}
> private String addLimit(String query) {
> boolean containsLimitOrAggregate = query.contains(" limit")
> query.contains(" LIMIT")  query.contains("count(*)");
> if (!containsLimitOrAggregate){
> String limitQuery = query + " limit " + getFetchSize();
> return limitQuery;
> } else {
> return query;
> }
> }
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (GEODE-744) Incorrect use of APP_FETCH_SIZE in GFSH

2016-06-07 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15319688#comment-15319688
 ] 

ASF subversion and git services commented on GEODE-744:
---

Commit ec466fc38e8cc5fc65450362b8d313c35e6ea14f in incubator-geode's branch 
refs/heads/develop from [~kduling]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-geode.git;h=ec466fc ]

GEODE-744: Incorrect use of APP_FETCH_SIZE in GFSH

This closes #151


> Incorrect use of APP_FETCH_SIZE in GFSH
> ---
>
> Key: GEODE-744
> URL: https://issues.apache.org/jira/browse/GEODE-744
> Project: Geode
>  Issue Type: Bug
>  Components: gfsh
>Reporter: Jens Deppe
>Assignee: Kevin Duling
> Attachments: workspace (1).zip
>
>
> A customer is facing an easily reproducible issue when executing queries from 
> GFSH. It appears that the APP_FETCH_SIZE is being set only when parts of the 
> query are in lower case. It happens in 7.0.X, 8.0.X and 8.1.X.
> Attached to the TRAC is the reproducible scenario, steps to reproduce:
> Uncompress the file.
> Modify variables "GEMFIRE" and "JAVA_HOME" in file setenv.txt.
> Execute "./start_cluster.sh".
> Exceute "./run.sh". This script inserts 1500 entries in the region and, 
> afterwards, executes two queries, one using lower case and other using upper 
> case. You can see from the console that ouput is different, one returns the 
> actual size (1500) and the other one returns the default APP_FETCH_SIZE 
> (1000).
> Exceute "./stop_cluster.sh".
> The fix seems pretty easy to implement, the method "addLimit" of the inner 
> class "SelectExecStep?" in "DataCommandFunction?" class should be modified to 
> compare strings without using the actual word case. Is not enough to add more 
> "or" to the comparison like we are currently doing with since keywords like 
> "Count" or "coUn" will still break the functionallity. We should compare 
> everything using lower case or upper case, it doesn't matter which one, or at 
> least make sure that gfsh converts the query to upper/lower case before 
> actually executing them.
> The actual code with the problem is below:
> {noformat}
> private String addLimit(String query) {
> boolean containsLimitOrAggregate = query.contains(" limit")
> query.contains(" LIMIT")  query.contains("count(*)");
> if (!containsLimitOrAggregate){
> String limitQuery = query + " limit " + getFetchSize();
> return limitQuery;
> } else {
> return query;
> }
> }
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (GEODE-744) Incorrect use of APP_FETCH_SIZE in GFSH

2016-06-07 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15319191#comment-15319191
 ] 

ASF GitHub Bot commented on GEODE-744:
--

GitHub user kjduling opened a pull request:

https://github.com/apache/incubator-geode/pull/151

GEODE-744: Incorrect use of APP_FETCH_SIZE in GFSH

Changed the test to be case-insensitive.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/kjduling/incubator-geode feature/GEODE-744

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-geode/pull/151.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #151


commit c02dd1c1f2d176b5ce6316516278a064d8b2afaa
Author: Kevin J. Duling 
Date:   2016-06-07T19:29:19Z

GEODE-744: Incorrect use of APP_FETCH_SIZE in GFSH




> Incorrect use of APP_FETCH_SIZE in GFSH
> ---
>
> Key: GEODE-744
> URL: https://issues.apache.org/jira/browse/GEODE-744
> Project: Geode
>  Issue Type: Bug
>  Components: gfsh
>Reporter: Jens Deppe
>Assignee: Kevin Duling
> Attachments: workspace (1).zip
>
>
> A customer is facing an easily reproducible issue when executing queries from 
> GFSH. It appears that the APP_FETCH_SIZE is being set only when parts of the 
> query are in lower case. It happens in 7.0.X, 8.0.X and 8.1.X.
> Attached to the TRAC is the reproducible scenario, steps to reproduce:
> Uncompress the file.
> Modify variables "GEMFIRE" and "JAVA_HOME" in file setenv.txt.
> Execute "./start_cluster.sh".
> Exceute "./run.sh". This script inserts 1500 entries in the region and, 
> afterwards, executes two queries, one using lower case and other using upper 
> case. You can see from the console that ouput is different, one returns the 
> actual size (1500) and the other one returns the default APP_FETCH_SIZE 
> (1000).
> Exceute "./stop_cluster.sh".
> The fix seems pretty easy to implement, the method "addLimit" of the inner 
> class "SelectExecStep?" in "DataCommandFunction?" class should be modified to 
> compare strings without using the actual word case. Is not enough to add more 
> "or" to the comparison like we are currently doing with since keywords like 
> "Count" or "coUn" will still break the functionallity. We should compare 
> everything using lower case or upper case, it doesn't matter which one, or at 
> least make sure that gfsh converts the query to upper/lower case before 
> actually executing them.
> The actual code with the problem is below:
> {noformat}
> private String addLimit(String query) {
> boolean containsLimitOrAggregate = query.contains(" limit")
> query.contains(" LIMIT")  query.contains("count(*)");
> if (!containsLimitOrAggregate){
> String limitQuery = query + " limit " + getFetchSize();
> return limitQuery;
> } else {
> return query;
> }
> }
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)