julianhyde commented on a change in pull request #1108: [CALCITE-863] Support RESPECT NULLS, IGNORE NULLS option for lead, lag, first_value, last_value function URL: https://github.com/apache/calcite/pull/1108#discussion_r266683444
########## File path: core/src/main/java/org/apache/calcite/sql/SqlAggFunction.java ########## @@ -38,6 +38,7 @@ private final boolean requiresOrder; private final boolean requiresOver; private final Optionality requiresGroupOrder; + private final Boolean ignoreNulls; Review comment: A couple of 'data modeling' issues: * Whether to respect or ignore nulls seems, to me, to be a property of the call, not the operator. When you are calling a function and asking it to ignore nulls, you are not creating a new operator, but are creating a new call to an existing operator. * I would love it if we can change `ignoreNulls` from a nullable `Boolean` to a not-null `boolean`. (I hate null values in Java.) Since the default is `IGNORE NULLS`, do we really care whether they wrote `LAST_VALUE` or `LAST_VALUE IGNORE NULLS`? ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
