2016-12-16 20:15:59 -05:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!--
|
2018-07-11 12:55:18 -04:00
|
|
|
~ Licensed to the Apache Software Foundation (ASF) under one
|
|
|
|
~ or more contributor license agreements. See the NOTICE file
|
2016-12-16 20:15:59 -05:00
|
|
|
~ distributed with this work for additional information
|
2018-07-11 12:55:18 -04:00
|
|
|
~ regarding copyright ownership. The ASF licenses this file
|
2016-12-16 20:15:59 -05:00
|
|
|
~ to you under the Apache License, Version 2.0 (the
|
|
|
|
~ "License"); you may not use this file except in compliance
|
2018-07-11 12:55:18 -04:00
|
|
|
~ with the License. You may obtain a copy of the License at
|
2016-12-16 20:15:59 -05:00
|
|
|
~
|
2018-07-11 12:55:18 -04:00
|
|
|
~ http://www.apache.org/licenses/LICENSE-2.0
|
2016-12-16 20:15:59 -05:00
|
|
|
~
|
|
|
|
~ 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
|
2018-07-11 12:55:18 -04:00
|
|
|
~ KIND, either express or implied. See the License for the
|
2016-12-16 20:15:59 -05:00
|
|
|
~ specific language governing permissions and limitations
|
|
|
|
~ under the License.
|
|
|
|
-->
|
|
|
|
|
2022-12-06 18:54:05 -05:00
|
|
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
|
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
2016-12-16 20:15:59 -05:00
|
|
|
<modelVersion>4.0.0</modelVersion>
|
|
|
|
|
|
|
|
<artifactId>druid-sql</artifactId>
|
|
|
|
<name>druid-sql</name>
|
|
|
|
<description>Druid SQL</description>
|
|
|
|
|
|
|
|
<parent>
|
2018-08-30 12:56:26 -04:00
|
|
|
<groupId>org.apache.druid</groupId>
|
2016-12-16 20:15:59 -05:00
|
|
|
<artifactId>druid</artifactId>
|
2022-11-22 05:01:01 -05:00
|
|
|
<version>26.0.0-SNAPSHOT</version>
|
2016-12-16 20:15:59 -05:00
|
|
|
</parent>
|
|
|
|
|
|
|
|
<dependencies>
|
2019-09-09 17:37:21 -04:00
|
|
|
<dependency>
|
|
|
|
<groupId>org.apache.druid</groupId>
|
|
|
|
<artifactId>druid-processing</artifactId>
|
|
|
|
<version>${project.parent.version}</version>
|
|
|
|
</dependency>
|
2016-12-16 20:15:59 -05:00
|
|
|
<dependency>
|
2018-08-30 12:56:26 -04:00
|
|
|
<groupId>org.apache.druid</groupId>
|
2016-12-16 20:15:59 -05:00
|
|
|
<artifactId>druid-server</artifactId>
|
|
|
|
<version>${project.parent.version}</version>
|
|
|
|
</dependency>
|
|
|
|
<dependency>
|
|
|
|
<groupId>org.apache.calcite</groupId>
|
|
|
|
<artifactId>calcite-core</artifactId>
|
2018-01-05 18:12:20 -05:00
|
|
|
<exclusions>
|
|
|
|
<!--
|
|
|
|
~ Calcite 1.15.0 uses sketches-core 0.9.0 for a profiling feature:
|
|
|
|
~ (https://issues.apache.org/jira/browse/CALCITE-1616).
|
|
|
|
~ This conflicts with druid-datasketches which uses a newer version of sketches-core.
|
|
|
|
~ Druid does not use this Calcite profiling feature, so we exclude sketches-core here.
|
|
|
|
-->
|
|
|
|
<exclusion>
|
|
|
|
<groupId>com.yahoo.datasketches</groupId>
|
|
|
|
<artifactId>sketches-core</artifactId>
|
|
|
|
</exclusion>
|
2019-11-21 00:22:55 -05:00
|
|
|
<!--
|
|
|
|
~ We don't use Calcite's YAML features.
|
|
|
|
-->
|
|
|
|
<exclusion>
|
|
|
|
<groupId>com.fasterxml.jackson.dataformat</groupId>
|
|
|
|
<artifactId>jackson-dataformat-yaml</artifactId>
|
|
|
|
</exclusion>
|
|
|
|
<exclusion>
|
|
|
|
<groupId>org.yaml</groupId>
|
|
|
|
<artifactId>snakeyaml</artifactId>
|
|
|
|
</exclusion>
|
2018-01-05 18:12:20 -05:00
|
|
|
</exclusions>
|
2016-12-16 20:15:59 -05:00
|
|
|
</dependency>
|
|
|
|
<dependency>
|
|
|
|
<groupId>org.apache.calcite</groupId>
|
|
|
|
<artifactId>calcite-linq4j</artifactId>
|
|
|
|
</dependency>
|
2017-01-06 17:45:17 -05:00
|
|
|
<dependency>
|
|
|
|
<groupId>org.apache.calcite.avatica</groupId>
|
|
|
|
<artifactId>avatica-core</artifactId>
|
|
|
|
</dependency>
|
2016-12-16 20:15:59 -05:00
|
|
|
<dependency>
|
|
|
|
<groupId>org.apache.calcite.avatica</groupId>
|
|
|
|
<artifactId>avatica-server</artifactId>
|
2019-05-12 17:38:06 -04:00
|
|
|
<exclusions>
|
|
|
|
<exclusion>
|
|
|
|
<groupId>org.eclipse.jetty</groupId>
|
|
|
|
<artifactId>jetty-http</artifactId>
|
|
|
|
</exclusion>
|
|
|
|
</exclusions>
|
2016-12-16 20:15:59 -05:00
|
|
|
</dependency>
|
2019-09-09 17:37:21 -04:00
|
|
|
<dependency>
|
|
|
|
<groupId>com.google.code.findbugs</groupId>
|
|
|
|
<artifactId>jsr305</artifactId>
|
|
|
|
</dependency>
|
|
|
|
<dependency>
|
|
|
|
<groupId>org.eclipse.jetty</groupId>
|
|
|
|
<artifactId>jetty-server</artifactId>
|
|
|
|
</dependency>
|
|
|
|
<dependency>
|
|
|
|
<groupId>joda-time</groupId>
|
|
|
|
<artifactId>joda-time</artifactId>
|
|
|
|
</dependency>
|
|
|
|
<dependency>
|
|
|
|
<groupId>com.fasterxml.jackson.core</groupId>
|
|
|
|
<artifactId>jackson-annotations</artifactId>
|
|
|
|
</dependency>
|
2022-02-27 18:19:28 -05:00
|
|
|
<dependency>
|
|
|
|
<groupId>jakarta.inject</groupId>
|
|
|
|
<artifactId>jakarta.inject-api</artifactId>
|
|
|
|
</dependency>
|
2019-09-09 17:37:21 -04:00
|
|
|
<dependency>
|
|
|
|
<groupId>com.google.inject</groupId>
|
|
|
|
<artifactId>guice</artifactId>
|
|
|
|
</dependency>
|
2020-02-04 14:33:48 -05:00
|
|
|
<dependency>
|
|
|
|
<groupId>com.google.inject.extensions</groupId>
|
|
|
|
<artifactId>guice-assistedinject</artifactId>
|
|
|
|
</dependency>
|
2019-09-09 17:37:21 -04:00
|
|
|
<dependency>
|
|
|
|
<groupId>com.fasterxml.jackson.core</groupId>
|
|
|
|
<artifactId>jackson-databind</artifactId>
|
|
|
|
</dependency>
|
|
|
|
<dependency>
|
|
|
|
<groupId>com.opencsv</groupId>
|
|
|
|
<artifactId>opencsv</artifactId>
|
|
|
|
</dependency>
|
|
|
|
<dependency>
|
|
|
|
<groupId>com.google.inject.extensions</groupId>
|
|
|
|
<artifactId>guice-multibindings</artifactId>
|
|
|
|
</dependency>
|
|
|
|
<dependency>
|
|
|
|
<groupId>javax.ws.rs</groupId>
|
|
|
|
<artifactId>jsr311-api</artifactId>
|
|
|
|
</dependency>
|
2016-12-16 20:15:59 -05:00
|
|
|
<dependency>
|
|
|
|
<groupId>io.netty</groupId>
|
2019-09-09 17:37:21 -04:00
|
|
|
<artifactId>netty</artifactId>
|
|
|
|
</dependency>
|
|
|
|
<dependency>
|
|
|
|
<groupId>javax.servlet</groupId>
|
|
|
|
<artifactId>javax.servlet-api</artifactId>
|
|
|
|
</dependency>
|
|
|
|
<dependency>
|
|
|
|
<groupId>it.unimi.dsi</groupId>
|
2021-06-10 10:43:18 -04:00
|
|
|
<artifactId>fastutil-core</artifactId>
|
2019-09-09 17:37:21 -04:00
|
|
|
</dependency>
|
|
|
|
<dependency>
|
|
|
|
<groupId>com.fasterxml.jackson.core</groupId>
|
|
|
|
<artifactId>jackson-core</artifactId>
|
|
|
|
</dependency>
|
|
|
|
<dependency>
|
|
|
|
<groupId>com.google.guava</groupId>
|
|
|
|
<artifactId>guava</artifactId>
|
|
|
|
</dependency>
|
|
|
|
<dependency>
|
|
|
|
<groupId>com.google.errorprone</groupId>
|
|
|
|
<artifactId>error_prone_annotations</artifactId>
|
|
|
|
</dependency>
|
|
|
|
<dependency>
|
|
|
|
<groupId>org.apache.calcite.avatica</groupId>
|
|
|
|
<artifactId>avatica-metrics</artifactId>
|
2016-12-16 20:15:59 -05:00
|
|
|
</dependency>
|
2019-11-21 00:22:55 -05:00
|
|
|
<dependency>
|
|
|
|
<groupId>org.checkerframework</groupId>
|
|
|
|
<artifactId>checker-qual</artifactId>
|
|
|
|
<version>${checkerframework.version}</version>
|
|
|
|
<scope>provided</scope>
|
|
|
|
</dependency>
|
2020-02-04 14:33:48 -05:00
|
|
|
<dependency>
|
|
|
|
<groupId>javax.validation</groupId>
|
|
|
|
<artifactId>validation-api</artifactId>
|
|
|
|
<scope>provided</scope>
|
|
|
|
</dependency>
|
2022-02-08 05:53:15 -05:00
|
|
|
<dependency>
|
|
|
|
<groupId>org.slf4j</groupId>
|
|
|
|
<artifactId>slf4j-api</artifactId>
|
|
|
|
<scope>provided</scope>
|
|
|
|
</dependency>
|
2016-12-16 20:15:59 -05:00
|
|
|
|
2022-12-06 18:54:05 -05:00
|
|
|
|
2016-12-16 20:15:59 -05:00
|
|
|
<!-- Tests -->
|
|
|
|
<dependency>
|
|
|
|
<groupId>junit</groupId>
|
|
|
|
<artifactId>junit</artifactId>
|
|
|
|
<scope>test</scope>
|
|
|
|
</dependency>
|
2020-05-28 22:10:26 -04:00
|
|
|
<dependency>
|
|
|
|
<groupId>pl.pragmatists</groupId>
|
|
|
|
<artifactId>JUnitParams</artifactId>
|
|
|
|
<scope>test</scope>
|
|
|
|
</dependency>
|
2023-03-10 06:12:08 -05:00
|
|
|
<dependency>
|
|
|
|
<groupId>org.apache.commons</groupId>
|
|
|
|
<artifactId>commons-text</artifactId>
|
|
|
|
<scope>test</scope>
|
|
|
|
</dependency>
|
2016-12-16 20:15:59 -05:00
|
|
|
<dependency>
|
|
|
|
<groupId>org.apache.calcite</groupId>
|
|
|
|
<artifactId>calcite-core</artifactId>
|
|
|
|
<type>test-jar</type>
|
|
|
|
<scope>test</scope>
|
|
|
|
</dependency>
|
2017-03-14 00:56:16 -04:00
|
|
|
<dependency>
|
|
|
|
<groupId>org.easymock</groupId>
|
|
|
|
<artifactId>easymock</artifactId>
|
2022-09-12 04:40:06 -04:00
|
|
|
<scope>test</scope>
|
|
|
|
</dependency>
|
2022-12-06 18:54:05 -05:00
|
|
|
<dependency>
|
|
|
|
<groupId>com.fasterxml.jackson.dataformat</groupId>
|
|
|
|
<artifactId>jackson-dataformat-yaml</artifactId>
|
|
|
|
<scope>test</scope>
|
|
|
|
</dependency>
|
2022-09-12 04:40:06 -04:00
|
|
|
<dependency>
|
|
|
|
<groupId>commons-io</groupId>
|
|
|
|
<artifactId>commons-io</artifactId>
|
2017-03-14 00:56:16 -04:00
|
|
|
<scope>test</scope>
|
|
|
|
</dependency>
|
2016-12-16 20:15:59 -05:00
|
|
|
<dependency>
|
2018-08-30 12:56:26 -04:00
|
|
|
<groupId>org.apache.druid</groupId>
|
2016-12-16 20:15:59 -05:00
|
|
|
<artifactId>druid-processing</artifactId>
|
|
|
|
<version>${project.parent.version}</version>
|
|
|
|
<type>test-jar</type>
|
|
|
|
<scope>test</scope>
|
|
|
|
</dependency>
|
2017-10-12 22:22:24 -04:00
|
|
|
<dependency>
|
2018-08-30 12:56:26 -04:00
|
|
|
<groupId>org.apache.druid</groupId>
|
2017-10-12 22:22:24 -04:00
|
|
|
<artifactId>druid-server</artifactId>
|
|
|
|
<version>${project.parent.version}</version>
|
|
|
|
<type>test-jar</type>
|
|
|
|
<scope>test</scope>
|
|
|
|
</dependency>
|
2019-09-09 17:37:21 -04:00
|
|
|
<dependency>
|
|
|
|
<groupId>org.hamcrest</groupId>
|
|
|
|
<artifactId>hamcrest-core</artifactId>
|
|
|
|
<scope>test</scope>
|
|
|
|
</dependency>
|
2020-02-19 16:09:20 -05:00
|
|
|
<dependency>
|
|
|
|
<groupId>nl.jqno.equalsverifier</groupId>
|
|
|
|
<artifactId>equalsverifier</artifactId>
|
|
|
|
<scope>test</scope>
|
|
|
|
</dependency>
|
2021-04-07 13:04:47 -04:00
|
|
|
<dependency>
|
|
|
|
<groupId>org.mockito</groupId>
|
|
|
|
<artifactId>mockito-core</artifactId>
|
|
|
|
<scope>test</scope>
|
|
|
|
</dependency>
|
2022-12-06 18:54:05 -05:00
|
|
|
<dependency>
|
|
|
|
<groupId>org.jdbi</groupId>
|
|
|
|
<artifactId>jdbi</artifactId>
|
|
|
|
<scope>test</scope>
|
|
|
|
</dependency>
|
2016-12-16 20:15:59 -05:00
|
|
|
</dependencies>
|
|
|
|
|
|
|
|
<build>
|
|
|
|
<plugins>
|
|
|
|
<plugin>
|
|
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
|
|
<artifactId>maven-jar-plugin</artifactId>
|
|
|
|
<executions>
|
|
|
|
<execution>
|
|
|
|
<goals>
|
|
|
|
<goal>test-jar</goal>
|
|
|
|
</goals>
|
|
|
|
</execution>
|
|
|
|
</executions>
|
|
|
|
</plugin>
|
2022-02-08 05:53:15 -05:00
|
|
|
|
|
|
|
<!-- Following plugins and their configurations are used to generate the custom Calcite's SQL parser for Druid -->
|
|
|
|
<!-- Extracts the Parser.jj from Calcite to ${project.build.directory}, where all the Freemarker templates are -->
|
|
|
|
<plugin>
|
|
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
|
|
<artifactId>maven-dependency-plugin</artifactId>
|
|
|
|
<executions>
|
|
|
|
<execution>
|
|
|
|
<id>unpack-parser-template</id>
|
2022-12-08 16:56:02 -05:00
|
|
|
<phase>generate-sources</phase>
|
2022-02-08 05:53:15 -05:00
|
|
|
<goals>
|
|
|
|
<goal>unpack</goal>
|
|
|
|
</goals>
|
|
|
|
<configuration>
|
|
|
|
<artifactItems>
|
|
|
|
<artifactItem>
|
|
|
|
<groupId>org.apache.calcite</groupId>
|
|
|
|
<artifactId>calcite-core</artifactId>
|
|
|
|
<version>${calcite.version}</version>
|
|
|
|
<type>jar</type>
|
|
|
|
<overWrite>true</overWrite>
|
|
|
|
<outputDirectory>${project.build.directory}/</outputDirectory>
|
|
|
|
<includes>**/Parser.jj</includes>
|
|
|
|
</artifactItem>
|
|
|
|
</artifactItems>
|
|
|
|
</configuration>
|
|
|
|
</execution>
|
|
|
|
</executions>
|
|
|
|
</plugin>
|
|
|
|
|
|
|
|
<!-- Copy the templates present in the codegen directory of druid-sql containing custom SQL rules to
|
|
|
|
${project.build.directory}/codegen -->
|
|
|
|
<plugin>
|
|
|
|
<artifactId>maven-resources-plugin</artifactId>
|
|
|
|
<executions>
|
|
|
|
<execution>
|
|
|
|
<id>copy-fmpp-resources</id>
|
2022-12-08 16:56:02 -05:00
|
|
|
<phase>generate-sources</phase>
|
2022-02-08 05:53:15 -05:00
|
|
|
<goals>
|
|
|
|
<goal>copy-resources</goal>
|
|
|
|
</goals>
|
|
|
|
<configuration>
|
|
|
|
<outputDirectory>${project.build.directory}/codegen</outputDirectory>
|
|
|
|
<resources>
|
|
|
|
<resource>
|
|
|
|
<directory>src/main/codegen</directory>
|
|
|
|
<filtering>false</filtering>
|
|
|
|
</resource>
|
|
|
|
</resources>
|
|
|
|
</configuration>
|
|
|
|
</execution>
|
|
|
|
</executions>
|
|
|
|
</plugin>
|
|
|
|
|
|
|
|
<!-- "Plugs in" the Calcite's Parser.jj with the variables present in config.fmpp. These contain the custom rules
|
|
|
|
as well as the class to which the custom implementation will get generated -->
|
|
|
|
<plugin>
|
|
|
|
<groupId>com.googlecode.fmpp-maven-plugin</groupId>
|
|
|
|
<artifactId>fmpp-maven-plugin</artifactId>
|
|
|
|
<executions>
|
|
|
|
<execution>
|
|
|
|
<id>generate-fmpp-sources</id>
|
|
|
|
<phase>generate-sources</phase>
|
|
|
|
<goals>
|
|
|
|
<goal>generate</goal>
|
|
|
|
</goals>
|
|
|
|
<configuration>
|
|
|
|
<cfgFile>${project.build.directory}/codegen/config.fmpp</cfgFile>
|
2022-12-08 16:56:02 -05:00
|
|
|
<outputDirectory>${project.build.directory}/generated-sources</outputDirectory>
|
2022-02-08 05:53:15 -05:00
|
|
|
<templateDirectory>${project.build.directory}/codegen/templates</templateDirectory>
|
|
|
|
</configuration>
|
|
|
|
</execution>
|
|
|
|
</executions>
|
|
|
|
</plugin>
|
|
|
|
|
2022-12-08 16:56:02 -05:00
|
|
|
<!-- Creates a Java class for the custom parser from Parser.jj -->
|
2022-02-08 05:53:15 -05:00
|
|
|
<plugin>
|
|
|
|
<groupId>org.codehaus.mojo</groupId>
|
|
|
|
<artifactId>javacc-maven-plugin</artifactId>
|
|
|
|
<executions>
|
|
|
|
<execution>
|
|
|
|
<phase>generate-sources</phase>
|
|
|
|
<id>javacc</id>
|
|
|
|
<goals>
|
|
|
|
<goal>javacc</goal>
|
|
|
|
</goals>
|
|
|
|
<configuration>
|
2022-12-08 16:56:02 -05:00
|
|
|
<sourceDirectory>${project.build.directory}/generated-sources/javacc</sourceDirectory>
|
2022-02-08 05:53:15 -05:00
|
|
|
<includes>
|
2022-12-08 16:56:02 -05:00
|
|
|
<include>Parser.jj</include>
|
2022-02-08 05:53:15 -05:00
|
|
|
</includes>
|
|
|
|
<lookAhead>2</lookAhead>
|
|
|
|
<isStatic>false</isStatic>
|
2022-12-08 16:56:02 -05:00
|
|
|
<outputDirectory>${project.build.directory}/generated-sources</outputDirectory>
|
2022-02-08 05:53:15 -05:00
|
|
|
</configuration>
|
|
|
|
</execution>
|
|
|
|
</executions>
|
|
|
|
</plugin>
|
|
|
|
|
2022-12-14 11:22:09 -05:00
|
|
|
<!-- This plugin is used to replace the production rule for FROM clause in the calcite grammar.
|
|
|
|
It is done by a search and replace since calcite doesn't allow to override production rules generally
|
|
|
|
in its grammar (override is possible only if there's a hook for it in the grammar). And the FROM clause
|
|
|
|
doesn't contain any hook for extension. For the custom changes done in
|
|
|
|
extension, please check from.ftl file in sql module.
|
|
|
|
-->
|
|
|
|
<plugin>
|
|
|
|
<groupId>com.google.code.maven-replacer-plugin</groupId>
|
|
|
|
<artifactId>replacer</artifactId>
|
|
|
|
<version>1.5.3</version>
|
|
|
|
<executions>
|
|
|
|
<execution>
|
|
|
|
<phase>generate-sources</phase>
|
|
|
|
<goals>
|
|
|
|
<goal>replace</goal>
|
|
|
|
</goals>
|
|
|
|
</execution>
|
|
|
|
</executions>
|
|
|
|
<configuration>
|
|
|
|
<basedir>${project.build.directory}/generated-sources/org/apache/druid/sql/calcite/parser</basedir>
|
|
|
|
<includes>
|
|
|
|
<include>**/DruidSqlParserImpl.java</include>
|
|
|
|
</includes>
|
|
|
|
<replacements>
|
|
|
|
<replacement>
|
|
|
|
<token>fromClause = FromClause</token>
|
|
|
|
<value>fromClause = DruidFromClause</value>
|
|
|
|
</replacement>
|
|
|
|
</replacements>
|
|
|
|
</configuration>
|
|
|
|
</plugin>
|
|
|
|
|
2022-02-08 05:53:15 -05:00
|
|
|
<!-- Adds the path of the generated parser to the classpath -->
|
|
|
|
<plugin>
|
|
|
|
<groupId>org.codehaus.mojo</groupId>
|
|
|
|
<artifactId>build-helper-maven-plugin</artifactId>
|
|
|
|
<executions>
|
|
|
|
<execution>
|
|
|
|
<id>add-source</id>
|
|
|
|
<phase>generate-sources</phase>
|
|
|
|
<goals>
|
|
|
|
<goal>add-source</goal>
|
|
|
|
</goals>
|
|
|
|
<configuration>
|
|
|
|
<sources>
|
2022-12-08 16:56:02 -05:00
|
|
|
<source>src/generated-sources</source>
|
2022-02-08 05:53:15 -05:00
|
|
|
</sources>
|
|
|
|
</configuration>
|
|
|
|
</execution>
|
|
|
|
</executions>
|
|
|
|
</plugin>
|
2016-12-16 20:15:59 -05:00
|
|
|
</plugins>
|
|
|
|
</build>
|
2022-02-08 05:53:15 -05:00
|
|
|
<!-- Build for Druid's custom SQL parser complete -->
|
2016-12-16 20:15:59 -05:00
|
|
|
|
|
|
|
</project>
|