[calcite-site] branch main updated: Website deployed from calcite@7277e53adea98e7dd8477d5a47e728aca6d8f680

2022-11-11 Thread asf-ci-deploy
This is an automated email from the ASF dual-hosted git repository.

asf-ci-deploy pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/calcite-site.git


The following commit(s) were added to refs/heads/main by this push:
 new eb33ff4a Website deployed from 
calcite@7277e53adea98e7dd8477d5a47e728aca6d8f680
eb33ff4a is described below

commit eb33ff4a1c60e778b5cf54b8f653e761094ab6c1
Author: F21 
AuthorDate: Sat Nov 12 01:58:53 2022 +

Website deployed from calcite@7277e53adea98e7dd8477d5a47e728aca6d8f680
---
 develop/index.html | 64 +++
 docs/howto.html| 87 ++
 2 files changed, 146 insertions(+), 5 deletions(-)

diff --git a/develop/index.html b/develop/index.html
index bc18f2bd..b8e4713d 100644
--- a/develop/index.html
+++ b/develop/index.html
@@ -65,9 +65,15 @@
 
   Source code
   Download source, build, 
and run tests
+  
+JIRA accounts

+  I
 already have an ASF JIRA account and want to be added as a contributor
+  I
 do not have an ASF JIRA account, want to request an account and be added as a 
contributor
+
+  
   Contributing
   Null safety
-  Continuous Integration 
Testing
+  Continuous integration 
testing
   Getting 
started
 
 
@@ -108,6 +114,54 @@ then build using Gradle:
 run more or fewer tests and
 run integration 
tests.
 
+JIRA accounts
+Calcite uses https://issues.apache.org/jira/browse/CALCITE";>JIRA for issues/case 
management.
+You must have a JIRA account in order to log cases and issues.
+
+I 
already have an ASF JIRA account and want to be added as a contributor
+If you already have an ASF JIRA account, you do not need to sign up for a
+new account. Please email mailto:jira-reque...@calcite.apache.org";>jira-reque...@calcite.apache.org
+using the following template, so that we can add your account to the
+contributors list in JIRA:
+
+mailto:jira-reque...@calcite.apache.org?subject=Add%20me%20as%20a%20contributor%20to%20JIRA&body=Hello,%0A%0APlease%20add%20me%20as%20a%20contributor%20to%20JIRA.%0AMy%20JIRA%20username%20is:%20%5BINSERT%20YOUR%20JIRA%20USERNAME%20HERE%5D%0A%0AThanks,%0A%5BINSERT%20YOUR%20NAME%20HERE%5D";>[Open
 the template in your email client]
+
+Subject: Add me as a contributor to JIRA
+
+Hello,
+
+Please add me as a contributor to JIRA.
+My JIRA username is: [INSERT YOUR JIRA USERNAME HERE]
+
+Thanks,
+[INSERT YOUR NAME HERE]
+
+I
 do not have an ASF JIRA account, want to request an account and be added as a 
contributor
+In order to request an ASF JIRA account, you will need to email
+mailto:jira-reque...@calcite.apache.org";>jira-reque...@calcite.apache.org
+using the following template:
+
+mailto:jira-reque...@calcite.apache.org?subject=Request%20for%20JIRA%20Account&body=Hello,%0A%0AI%20would%20like%20to%20request%20a%20JIRA%20account.%0AMy%20proposed%20JIRA%20username:%20%5BINSERT%20YOUR%20DESIRED%20JIRA%20USERNAME%20HERE%20(LOWERCASE%20LETTERS%20AND%20NUMBERS%20ONLY)%5D%0AMy%20full%20name:%20%5BINSERT%20YOUR%20FULL%20NAME%20HERE%5D%0AMy%20email%20address:%20%5BINSERT%20YOUR%20EMAIL%20ADDRESS%20HERE%5D%0A%0AThanks,%0A%5BINSERT%20YOUR%20NAME%20HERE%5D">Subject: Request for JIRA Account
+
+Hello,
+
+I would like to request a JIRA account.
+My proposed JIRA username: [INSERT YOUR DESIRED JIRA USERNAME HERE (LOWERCASE 
LETTERS AND NUMBERS ONLY)]
+My full name: [INSERT YOUR FULL NAME HERE]
+My email address: [INSERT YOUR EMAIL ADDRESS HERE]
+
+Thanks,
+[INSERT YOUR NAME HERE]
+
+IMPORTANT: The email address the request is sent from MUST 
be the same
+as the email address in the body of the request, otherwise, we will not be
+able to process your request.
+
+Once the ASF has processed our submission on your behalf, you will receive
+an email to set your password.
+
 Contributing
 
 We welcome contributions.
@@ -131,7 +185,7 @@ summary line. If you remove information while clarifying, 
put it in
 the description of the case.
 
 Design discussions may happen in various places (email threads,
-github reviews) but the JIRA case is the canonical place for those
+Github reviews) but the JIRA case is the canonical place for those
 discussions. Link to them or summarize them in the case.
 
 When implementing a case, especially a new feature, make sure
@@ -155,8 +209,8 @@ feel free to tag the respective contributor(s) in the 
discussion.
 
 If you are going to take on the issue right away assign it to yourself.
 To assign issues to yourself you have to be registered in JIRA as a 
contributor.
-In order to do that, send an email to the developers list
-and provide your JIRA username.
+In order to do that, please follow the instructions outlined in the
+JIRA Accounts section.
 
 If you are committed to fixing the issue before the upcoming release set
 the fix version accordingly (e.g., 1.20.0), otherwise leave it as blank.
@@ -380,7 +434,7 @@ then it is the same as 

[calcite] branch site updated: [CALCITE-5353] Document new procedure for requesting JIRA accounts and becoming a contributor

2022-11-11 Thread github-bot
This is an automated email from the ASF dual-hosted git repository.

github-bot pushed a commit to branch site
in repository https://gitbox.apache.org/repos/asf/calcite.git


The following commit(s) were added to refs/heads/site by this push:
 new 6c710fb8e6 [CALCITE-5353] Document new procedure for requesting JIRA 
accounts and becoming a contributor
6c710fb8e6 is described below

commit 6c710fb8e6568202e03c0f359bb6fb940824c294
Author: Francis Chuang 
AuthorDate: Tue Nov 1 10:09:15 2022 +1100

[CALCITE-5353] Document new procedure for requesting JIRA accounts and 
becoming a contributor
---
 README.md |  3 ++
 site/_docs/howto.md   | 78 +++
 site/develop/index.md | 59 +++---
 3 files changed, 136 insertions(+), 4 deletions(-)

diff --git a/README.md b/README.md
index d927704370..a2e78356eb 100644
--- a/README.md
+++ b/README.md
@@ -37,3 +37,6 @@ Elasticsearch, MongoDB, Kafka, and others, with minimal
 configuration.
 
 For more details, see the [home page](http://calcite.apache.org).
+
+The project uses [JIRA](https://issues.apache.org/jira/browse/CALCITE)
+for issue tracking. For further information, please see the [JIRA accounts 
guide](https://calcite.apache.org/develop/#jira-accounts).
diff --git a/site/_docs/howto.md b/site/_docs/howto.md
index 2b2a0a950e..921a962ce9 100644
--- a/site/_docs/howto.md
+++ b/site/_docs/howto.md
@@ -1006,3 +1006,81 @@ that `main` code freeze is over and commits can resume.
 
 See instructions in
 [site/README.md]({{ site.sourceRoot }}/site/README.md).
+
+# Advanced topics for PMC members
+
+## Processing JIRA account requests
+Here are some email templates that can be used when processing requests for 
JIRA accounts.
+
+### Account added to contributor list
+{% highlight text %}
+Hello [INSERT NAME HERE],
+
+Thanks for your interest in becoming a Calcite contributor! I have added your 
username ([INSERT USERNAME HERE])
+to the contributors group in JIRA. Happy contributing!
+
+If you have not subscribed to our development list (d...@calcite.apache.org) 
yet, I encourage you to do so by
+emailing dev-subscr...@calcite.apache.org. Further information about our 
mailing lists is available here:
+https://calcite.apache.org/community/#mailing-lists
+
+Best regards,
+[INSERT YOUR NAME HERE]
+{% endhighlight %}
+
+### Account not found
+{% highlight text %}
+Hello [INSERT NAME HERE],
+
+Thanks for your interest in becoming a Calcite contributor! I am sorry to 
inform you that I was unable to
+find your account ([INSERT USERNAME HERE]) in JIRA and was not able to add you 
to the contributors group.
+Please let me know the correct username by return email and I will process 
your request again.
+
+If you do not have an ASF JIRA account, please follow the instructions here to 
request one:
+https://calcite.apache.org/develop/#i-do-not-have-an-asf-jira-account-want-to-request-an-account-and-be-added-as-a-contributor
+
+Best regards,
+[INSERT YOUR NAME HERE]
+{% endhighlight %}
+
+### JIRA account created and added to contributors list
+{% highlight text %}
+Hello [INSERT NAME HERE],
+
+Thanks for your interest in becoming a Calcite contributor! I have requested 
for your JIRA account
+with the username ([INSERT USERNAME HERE]) to be created. You will receive an 
email shortly with further
+instructions on how to set your password. I have also added your account to 
the contributors list in JIRA.
+Happy contributing!
+
+If you have not subscribed to our development list (d...@calcite.apache.org) 
yet, I encourage you to do so by
+emailing dev-subscr...@calcite.apache.org. Further information about our 
mailing lists is available here:
+https://calcite.apache.org/community/#mailing-lists
+
+Best regards,
+[INSERT YOUR NAME HERE]
+{% endhighlight %}
+
+### JIRA username unavailable
+{% highlight text %}
+Hello [INSERT NAME HERE],
+
+Thanks for your interest in becoming a Calcite contributor! Unfortunately, the 
username you requested
+([INSERT USERNAME HERE]) is not available. Please note that usernames can only 
contain lowercase
+letters and numbers. Please select a different username and let me know by 
return email to try again.
+
+Best regards,
+[INSERT YOUR NAME HERE]
+{% endhighlight %}
+
+### Request not sent from same email address for JIRA account
+{% highlight text %}
+Hello [INSERT NAME HERE],
+
+Thanks for your interest in becoming a Calcite contributor! Unfortunately, I 
am unable to process your
+request as the request was not sent from the email address to be linked to 
your JIRA account.
+
+Please send your request again using the same email address as the one 
requested for your account ([INSERT EMAIL ADDRESS HERE]),
+so that I can process your request.
+
+Best regards,
+[INSERT YOUR NAME HERE]
+{% endhighlight %}
diff --git a/site/develop/index.md b/site/develop/index.md
index c619f049bb..d84b130890 100644
--- a/site/develop/index.md
+++ b/site/develop/index.md
@@ -65

[calcite-avatica-go] branch main updated: [CALCITE-5353] Document new procedure for requesting JIRA accounts and becoming a contributor

2022-11-11 Thread francischuang
This is an automated email from the ASF dual-hosted git repository.

francischuang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/calcite-avatica-go.git


The following commit(s) were added to refs/heads/main by this push:
 new 9db0166  [CALCITE-5353] Document new procedure for requesting JIRA 
accounts and becoming a contributor
9db0166 is described below

commit 9db01665008890a9409043155a173eaeb95d169f
Author: Francis Chuang 
AuthorDate: Tue Nov 1 10:24:31 2022 +1100

[CALCITE-5353] Document new procedure for requesting JIRA accounts and 
becoming a contributor
---
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index ae09798..b560f66 100644
--- a/README.md
+++ b/README.md
@@ -56,4 +56,4 @@ 
page](https://calcite.apache.org/avatica/docs/go_history.html).
 
 ## Issues
 We do not use Github to file issues. Please create an issue on [Calcite's 
JIRA](https://issues.apache.org/jira/projects/CALCITE/issues)
-and select `avatica-go` as the component.
\ No newline at end of file
+and select `avatica-go` as the component. For further information, please see 
the [JIRA accounts guide](https://calcite.apache.org/develop/#jira-accounts).
\ No newline at end of file



[GitHub] [calcite-avatica-go] F21 merged pull request #62: [CALCITE-5353] Document new procedure for requesting JIRA accounts and becoming a contributor

2022-11-11 Thread GitBox


F21 merged PR #62:
URL: https://github.com/apache/calcite-avatica-go/pull/62


-- 
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-unsubscr...@calcite.apache.org

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



[calcite-avatica] branch main updated: [CALCITE-5353] Document new procedure for requesting JIRA accounts and becoming a contributor

2022-11-11 Thread francischuang
This is an automated email from the ASF dual-hosted git repository.

francischuang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/calcite-avatica.git


The following commit(s) were added to refs/heads/main by this push:
 new 8d5eb143e [CALCITE-5353] Document new procedure for requesting JIRA 
accounts and becoming a contributor
8d5eb143e is described below

commit 8d5eb143ef749cda660ce7b024d1c8358aa00fce
Author: Francis Chuang 
AuthorDate: Tue Nov 1 10:17:30 2022 +1100

[CALCITE-5353] Document new procedure for requesting JIRA accounts and 
becoming a contributor
---
 README.md | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/README.md b/README.md
index 7a8143ad9..457702789 100644
--- a/README.md
+++ b/README.md
@@ -28,3 +28,6 @@ For more details, see the [home 
page](https://calcite.apache.org/avatica).
 
 Release notes for all published versions are available on the [history
 page](https://calcite.apache.org/avatica/docs/history.html).
+
+The project uses [JIRA](https://issues.apache.org/jira/browse/CALCITE)
+for issue tracking. For further information, please see the [JIRA accounts 
guide](https://calcite.apache.org/develop/#jira-accounts).



[GitHub] [calcite-avatica] F21 merged pull request #188: [CALCITE-5353] Document new procedure for requesting JIRA accounts and becoming a contributor

2022-11-11 Thread GitBox


F21 merged PR #188:
URL: https://github.com/apache/calcite-avatica/pull/188


-- 
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-unsubscr...@calcite.apache.org

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



[calcite] branch main updated: [CALCITE-5353] Document new procedure for requesting JIRA accounts and becoming a contributor

2022-11-11 Thread francischuang
This is an automated email from the ASF dual-hosted git repository.

francischuang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/calcite.git


The following commit(s) were added to refs/heads/main by this push:
 new 7277e53ade [CALCITE-5353] Document new procedure for requesting JIRA 
accounts and becoming a contributor
7277e53ade is described below

commit 7277e53adea98e7dd8477d5a47e728aca6d8f680
Author: Francis Chuang 
AuthorDate: Tue Nov 1 10:09:15 2022 +1100

[CALCITE-5353] Document new procedure for requesting JIRA accounts and 
becoming a contributor
---
 README.md |  3 ++
 site/_docs/howto.md   | 78 +++
 site/develop/index.md | 59 +++---
 3 files changed, 136 insertions(+), 4 deletions(-)

diff --git a/README.md b/README.md
index 64a9145ea6..af6a60e2da 100644
--- a/README.md
+++ b/README.md
@@ -35,3 +35,6 @@ Elasticsearch, MongoDB, Kafka, and others, with minimal
 configuration.
 
 For more details, see the [home page](http://calcite.apache.org).
+
+The project uses [JIRA](https://issues.apache.org/jira/browse/CALCITE)
+for issue tracking. For further information, please see the [JIRA accounts 
guide](https://calcite.apache.org/develop/#jira-accounts).
diff --git a/site/_docs/howto.md b/site/_docs/howto.md
index 2b2a0a950e..921a962ce9 100644
--- a/site/_docs/howto.md
+++ b/site/_docs/howto.md
@@ -1006,3 +1006,81 @@ that `main` code freeze is over and commits can resume.
 
 See instructions in
 [site/README.md]({{ site.sourceRoot }}/site/README.md).
+
+# Advanced topics for PMC members
+
+## Processing JIRA account requests
+Here are some email templates that can be used when processing requests for 
JIRA accounts.
+
+### Account added to contributor list
+{% highlight text %}
+Hello [INSERT NAME HERE],
+
+Thanks for your interest in becoming a Calcite contributor! I have added your 
username ([INSERT USERNAME HERE])
+to the contributors group in JIRA. Happy contributing!
+
+If you have not subscribed to our development list (d...@calcite.apache.org) 
yet, I encourage you to do so by
+emailing dev-subscr...@calcite.apache.org. Further information about our 
mailing lists is available here:
+https://calcite.apache.org/community/#mailing-lists
+
+Best regards,
+[INSERT YOUR NAME HERE]
+{% endhighlight %}
+
+### Account not found
+{% highlight text %}
+Hello [INSERT NAME HERE],
+
+Thanks for your interest in becoming a Calcite contributor! I am sorry to 
inform you that I was unable to
+find your account ([INSERT USERNAME HERE]) in JIRA and was not able to add you 
to the contributors group.
+Please let me know the correct username by return email and I will process 
your request again.
+
+If you do not have an ASF JIRA account, please follow the instructions here to 
request one:
+https://calcite.apache.org/develop/#i-do-not-have-an-asf-jira-account-want-to-request-an-account-and-be-added-as-a-contributor
+
+Best regards,
+[INSERT YOUR NAME HERE]
+{% endhighlight %}
+
+### JIRA account created and added to contributors list
+{% highlight text %}
+Hello [INSERT NAME HERE],
+
+Thanks for your interest in becoming a Calcite contributor! I have requested 
for your JIRA account
+with the username ([INSERT USERNAME HERE]) to be created. You will receive an 
email shortly with further
+instructions on how to set your password. I have also added your account to 
the contributors list in JIRA.
+Happy contributing!
+
+If you have not subscribed to our development list (d...@calcite.apache.org) 
yet, I encourage you to do so by
+emailing dev-subscr...@calcite.apache.org. Further information about our 
mailing lists is available here:
+https://calcite.apache.org/community/#mailing-lists
+
+Best regards,
+[INSERT YOUR NAME HERE]
+{% endhighlight %}
+
+### JIRA username unavailable
+{% highlight text %}
+Hello [INSERT NAME HERE],
+
+Thanks for your interest in becoming a Calcite contributor! Unfortunately, the 
username you requested
+([INSERT USERNAME HERE]) is not available. Please note that usernames can only 
contain lowercase
+letters and numbers. Please select a different username and let me know by 
return email to try again.
+
+Best regards,
+[INSERT YOUR NAME HERE]
+{% endhighlight %}
+
+### Request not sent from same email address for JIRA account
+{% highlight text %}
+Hello [INSERT NAME HERE],
+
+Thanks for your interest in becoming a Calcite contributor! Unfortunately, I 
am unable to process your
+request as the request was not sent from the email address to be linked to 
your JIRA account.
+
+Please send your request again using the same email address as the one 
requested for your account ([INSERT EMAIL ADDRESS HERE]),
+so that I can process your request.
+
+Best regards,
+[INSERT YOUR NAME HERE]
+{% endhighlight %}
diff --git a/site/develop/index.md b/site/develop/index.md
index a58b8f138c..d79f0155da 100644
--- a/site/develop/index.md
+++ b/site/develop/index.md
@@ 

[GitHub] [calcite] F21 merged pull request #2959: [CALCITE-5353] Document new procedure for requesting JIRA accounts and becoming a contributor

2022-11-11 Thread GitBox


F21 merged PR #2959:
URL: https://github.com/apache/calcite/pull/2959


-- 
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-unsubscr...@calcite.apache.org

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



[GitHub] [calcite] dssysolyatin commented on a diff in pull request #2929: [CALCITE-5310] JSON_OBJECT in scalar sub-query throws AssertionError

2022-11-11 Thread GitBox


dssysolyatin commented on code in PR #2929:
URL: https://github.com/apache/calcite/pull/2929#discussion_r1020099005


##
core/src/main/java/org/apache/calcite/sql2rel/RelDecorrelator.java:
##
@@ -1790,10 +1790,11 @@ private RexNode createCaseExpression(
 
 @Override public RexNode visitLiteral(RexLiteral literal) {
   // Use nullIndicator to decide whether to project null.
-  // Do nothing if the literal is null.
+  // Do nothing if the literal is null or symbol.
   if (!RexUtil.isNull(literal)

Review Comment:
   Do I understand correctly that if I have query like:
   ```
   SELECT (SELECT CARDINALITY(ARRAY[false, true, a.attidentity = 'a']) FROM 
UNNEST(ARRAY[1]) as v) as options
   FROM UNNEST(ARRAY['a', 'b']) AS a(attidentity);
   ```
   RelDecorrelator will try to wrap true and false into case expression ?
   
   Another question. why do we need to wrap literals into case expression at 
all ?



-- 
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-unsubscr...@calcite.apache.org

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



[GitHub] [calcite] rubenada commented on pull request #2965: [CALCITE-5105] Add MEASURE type and AGGREGATE aggregate function

2022-11-11 Thread GitBox


rubenada commented on PR #2965:
URL: https://github.com/apache/calcite/pull/2965#issuecomment-1311503006

   @julianhyde Thanks for this contribution. Looks good. I have taken a look, 
and left some minor comments (I'm not very familiar with SQL parser and 
validator parts though, so I'm probably not the most suited reviewer in there).


-- 
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-unsubscr...@calcite.apache.org

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



[GitHub] [calcite] itiels commented on pull request #2868: [CALCITE-5230] Fix PERCENTILE_DISC return type derivation

2022-11-11 Thread GitBox


itiels commented on PR #2868:
URL: https://github.com/apache/calcite/pull/2868#issuecomment-1311502368

   Thanks @libenchao for the review. 
   
   I've fixed the comment.
   As for `PERCENTILE_CONT`, based on conversation with Julian in the Jira 
ticket, there is nothing to be done.
   
   Is there anything else that I need/should to do for this PR? 
   


-- 
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-unsubscr...@calcite.apache.org

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



[GitHub] [calcite] itiels commented on a diff in pull request #2868: [CALCITE-5230] Fix PERCENTILE_DISC return type derivation

2022-11-11 Thread GitBox


itiels commented on code in PR #2868:
URL: https://github.com/apache/calcite/pull/2868#discussion_r1020077749


##
core/src/main/java/org/apache/calcite/sql/fun/SqlStdOperatorTable.java:
##
@@ -2303,7 +2303,7 @@ public class SqlStdOperatorTable extends 
ReflectiveSqlOperatorTable {
*/
   public static final SqlAggFunction PERCENTILE_DISC =
   SqlBasicAggFunction
-  .create(SqlKind.PERCENTILE_DISC, ReturnTypes.DOUBLE,
+  .create(SqlKind.PERCENTILE_DISC, ReturnTypes.PERCENTILE_DISC,

Review Comment:
   Thanks, fixed it



-- 
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-unsubscr...@calcite.apache.org

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



[GitHub] [calcite] rubenada commented on a diff in pull request #2965: [CALCITE-5105] Add MEASURE type and AGGREGATE aggregate function

2022-11-11 Thread GitBox


rubenada commented on code in PR #2965:
URL: https://github.com/apache/calcite/pull/2965#discussion_r1020076304


##
core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorUtil.java:
##
@@ -1287,6 +1287,20 @@ private static FlatAggregate flattenRecurse(@Nullable 
SqlCall filterCall,
 }
   }
 
+  /** Returns whether a select item is a measure. */
+  public static boolean isMeasure(SqlNode selectItem) {
+return getMeasure(selectItem) != null;
+  }
+
+  /** Returns the measure expression if a select item is a measure, null
+   * otherwise.
+   *
+   * For a measure, {@code selectItem} will have the form
+   * {@code AS(MEASURE(exp), alias)} and this method returns {@code exp}. */
+  public static @Nullable SqlNode getMeasure(SqlNode selectItem) {
+return null;

Review Comment:
   This method seems unfinished, will it be part of future work? Maybe add a 
TODO or a comment in that case?



-- 
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-unsubscr...@calcite.apache.org

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



[GitHub] [calcite] rubenada commented on a diff in pull request #2965: [CALCITE-5105] Add MEASURE type and AGGREGATE aggregate function

2022-11-11 Thread GitBox


rubenada commented on code in PR #2965:
URL: https://github.com/apache/calcite/pull/2965#discussion_r1020067000


##
core/src/main/java/org/apache/calcite/sql/type/ApplySqlType.java:
##
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.calcite.sql.type;
+
+import org.apache.calcite.linq4j.Ord;
+import org.apache.calcite.rel.type.RelDataType;
+
+import com.google.common.collect.ImmutableList;
+
+/** Type that applies generic type to type parameters. */
+abstract class ApplySqlType extends AbstractSqlType {
+  protected final ImmutableList types;
+
+  ApplySqlType(SqlTypeName typeName, boolean isNullable,
+  Iterable types) {
+super(typeName, isNullable, null);
+this.types = ImmutableList.copyOf(types);

Review Comment:
   Would it make sense to check that `types` is not empty?



-- 
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-unsubscr...@calcite.apache.org

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



[GitHub] [calcite] rubenada commented on a diff in pull request #2965: [CALCITE-5105] Add MEASURE type and AGGREGATE aggregate function

2022-11-11 Thread GitBox


rubenada commented on code in PR #2965:
URL: https://github.com/apache/calcite/pull/2965#discussion_r1020048689


##
site/_docs/reference.md:
##
@@ -49,6 +49,13 @@ here to appease testAllFunctionsAreDocumented:
 | SUCCEEDS   | Documented as a period operator
 | TABLE  | Documented as part of FROM syntax
 | VARIANCE() | In SqlStdOperatorTable, but not fully implemented
+
+Dialect-specific:
+
+| C | Function   | Reason not documented
+|:--|:-- |:-
+| c | AGGREGATE(m)   | TODO: document; also AS MEASURE

Review Comment:
   I guess when this get "officially" documented, we will also need to add 'c' 
as a new value for the compatibility column in the "Dialect-specific 
Operators", but there is no point to add it 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-unsubscr...@calcite.apache.org

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