Login Register Actian.com  

Actian Community Forum


Go Back   Actian Community Forums > Vectorwise > Vectorwise Discussion
 

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 2012-07-19   #1 (permalink)
Junior Member
 
Join Date: Jun 2012
Posts: 5
Default Bug in counting timestamp casted to ansidate

Hi!
I found another bug:

Preparing data:
Code:
drop table if exists test_avg;
create table test_avg (
datetime timestamp not null
) with structure = vectorwise;

insert into test_avg values ('2012-07-01 00:00:01');
insert into test_avg values ('2012-07-01 00:00:02');
insert into test_avg values ('2012-07-02 00:00:03');
insert into test_avg values ('2012-07-02 00:00:04');
\g
Subquery code:
Code:
select cast(datetime, ansidate) x
from test_avg
group by cast(datetime, ansidate)
Outputs:
|x |
+----------+
|2012-07-01|
|2012-07-02|
What is correct

But:
Code:
select count(x) daily_avg_log
from (
select cast(datetime, ansidate) x
from test_avg
group by cast(datetime, ansidate)
) a;
\g
Outputs 4.
mzak is offline   Reply With Quote
Old 2012-07-20   #2 (permalink)
Ingres Community
 
Join Date: Mar 2007
Posts: 55
Default

Recreated , will discuss with Development. Correct value to be returned is 2 , not 4.

Last edited by verde02; 2012-07-20 at 01:33 AM.
verde02 is offline   Reply With Quote

Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


© 2011 Actian Corporation. All Rights Reserved