Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1146501

Summary: Bad result of query with GROUB BY clause (underlying sybase15 datasource)
Product: [JBoss] JBoss Data Virtualization 6 Reporter: Juraj Duráni <jdurani>
Component: TeiidAssignee: Van Halbert <vhalbert>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.1.0CC: atangrin, dlesage, vhalbert
Target Milestone: ER4Keywords: QA-Closed
Target Release: 6.1.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
If a query had a GROUB BY clause the resulting table was missing some values. This was fixed by a code change. As a result, the table is now populated wtih all values.
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-10 08:48:23 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Juraj Duráni 2014-09-25 10:54:55 UTC
Description:
There is sybase15 database with table named SmallA and table named SmallA in VDB which is mapped to sybase table (see tables definition below).
I am trying to run query against VDB:
SELECT 
	INTKEY, STRINGKEY, INTNUM, STRINGNUM, FLOATNUM, LONGNUM, DOUBLENUM, BYTENUM, DATEVALUE, TIMEVALUE, TIMESTAMPVALUE, BOOLEANVALUE, CHARVALUE, SHORTVALUE, BIGINTEGERVALUE, BIGDECIMALVALUE
FROM 
	BQT1.SMALLA 
GROUP BY 
	INTKEY, STRINGKEY, INTNUM, STRINGNUM, FLOATNUM, LONGNUM, DOUBLENUM, BYTENUM, DATEVALUE, TIMEVALUE, TIMESTAMPVALUE, BOOLEANVALUE, CHARVALUE, SHORTVALUE, BIGINTEGERVALUE, BIGDECIMALVALUE

Result is table which misses some values (the other values are OK):
FloatNum: always 0
ByteNum: always 0
DateValue: always 1900-01-01
TimeValue: always 00:00:00
BooleanValue: always 'false'
CharValue: always empty character
ShortValue: always 0
BigIntegerValue: always 0
BigDecimalValue: always 0

After removing 'INTKEY' and 'STRINGKEY' from the query is result OK (sybase15 has indices only for these two columns).



///////////////////
Table definition
///////////////////
SmallA (sybase) has these columns (name:type):
IntKey:int -> PRIMARY KEY, HAS INDEX
StringKey:varchar -> HAS INDEX
IntNum:int
StringNum:varchar
FloatNum:float
LongNum:numeric
DoubleNum:float
ByteNum:real
DateValue:datetime
TimeValue:datetime
TimestampValue:datetime
BooleanValue:tinyint
CharValue:char
ShortValue:numeric
BigIntegerValue:numeric
BigDecimalValue:numeric
ObjectValue:text

SmallA (VDB) has these columns (name:type):
IntKey:integer
StringKey:string
IntNum:integer
StringNum:string
FloatNum:float
LongNum:long
DoubleNum:double
ByteNum:byte
DateValue:date
TimeValue:time
TimestampValue:timestamp
BooleanValue:boolean
CharValue:char
ShortValue:short
BigIntegerValue:biginteger
BigDecimalValue:bigdecimal
ObjectValue:object

Comment 2 JBoss JIRA Server 2014-10-07 20:11:21 UTC
Steven Hawkins <shawkins> updated the status of jira TEIID-3141 to Resolved

Comment 5 JBoss JIRA Server 2016-06-03 22:43:32 UTC
Steven Hawkins <shawkins> updated the status of jira TEIID-3141 to Closed