pandalanax opened a new issue #2390:
URL: https://github.com/apache/drill/issues/2390


   **Is your feature request related to a problem? Please describe.**
   We work with small files in hdfs, our current process for good performance 
is to save all data before current month to parquet (new table) and then `UNION 
ALL` with current month files (and save as view). this process is called once a 
month. 
   
   Now we are faced with high velocity data, so that we have to call the above 
process every week instead of once a month.
   We could do this through other apache solutions but DRILL is the most 
convenient way.
   
   **Describe the solution you'd like**
   ```sql
    SELECT EXTRACT(WEEK from CURRENT_DATE) as weekno,CURRENT_DATE FROM 
(VALUES(1));
   +--------+--------------+
   | weekno | CURRENT_DATE |
   +--------+--------------+
   | 48     | 2021-11-30   |
   +--------+--------------+
   ```
   
   **Describe alternatives you've considered**
   1. Go back 7 days with `INTERVAL`
   ```sql
   WHERE `dir0` > DATE_SUB(CURRENT_DATE,INTERVAL '7' DAY)
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to