[GitHub] [calcite] LakeShen commented on pull request #3436: [CALCITE-5984] Allow disabling field trim via `SqlToRelConverter` config

2023-09-27 Thread via GitHub


LakeShen commented on PR #3436:
URL: https://github.com/apache/calcite/pull/3436#issuecomment-1738378375

   Hi @WegdanGhazi ,If you think we could add this feature in 1.36.0,please 
change this jira Fix Version to 1.36.0.
   
   And also need the others review.


-- 
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] JiajunBernoulli commented on a diff in pull request #3399: [CALCITE-5962] Support parse Spark-style syntax LEFT ANTI JOIN in Babel parser

2023-09-27 Thread via GitHub


JiajunBernoulli commented on code in PR #3399:
URL: https://github.com/apache/calcite/pull/3399#discussion_r1339432251


##
babel/src/test/java/org/apache/calcite/test/BabelParserTest.java:
##
@@ -430,6 +431,23 @@ private void checkParseInfixCast(String sqlType) {
 f.sql("DISCARD TEMP").same();
   }
 
+  @Test void testSparkLeftAntiJoin() {
+final SqlParserFixture f = fixture().withDialect(SparkSqlDialect.DEFAULT);
+final String sql = "select a.cid, a.cname, count(1) as amount\n"
++ "from geo.area1 as a\n"
++ "left anti join (select distinct cid, cname\n"
++ "from geo.area2\n"
++ "where cname = 'cityA') as b on a.cid = b.cid\n"
++ "group by a.cid, a.cname";
+final String expected = "SELECT A.CID, A.CNAME, COUNT(1) AMOUNT\n"
++ "FROM GEO.AREA1 A\n"
++ "LEFT ANTI JOIN (SELECT DISTINCT CID, CNAME\n"
++ "FROM GEO.AREA2\n"
++ "WHERE (CNAME = 'cityA')) B ON (A.CID = B.CID)\n"
++ "GROUP BY A.CID, A.CNAME";
+f.sql(sql).ok(expected);

Review Comment:
   @jiefei30 , If we not use `withDialect(SparkSqlDialect.DEFAULT)`.
   
   We also can unparse `LEFT ANTI JOIN`.
   
   Just a unit test, I will merge 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] JiajunBernoulli commented on pull request #3429: [CALCITE-6006] RelToSqlConverter loses charset information

2023-09-27 Thread via GitHub


JiajunBernoulli commented on PR #3429:
URL: https://github.com/apache/calcite/pull/3429#issuecomment-1738337214

   @mihaibudiu , would you please squash commits?


-- 
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] mihaibudiu opened a new pull request, #3446: [CALCITE-6030] DATE_PART is not handled by the RexToLixTranslator

2023-09-27 Thread via GitHub


mihaibudiu opened a new pull request, #3446:
URL: https://github.com/apache/calcite/pull/3446

   Please note that running this test requires #3445 to be merged first.
   


-- 
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] sonarcloud[bot] commented on pull request #3445: [CALCITE-6029] SqlOperatorTest cannot test operators that require the Babel parser

2023-09-27 Thread via GitHub


sonarcloud[bot] commented on PR #3445:
URL: https://github.com/apache/calcite/pull/3445#issuecomment-1738229307

   Kudos, SonarCloud Quality Gate passed!  [![Quality Gate 
passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png
 'Quality Gate 
passed')](https://sonarcloud.io/dashboard?id=apache_calcite=3445)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=apache_calcite=3445=false=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_calcite=3445=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_calcite=3445=false=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_calcite=3445=false=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_calcite=3445=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_calcite=3445=false=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_calcite=3445=false=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=apache_calcite=3445=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_calcite=3445=false=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=apache_calcite=3445=false=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_calcite=3445=false=CODE_SMELL)
 [0 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_calcite=3445=false=CODE_SMELL)
   
   
[![100.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/100-16px.png
 
'100.0%')](https://sonarcloud.io/component_measures?id=apache_calcite=3445=new_coverage=list)
 [100.0% 
Coverage](https://sonarcloud.io/component_measures?id=apache_calcite=3445=new_coverage=list)
  
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=apache_calcite=3445=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_calcite=3445=new_duplicated_lines_density=list)
   
   


-- 
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] mihaibudiu opened a new pull request, #3445: [CALCITE-6029] SqlOperatorTest cannot test operators that require the Babel parser

2023-09-27 Thread via GitHub


mihaibudiu opened a new pull request, #3445:
URL: https://github.com/apache/calcite/pull/3445

   (no comment)


-- 
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] asfgit closed pull request #3421: [CALCITE-5982] Allow overloading the created enumerable in CalciteMetaImpl when calling getTables() or getColumns()

2023-09-27 Thread via GitHub


asfgit closed pull request #3421: [CALCITE-5982] Allow overloading the created 
enumerable in CalciteMetaImpl when calling getTables() or getColumns()
URL: https://github.com/apache/calcite/pull/3421


-- 
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-5982] Allow implementations of CalciteMeta to return extra columns in their responses to DatabaseMetaData.getTables and getColumns requests

2023-09-27 Thread jhyde
This is an automated email from the ASF dual-hosted git repository.

jhyde 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 436ae7d296 [CALCITE-5982] Allow implementations of CalciteMeta to 
return extra columns in their responses to DatabaseMetaData.getTables and 
getColumns requests
436ae7d296 is described below

commit 436ae7d296dfcac321ec461feaf0f645ec980993
Author: Oliver Lee 
AuthorDate: Fri Jul 28 03:09:32 2023 +

[CALCITE-5982] Allow implementations of CalciteMeta to return extra columns 
in their responses to DatabaseMetaData.getTables and getColumns requests

A JDBC provider based on Calcite may wish to return extended
metadata. To accomplish this, we add parameters to the
CalciteMetaImpl whose types are the new interfaces
CalciteMetaTableFactory and CalciteMetaColumnFactory.

The default implementation of interface
CalciteMetaTableFactory returns a collection MetaTable
objects; an alternative implementation could return some
subclass that has extra columns, and those extra columns
will be carried through the Avatica RPC protocol and appear
in the ResultSet returned from DatabaseMetaData.getTables.
Similarly CalciteMetaColumnFactory and
DatabaseMetaData.getColumns.

Various fix-ups: (Julian Hyde)
* Make the CalciteMetaDataTableFactory and
  CalciteMetaColumnFactory parameters to the CalciteMetaImpl
  constructor mandatory;
* Add CalciteMetaImpl.create;
* Make CalciteMetaTableFactoryImpl and
  CalciteMetaColumnFactoryImpl singletons (with a protected
  constructor to allow subclassing);
* Rename factory methods ('newMetaColumn' to 'createColumn',
  'newMetaTable' to 'createTable');
* Convert some lambdas into functions.

Add a lint rule to ensure that the 'implements' keyword is
not at end of a line. (Julian Hyde)

Close apache/calcite#3421
---
 build.gradle.kts   |   1 +
 .../calcite/config/CalciteConnectionConfig.java|  12 +
 .../config/CalciteConnectionConfigImpl.java|  17 +-
 .../calcite/config/CalciteConnectionProperty.java  |   6 +
 .../calcite/jdbc/CalciteMetaColumnFactory.java |  48 
 .../calcite/jdbc/CalciteMetaColumnFactoryImpl.java |  69 ++
 .../org/apache/calcite/jdbc/CalciteMetaImpl.java   | 256 ++---
 .../calcite/jdbc/CalciteMetaTableFactory.java  |  42 
 .../calcite/jdbc/CalciteMetaTableFactoryImpl.java  |  45 
 .../main/java/org/apache/calcite/jdbc/Driver.java  |  12 +-
 .../apache/calcite/rel/core/TableFunctionScan.java |   4 +-
 .../calcite/jdbc/CalciteRemoteDriverTest.java  | 145 +++-
 .../apache/calcite/test/JdbcFrontJdbcBackTest.java |  71 ++
 13 files changed, 578 insertions(+), 150 deletions(-)

diff --git a/build.gradle.kts b/build.gradle.kts
index a9a6c0692b..4b78f37ed7 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -605,6 +605,7 @@ allprojects {
 replaceRegex("Method argument list should not end in 
whitespace or newline", "(?[CALCITE-...] link styles: 1", 
"])++CALCITE-\\d+[^>]++>\\s*+\\[?(CALCITE-\\d+)\\]?", "https://issues.apache.org/jira/browse/\$1\;>[\$1]")
 // If the link was crafted manually, ensure it has 
[CALCITE-...] in the link text
diff --git 
a/core/src/main/java/org/apache/calcite/config/CalciteConnectionConfig.java 
b/core/src/main/java/org/apache/calcite/config/CalciteConnectionConfig.java
index c5e5d041e7..3999a6ce9b 100644
--- a/core/src/main/java/org/apache/calcite/config/CalciteConnectionConfig.java
+++ b/core/src/main/java/org/apache/calcite/config/CalciteConnectionConfig.java
@@ -110,4 +110,16 @@ public interface CalciteConnectionConfig extends 
ConnectionConfig {
   boolean lenientOperatorLookup();
   /** Returns the value of {@link CalciteConnectionProperty#TOPDOWN_OPT}. */
   boolean topDownOpt();
+
+  /** Returns the value of {@link 
CalciteConnectionProperty#META_TABLE_FACTORY},
+   * or a default meta table factory if not set. If
+   * {@code defaultMetaTableFactory} is not null, the result is never null. */
+   @PolyNull T metaTableFactory(Class metaTableFactoryClass,
+  @PolyNull T defaultMetaTableFactory);
+
+  /** Returns the value of {@link 
CalciteConnectionProperty#META_COLUMN_FACTORY},
+   * or a default meta column factory if not set. If
+   * {@code defaultMetaColumnFactory} is not null, the result is never null. */
+   @PolyNull T metaColumnFactory(Class metaColumnFactoryClass,
+  @PolyNull T defaultMetaColumnFactory);
 }
diff --git 
a/core/src/main/java/org/apache/calcite/config/CalciteConnectionConfigImpl.java 
b/core/src/main/java/org/apache/calcite/config/CalciteConnectionConfigImpl.java
index 49521bcb68..7d9f9f76d1 100644
--- 
a/core/src/main/java/org/apache/calcite/config/CalciteConnectionConfigImpl.java
+++ 

[calcite] branch main updated: [CALCITE-6007] Sub-query that contains WITH and has no alias generates invalid SQL after expansion

2023-09-27 Thread jhyde
This is an automated email from the ASF dual-hosted git repository.

jhyde 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 1245db6201 [CALCITE-6007] Sub-query that contains WITH and has no 
alias generates invalid SQL after expansion
1245db6201 is described below

commit 1245db620114ee5174641ad540af6b27dcd772e3
Author: wenrui 
AuthorDate: Fri Sep 22 22:56:53 2023 -0700

[CALCITE-6007] Sub-query that contains WITH and has no alias generates 
invalid SQL after expansion

Add Quidem test (Julian Hyde).

Close apache/calcite#3440
---
 .../calcite/sql/validate/SqlValidatorImpl.java |  2 +-
 .../org/apache/calcite/test/SqlValidatorTest.java  | 19 +++
 core/src/test/resources/sql/misc.iq| 28 ++
 3 files changed, 48 insertions(+), 1 deletion(-)

diff --git 
a/core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java 
b/core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java
index 83fbc51382..75eb3637ed 100644
--- a/core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java
+++ b/core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java
@@ -2350,7 +2350,7 @@ public class SqlValidatorImpl implements 
SqlValidatorWithHints {
   case PIVOT:
   case UNPIVOT:
   case MATCH_RECOGNIZE:
-
+  case WITH:
 // give this anonymous construct a name since later
 // query processing stages rely on it
 alias = SqlValidatorUtil.alias(node, nextGeneratedId++);
diff --git a/core/src/test/java/org/apache/calcite/test/SqlValidatorTest.java 
b/core/src/test/java/org/apache/calcite/test/SqlValidatorTest.java
index 150dbdf785..8f0d1c002f 100644
--- a/core/src/test/java/org/apache/calcite/test/SqlValidatorTest.java
+++ b/core/src/test/java/org/apache/calcite/test/SqlValidatorTest.java
@@ -7993,6 +7993,25 @@ public class SqlValidatorTest extends 
SqlValidatorTestCase {
 + "FROM `DEPT`");
   }
 
+  /** Test case for
+   * https://issues.apache.org/jira/browse/CALCITE-6007;>[CALCITE-6007]
+   * Sub-query that contains WITH and has no alias generates invalid SQL after
+   * expansion. */
+  @Test void testSubQueryWithoutAlias() {
+// Note the 'AS `EXPR$0`' in the rewritten form of each query.
+// Before [CALCITE-6007] was fixed, that alias was missing.
+sql("select a from (select 1 as a)")
+.withValidatorIdentifierExpansion(true)
+.rewritesTo("SELECT `EXPR$0`.`A`\n"
++ "FROM (SELECT 1 AS `A`) AS `EXPR$0`");
+sql("select a from (with sub as (select 1 as a) select a from sub)")
+.withValidatorIdentifierExpansion(true)
+.rewritesTo("SELECT `EXPR$0`.`A`\n"
++ "FROM (WITH `SUB` AS (SELECT 1 AS `A`) "
++ "SELECT `SUB`.`A`\n"
++ "FROM `SUB` AS `SUB`) AS `EXPR$0`");
+  }
+
   /** Test case for
* https://issues.apache.org/jira/browse/CALCITE-1238;>[CALCITE-1238]
* Unparsing LIMIT without ORDER BY after validation. */
diff --git a/core/src/test/resources/sql/misc.iq 
b/core/src/test/resources/sql/misc.iq
index 65fe7f085d..9876587d19 100644
--- a/core/src/test/resources/sql/misc.iq
+++ b/core/src/test/resources/sql/misc.iq
@@ -796,6 +796,34 @@ having exists
 
 !ok
 
+# [CALCITE-6007] Sub-query that contains WITH and has no alias generates 
invalid SQL after expansion
+SELECT a, b
+FROM (
+  WITH sub AS (SELECT 1 AS a, 2 AS b)
+  SELECT * FROM sub)
+WHERE a IS NOT NULL;
++---+---+
+| A | B |
++---+---+
+| 1 | 2 |
++---+---+
+(1 row)
+
+!ok
+
+# Similar pattern to previous, without WITH
+SELECT a, b
+FROM (SELECT 1 AS a, 2 AS b)
+WHERE a IS NOT NULL;
++---+---+
+| A | B |
++---+---+
+| 1 | 2 |
++---+---+
+(1 row)
+
+!ok
+
 # [CALCITE-411] Duplicate aliases
 select 1 as a, 2 as a from (values (true));
 +---+---+



[GitHub] [calcite] julianhyde closed pull request #3440: [CALCITE-6007] CTE as subquery without alias doesn't have correct alias setup

2023-09-27 Thread via GitHub


julianhyde closed pull request #3440: [CALCITE-6007] CTE as subquery without 
alias doesn't have correct alias setup
URL: https://github.com/apache/calcite/pull/3440


-- 
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] sonarcloud[bot] commented on pull request #3420: [CALCITE-5989] Type inference for RPAD and LPAD functions (BIGQUERY) is incorrect

2023-09-27 Thread via GitHub


sonarcloud[bot] commented on PR #3420:
URL: https://github.com/apache/calcite/pull/3420#issuecomment-1737858473

   Kudos, SonarCloud Quality Gate passed!  [![Quality Gate 
passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png
 'Quality Gate 
passed')](https://sonarcloud.io/dashboard?id=apache_calcite=3420)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=apache_calcite=3420=false=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_calcite=3420=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_calcite=3420=false=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_calcite=3420=false=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_calcite=3420=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_calcite=3420=false=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_calcite=3420=false=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=apache_calcite=3420=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_calcite=3420=false=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=apache_calcite=3420=false=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_calcite=3420=false=CODE_SMELL)
 [1 Code 
Smell](https://sonarcloud.io/project/issues?id=apache_calcite=3420=false=CODE_SMELL)
   
   
[![100.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/100-16px.png
 
'100.0%')](https://sonarcloud.io/component_measures?id=apache_calcite=3420=new_coverage=list)
 [100.0% 
Coverage](https://sonarcloud.io/component_measures?id=apache_calcite=3420=new_coverage=list)
  
   
[![61.5%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/20plus-16px.png
 
'61.5%')](https://sonarcloud.io/component_measures?id=apache_calcite=3420=new_duplicated_lines_density=list)
 [61.5% 
Duplication](https://sonarcloud.io/component_measures?id=apache_calcite=3420=new_duplicated_lines_density=list)
   
   


-- 
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] mihaibudiu commented on pull request #3420: [CALCITE-5989] Type inference for RPAD and LPAD functions (BIGQUERY) is incorrect

2023-09-27 Thread via GitHub


mihaibudiu commented on PR #3420:
URL: https://github.com/apache/calcite/pull/3420#issuecomment-1737842041

   Hopefully I have fixed the conflicts.


-- 
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] sonarcloud[bot] commented on pull request #3444: [MINOR] Add example for MAP type in reference docs

2023-09-27 Thread via GitHub


sonarcloud[bot] commented on PR #3444:
URL: https://github.com/apache/calcite/pull/3444#issuecomment-1737804213

   Kudos, SonarCloud Quality Gate passed!  [![Quality Gate 
passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png
 'Quality Gate 
passed')](https://sonarcloud.io/dashboard?id=apache_calcite=3444)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=apache_calcite=3444=false=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_calcite=3444=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_calcite=3444=false=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_calcite=3444=false=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_calcite=3444=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_calcite=3444=false=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_calcite=3444=false=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=apache_calcite=3444=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_calcite=3444=false=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=apache_calcite=3444=false=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_calcite=3444=false=CODE_SMELL)
 [0 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_calcite=3444=false=CODE_SMELL)
   
   [![No Coverage 
information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo-16px.png
 'No Coverage 
information')](https://sonarcloud.io/component_measures?id=apache_calcite=3444=coverage=list)
 No Coverage information  
   [![No Duplication 
information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/NoDuplicationInfo-16px.png
 'No Duplication 
information')](https://sonarcloud.io/component_measures?id=apache_calcite=3444=duplicated_lines_density=list)
 No Duplication information
   
   


-- 
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] sonarcloud[bot] commented on pull request #3444: [MINOR] Add example for MAP type in reference docs

2023-09-27 Thread via GitHub


sonarcloud[bot] commented on PR #3444:
URL: https://github.com/apache/calcite/pull/3444#issuecomment-1737774036

   Kudos, SonarCloud Quality Gate passed!  [![Quality Gate 
passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png
 'Quality Gate 
passed')](https://sonarcloud.io/dashboard?id=apache_calcite=3444)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=apache_calcite=3444=false=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_calcite=3444=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_calcite=3444=false=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_calcite=3444=false=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_calcite=3444=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_calcite=3444=false=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_calcite=3444=false=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=apache_calcite=3444=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_calcite=3444=false=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=apache_calcite=3444=false=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_calcite=3444=false=CODE_SMELL)
 [0 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_calcite=3444=false=CODE_SMELL)
   
   [![No Coverage 
information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo-16px.png
 'No Coverage 
information')](https://sonarcloud.io/component_measures?id=apache_calcite=3444=coverage=list)
 No Coverage information  
   [![No Duplication 
information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/NoDuplicationInfo-16px.png
 'No Duplication 
information')](https://sonarcloud.io/component_measures?id=apache_calcite=3444=duplicated_lines_density=list)
 No Duplication information
   
   


-- 
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] chucheng92 commented on pull request #3444: [MINOR] Add example for MAP type in reference docs

2023-09-27 Thread via GitHub


chucheng92 commented on PR #3444:
URL: https://github.com/apache/calcite/pull/3444#issuecomment-1737757453

   > Is there a test which confirms this syntax?
   
   thanks for reviewing. Yes, we have.
   
   
https://github.com/apache/calcite/blob/aef9bdb5c091e4df84eeb47a9aa70770dd3d3fb8/testkit/src/main/java/org/apache/calcite/test/SqlOperatorTest.java#L6639
   
   The background is that I was going to implement Spark's map function, and 
found that the MAP document embedded in calcite had no examples.


-- 
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] chucheng92 opened a new pull request, #3444: [MINOR] Add example for map type in reference docs

2023-09-27 Thread via GitHub


chucheng92 opened a new pull request, #3444:
URL: https://github.com/apache/calcite/pull/3444

   (no comment)


-- 
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-5940] Add the Rule to merge Limit

2023-09-27 Thread jiajunxie
This is an automated email from the ASF dual-hosted git repository.

jiajunxie 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 aef9bdb5c0 [CALCITE-5940] Add the Rule to merge Limit
aef9bdb5c0 is described below

commit aef9bdb5c091e4df84eeb47a9aa70770dd3d3fb8
Author: shenlang 
AuthorDate: Sun Aug 27 20:42:06 2023 +0800

[CALCITE-5940] Add the Rule to merge Limit
---
 .../java/org/apache/calcite/plan/RelOptUtil.java   |   7 +
 .../org/apache/calcite/rel/rules/CoreRules.java|   5 +
 .../apache/calcite/rel/rules/SortMergeRule.java| 141 +
 .../org/apache/calcite/test/RelOptRulesTest.java   |  91 +++
 .../org/apache/calcite/test/RelOptRulesTest.xml| 170 +
 5 files changed, 414 insertions(+)

diff --git a/core/src/main/java/org/apache/calcite/plan/RelOptUtil.java 
b/core/src/main/java/org/apache/calcite/plan/RelOptUtil.java
index 6ec10cf951..90dedd5cfa 100644
--- a/core/src/main/java/org/apache/calcite/plan/RelOptUtil.java
+++ b/core/src/main/java/org/apache/calcite/plan/RelOptUtil.java
@@ -194,6 +194,13 @@ public abstract class RelOptUtil {
 return (rel instanceof Sort) && !((Sort) 
rel).getCollation().getFieldCollations().isEmpty();
   }
 
+  /**
+   * Whether this node contains a offset specification.
+   */
+  public static boolean isOffset(RelNode rel) {
+return (rel instanceof Sort) && ((Sort) rel).offset != null;
+  }
+
   /**
* Returns a set of tables used by this expression or its children.
*/
diff --git a/core/src/main/java/org/apache/calcite/rel/rules/CoreRules.java 
b/core/src/main/java/org/apache/calcite/rel/rules/CoreRules.java
index 43b1eb830a..5c5cc04c71 100644
--- a/core/src/main/java/org/apache/calcite/rel/rules/CoreRules.java
+++ b/core/src/main/java/org/apache/calcite/rel/rules/CoreRules.java
@@ -716,6 +716,11 @@ public class CoreRules {
   public static final SortRemoveRule SORT_REMOVE =
   SortRemoveRule.Config.DEFAULT.toRule();
 
+  /** Rule that merge a {@link Sort} representing the Limit semantics and
+   * another {@link Sort} representing the Limit or TOPN semantics. */
+  public static final SortMergeRule LIMIT_MREGE =
+  SortMergeRule.Config.LIMIT_MERGE.toRule();
+
   /** Rule that removes keys from a {@link Sort}
* if those keys are known to be constant, or removes the entire Sort if all
* keys are constant. */
diff --git a/core/src/main/java/org/apache/calcite/rel/rules/SortMergeRule.java 
b/core/src/main/java/org/apache/calcite/rel/rules/SortMergeRule.java
new file mode 100644
index 00..b4a484e333
--- /dev/null
+++ b/core/src/main/java/org/apache/calcite/rel/rules/SortMergeRule.java
@@ -0,0 +1,141 @@
+/*
+ * 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.rel.rules;
+
+import org.apache.calcite.plan.RelOptRuleCall;
+import org.apache.calcite.plan.RelOptUtil;
+import org.apache.calcite.plan.RelRule;
+import org.apache.calcite.rel.core.Sort;
+import org.apache.calcite.rex.RexLiteral;
+import org.apache.calcite.rex.RexNode;
+import org.apache.calcite.tools.RelBuilder;
+
+import com.google.common.collect.ImmutableList;
+
+import org.immutables.value.Value;
+
+/**
+ * This rule try to merge the double {@link Sort},one is Limit semantics,
+ * another sort is Limit or TOPN semantics.
+ *
+ *  It generally used with the {@link SortProjectTransposeRule} rule.
+ *
+ *  For example:
+ * {@code
+ * select
+ *   concat('-', N_REGIONKEY) from
+ *   (
+ * select
+ *   *
+ * from nation limit 1) limit 10}
+ *  
+ *
+ *  will convert to
+ * {@code
+ * select
+ *   concat('-', N_REGIONKEY)
+ * from
+ *   nation limit 10
+ * }
+ *
+ *  The sql :
+ * {@code
+ * select concat('-',N_REGIONKEY) from
+ * (SELECT * FROM nation order BY N_REGIONKEY DESC LIMIT 1) limit 10
+ * }
+ *
+ *  will convert to
+ * {@code
+ * SELECT concat('-',N_REGIONKEY) FROM nation order BY N_REGIONKEY DESC LIMIT 
10
+ * }
+ *
+ *  In the future,we could also extend other sort merge logic in this rule.
+ *
+ * @see CoreRules#LIMIT_MREGE
+ */
+@Value.Enclosing
+public class SortMergeRule
+extends RelRule
+

[GitHub] [calcite] sonarcloud[bot] commented on pull request #3396: [CALCITE-5940] Add the Rule to merge Limit

2023-09-27 Thread via GitHub


sonarcloud[bot] commented on PR #3396:
URL: https://github.com/apache/calcite/pull/3396#issuecomment-1736956144

   Kudos, SonarCloud Quality Gate passed!  [![Quality Gate 
passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png
 'Quality Gate 
passed')](https://sonarcloud.io/dashboard?id=apache_calcite=3396)
   
   
[![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png
 
'Bug')](https://sonarcloud.io/project/issues?id=apache_calcite=3396=false=BUG)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_calcite=3396=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_calcite=3396=false=BUG)
  
   
[![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png
 
'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_calcite=3396=false=VULNERABILITY)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_calcite=3396=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_calcite=3396=false=VULNERABILITY)
  
   [![Security 
Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png
 'Security 
Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_calcite=3396=false=SECURITY_HOTSPOT)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/security_hotspots?id=apache_calcite=3396=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_calcite=3396=false=SECURITY_HOTSPOT)
  
   [![Code 
Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png
 'Code 
Smell')](https://sonarcloud.io/project/issues?id=apache_calcite=3396=false=CODE_SMELL)
 
[![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png
 
'A')](https://sonarcloud.io/project/issues?id=apache_calcite=3396=false=CODE_SMELL)
 [1 Code 
Smell](https://sonarcloud.io/project/issues?id=apache_calcite=3396=false=CODE_SMELL)
   
   
[![83.6%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60-16px.png
 
'83.6%')](https://sonarcloud.io/component_measures?id=apache_calcite=3396=new_coverage=list)
 [83.6% 
Coverage](https://sonarcloud.io/component_measures?id=apache_calcite=3396=new_coverage=list)
  
   
[![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png
 
'0.0%')](https://sonarcloud.io/component_measures?id=apache_calcite=3396=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_calcite=3396=new_duplicated_lines_density=list)
   
   


-- 
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 #3420: [CALCITE-5989] Type inference for RPAD and LPAD functions (BIGQUERY) is incorrect

2023-09-27 Thread via GitHub


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

   @mihaibudiu , sorry, there seems to be some conflicts now in the PR, could 
you please resolve it? I'll merge it right away.


-- 
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-site] branch main updated: Website deployed from calcite@56f7b8248352568539cbfe0222606903d69e521c

2023-09-27 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 9257dec0d Website deployed from 
calcite@56f7b8248352568539cbfe0222606903d69e521c
9257dec0d is described below

commit 9257dec0dcdfbe37ed2734f2cb440f9efb440d15
Author: rubenada 
AuthorDate: Wed Sep 27 07:20:29 2023 +

Website deployed from calcite@56f7b8248352568539cbfe0222606903d69e521c
---
 docs/history.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs/history.html b/docs/history.html
index dd426fc33..27d35e813 100644
--- a/docs/history.html
+++ b/docs/history.html
@@ -79,7 +79,7 @@
 -->
 
 For a full list of releases, see
-https://github.com/apache/calcite/releases;>github.
+https://github.com/apache/calcite/tags;>github.
 Downloads are available on the
 downloads page.
 



[calcite] branch site updated: [CALCITE-6017] Update the GitHub link of released versions

2023-09-27 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 d34d844eea [CALCITE-6017] Update the GitHub link of released versions
d34d844eea is described below

commit d34d844eea4ea5879331966ad38c7374ab62b3a5
Author: Ran Tao 
AuthorDate: Tue Sep 26 14:21:10 2023 +0800

[CALCITE-6017] Update the GitHub link of released versions
---
 site/_docs/history.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/site/_docs/history.md b/site/_docs/history.md
index 00cdd3a576..481bf5a512 100644
--- a/site/_docs/history.md
+++ b/site/_docs/history.md
@@ -24,7 +24,7 @@ limitations under the License.
 -->
 
 For a full list of releases, see
-https://github.com/apache/calcite/releases;>github.
+https://github.com/apache/calcite/tags;>github.
 Downloads are available on the
 [downloads page]({{ site.baseurl }}/downloads/).
 



[GitHub] [calcite] rubenada merged pull request #3441: [CALCITE-6017] Update the GitHub link of released versions

2023-09-27 Thread via GitHub


rubenada merged PR #3441:
URL: https://github.com/apache/calcite/pull/3441


-- 
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-6017] Update the GitHub link of released versions

2023-09-27 Thread rubenql
This is an automated email from the ASF dual-hosted git repository.

rubenql 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 56f7b82483 [CALCITE-6017] Update the GitHub link of released versions
56f7b82483 is described below

commit 56f7b8248352568539cbfe0222606903d69e521c
Author: Ran Tao 
AuthorDate: Tue Sep 26 14:21:10 2023 +0800

[CALCITE-6017] Update the GitHub link of released versions
---
 site/_docs/history.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/site/_docs/history.md b/site/_docs/history.md
index 00cdd3a576..481bf5a512 100644
--- a/site/_docs/history.md
+++ b/site/_docs/history.md
@@ -24,7 +24,7 @@ limitations under the License.
 -->
 
 For a full list of releases, see
-https://github.com/apache/calcite/releases;>github.
+https://github.com/apache/calcite/tags;>github.
 Downloads are available on the
 [downloads page]({{ site.baseurl }}/downloads/).