You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "techdocsmith (via GitHub)" <gi...@apache.org> on 2024/09/17 23:54:42 UTC

[PR] [Docs] Update known issues for window functions (druid)

techdocsmith opened a new pull request, #17097:
URL: https://github.com/apache/druid/pull/17097

   Removes the items addressed in the Window Functions known issues list and adds new known issues
   
   - [ x] been self-reviewed.


-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] [Docs] Update known issues for window functions (druid)

Posted by "sreemanamala (via GitHub)" <gi...@apache.org>.
sreemanamala commented on code in PR #17097:
URL: https://github.com/apache/druid/pull/17097#discussion_r1764348065


##########
docs/querying/sql-window-functions.md:
##########
@@ -427,8 +427,6 @@ The number of rows considered for the `moving5` window for the `count5` column:
 
 The following are known issues with window functions:
 
--  Aggregates with ORDER BY specified are processed in the window: ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW  
-     This behavior differs from other databases that use the default of RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW.  
-     In cases where the order column is unique there is no difference between RANGE / ROWS; windows with RANGE specifications are handled as ROWS.
-- LEAD/LAG ignores the default value
-- LAST_VALUE returns the last value of the window even when you include an ORDER BY clause
+- Full range queries: RANGE x PRECEDING y FOLLOWING
+- GROUP BY queries
+- SELECT *

Review Comment:
   1. Range queries only support with both bounds are either `UNBOUNDED PRECEDING / FOLLOWING` or `CURRENT ROW`. We currently do not support `RANGE x PRECEDING and y FOLLOWING`
   2. Groups are not supported - `GROUPS x PRECEDING`
   3. `select *` is not supported when the query contains a window function. If we plan to retrieve all columns, need to specify using column names
   4. Window processors does not support unnesting MVDs. Consider Unnest or use `MV_TO_ARRAY` 



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] [Docs] Update known issues for window functions (druid)

Posted by "techdocsmith (via GitHub)" <gi...@apache.org>.
techdocsmith commented on code in PR #17097:
URL: https://github.com/apache/druid/pull/17097#discussion_r1768949504


##########
docs/querying/sql-window-functions.md:
##########
@@ -427,8 +427,6 @@ The number of rows considered for the `moving5` window for the `count5` column:
 
 The following are known issues with window functions:
 
--  Aggregates with ORDER BY specified are processed in the window: ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW  
-     This behavior differs from other databases that use the default of RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW.  
-     In cases where the order column is unique there is no difference between RANGE / ROWS; windows with RANGE specifications are handled as ROWS.
-- LEAD/LAG ignores the default value
-- LAST_VALUE returns the last value of the window even when you include an ORDER BY clause
+- Full range queries: RANGE x PRECEDING y FOLLOWING
+- GROUP BY queries
+- SELECT *

Review Comment:
   agree with @kgyrtkirk  that if there are clear error messages in the product, we don't need to put in the docs.
   Let me know the status on #3 and I will correct it according to @sreemanamala 
   
   Thanks for the reviews!



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] [Docs] Update known issues for window functions (druid)

Posted by "techdocsmith (via GitHub)" <gi...@apache.org>.
techdocsmith commented on code in PR #17097:
URL: https://github.com/apache/druid/pull/17097#discussion_r1768949504


##########
docs/querying/sql-window-functions.md:
##########
@@ -427,8 +427,6 @@ The number of rows considered for the `moving5` window for the `count5` column:
 
 The following are known issues with window functions:
 
--  Aggregates with ORDER BY specified are processed in the window: ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW  
-     This behavior differs from other databases that use the default of RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW.  
-     In cases where the order column is unique there is no difference between RANGE / ROWS; windows with RANGE specifications are handled as ROWS.
-- LEAD/LAG ignores the default value
-- LAST_VALUE returns the last value of the window even when you include an ORDER BY clause
+- Full range queries: RANGE x PRECEDING y FOLLOWING
+- GROUP BY queries
+- SELECT *

Review Comment:
   agree with @kgyrtkirk  that if there are clear error messages in the product, we don't need to put in the docs.
   Let me know the status on item 3 and I will correct it according to @sreemanamala 
   
   Thanks for the reviews!



##########
docs/querying/sql-window-functions.md:
##########
@@ -427,8 +427,6 @@ The number of rows considered for the `moving5` window for the `count5` column:
 
 The following are known issues with window functions:
 
--  Aggregates with ORDER BY specified are processed in the window: ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW  
-     This behavior differs from other databases that use the default of RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW.  
-     In cases where the order column is unique there is no difference between RANGE / ROWS; windows with RANGE specifications are handled as ROWS.
-- LEAD/LAG ignores the default value
-- LAST_VALUE returns the last value of the window even when you include an ORDER BY clause
+- Full range queries: RANGE x PRECEDING y FOLLOWING
+- GROUP BY queries
+- SELECT *

Review Comment:
   agree with @kgyrtkirk  that if there are clear error messages in the product, we don't need to put in the docs.
   Let me know the status on item 3 and I will correct it according to @sreemanamala text 
   
   Thanks for the reviews!



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] [Docs] Update known issues for window functions (druid)

Posted by "techdocsmith (via GitHub)" <gi...@apache.org>.
techdocsmith merged PR #17097:
URL: https://github.com/apache/druid/pull/17097


-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] [Docs] Update known issues for window functions (druid)

Posted by "kgyrtkirk (via GitHub)" <gi...@apache.org>.
kgyrtkirk commented on code in PR #17097:
URL: https://github.com/apache/druid/pull/17097#discussion_r1766246753


##########
docs/querying/sql-window-functions.md:
##########
@@ -427,8 +427,6 @@ The number of rows considered for the `moving5` window for the `count5` column:
 
 The following are known issues with window functions:
 
--  Aggregates with ORDER BY specified are processed in the window: ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW  
-     This behavior differs from other databases that use the default of RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW.  
-     In cases where the order column is unique there is no difference between RANGE / ROWS; windows with RANGE specifications are handled as ROWS.
-- LEAD/LAG ignores the default value
-- LAST_VALUE returns the last value of the window even when you include an ORDER BY clause
+- Full range queries: RANGE x PRECEDING y FOLLOWING
+- GROUP BY queries
+- SELECT *

Review Comment:
   all the previously mentioned things were working differently than possibly expected by the user - and they did returned some resultset which might have been incorrect in some cases
   
   * I think we should not list 1,2,4 as "known issues"; as they all have appropriate error messages - so they are just limitations of the current implementation
   * Item 2 is not supported by Calcite either...and most people doesn't even know about it.
   * We could possibly retain 3 but I think with the latest serde change that should be gone now (right?)
   



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org