You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Anthony Baker (JIRA)" <ji...@apache.org> on 2016/01/15 07:14:55 UTC
[jira] [Closed] (GEODE-533) GFSH query swaps row values when they
are null
[ https://issues.apache.org/jira/browse/GEODE-533?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Anthony Baker closed GEODE-533.
-------------------------------
> GFSH query swaps row values when they are null
> ----------------------------------------------
>
> Key: GEODE-533
> URL: https://issues.apache.org/jira/browse/GEODE-533
> Project: Geode
> Issue Type: Bug
> Components: management
> Affects Versions: 1.0.0-incubating.M1
> Reporter: Jens Deppe
> Assignee: Jens Deppe
> Fix For: 1.0.0-incubating.M1
>
>
> gfsh shows incorrect value for the name String field when value is null it swaps the values between rows as can be seen in the GFSH output in the below.
> Domain object Customer
> {noformat}
> package com.gopivotal.gemfire.sample;
> import java.io.Serializable;
> import java.util.List;
> public class Customer implements Serializable {
> private static final long serialVersionUID = 1L;
> private String name;
> private Integer custId;
> public Customer() {
> }
> public Customer(String name,Integer custId) {
> this.setCustId(custId); this.setName(name);
> }
> public String getName() {
> return name;
> }
> public void setName(String name) {
> this.name = name;
> }
> public Integer getCustId() {
> return custId;
> }
> public void setCustId(Integer custId) {
> this.custId = custId;
> }
> public String toString() {
> StringBuffer sb = new StringBuffer();
> sb.append("nothing");
> return sb.toString();
> }
> }
> {noformat}
> Data Putter
> {noformat}
> package com.gopivotal.gemfire.sample;
> import java.util.ArrayList;
> import java.util.List;
> import com.gemstone.gemfire.cache.Cache;
> import com.gemstone.gemfire.cache.Region;
> import com.gemstone.gemfire.cache.client.ClientCache;
> import com.gemstone.gemfire.cache.client.ClientCacheFactory;
> import com.gemstone.gemfire.cache.client.ClientRegionFactory;
> import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
> import com.gemstone.gemfire.cache.partition.PartitionRegionHelper;
> public class MyDataPutterGFSHSwapNull {
> public static void main(String[] argv) throws Exception {
> MyDataPutterGFSHSwapNull mdp = new MyDataPutterGFSHSwapNull();
> mdp.fire(Integer.parseInt("100000"));
> }
> public void fire(int count) throws Exception {
> ClientCacheFactory ccf=new ClientCacheFactory();
> ccf.addPoolLocator("localhost", 10334);
> ClientCache ccache=ccf.create();
> ClientRegionFactory rf; rf = cache.createClientRegionFactory(ClientRegionShortcut.PROXY);
> Region<Integer,Customer> customer=rf.create("Customer");
> customer.put(new Integer(1), new Customer(null, 1));
> customer.put(new Integer(2), new Customer("Tommy", 2));
> ccache.close();
> }
> }
> {noformat}
> GFSH command and result:
> ------------------------
> {noformat}
> gfsh>query --query="select * from /Customer"
> Result : true
> startCount : 0
> endCount : 20
> Rows : 2
> Query Trace : Query Executed in 4.920503 ms; indexesUsed(0)
> custId | name
> ------ | -----
> 1 | Tommy
> 2 | null
> NEXT_STEP_NAME : END
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)