Uploaded image for project: 'Apache HAWQ'
  1. Apache HAWQ
  2. HAWQ-1526

Queries with functions in WHERE clause return empty result for external PXF tables

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.3.0.0-incubating
    • Component/s: PXF
    • Labels:
      None

      Description

      Two same queries with the same WHERE clauses(having function call) return a different result based on a column in SELECT clause:

      template1=# select transaction_id  from ext_purchase_data WHERE to_timestamp(order_time)::DATE = '2017-09-10'::DATE and project = 'Dating' and project_subtype in ('DACH','NG');
       transaction_id 
      ----------------
      (0 rows)
      
      template1=# select * from ext_purchase_data WHERE to_timestamp(order_time)::DATE = '2017-09-10'::DATE and project = 'Dating' and project_subtype in ('DACH','NG');
       meta_extracted_at_time | meta_utc_time_offset | meta_transaction_action | meta_source_system | project | project_subtype | transaction_id | user_id | amount | currency_code | reference_transaction_id | product_type | transaction_type | order_time | vat  | legal_entity | sale_action_id | content_id | content_name | content_quantity 
      ------------------------+----------------------+-------------------------+--------------------+---------+-----------------+----------------+---------+--------+---------------+--------------------------+--------------+------------------+------------+------+--------------+----------------+------------+--------------+------------------
                   1505056530 | +1                   | +1                      | fancy system       | Dating  | NG              | 12345          | acedres |   20.5 | EUR           | 123456789                | DATA         | Online           | 1505056530 | 21.4 | BBVA         | 1234           |         10 | Diez         |              100
      (1 row)
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                odiachenko Oleksandr Diachenko
                Reporter:
                odiachenko Oleksandr Diachenko
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: