phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "pranludi (JIRA)" <j...@apache.org>
Subject [jira] [Created] (PHOENIX-3561) Find null value by SELECT ALL
Date Wed, 04 Jan 2017 01:28:58 GMT
pranludi created PHOENIX-3561:
---------------------------------

             Summary: Find null value by SELECT ALL
                 Key: PHOENIX-3561
                 URL: https://issues.apache.org/jira/browse/PHOENIX-3561
             Project: Phoenix
          Issue Type: Bug
    Affects Versions: 4.8.2
            Reporter: pranludi


table schema
!desc tb_server_user_stat_20170103;
+------------+--------------+-------------------------------+-----------------+------------+------------+--------------+----------------+-----------------+-----------------+-----------+----------+
| TABLE_CAT  | TABLE_SCHEM  |          TABLE_NAME           |   COLUMN_NAME   | DATA_TYPE
 | TYPE_NAME  | COLUMN_SIZE  | BUFFER_LENGTH  | DECIMAL_DIGITS  | NUM_PREC_RADIX  | NULLABLE
 | REMARKS  |
+------------+--------------+-------------------------------+-----------------+------------+------------+--------------+----------------+-----------------+-----------------+-----------+----------+
|            |              | TB_SERVER_USER_STAT_20170103  | SERVER_TIME     | 12       
 | VARCHAR    | 32           | null           | null            | null            | 0    
    |          |
|            |              | TB_SERVER_USER_STAT_20170103  | ROOMCNT         | 4        
 | INTEGER    | null         | null           | null            | null            | 1    
    |          |
|            |              | TB_SERVER_USER_STAT_20170103  | CURRENTUSERCNT  | 4        
 | INTEGER    | null         | null           | null            | null            | 1    
    |          |
|            |              | TB_SERVER_USER_STAT_20170103  | BLIND           | 12       
 | VARCHAR    | 128          | null           | null            | null            | 1    
    |          |
|            |              | TB_SERVER_USER_STAT_20170103  | BLIND_0         | 4        
 | INTEGER    | null         | null           | null            | null            | 1    
    |          |
|            |              | TB_SERVER_USER_STAT_20170103  | BLIND_1         | 4        
 | INTEGER    | null         | null           | null            | null            | 1    
    |          |
|            |              | TB_SERVER_USER_STAT_20170103  | BLIND_2         | 4        
 | INTEGER    | null         | null           | null            | null            | 1    
    |          |
|            |              | TB_SERVER_USER_STAT_20170103  | BLIND_3         | 4        
 | INTEGER    | null         | null           | null            | null            | 1    
    |          |
|            |              | TB_SERVER_USER_STAT_20170103  | BLIND_4         | 4        
 | INTEGER    | null         | null           | null            | null            | 1    
    |          |
|            |              | TB_SERVER_USER_STAT_20170103  | BLIND_5         | 4        
 | INTEGER    | null         | null           | null            | null            | 1    
    |          |
|            |              | TB_SERVER_USER_STAT_20170103  | BLIND_6         | 4        
 | INTEGER    | null         | null           | null            | null            | 1    
    |          |
|            |              | TB_SERVER_USER_STAT_20170103  | BLIND_7         | 4        
 | INTEGER    | null         | null           | null            | null            | 1    
    |          |
|            |              | TB_SERVER_USER_STAT_20170103  | BLIND_8         | 4        
 | INTEGER    | null         | null           | null            | null            | 1    
    |          |
|            |              | TB_SERVER_USER_STAT_20170103  | BLIND_9         | 4        
 | INTEGER    | null         | null           | null            | null            | 1    
    |          |
|            |              | TB_SERVER_USER_STAT_20170103  | BLIND_10        | 4        
 | INTEGER    | null         | null           | null            | null            | 1    
    |          |
|            |              | TB_SERVER_USER_STAT_20170103  | BLIND_11        | 4        
 | INTEGER    | null         | null           | null            | null            | 1    
    |          |
|            |              | TB_SERVER_USER_STAT_20170103  | BLIND_12        | 4        
 | INTEGER    | null         | null           | null            | null            | 1    
    |          |
|            |              | TB_SERVER_USER_STAT_20170103  | BLIND_13        | 4        
 | INTEGER    | null         | null           | null            | null            | 1    
    |          |
|            |              | TB_SERVER_USER_STAT_20170103  | BLIND_14        | 4        
 | INTEGER    | null         | null           | null            | null            | 1    
    |          |
|            |              | TB_SERVER_USER_STAT_20170103  | BLIND_15        | 4        
 | INTEGER    | null         | null           | null            | null            | 1    
    |          |
|            |              | TB_SERVER_USER_STAT_20170103  | BLIND_16        | 4        
 | INTEGER    | null         | null           | null            | null            | 1    
    |          |
|            |              | TB_SERVER_USER_STAT_20170103  | BLIND_17        | 4        
 | INTEGER    | null         | null           | null            | null            | 1    
    |          |
|            |              | TB_SERVER_USER_STAT_20170103  | BLIND_18        | 4        
 | INTEGER    | null         | null           | null            | null            | 1    
    |          |
|            |              | TB_SERVER_USER_STAT_20170103  | BLIND_19        | 4        
 | INTEGER    | null         | null           | null            | null            | 1    
    |          |
+------------+--------------+-------------------------------+-----------------+------------+------------+--------------+----------------+-----------------+-----------------+-----------+----------+

data summary : avg  7000 ~ 10000
select * from tb_server_user_stat_20170103 limit 10;
+----------------------+----------+-----------------+--------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+-----------+-----------+
|     SERVER_TIME      | ROOMCNT  | CURRENTUSERCNT  | BLIND  | BLIND_0  | BLIND_1  | BLIND_2
 | BLIND_3  | BLIND_4  | BLIND_5  | BLIND_6  | BLIND_7  | BLIND_8  | BLIND_9  | BLIND_10 
| BLIND_11  |
+----------------------+----------+-----------------+--------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+-----------+-----------+
| 2017-01-03 01:40:30  | 307      | 2070            |        | 253      | 161      | 106 
    | 260      | 227      | 202      | 90       | 71       | 50       | 24       | 9     
   | 19        |
| 2017-01-03 01:40:40  | 307      | 2070            |        | 253      | 161      | 106 
    | 260      | 227      | 202      | 90       | 71       | 50       | 24       | 9     
   | 19        |
| 2017-01-03 01:40:50  | 306      | 2071            |        | 252      | 161      | 106 
    | 262      | 228      | 202      | 90       | 71       | 50       | 24       | 9     
   | 19        |
| 2017-01-03 01:41:00  | 306      | 2063            |        | 247      | 163      | 103 
    | 264      | 223      | 201      | 90       | 71       | 49       | 25       | 9     
   | 19        |
| 2017-01-03 01:41:10  | 306      | 2066            |        | 250      | 159      | 101 
    | 266      | 223      | 202      | 90       | 70       | 49       | 25       | 9     
   | 18        |
| 2017-01-03 01:41:20  | 305      | 2063            |        | 250      | 159      | 99  
    | 270      | 223      | 200      | 90       | 71       | 50       | 24       | 10    
   | 18        |
| 2017-01-03 01:41:30  | 304      | 2058            |        | 248      | 158      | 99  
    | 269      | 221      | 197      | 90       | 70       | 50       | 26       | 10    
   | 18        |
| 2017-01-03 01:41:40  | 304      | 2058            |        | 246      | 157      | 99  
    | 270      | 218      | 196      | 88       | 70       | 50       | 25       | 11    
   | 19        |
| 2017-01-03 01:41:50  | 304      | 2066            |        | 244      | 160      | 100 
    | 269      | 221      | 194      | 88       | 70       | 50       | 24       | 12    
   | 19        |
| 2017-01-03 01:42:00  | 306      | 2067            |        | 249      | 161      | 98  
    | 269      | 221      | 192      | 89       | 70       | 50       | 24       | 12    
   | 18        |
+----------------------+----------+-----------------+--------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+-----------+-----------+
10 rows selected (0.132 seconds)


issue:
select * from tb_server_user_stat_20170103;
+----------------------+----------+-----------------+--------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+-----------+-----------+
|     SERVER_TIME      | ROOMCNT  | CURRENTUSERCNT  | BLIND  | BLIND_0  | BLIND_1  | BLIND_2
 | BLIND_3  | BLIND_4  | BLIND_5  | BLIND_6  | BLIND_7  | BLIND_8  | BLIND_9  | BLIND_10 
| BLIND_11  |
+----------------------+----------+-----------------+--------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+-----------+-----------+
~~~
| 2017-01-03 14:49:30  | null     | null            |        | 120      | 99       | 65  
    | 143      | 104      | 122      | 50       | 42       | 31       | 15       | 12    
   | 7         |
~~~

but!!!!
select * from tb_server_user_stat_20170103 where server_time = '2017-01-03 14:49:30';
select * from tb_server_user_stat_20170103 where server_time = '2017-01-03 14:49:30';
+----------------------+----------+-----------------+--------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+-----------+-----------+
|     SERVER_TIME      | ROOMCNT  | CURRENTUSERCNT  | BLIND  | BLIND_0  | BLIND_1  | BLIND_2
 | BLIND_3  | BLIND_4  | BLIND_5  | BLIND_6  | BLIND_7  | BLIND_8  | BLIND_9  | BLIND_10 
| BLIND_11  |
+----------------------+----------+-----------------+--------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+-----------+-----------+
| 2017-01-03 14:49:30  | 190      | 1205            |        | 120      | 99       | 65  
    | 143      | 104      | 122      | 50       | 42       | 31       | 15       | 12    
   | 7         |
+----------------------+----------+-----------------+--------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+-----------+-----------+
1 row selected (0.112 seconds)

null value not




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

Mime
View raw message