Uploaded image for project: 'Kylin'
  1. Kylin
  2. KYLIN-4171

real-time query can't support derivative field for condition

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • v3.0.0-alpha2
    • None
    • Real-time Streaming
    • None

    Description

      when i make a query like this

      //sql
      SELECT t.* FROM
      ( SELECT a.*,ROW_NUMBER() OVER(PARTITION BY data_id ORDER BY data_update_time desc) AS r 
      FROM kylin_stream_order a WHERE a.type = 'UPDATE') t
      LIMIT 10
      

      It's ok. I can get answer.

      But when i make a query like this

      //sql
      SELECT t.* FROM
      ( SELECT a.*,ROW_NUMBER() OVER(PARTITION BY data_id ORDER BY data_update_time desc) AS r 
      FROM kylin_stream_order a WHERE a.type = 'UPDATE') t
      WHERE t.r = 1
      LIMIT 10
      

      It's not ok. I get Nothing. However, same query for off-line cube, It's ok.

      So, I think real-time query can't support derivative field for condition. Using `ROW_NUMBER` function to remove duplication is a common scenario. Please make real-time support it.

      Attachments

        Activity

          People

            Unassigned Unassigned
            haven0930 Peng Huang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: