Uploaded image for project: 'Teiid'
  1. Teiid
  2. TEIID-3279

SOLR: Error when date,time or timestamp literal is in where clause

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 8.7.1.6_2, 8.11
    • 8.7
    • Connector API
    • None

    Description

      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.

      Attachments

        Activity

          People

            rhn-engineering-rareddy Ramesh Reddy
            felias_jira Filip Elias (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: