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

Bug 1180107

Summary: SOLR: Error when date,time or timestamp literal is in where clause
Product: [JBoss] JBoss Data Virtualization 6 Reporter: Filip Elias <felias>
Component: TeiidAssignee: Van Halbert <vhalbert>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.1.0CC: atangrin, jstastny, vhalbert
Target Milestone: ER3Keywords: QA-Closed
Target Release: 6.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-10 08:55:50 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 Filip Elias 2015-01-08 11:31:32 UTC
Query fails when time,date or timestamp literal is used in where clause.

Examples:
Query:
select intkey from smalla where timevalue = '11:30:20'

Error:
'11:30:20'org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException: Invalid Date String:'11-30-20'
	at org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:491)

Query:
select intkey from smalla where datevalue = '2002-02-02'

Error: 
org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException: Invalid Date String:'11-30-20'
	at org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:491)

Query:
select intkey from smalla where timestampvalue = '2000-01-01 00:00:04'

Error:
 org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException: Invalid Date String:'2000-01-01T00-00-04'
	at org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:491)

SOLR supports only timestamps (YYYY-mm-ddThh:mm:ssZ) so date and time types should be converted into timestamp before a query is send to SOLR.

Comment 1 JBoss JIRA Server 2015-01-10 01:39:28 UTC
Ramesh Reddy <rareddy> updated the status of jira TEIID-3279 to Resolved

Comment 4 Jan Stastny 2015-06-16 11:18:33 UTC
Still experiencing problems with solr date/time/timestamp literals in DV 6.2.0 ER2:

SELECT BQT1.SmallA.TimeValue FROM BQT1.SmallA WHERE BQT1.SmallA.TimeValue < '17:00:00' ORDER BY TimeValue
Remote org.teiid.core.TeiidException: Invalid Date String:'1970-01-01T16'

SELECT BQT1.SmallA.DateValue FROM BQT1.SmallA WHERE BQT1.SmallA.DateValue <> '2000-02-02' ORDER BY DateValue
Remote org.teiid.core.TeiidException: Invalid Date String:'2000-02-01T23'

SELECT BQT1.SmallA.DateValue FROM BQT1.SmallA WHERE BQT1.SmallA.DateValue = '2000-02-02'
Remote org.teiid.core.TeiidException: Invalid Date String:'2000-02-01T23'

SELECT BQT1.SmallA.TimeStampValue FROM BQT1.SmallA WHERE BQT1.SmallA.TimeStampValue <> '2000-01-01 00:00:30.0' ORDER BY TimestampValue
Remote org.teiid.core.TeiidException: Invalid Date String:'1999-12-31T23'

Comment 5 JBoss JIRA Server 2015-06-16 12:22:56 UTC
Van Halbert <vhalbert> updated the status of jira TEIID-3279 to Reopened

Comment 6 JBoss JIRA Server 2015-06-16 15:03:22 UTC
Steven Hawkins <shawkins> updated the status of jira TEIID-3279 to Resolved

Comment 7 JBoss JIRA Server 2015-10-09 19:40:42 UTC
Steven Hawkins <shawkins> updated the status of jira TEIID-3279 to Closed