├── file └── src │ ├── test │ └── resources │ │ ├── sales-csv │ │ ├── EMPTY.csv │ │ ├── HEADER_ONLY.csv │ │ ├── DEPTS.csv │ │ ├── EMPS.csv.gz │ │ └── SDEPTS.csv │ │ ├── sales-json │ │ ├── DATE.csv │ │ ├── EMPTY.json │ │ └── DEPTS.json │ │ ├── tableNoTH.html │ │ ├── tableNoTheadTbody.html │ │ ├── sales-csv.json │ │ └── sales-json.json │ └── main │ └── java │ └── org │ └── apache │ └── calcite │ └── adapter │ └── file │ └── package-info.java ├── pig └── src │ ├── test │ └── resources │ │ ├── data.txt │ │ └── data2.txt │ └── main │ └── java │ └── org │ └── apache │ └── calcite │ └── adapter │ └── pig │ └── package-info.java ├── site ├── .gitignore ├── favicon.ico ├── img │ ├── cake.jpg │ ├── logo.png │ ├── feather.png │ ├── old-logo.png │ ├── pie-chart.png │ ├── powered-by.png │ ├── window-types.png │ ├── pb-calcite-140.png │ └── pb-calcite-240.png ├── fonts │ ├── fontawesome-webfont.eot │ ├── fontawesome-webfont.ttf │ └── fontawesome-webfont.woff ├── css │ └── screen.scss ├── _layouts │ ├── default.html │ ├── external.html │ ├── page.html │ ├── news.html │ └── docs.html ├── _includes │ ├── docs_contents.html │ ├── header.html │ ├── news_contents_mobile.html │ ├── docs_contents_mobile.html │ ├── docs_option.html │ ├── top.html │ ├── footer.html │ ├── primary-nav-items.html │ ├── anchor_links.html │ └── news_contents.html ├── _plugins │ └── bundler.rb ├── _sass │ ├── _font-awesome.scss │ └── _mixins.scss ├── Gemfile ├── news │ └── releases │ │ └── index.html ├── _docs │ ├── avatica_roadmap.md │ ├── avatica_overview.md │ ├── avatica_json_reference.md │ ├── api.md │ ├── avatica_protobuf_reference.md │ └── testapi.md └── _posts │ ├── 2014-10-02-release-0.9.1-incubating.md │ ├── 2014-08-19-release-0.9.0-incubating.md │ └── 2014-06-27-release-0.8.0-incubating.md ├── core └── src │ ├── main │ ├── resources │ │ ├── META-INF │ │ │ └── services │ │ │ │ └── java.sql.Driver │ │ ├── com.linkedin.relocated.org.codehaus.commons.compiler.properties │ │ └── version │ │ │ └── org-apache-calcite-jdbc.properties │ ├── java │ │ └── org │ │ │ └── apache │ │ │ └── calcite │ │ │ ├── sql │ │ │ ├── validate │ │ │ │ ├── SqlModality.java │ │ │ │ ├── package-info.java │ │ │ │ └── SqlMonikerType.java │ │ │ ├── type │ │ │ │ ├── package-info.java │ │ │ │ └── OperandsTypeChecking.java │ │ │ ├── parser │ │ │ │ ├── package-info.java │ │ │ │ └── impl │ │ │ │ │ └── package-info.java │ │ │ ├── SqlAccessEnum.java │ │ │ ├── dialect │ │ │ │ └── package-info.java │ │ │ ├── pretty │ │ │ │ └── package-info.java │ │ │ ├── util │ │ │ │ └── package-info.java │ │ │ ├── SqlJsonExistsErrorBehavior.java │ │ │ └── SqlJsonQueryWrapperBehavior.java │ │ │ ├── config │ │ │ └── package-info.java │ │ │ ├── jdbc │ │ │ └── package-info.java │ │ │ ├── tools │ │ │ ├── package-info.java │ │ │ └── RuleSet.java │ │ │ ├── util │ │ │ ├── package-info.java │ │ │ ├── trace │ │ │ │ └── package-info.java │ │ │ ├── javac │ │ │ │ └── package-info.java │ │ │ ├── mapping │ │ │ │ └── package-info.java │ │ │ ├── graph │ │ │ │ └── package-info.java │ │ │ ├── CalciteParserException.java │ │ │ └── CalciteValidatorException.java │ │ │ ├── profile │ │ │ └── package-info.java │ │ │ ├── runtime │ │ │ ├── package-info.java │ │ │ └── Typed.java │ │ │ ├── adapter │ │ │ ├── clone │ │ │ │ └── package-info.java │ │ │ ├── jdbc │ │ │ │ ├── package-info.java │ │ │ │ └── JdbcRel.java │ │ │ ├── enumerable │ │ │ │ ├── package-info.java │ │ │ │ ├── impl │ │ │ │ │ └── package-info.java │ │ │ │ └── WinAggContext.java │ │ │ ├── java │ │ │ │ └── package-info.java │ │ │ └── Java9Workaround.java │ │ │ ├── schema │ │ │ ├── SemiMutableSchema.java │ │ │ ├── impl │ │ │ │ └── package-info.java │ │ │ └── Wrapper.java │ │ │ ├── package-info.java │ │ │ ├── rel │ │ │ ├── type │ │ │ │ ├── package-info.java │ │ │ │ └── RelDataTypeFamily.java │ │ │ ├── rel2sql │ │ │ │ └── package-info.java │ │ │ ├── metadata │ │ │ │ ├── package-info.java │ │ │ │ └── MetadataHandler.java │ │ │ ├── convert │ │ │ │ └── package-info.java │ │ │ └── externalize │ │ │ │ └── package-info.java │ │ │ ├── server │ │ │ └── package-info.java │ │ │ ├── interpreter │ │ │ ├── Node.java │ │ │ ├── Scalar.java │ │ │ └── Source.java │ │ │ ├── sql2rel │ │ │ └── package-info.java │ │ │ ├── prepare │ │ │ └── package-info.java │ │ │ ├── plan │ │ │ ├── package-info.java │ │ │ └── hep │ │ │ │ └── package-info.java │ │ │ ├── rex │ │ │ └── RexDigestIncludeType.java │ │ │ └── statistic │ │ │ └── package-info.java │ └── codegen │ │ └── includes │ │ ├── parserImpls.ftl │ │ └── compoundIdentifier.ftl │ └── test │ ├── resources │ ├── empty-model.yaml │ ├── sql │ │ └── dummy.iq │ ├── mysql-foodmart-model.json │ └── hsqldb-foodmart-auto-lattice-model.json │ ├── java │ ├── org │ │ └── apache │ │ │ └── calcite │ │ │ ├── test │ │ │ ├── SlowTests.java │ │ │ ├── package-info.java │ │ │ └── enumerable │ │ │ │ └── package-info.java │ │ │ └── sql │ │ │ └── test │ │ │ └── package-info.java │ └── RootHr.java │ └── codegen │ └── includes │ └── compoundIdentifier.ftl ├── example ├── csv │ └── src │ │ └── test │ │ └── resources │ │ ├── sales │ │ ├── DEPTS.csv │ │ ├── EMPS.csv.gz │ │ └── SDEPTS.csv │ │ ├── bug │ │ ├── LONG_EMPS.csv │ │ ├── WACKY_COLUMN_NAMES.csv │ │ └── DATE.csv │ │ ├── bug.yaml │ │ ├── model.yaml │ │ ├── model-with-custom-table.yaml │ │ ├── bug.json │ │ ├── model-stream-table.yaml │ │ ├── model-with-view.yaml │ │ └── model.json └── function │ └── src │ └── main │ └── java │ └── org │ └── apache │ └── calcite │ └── example │ └── maze │ └── package-info.java ├── .reviewboardrc ├── li-update-version.sh ├── geode ├── src │ ├── test │ │ └── resources │ │ │ ├── book_master.json │ │ │ ├── book_customer.json │ │ │ └── log4j.properties │ └── main │ │ └── java │ │ └── org │ │ └── apache │ │ └── calcite │ │ └── adapter │ │ └── geode │ │ ├── rel │ │ └── package-info.java │ │ ├── util │ │ └── package-info.java │ │ └── simple │ │ └── package-info.java └── README.md ├── README ├── .gitattributes ├── src └── main │ └── config │ └── checkstyle │ ├── header.properties.txt │ ├── header.xml.txt │ └── header.java.txt ├── .mvn └── wrapper │ └── maven-wrapper.properties ├── linq4j └── src │ ├── main │ └── java │ │ └── org │ │ └── apache │ │ └── calcite │ │ └── linq4j │ │ ├── OpType.java │ │ ├── package-info.java │ │ ├── tree │ │ ├── SwitchCase.java │ │ ├── MemberAssignment.java │ │ ├── ElementInit.java │ │ ├── MemberMemberBinding.java │ │ ├── MemberListBinding.java │ │ ├── CallSiteBinder.java │ │ ├── MemberDeclaration.java │ │ ├── MemberBinding.java │ │ └── Node.java │ │ ├── function │ │ ├── Function.java │ │ ├── package-info.java │ │ ├── Function0.java │ │ ├── EqualityComparer.java │ │ ├── LongFunction1.java │ │ ├── FloatFunction1.java │ │ ├── IntegerFunction1.java │ │ ├── DoubleFunction1.java │ │ ├── NullableLongFunction1.java │ │ ├── Function2.java │ │ └── NullableFloatFunction1.java │ │ ├── OrderedQueryable.java │ │ └── Grouping.java │ └── test │ └── java │ ├── com │ └── example │ │ └── package-info.java │ └── org │ └── apache │ └── calcite │ └── linq4j │ ├── test │ └── package-info.java │ ├── tree │ └── package-info.java │ └── function │ └── package-info.java ├── babel └── src │ ├── test │ └── resources │ │ └── sql │ │ └── dummy.iq │ └── main │ └── java │ └── org │ └── apache │ └── calcite │ └── sql │ └── babel │ ├── package-info.java │ └── Babel.java ├── druid └── src │ └── main │ └── java │ └── org │ └── apache │ └── calcite │ └── adapter │ └── druid │ ├── DruidConnection.java │ ├── package-info.java │ └── ExtractionFunction.java ├── piglet └── src │ ├── main │ └── java │ │ └── org │ │ └── apache │ │ └── calcite │ │ └── piglet │ │ └── package-info.java │ └── test │ └── resources │ └── log4j.properties ├── plus └── src │ └── main │ └── java │ └── org │ └── apache │ └── calcite │ ├── chinook │ ├── package-info.java │ ├── ChosenCustomerEmail.java │ └── StringConcatFunction.java │ └── adapter │ ├── tpcds │ └── package-info.java │ ├── tpch │ └── package-info.java │ └── os │ └── package-info.java ├── ubenchmark └── src │ └── main │ └── java │ └── org │ └── apache │ └── calcite │ └── benchmarks │ └── package-info.java ├── splunk └── src │ ├── main │ └── java │ │ └── org │ │ └── apache │ │ └── calcite │ │ └── adapter │ │ └── splunk │ │ ├── util │ │ └── package-info.java │ │ └── search │ │ └── package-info.java │ └── test │ └── resources │ └── log4j.properties ├── mongodb └── src │ ├── main │ └── java │ │ └── org │ │ └── apache │ │ └── calcite │ │ └── adapter │ │ └── mongodb │ │ └── package-info.java │ └── test │ └── resources │ └── log4j.properties ├── spark └── src │ └── main │ └── java │ └── org │ └── apache │ └── calcite │ └── adapter │ └── spark │ └── package-info.java ├── .gitignore ├── elasticsearch └── src │ └── main │ └── java │ └── org │ └── apache │ └── calcite │ └── adapter │ └── elasticsearch │ └── package-info.java ├── kafka └── src │ └── main │ └── java │ └── org │ └── apache │ └── calcite │ └── adapter │ └── kafka │ └── package-info.java └── cassandra └── src └── main └── java └── org └── apache └── calcite └── adapter └── cassandra └── package-info.java /file/src/test/resources/sales-csv/EMPTY.csv: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pig/src/test/resources/data.txt: -------------------------------------------------------------------------------- 1 | a 1 2 | b 2 3 | c 3 4 | -------------------------------------------------------------------------------- /pig/src/test/resources/data2.txt: -------------------------------------------------------------------------------- 1 | 1 label1 2 | 2 label2 3 | -------------------------------------------------------------------------------- /site/.gitignore: -------------------------------------------------------------------------------- 1 | .sass-cache 2 | Gemfile.lock 3 | .jekyll-metadata 4 | -------------------------------------------------------------------------------- /file/src/test/resources/sales-csv/HEADER_ONLY.csv: -------------------------------------------------------------------------------- 1 | DEPTNO:int,NAME:string 2 | -------------------------------------------------------------------------------- /core/src/main/resources/META-INF/services/java.sql.Driver: -------------------------------------------------------------------------------- 1 | org.apache.calcite.jdbc.Driver 2 | -------------------------------------------------------------------------------- /site/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/linkedin-calcite/HEAD/site/favicon.ico -------------------------------------------------------------------------------- /site/img/cake.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/linkedin-calcite/HEAD/site/img/cake.jpg -------------------------------------------------------------------------------- /site/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/linkedin-calcite/HEAD/site/img/logo.png -------------------------------------------------------------------------------- /site/img/feather.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/linkedin-calcite/HEAD/site/img/feather.png -------------------------------------------------------------------------------- /site/img/old-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/linkedin-calcite/HEAD/site/img/old-logo.png -------------------------------------------------------------------------------- /site/img/pie-chart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/linkedin-calcite/HEAD/site/img/pie-chart.png -------------------------------------------------------------------------------- /site/img/powered-by.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/linkedin-calcite/HEAD/site/img/powered-by.png -------------------------------------------------------------------------------- /site/img/window-types.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/linkedin-calcite/HEAD/site/img/window-types.png -------------------------------------------------------------------------------- /site/img/pb-calcite-140.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/linkedin-calcite/HEAD/site/img/pb-calcite-140.png -------------------------------------------------------------------------------- /site/img/pb-calcite-240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/linkedin-calcite/HEAD/site/img/pb-calcite-240.png -------------------------------------------------------------------------------- /file/src/test/resources/sales-csv/DEPTS.csv: -------------------------------------------------------------------------------- 1 | DEPTNO:int,NAME:string 2 | 10,"Sales" 3 | 20,"Marketing" 4 | 30,"Accounts" 5 | -------------------------------------------------------------------------------- /example/csv/src/test/resources/sales/DEPTS.csv: -------------------------------------------------------------------------------- 1 | DEPTNO:int,NAME:string 2 | 10,"Sales" 3 | 20,"Marketing" 4 | 30,"Accounts" 5 | -------------------------------------------------------------------------------- /site/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/linkedin-calcite/HEAD/site/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /site/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/linkedin-calcite/HEAD/site/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /site/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/linkedin-calcite/HEAD/site/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /file/src/test/resources/sales-csv/EMPS.csv.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/linkedin-calcite/HEAD/file/src/test/resources/sales-csv/EMPS.csv.gz -------------------------------------------------------------------------------- /example/csv/src/test/resources/sales/EMPS.csv.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linkedin/linkedin-calcite/HEAD/example/csv/src/test/resources/sales/EMPS.csv.gz -------------------------------------------------------------------------------- /example/csv/src/test/resources/sales/SDEPTS.csv: -------------------------------------------------------------------------------- 1 | DEPTNO:int,NAME:string 2 | 10,"Sales" 3 | 20,"Marketing" 4 | 30,"Accounts" 5 | 40,"40" 6 | 50,"50" 7 | 60,"60" 8 | -------------------------------------------------------------------------------- /file/src/test/resources/sales-csv/SDEPTS.csv: -------------------------------------------------------------------------------- 1 | DEPTNO:int,NAME:string 2 | 10,"Sales" 3 | 20,"Marketing" 4 | 30,"Accounts" 5 | 40,"40" 6 | 50,"50" 7 | 60,"60" 8 | -------------------------------------------------------------------------------- /site/css/screen.scss: -------------------------------------------------------------------------------- 1 | --- 2 | --- 3 | 4 | @import "mixins"; 5 | @import "normalize"; 6 | @import "gridism"; 7 | @import "pygments"; 8 | @import "font-awesome"; 9 | @import "style"; 10 | -------------------------------------------------------------------------------- /.reviewboardrc: -------------------------------------------------------------------------------- 1 | REPOSITORY = "apache calcite" 2 | REVIEWBOARD_URL='https://rb.corp.linkedin.com' 3 | GUESS_FIELDS='yes' 4 | OPEN_BROWSER='true' 5 | BRANCH='li-1.21.0' 6 | TRACKING_BRANCH='origin/li-1.21.0' 7 | -------------------------------------------------------------------------------- /site/_layouts/default.html: -------------------------------------------------------------------------------- 1 | {% include top.html %} 2 | 3 | 4 | {% include header.html %} 5 | 6 | {{ content }} 7 | 8 | {% include footer.html %} 9 | {% include anchor_links.html %} 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /site/_includes/docs_contents.html: -------------------------------------------------------------------------------- 1 |
2 | 8 |
9 | -------------------------------------------------------------------------------- /site/_layouts/external.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{ page.title }} 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /site/_layouts/page.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 | 5 |
6 |
7 | 8 |
9 |
10 |

{{ page.title }}

11 | {{ content }} 12 |
13 |
14 | 15 |
16 | 17 |
18 |
19 | -------------------------------------------------------------------------------- /site/_layouts/news.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 | 5 |
6 |
7 | 8 | {% include news_contents_mobile.html %} 9 | 10 |
11 | {{ content }} 12 |
13 | 14 | {% include news_contents.html %} 15 | 16 |
17 | 18 |
19 |
20 | -------------------------------------------------------------------------------- /example/csv/src/test/resources/bug/LONG_EMPS.csv: -------------------------------------------------------------------------------- 1 | EMPNO:long,NAME:string,DEPTNO:int,GENDER:string,CITY:string,EMPID:int,AGE:int,SLACKER:boolean,MANAGER:boolean,JOINEDAT:date 2 | 100,"Fred",10,,,30,25,true,false,"1996-08-03" 3 | 110,"Eric",20,"M","San Francisco",3,80,,false,"2001-01-01" 4 | 110,"John",40,"M","Vancouver",2,,false,true,"2002-05-03" 5 | 120,"Wilma",20,"F",,1,5,,true,"2005-09-07" 6 | 130,"Alice",40,"F","Vancouver",2,,false,true,"2007-01-01" 7 | -------------------------------------------------------------------------------- /example/csv/src/test/resources/bug/WACKY_COLUMN_NAMES.csv: -------------------------------------------------------------------------------- 1 | EMPNO:int,naME:string,DEPTNO:Integer,2gender:string,CITY:string,EMPID:int,AGE:int,SLACKER:boolean,MANAGER:boolean,joined at:date 2 | 100,"Fred",10,,,30,25,true,false,"1996-08-03" 3 | 110,"Eric",20,"M","San Francisco",3,80,,false,"2001-01-01" 4 | 110,"John",40,"M","Vancouver",2,,false,true,"2002-05-03" 5 | 120,"Wilma",20,"F",,1,5,,true,"2005-09-07" 6 | 130,"Alice",40,"F","Vancouver",2,,false,true,"2007-01-01" 7 | -------------------------------------------------------------------------------- /site/_includes/header.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 11 | 14 |
15 |
16 | -------------------------------------------------------------------------------- /example/csv/src/test/resources/bug/DATE.csv: -------------------------------------------------------------------------------- 1 | EMPNO:int,JOINEDAT:date,JOINTIME:time,JOINTIMES:timestamp 2 | 100,"1996-08-03","00:01:02","1996-08-03 00:01:02" 3 | 110,"2001-01-01","00:00:00","2001-01-01 00:00:00" 4 | 110,"2002-05-03","00:00:00","2002-05-03 00:00:00" 5 | 120,"2005-09-07","00:00:00","2005-09-07 00:00:00" 6 | 130,"2007-01-01","00:00:00","2007-01-01 00:00:00" 7 | 140,"2015-12-31","07:15:56","2015-12-31 07:15:56" 8 | 150,"2015-12-31","13:31:21","2015-12-31 13:31:21" 9 | 200,,, 10 | -------------------------------------------------------------------------------- /file/src/test/resources/sales-json/DATE.csv: -------------------------------------------------------------------------------- 1 | EMPNO:int,JOINEDAT:date,JOINTIME:time,JOINTIMES:timestamp 2 | 100,"1996-08-03","00:01:02","1996-08-03 00:01:02" 3 | 110,"2001-01-01","00:00:00","2001-01-01 00:00:00" 4 | 110,"2002-05-03","00:00:00","2002-05-03 00:00:00" 5 | 120,"2005-09-07","00:00:00","2005-09-07 00:00:00" 6 | 130,"2007-01-01","00:00:00","2007-01-01 00:00:00" 7 | 140,"2015-12-31","07:15:56","2015-12-31 07:15:56" 8 | 150,"2015-12-31","13:31:21","2015-12-31 13:31:21" 9 | 200,,, 10 | -------------------------------------------------------------------------------- /li-update-version.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | li_version=$1 4 | 5 | echo "Updating version info..." 6 | 7 | # The following command does it as per how maven wants us to do a version change 8 | mvn versions:set -DnewVersion=${li_version} -DgenerateBackupPoms=false 9 | 10 | # Note: this is for building the artifact-spec in the calcite multiproduct 11 | echo "Creating build.properties file with new version info..." 12 | cat > build.properties < 2 | 11 | 12 | -------------------------------------------------------------------------------- /site/_layouts/docs.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 | 5 |
6 |
7 | 8 | {% include docs_contents_mobile.html %} 9 | 10 |
11 |
12 |

{{ page.title }}

13 | {{ content }} 14 | {% include section_nav.html %} 15 |
16 |
17 | 18 | {% include docs_contents.html %} 19 | 20 |
21 | 22 |
23 |
24 | -------------------------------------------------------------------------------- /site/_includes/docs_contents_mobile.html: -------------------------------------------------------------------------------- 1 |
2 | 11 |
12 | -------------------------------------------------------------------------------- /geode/src/test/resources/book_master.json: -------------------------------------------------------------------------------- 1 | {"itemNumber":123,"description":"Run on sentences and drivel on all things mundane","retailCost":34.99,"yearPublished":2011,"author":"Daisy Mae West","title":"A Treatise of Treatises"} 2 | {"itemNumber":456,"description":"A book about a dog","retailCost":11.99,"yearPublished":1971,"author":"Clarence Meeks","title":"Clifford the Big Red Dog"} 3 | {"itemNumber":789,"description":"Theoretical information about the structure of Operating Systems","retailCost":59.99,"yearPublished":2011,"author":"Jim Heavisides","title":"Operating Systems: An Introduction"} 4 | -------------------------------------------------------------------------------- /site/_includes/docs_option.html: -------------------------------------------------------------------------------- 1 | {% assign items = include.items %}{% comment %} 2 | {% endcomment %}{% for item in items %}{% comment %} 3 | {% endcomment %}{% assign item_url = item | prepend:"{{ site.baseurl }}/docs/" | append:".html" %}{% comment %} 4 | {% endcomment %}{% for p in site.docs %}{% comment %} 5 | {% endcomment %}{% if p.url == item_url %}{% comment %} 6 | {% endcomment %}{% comment %} 7 | {% endcomment %}{% endif %}{% comment %} 8 | {% endcomment %}{% endfor %}{% comment %} 9 | {% endcomment %}{% endfor %} 10 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | Apache Calcite release 1.21.0 2 | 3 | This is a source or binary distribution of Apache Calcite. 4 | 5 | Changes since the previous release are described in the 6 | site/_docs/history.md file. 7 | 8 | The LICENSE and NOTICE files contain license information. 9 | 10 | If this is a source distribution, you can find instructions how to 11 | build the release in the "Building from a source distribution" section 12 | in site/_docs/howto.md. 13 | 14 | README.md contains examples of running Calcite. 15 | 16 | Further information about Apache Calcite is available at its web site, 17 | http://calcite.apache.org. 18 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | *.cs text diff=csharp 5 | *.java text diff=java 6 | *.html text diff=html 7 | *.py text diff=python 8 | *.pl text diff=perl 9 | *.pm text diff=perl 10 | *.css text 11 | *.js text 12 | *.sql text 13 | *.q text 14 | 15 | *.sh text eol=lf 16 | 17 | #test files, use lf so that size is same on windows as well 18 | data/files/*.dat text eol=lf 19 | 20 | *.bat text eol=crlf 21 | *.cmd text eol=crlf 22 | *.csproj text merge=union eol=crlf 23 | *.sln text merge=union eol=crlf 24 | -------------------------------------------------------------------------------- /site/_includes/top.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{ page.title }} 6 | 7 | 8 | 9 | 10 | 11 | 15 | 16 | -------------------------------------------------------------------------------- /site/_includes/footer.html: -------------------------------------------------------------------------------- 1 | 16 | -------------------------------------------------------------------------------- /src/main/config/checkstyle/header.properties.txt: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to you under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | -------------------------------------------------------------------------------- /src/main/config/checkstyle/header.xml.txt: -------------------------------------------------------------------------------- 1 | 2 | 18 | -------------------------------------------------------------------------------- /site/_includes/primary-nav-items.html: -------------------------------------------------------------------------------- 1 | 21 | -------------------------------------------------------------------------------- /src/main/config/checkstyle/header.java.txt: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | -------------------------------------------------------------------------------- /file/src/test/resources/sales-json/EMPTY.json: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | -------------------------------------------------------------------------------- /geode/src/test/resources/book_customer.json: -------------------------------------------------------------------------------- 1 | {"customerNumber":5598,"firstName":"Kari","lastName":"Powell","primaryAddress":{"addressLine1":"123 Main St.","addressLine2":null,"addressLine3":null,"city":"Topeka","state":"KS","postalCode":"50505","country":"US","phoneNumber":"423-555-3322","addressTag":"HOME"},"myBookOrders":[17699,18009,18049]} 2 | {"customerNumber":5543,"firstName":"Lula","lastName":"Wax","primaryAddress":{"addressLine1":"123 Main St.","addressLine2":null,"addressLine3":null,"city":"Topeka","state":"KS","postalCode":"50505","country":"US","phoneNumber":"423-555-3322","addressTag":"HOME"},"myBookOrders":[17700]} 3 | {"customerNumber":6024,"firstName":"Trenton","lastName":"Garcia","primaryAddress":{"addressLine1":"123 Main St.","addressLine2":null,"addressLine3":null,"city":"San Francisco","state":"CA","postalCode":"50505","country":"US","phoneNumber":"423-555-3322","addressTag":"HOME"},"myBookOrders":[]} 4 | -------------------------------------------------------------------------------- /geode/README.md: -------------------------------------------------------------------------------- 1 | 19 | 20 | ##Apache Geode SQL/JBC Adapter 21 | 22 | -------------------------------------------------------------------------------- /site/_plugins/bundler.rb: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to you under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | require "rubygems" 17 | require "bundler/setup" 18 | Bundler.require(:default) 19 | 20 | # End bundler.rb 21 | -------------------------------------------------------------------------------- /core/src/test/resources/empty-model.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to you under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | # 17 | # A JSON model of a simple Calcite schema. 18 | # 19 | version: 1.0 20 | defaultSchema: EMPTY_SCHEMA 21 | -------------------------------------------------------------------------------- /core/src/test/resources/sql/dummy.iq: -------------------------------------------------------------------------------- 1 | # dummy.iq - Scratch space 2 | # 3 | # Licensed to the Apache Software Foundation (ASF) under one or more 4 | # contributor license agreements. See the NOTICE file distributed with 5 | # this work for additional information regarding copyright ownership. 6 | # The ASF licenses this file to you under the Apache License, Version 2.0 7 | # (the "License"); you may not use this file except in compliance with 8 | # the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | !use post 19 | values 1; 20 | EXPR$0 21 | 1 22 | !ok 23 | # End dummy.iq 24 | -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to you under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip 17 | -------------------------------------------------------------------------------- /core/src/main/resources/com.linkedin.relocated.org.codehaus.commons.compiler.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to you under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | compilerFactory=com.linkedin.relocated.org.codehaus.janino.CompilerFactory 16 | -------------------------------------------------------------------------------- /site/_sass/_font-awesome.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.2.0 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */ 5 | @font-face { 6 | font-family: 'FontAwesome'; 7 | src: url('../fonts/fontawesome-webfont.eot?v=4.2.0'); 8 | src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.2.0') format('embedded-opentype'), url('../fonts/fontawesome-webfont.woff?v=4.2.0') format('woff'), url('../fonts/fontawesome-webfont.ttf?v=4.2.0') format('truetype'), url('../fonts/fontawesome-webfont.svg?v=4.2.0#fontawesomeregular') format('svg'); 9 | font-weight: normal; 10 | font-style: normal; 11 | } 12 | .fa { 13 | display: inline-block; 14 | font: normal normal normal 14px/1 FontAwesome; 15 | font-size: inherit; 16 | text-rendering: auto; 17 | -webkit-font-smoothing: antialiased; 18 | -moz-osx-font-smoothing: grayscale; 19 | } 20 | .fa-link:before { 21 | content: "\f0c1"; 22 | } 23 | .fa-pencil:before { 24 | content: "\f040"; 25 | } 26 | -------------------------------------------------------------------------------- /site/Gemfile: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to you under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | source 'https://rubygems.org' 17 | gem 'github-pages', '182' 18 | gem 'rouge' 19 | gem 'jekyll-redirect-from' 20 | 21 | group :jekyll_plugins do 22 | gem 'jekyll_oembed' 23 | end 24 | 25 | # End Gemfile 26 | -------------------------------------------------------------------------------- /example/csv/src/test/resources/bug.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to you under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | # 17 | version: 1.0 18 | defaultSchema: BUG 19 | schemas: 20 | - name: BUG 21 | type: custom 22 | factory: org.apache.calcite.adapter.csv.CsvSchemaFactory 23 | operand: 24 | directory: bug 25 | -------------------------------------------------------------------------------- /linq4j/src/main/java/org/apache/calcite/linq4j/OpType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.calcite.linq4j; 18 | 19 | /** 20 | * Operator type. 21 | */ 22 | public enum OpType { 23 | WHERE, 24 | } 25 | 26 | // End OpType.java 27 | -------------------------------------------------------------------------------- /site/news/releases/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: news 3 | title: Releases 4 | permalink: /news/releases/ 5 | author: all 6 | --- 7 | {% comment %} 8 | Licensed to the Apache Software Foundation (ASF) under one or more 9 | contributor license agreements. See the NOTICE file distributed with 10 | this work for additional information regarding copyright ownership. 11 | The ASF licenses this file to you under the Apache License, Version 2.0 12 | (the "License"); you may not use this file except in compliance with 13 | the License. You may obtain a copy of the License at 14 | 15 | http://www.apache.org/licenses/LICENSE-2.0 16 | 17 | Unless required by applicable law or agreed to in writing, software 18 | distributed under the License is distributed on an "AS IS" BASIS, 19 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | See the License for the specific language governing permissions and 21 | limitations under the License. 22 | {% endcomment %} 23 | 24 | {% for post in site.categories.release %} 25 | {% include news_item.html %} 26 | {% endfor %} 27 | -------------------------------------------------------------------------------- /site/_docs/avatica_roadmap.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: docs 3 | title: Avatica Roadmap 4 | sidebar_title: Roadmap 5 | permalink: /docs/avatica_roadmap.html 6 | redirect_to: https://calcite.apache.org/avatica/docs/roadmap.html 7 | --- 8 | 9 | 27 | -------------------------------------------------------------------------------- /babel/src/test/resources/sql/dummy.iq: -------------------------------------------------------------------------------- 1 | # dummy.iq 2 | # 3 | # Licensed to the Apache Software Foundation (ASF) under one or more 4 | # contributor license agreements. See the NOTICE file distributed with 5 | # this work for additional information regarding copyright ownership. 6 | # The ASF licenses this file to you under the Apache License, Version 2.0 7 | # (the "License"); you may not use this file except in compliance with 8 | # the License. You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | !use scott 19 | !set outputformat mysql 20 | 21 | # VALUES as top-level (not Oracle) 22 | VALUES 1 + 2; 23 | 24 | VALUES ROW(1 + 2) 25 | !explain-validated-on calcite postgres 26 | 27 | # End dummy.iq 28 | -------------------------------------------------------------------------------- /linq4j/src/test/java/com/example/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Examples of using linq4j. 20 | */ 21 | @PackageMarker 22 | package com.example; 23 | 24 | import org.apache.calcite.linq4j.PackageMarker; 25 | 26 | // End package-info.java 27 | -------------------------------------------------------------------------------- /site/_docs/avatica_overview.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: docs 3 | title: Avatica Overview 4 | sidebar_title: Overview 5 | permalink: /docs/avatica_overview.html 6 | redirect_to: https://calcite.apache.org/avatica/docs/index.html 7 | --- 8 | 9 | 27 | -------------------------------------------------------------------------------- /linq4j/src/main/java/org/apache/calcite/linq4j/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Language-integrated query for Java (linq4j) main package. 20 | */ 21 | @PackageMarker 22 | package org.apache.calcite.linq4j; 23 | 24 | // End package-info.java 25 | -------------------------------------------------------------------------------- /core/src/test/java/org/apache/calcite/test/SlowTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.calcite.test; 18 | 19 | /** 20 | * Declares a JUnit category for slow tests to speedup CI. 21 | */ 22 | public interface SlowTests { 23 | } 24 | 25 | // End SlowTests.java 26 | -------------------------------------------------------------------------------- /druid/src/main/java/org/apache/calcite/adapter/druid/DruidConnection.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.calcite.adapter.druid; 18 | 19 | /** 20 | * Connection to Druid. 21 | */ 22 | public interface DruidConnection { 23 | } 24 | 25 | // End DruidConnection.java 26 | -------------------------------------------------------------------------------- /core/src/main/java/org/apache/calcite/sql/validate/SqlModality.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.calcite.sql.validate; 18 | 19 | /** Relational or streaming. */ 20 | public enum SqlModality { 21 | RELATION, 22 | STREAM 23 | } 24 | 25 | // End SqlModality.java 26 | -------------------------------------------------------------------------------- /file/src/test/resources/sales-json/DEPTS.json: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | [ 18 | { 19 | "DEPTNO": 10, 20 | "NAME": "Sales" 21 | }, 22 | { 23 | "DEPTNO": 20, 24 | "NAME": "Marketing" 25 | }, 26 | { 27 | "DEPTNO": 30, 28 | "NAME": "Accounts" 29 | } 30 | ] 31 | -------------------------------------------------------------------------------- /linq4j/src/main/java/org/apache/calcite/linq4j/tree/SwitchCase.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.calcite.linq4j.tree; 18 | 19 | /** 20 | * Represents one case of a {@link SwitchStatement}. 21 | */ 22 | public class SwitchCase { 23 | } 24 | 25 | // End SwitchCase.java 26 | -------------------------------------------------------------------------------- /core/src/main/java/org/apache/calcite/config/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Configuration. 20 | */ 21 | @PackageMarker 22 | package org.apache.calcite.config; 23 | 24 | import org.apache.calcite.avatica.util.PackageMarker; 25 | 26 | // End package-info.java 27 | -------------------------------------------------------------------------------- /core/src/test/java/org/apache/calcite/test/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Tests for Calcite. 20 | */ 21 | @PackageMarker 22 | package org.apache.calcite.test; 23 | 24 | import org.apache.calcite.avatica.util.PackageMarker; 25 | 26 | // End package-info.java 27 | -------------------------------------------------------------------------------- /piglet/src/main/java/org/apache/calcite/piglet/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** Piglet, a Pig-like language. */ 19 | @PackageMarker 20 | package org.apache.calcite.piglet; 21 | 22 | import org.apache.calcite.avatica.util.PackageMarker; 23 | 24 | // End package-info.java 25 | -------------------------------------------------------------------------------- /core/src/main/java/org/apache/calcite/jdbc/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * JDBC driver for Calcite. 20 | */ 21 | @PackageMarker 22 | package org.apache.calcite.jdbc; 23 | 24 | import org.apache.calcite.avatica.util.PackageMarker; 25 | 26 | // End package-info.java 27 | -------------------------------------------------------------------------------- /core/src/main/java/org/apache/calcite/sql/type/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * SQL type system. 20 | */ 21 | @PackageMarker 22 | package org.apache.calcite.sql.type; 23 | 24 | import org.apache.calcite.avatica.util.PackageMarker; 25 | 26 | // End package-info.java 27 | -------------------------------------------------------------------------------- /core/src/main/java/org/apache/calcite/tools/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Provides utility classes. 20 | */ 21 | @PackageMarker 22 | package org.apache.calcite.tools; 23 | 24 | import org.apache.calcite.avatica.util.PackageMarker; 25 | 26 | // End package-info.java 27 | -------------------------------------------------------------------------------- /core/src/main/java/org/apache/calcite/util/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Provides utility classes. 20 | */ 21 | @PackageMarker 22 | package org.apache.calcite.util; 23 | 24 | import org.apache.calcite.avatica.util.PackageMarker; 25 | 26 | // End package-info.java 27 | -------------------------------------------------------------------------------- /plus/src/main/java/org/apache/calcite/chinook/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * End to end tests. 20 | */ 21 | @PackageMarker 22 | package org.apache.calcite.chinook; 23 | 24 | import org.apache.calcite.avatica.util.PackageMarker; 25 | 26 | // End package-info.java 27 | -------------------------------------------------------------------------------- /site/_docs/avatica_json_reference.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: docs 3 | title: Avatica JSON Reference 4 | sidebar_title: JSON Reference 5 | permalink: /docs/avatica_json_reference.html 6 | redirect_to: https://calcite.apache.org/avatica/docs/json_reference.html 7 | --- 8 | 9 | 27 | -------------------------------------------------------------------------------- /core/src/main/java/org/apache/calcite/sql/validate/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * SQL validation. 20 | */ 21 | @PackageMarker 22 | package org.apache.calcite.sql.validate; 23 | 24 | import org.apache.calcite.avatica.util.PackageMarker; 25 | 26 | // End package-info.java 27 | -------------------------------------------------------------------------------- /core/src/main/java/org/apache/calcite/util/trace/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Tracing services. 20 | */ 21 | @PackageMarker 22 | package org.apache.calcite.util.trace; 23 | 24 | import org.apache.calcite.avatica.util.PackageMarker; 25 | 26 | // End package-info.java 27 | -------------------------------------------------------------------------------- /example/csv/src/test/resources/model.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to you under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | # 17 | # A JSON model of a simple Calcite schema. 18 | # 19 | version: 1.0 20 | defaultSchema: SALES 21 | schemas: 22 | - name: SALES 23 | type: custom 24 | factory: org.apache.calcite.adapter.csv.CsvSchemaFactory 25 | operand: 26 | directory: sales 27 | -------------------------------------------------------------------------------- /linq4j/src/test/java/org/apache/calcite/linq4j/test/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Core linq4j tests. 20 | */ 21 | @PackageMarker 22 | package org.apache.calcite.linq4j.test; 23 | 24 | import org.apache.calcite.linq4j.PackageMarker; 25 | 26 | // End package-info.java 27 | -------------------------------------------------------------------------------- /linq4j/src/test/java/org/apache/calcite/linq4j/tree/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Tests for expressions. 20 | */ 21 | @PackageMarker 22 | package org.apache.calcite.linq4j.tree; 23 | 24 | import org.apache.calcite.linq4j.PackageMarker; 25 | 26 | // End package-info.java 27 | -------------------------------------------------------------------------------- /plus/src/main/java/org/apache/calcite/adapter/tpcds/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * TPC-DS schema. 20 | */ 21 | @PackageMarker 22 | package org.apache.calcite.adapter.tpcds; 23 | 24 | import org.apache.calcite.avatica.util.PackageMarker; 25 | 26 | // End package-info.java 27 | -------------------------------------------------------------------------------- /plus/src/main/java/org/apache/calcite/adapter/tpch/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * TPC-H schema. 20 | */ 21 | @PackageMarker 22 | package org.apache.calcite.adapter.tpch; 23 | 24 | import org.apache.calcite.avatica.util.PackageMarker; 25 | 26 | // End package-info.java 27 | -------------------------------------------------------------------------------- /core/src/main/java/org/apache/calcite/profile/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Utilities to analyze data sets. 20 | */ 21 | @PackageMarker 22 | package org.apache.calcite.profile; 23 | 24 | import org.apache.calcite.avatica.util.PackageMarker; 25 | 26 | // End package-info.java 27 | -------------------------------------------------------------------------------- /core/src/main/java/org/apache/calcite/runtime/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Utilities required at runtime. 20 | */ 21 | @PackageMarker 22 | package org.apache.calcite.runtime; 23 | 24 | import org.apache.calcite.avatica.util.PackageMarker; 25 | 26 | // End package-info.java 27 | -------------------------------------------------------------------------------- /core/src/main/java/org/apache/calcite/sql/parser/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Provides a SQL parser. 20 | */ 21 | @PackageMarker 22 | package org.apache.calcite.sql.parser; 23 | 24 | import org.apache.calcite.avatica.util.PackageMarker; 25 | 26 | // End package-info.java 27 | -------------------------------------------------------------------------------- /core/src/main/java/org/apache/calcite/sql/SqlAccessEnum.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.calcite.sql; 18 | 19 | /** 20 | * Enumeration representing different access types 21 | */ 22 | public enum SqlAccessEnum { 23 | SELECT, UPDATE, INSERT, DELETE; 24 | } 25 | 26 | // End SqlAccessEnum.java 27 | -------------------------------------------------------------------------------- /linq4j/src/test/java/org/apache/calcite/linq4j/function/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Tests for functions. 20 | */ 21 | @PackageMarker 22 | package org.apache.calcite.linq4j.function; 23 | 24 | import org.apache.calcite.linq4j.PackageMarker; 25 | 26 | // End package-info.java 27 | -------------------------------------------------------------------------------- /pig/src/main/java/org/apache/calcite/adapter/pig/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Pig query provider. 20 | * 21 | */ 22 | @PackageMarker 23 | package org.apache.calcite.adapter.pig; 24 | 25 | import org.apache.calcite.avatica.util.PackageMarker; 26 | 27 | // End package-info.java 28 | -------------------------------------------------------------------------------- /core/src/main/java/org/apache/calcite/adapter/clone/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Provides utility classes. 20 | */ 21 | @PackageMarker 22 | package org.apache.calcite.adapter.clone; 23 | 24 | import org.apache.calcite.avatica.util.PackageMarker; 25 | 26 | // End package-info.java 27 | -------------------------------------------------------------------------------- /core/src/main/java/org/apache/calcite/schema/SemiMutableSchema.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.calcite.schema; 18 | 19 | 20 | /** 21 | * Schema to which materializations can be added. 22 | */ 23 | public interface SemiMutableSchema extends Schema { 24 | } 25 | 26 | // End SemiMutableSchema.java 27 | -------------------------------------------------------------------------------- /core/src/main/java/org/apache/calcite/sql/dialect/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * SQL unparsers for JDBC dialects. 20 | */ 21 | @PackageMarker 22 | package org.apache.calcite.sql.dialect; 23 | 24 | import org.apache.calcite.avatica.util.PackageMarker; 25 | 26 | // End package-info.java 27 | -------------------------------------------------------------------------------- /core/src/main/java/org/apache/calcite/util/javac/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Provides compilers for Java code. 20 | */ 21 | @PackageMarker 22 | package org.apache.calcite.util.javac; 23 | 24 | import org.apache.calcite.avatica.util.PackageMarker; 25 | 26 | // End package-info.java 27 | -------------------------------------------------------------------------------- /core/src/main/java/org/apache/calcite/util/mapping/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Support for algebraic maps. 20 | */ 21 | @PackageMarker 22 | package org.apache.calcite.util.mapping; 23 | 24 | import org.apache.calcite.avatica.util.PackageMarker; 25 | 26 | // End package-info.java 27 | -------------------------------------------------------------------------------- /core/src/test/java/org/apache/calcite/sql/test/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Regression tests for the SQL model. 20 | */ 21 | @PackageMarker 22 | package org.apache.calcite.sql.test; 23 | 24 | import org.apache.calcite.avatica.util.PackageMarker; 25 | 26 | // End package-info.java 27 | -------------------------------------------------------------------------------- /linq4j/src/main/java/org/apache/calcite/linq4j/function/Function.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.calcite.linq4j.function; 18 | 19 | /** 20 | * Base interface for all functions. 21 | * 22 | * @param Result type 23 | */ 24 | public interface Function { 25 | } 26 | 27 | // End Function.java 28 | -------------------------------------------------------------------------------- /ubenchmark/src/main/java/org/apache/calcite/benchmarks/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * JMH benchmarks for Calcite 20 | */ 21 | @PackageMarker 22 | package org.apache.calcite.benchmarks; 23 | 24 | import org.apache.calcite.avatica.util.PackageMarker; 25 | 26 | // End package-info.java 27 | -------------------------------------------------------------------------------- /site/_docs/api.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: API 3 | layout: external 4 | external_url: /apidocs 5 | --- 6 | {% comment %} 7 | Ideally, we want to use {{ site.apiRoot }} instead of hardcoding 8 | the above external_url value, but I don't believe there's a way to do that 9 | {% endcomment %} 10 | 11 | 29 | -------------------------------------------------------------------------------- /core/src/main/java/org/apache/calcite/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Main package for Calcite, the dynamic data management platform. 20 | */ 21 | @PackageMarker 22 | package org.apache.calcite; 23 | 24 | import org.apache.calcite.avatica.util.PackageMarker; 25 | 26 | // End package-info.java 27 | -------------------------------------------------------------------------------- /core/src/main/java/org/apache/calcite/rel/type/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Defines a type system for relational expressions. 20 | */ 21 | @PackageMarker 22 | package org.apache.calcite.rel.type; 23 | 24 | import org.apache.calcite.avatica.util.PackageMarker; 25 | 26 | // End package-info.java 27 | -------------------------------------------------------------------------------- /core/src/main/java/org/apache/calcite/schema/impl/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Utilities to help implement Calcite's SPIs. 20 | */ 21 | @PackageMarker 22 | package org.apache.calcite.schema.impl; 23 | 24 | import org.apache.calcite.avatica.util.PackageMarker; 25 | 26 | // End package-info.java 27 | -------------------------------------------------------------------------------- /core/src/main/java/org/apache/calcite/server/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Provides a server for hosting Calcite connections. 20 | */ 21 | @PackageMarker 22 | package org.apache.calcite.server; 23 | 24 | import org.apache.calcite.avatica.util.PackageMarker; 25 | 26 | // End package-info.java 27 | -------------------------------------------------------------------------------- /core/src/main/java/org/apache/calcite/sql/pretty/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Provides a pretty-printer for SQL statements. 20 | */ 21 | @PackageMarker 22 | package org.apache.calcite.sql.pretty; 23 | 24 | import org.apache.calcite.avatica.util.PackageMarker; 25 | 26 | // End package-info.java 27 | -------------------------------------------------------------------------------- /site/_docs/avatica_protobuf_reference.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: docs 3 | title: Avatica Protocol Buffers Reference 4 | sidebar_title: Protobuf Reference 5 | permalink: /docs/avatica_protobuf_reference.html 6 | redirect_to: https://calcite.apache.org/avatica/docs/protobuf_reference.html 7 | --- 8 | 9 | 27 | -------------------------------------------------------------------------------- /core/src/main/java/org/apache/calcite/adapter/jdbc/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Query provider based on a JDBC data source. 20 | */ 21 | @PackageMarker 22 | package org.apache.calcite.adapter.jdbc; 23 | 24 | import org.apache.calcite.avatica.util.PackageMarker; 25 | 26 | // End package-info.java 27 | -------------------------------------------------------------------------------- /core/src/main/java/org/apache/calcite/interpreter/Node.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.calcite.interpreter; 18 | 19 | /** 20 | * Relational expression that can be executed using an interpreter. 21 | */ 22 | public interface Node { 23 | void run() throws InterruptedException; 24 | } 25 | 26 | // End Node.java 27 | -------------------------------------------------------------------------------- /core/src/main/java/org/apache/calcite/sql/type/OperandsTypeChecking.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.calcite.sql.type; 18 | 19 | /** 20 | * Strategies to check for allowed operand types of an operator call. 21 | */ 22 | public abstract class OperandsTypeChecking { 23 | } 24 | 25 | // End OperandsTypeChecking.java 26 | -------------------------------------------------------------------------------- /core/src/main/java/org/apache/calcite/sql2rel/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Translates a SQL parse tree to relational expression. 20 | */ 21 | @PackageMarker 22 | package org.apache.calcite.sql2rel; 23 | 24 | import org.apache.calcite.avatica.util.PackageMarker; 25 | 26 | // End package-info.java 27 | -------------------------------------------------------------------------------- /core/src/main/java/org/apache/calcite/util/graph/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Graph-theoretic algorithms and data structures. 20 | */ 21 | @PackageMarker 22 | package org.apache.calcite.util.graph; 23 | 24 | import org.apache.calcite.avatica.util.PackageMarker; 25 | 26 | // End package-info.java 27 | -------------------------------------------------------------------------------- /core/src/test/java/org/apache/calcite/test/enumerable/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Tests for Enumerable convention runtime. 20 | */ 21 | @PackageMarker 22 | package org.apache.calcite.test.enumerable; 23 | 24 | import org.apache.calcite.avatica.util.PackageMarker; 25 | 26 | // End package-info.java 27 | -------------------------------------------------------------------------------- /druid/src/main/java/org/apache/calcite/adapter/druid/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Query provider based on a Druid database. 20 | */ 21 | @PackageMarker 22 | package org.apache.calcite.adapter.druid; 23 | 24 | import org.apache.calcite.avatica.util.PackageMarker; 25 | 26 | // End package-info.java 27 | -------------------------------------------------------------------------------- /site/_docs/testapi.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Test API 3 | layout: external 4 | external_url: /testapidocs 5 | --- 6 | {% comment %} 7 | Ideally, we want to use {{ site.apiRoot }} instead of hardcoding 8 | the above external_url value, but I don't believe there's a way to do that 9 | {% endcomment %} 10 | 11 | 29 | -------------------------------------------------------------------------------- /splunk/src/main/java/org/apache/calcite/adapter/splunk/util/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Utilities for RPC to Splunk. 20 | */ 21 | @PackageMarker 22 | package org.apache.calcite.adapter.splunk.util; 23 | 24 | import org.apache.calcite.avatica.util.PackageMarker; 25 | 26 | // End package-info.java 27 | -------------------------------------------------------------------------------- /babel/src/main/java/org/apache/calcite/sql/babel/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Parse tree for SQL extensions used by the Babel parser. 20 | */ 21 | @PackageMarker 22 | package org.apache.calcite.sql.babel; 23 | 24 | import org.apache.calcite.avatica.util.PackageMarker; 25 | 26 | // End package-info.java 27 | -------------------------------------------------------------------------------- /core/src/main/java/org/apache/calcite/rel/rel2sql/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Translates a relational expression to SQL parse tree. 20 | */ 21 | @PackageMarker 22 | package org.apache.calcite.rel.rel2sql; 23 | 24 | import org.apache.calcite.avatica.util.PackageMarker; 25 | 26 | // End package-info.java 27 | -------------------------------------------------------------------------------- /linq4j/src/main/java/org/apache/calcite/linq4j/function/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Contains definitions of functions and predicates. 20 | */ 21 | @PackageMarker 22 | package org.apache.calcite.linq4j.function; 23 | 24 | import org.apache.calcite.linq4j.PackageMarker; 25 | 26 | // End package-info.java 27 | -------------------------------------------------------------------------------- /core/src/main/java/org/apache/calcite/prepare/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Preparation of queries (parsing, planning and implementation). 20 | */ 21 | @PackageMarker 22 | package org.apache.calcite.prepare; 23 | 24 | import org.apache.calcite.avatica.util.PackageMarker; 25 | 26 | // End package-info.java 27 | -------------------------------------------------------------------------------- /mongodb/src/main/java/org/apache/calcite/adapter/mongodb/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Query provider based on a MongoDB database. 20 | */ 21 | @PackageMarker 22 | package org.apache.calcite.adapter.mongodb; 23 | 24 | import org.apache.calcite.avatica.util.PackageMarker; 25 | 26 | // End package-info.java 27 | -------------------------------------------------------------------------------- /core/src/main/java/org/apache/calcite/sql/util/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Utility classes for the SQL object model, parsing, and validation. 20 | */ 21 | @PackageMarker 22 | package org.apache.calcite.sql.util; 23 | 24 | import org.apache.calcite.avatica.util.PackageMarker; 25 | 26 | // End package-info.java 27 | -------------------------------------------------------------------------------- /linq4j/src/main/java/org/apache/calcite/linq4j/tree/MemberAssignment.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.calcite.linq4j.tree; 18 | 19 | /** 20 | * Represents assignment operation for a field or property of an object. 21 | */ 22 | public class MemberAssignment extends MemberBinding { 23 | } 24 | 25 | // End MemberAssignment.java 26 | -------------------------------------------------------------------------------- /spark/src/main/java/org/apache/calcite/adapter/spark/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Adapter based on the Apache Spark data management system. 20 | */ 21 | @PackageMarker 22 | package org.apache.calcite.adapter.spark; 23 | 24 | import org.apache.calcite.avatica.util.PackageMarker; 25 | 26 | // End package-info.java 27 | -------------------------------------------------------------------------------- /splunk/src/main/java/org/apache/calcite/adapter/splunk/search/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Executes queries via Splunk's REST API. 20 | */ 21 | @PackageMarker 22 | package org.apache.calcite.adapter.splunk.search; 23 | 24 | import org.apache.calcite.avatica.util.PackageMarker; 25 | 26 | // End package-info.java 27 | -------------------------------------------------------------------------------- /core/src/main/java/org/apache/calcite/adapter/enumerable/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Query optimizer rules for Java calling convention. 20 | */ 21 | @PackageMarker 22 | package org.apache.calcite.adapter.enumerable; 23 | 24 | import org.apache.calcite.avatica.util.PackageMarker; 25 | 26 | // End package-info.java 27 | -------------------------------------------------------------------------------- /core/src/main/java/org/apache/calcite/adapter/java/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Query provider based on Java in-memory data 20 | * structures. 21 | */ 22 | @PackageMarker 23 | package org.apache.calcite.adapter.java; 24 | 25 | import org.apache.calcite.avatica.util.PackageMarker; 26 | 27 | // End package-info.java 28 | -------------------------------------------------------------------------------- /core/src/main/java/org/apache/calcite/interpreter/Scalar.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.calcite.interpreter; 18 | 19 | /** 20 | * Compiled scalar expression. 21 | */ 22 | public interface Scalar { 23 | Object execute(Context context); 24 | void execute(Context context, Object[] results); 25 | } 26 | 27 | // End Scalar.java 28 | -------------------------------------------------------------------------------- /example/function/src/main/java/org/apache/calcite/example/maze/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * User-defined table function that generates a maze. 20 | */ 21 | @PackageMarker 22 | package org.apache.calcite.example.maze; 23 | 24 | import org.apache.calcite.avatica.util.PackageMarker; 25 | 26 | // End package-info.java 27 | -------------------------------------------------------------------------------- /linq4j/src/main/java/org/apache/calcite/linq4j/function/Function0.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.calcite.linq4j.function; 18 | 19 | /** 20 | * Function with no parameters. 21 | * 22 | * @param Result type 23 | */ 24 | public interface Function0 extends Function { 25 | R apply(); 26 | } 27 | 28 | // End Function0.java 29 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to you under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | *~ 17 | target 18 | .idea 19 | *.iml 20 | settings.xml 21 | .classpath.txt 22 | .fullclasspath.txt 23 | 24 | # eclipse 25 | .project 26 | .buildpath 27 | .classpath 28 | .settings 29 | .checkstyle 30 | 31 | # netbeans 32 | nb-configuration.xml 33 | */nb-configuration.xml 34 | 35 | .mvn/wrapper/maven-wrapper.jar 36 | 37 | # End .gitignore 38 | -------------------------------------------------------------------------------- /example/csv/src/test/resources/model-with-custom-table.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to you under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | # 17 | version: 1.0 18 | defaultSchema: CUSTOM_TABLE 19 | schemas: 20 | - name: CUSTOM_TABLE 21 | tables: 22 | - name: EMPS 23 | type: custom 24 | factory: org.apache.calcite.adapter.csv.CsvTableFactory 25 | operand: 26 | file: sales/EMPS.csv.gz 27 | flavor: scannable 28 | -------------------------------------------------------------------------------- /linq4j/src/main/java/org/apache/calcite/linq4j/tree/ElementInit.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.calcite.linq4j.tree; 18 | 19 | /** 20 | * Represents an initializer for a single element of an 21 | * {@link org.apache.calcite.linq4j.Enumerable} collection. 22 | */ 23 | public class ElementInit { 24 | } 25 | 26 | // End ElementInit.java 27 | -------------------------------------------------------------------------------- /linq4j/src/main/java/org/apache/calcite/linq4j/tree/MemberMemberBinding.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.calcite.linq4j.tree; 18 | 19 | /** 20 | * Represents initializing members of a member of a newly created object. 21 | */ 22 | public class MemberMemberBinding extends MemberBinding { 23 | } 24 | 25 | // End MemberMemberBinding.java 26 | -------------------------------------------------------------------------------- /site/_posts/2014-10-02-release-0.9.1-incubating.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: news_item 3 | date: "2014-10-02 00:00:00 -0800" 4 | author: jhyde 5 | version: 0.9.1-incubating 6 | tag: v0-9-1 7 | sha: 68012573 8 | categories: [release] 9 | --- 10 | 28 | 29 | This is the first release as Calcite. (The project was previously called Optiq.) 30 | -------------------------------------------------------------------------------- /core/src/main/java/org/apache/calcite/plan/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Defines interfaces for constructing rule-based optimizers of 20 | * relational expressions. 21 | */ 22 | @PackageMarker 23 | package org.apache.calcite.plan; 24 | 25 | import org.apache.calcite.avatica.util.PackageMarker; 26 | 27 | // End package-info.java 28 | -------------------------------------------------------------------------------- /core/src/main/java/org/apache/calcite/sql/SqlJsonExistsErrorBehavior.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.calcite.sql; 18 | 19 | /** 20 | * Categorizing Json exists error behaviors. 21 | */ 22 | public enum SqlJsonExistsErrorBehavior { 23 | TRUE, 24 | FALSE, 25 | UNKNOWN, 26 | ERROR 27 | } 28 | 29 | // End SqlJsonExistsErrorBehavior.java 30 | -------------------------------------------------------------------------------- /elasticsearch/src/main/java/org/apache/calcite/adapter/elasticsearch/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Query provider based on an Elasticsearch2 DB. 20 | */ 21 | @PackageMarker 22 | package org.apache.calcite.adapter.elasticsearch; 23 | 24 | import org.apache.calcite.avatica.util.PackageMarker; 25 | 26 | // End package-info.java 27 | -------------------------------------------------------------------------------- /core/src/main/java/org/apache/calcite/adapter/Java9Workaround.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.calcite.adapter; 18 | 19 | /** 20 | * JavaDoc from Java 9 seems to fail when package contents is empty. 21 | * The sole purpose of this class it to make package non empty. 22 | */ 23 | class Java9Workaround { 24 | } 25 | 26 | // End Java9Workaround.java 27 | -------------------------------------------------------------------------------- /core/src/main/java/org/apache/calcite/rel/metadata/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Defines metadata interfaces and utilities for relational 20 | * expressions. 21 | */ 22 | @PackageMarker 23 | package org.apache.calcite.rel.metadata; 24 | 25 | import org.apache.calcite.avatica.util.PackageMarker; 26 | 27 | // End package-info.java 28 | -------------------------------------------------------------------------------- /core/src/main/java/org/apache/calcite/rex/RexDigestIncludeType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.calcite.rex; 18 | 19 | /** 20 | * Defines if type information should be printed for {@link RexLiteral}. 21 | */ 22 | public enum RexDigestIncludeType { 23 | ALWAYS, 24 | OPTIONAL, 25 | NO_TYPE; 26 | } 27 | 28 | // End RexDigestIncludeType.java 29 | -------------------------------------------------------------------------------- /geode/src/main/java/org/apache/calcite/adapter/geode/rel/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Query provider based on Apache Geode (Gemfire) In Memory Data Grid 20 | */ 21 | @PackageMarker 22 | package org.apache.calcite.adapter.geode.rel; 23 | 24 | import org.apache.calcite.avatica.util.PackageMarker; 25 | 26 | // End package-info.java 27 | -------------------------------------------------------------------------------- /geode/src/main/java/org/apache/calcite/adapter/geode/util/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Query provider based on Apache Geode (Gemfire) In Memory Data Grid 20 | */ 21 | @PackageMarker 22 | package org.apache.calcite.adapter.geode.util; 23 | 24 | import org.apache.calcite.avatica.util.PackageMarker; 25 | 26 | // End package-info.java 27 | -------------------------------------------------------------------------------- /file/src/test/resources/tableNoTH.html: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 |
R0C0R0C1R0C2
R1C0R1C1R1C2
R2C0R2C1R2C2
38 | 39 | 40 | -------------------------------------------------------------------------------- /geode/src/main/java/org/apache/calcite/adapter/geode/simple/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Query provider based on Apache Geode (Gemfire) In Memory Data Grid 20 | */ 21 | @PackageMarker 22 | package org.apache.calcite.adapter.geode.simple; 23 | 24 | import org.apache.calcite.avatica.util.PackageMarker; 25 | 26 | // End package-info.java 27 | -------------------------------------------------------------------------------- /linq4j/src/main/java/org/apache/calcite/linq4j/tree/MemberListBinding.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.calcite.linq4j.tree; 18 | 19 | /** 20 | * Represents initializing the elements of a collection member of a newly 21 | * created object. 22 | */ 23 | public class MemberListBinding extends MemberBinding { 24 | } 25 | 26 | // End MemberListBinding.java 27 | -------------------------------------------------------------------------------- /core/src/main/java/org/apache/calcite/rel/convert/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Defines relational expressions and rules for converting between calling 20 | * conventions. 21 | */ 22 | @PackageMarker 23 | package org.apache.calcite.rel.convert; 24 | 25 | import org.apache.calcite.avatica.util.PackageMarker; 26 | 27 | // End package-info.java 28 | -------------------------------------------------------------------------------- /example/csv/src/test/resources/bug.json: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | { 18 | "version": "1.0", 19 | "defaultSchema": "BUG", 20 | "schemas": [ 21 | { 22 | "name": "BUG", 23 | "type": "custom", 24 | "factory": "org.apache.calcite.adapter.csv.CsvSchemaFactory", 25 | "operand": { 26 | "directory": "bug" 27 | } 28 | } 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /linq4j/src/main/java/org/apache/calcite/linq4j/tree/CallSiteBinder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.calcite.linq4j.tree; 18 | 19 | /** 20 | * Creates a {@link DynamicExpression} that represents a dynamic operation bound 21 | * by the provided {@code CallSiteBinder}. 22 | */ 23 | public interface CallSiteBinder { 24 | } 25 | 26 | // End CallSiteBinder.java 27 | -------------------------------------------------------------------------------- /site/_includes/anchor_links.html: -------------------------------------------------------------------------------- 1 | 34 | -------------------------------------------------------------------------------- /example/csv/src/test/resources/model-stream-table.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to you under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | # 17 | version: 1.0 18 | defaultSchema: STREAM 19 | schemas: 20 | - name: SS 21 | tables: 22 | - name: DEPTS 23 | type: custom 24 | factory: org.apache.calcite.adapter.csv.CsvStreamTableFactory 25 | stream: 26 | stream: true 27 | operand: 28 | file: sales/SDEPTS.csv 29 | flavor: scannable 30 | -------------------------------------------------------------------------------- /kafka/src/main/java/org/apache/calcite/adapter/kafka/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Kafka query provider. 20 | * 21 | *

One Kafka topic is mapping to one STREAM table.

22 | */ 23 | @PackageMarker 24 | package org.apache.calcite.adapter.kafka; 25 | 26 | import org.apache.calcite.avatica.util.PackageMarker; 27 | 28 | // End package-info.java 29 | -------------------------------------------------------------------------------- /linq4j/src/main/java/org/apache/calcite/linq4j/tree/MemberDeclaration.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.calcite.linq4j.tree; 18 | 19 | /** 20 | * Declaration of a member of a class. 21 | */ 22 | public abstract class MemberDeclaration implements Node { 23 | public abstract MemberDeclaration accept(Shuttle shuttle); 24 | } 25 | 26 | // End MemberDeclaration.java 27 | -------------------------------------------------------------------------------- /core/src/main/java/org/apache/calcite/adapter/enumerable/impl/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Calcite-specific classes for implementation of regular and window aggregates. 20 | */ 21 | @PackageMarker 22 | package org.apache.calcite.adapter.enumerable.impl; 23 | 24 | import org.apache.calcite.avatica.util.PackageMarker; 25 | 26 | // End package-info.java 27 | -------------------------------------------------------------------------------- /core/src/main/java/org/apache/calcite/plan/hep/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Provides a heuristic planner implementation for the interfaces in 20 | * {@link org.apache.calcite.plan}. 21 | */ 22 | @PackageMarker 23 | package org.apache.calcite.plan.hep; 24 | 25 | import org.apache.calcite.avatica.util.PackageMarker; 26 | 27 | // End package-info.java 28 | -------------------------------------------------------------------------------- /site/_posts/2014-08-19-release-0.9.0-incubating.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: news_item 3 | date: "2014-08-19 00:00:00 -0800" 4 | author: jhyde 5 | version: 0.9.0-incubating 6 | fullVersion: apache-optiq-0.9.0-incubating 7 | tag: v0-9-0 8 | sha: 45e5269b 9 | categories: [release] 10 | --- 11 | 29 | 30 | This is the first release under the Apache incubator process. 31 | -------------------------------------------------------------------------------- /core/src/main/java/org/apache/calcite/sql/parser/impl/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Contains generated code for the 20 | * {@link org.apache.calcite.sql.parser Calcite SQL parser}. 21 | */ 22 | @PackageMarker 23 | package org.apache.calcite.sql.parser.impl; 24 | 25 | import org.apache.calcite.avatica.util.PackageMarker; 26 | 27 | // End package-info.java 28 | -------------------------------------------------------------------------------- /core/src/main/java/org/apache/calcite/tools/RuleSet.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.calcite.tools; 18 | 19 | import org.apache.calcite.plan.RelOptRule; 20 | 21 | /** 22 | * A set rules associated with a particular 23 | * type of invocation of the {@link Planner}. 24 | */ 25 | public interface RuleSet extends Iterable { 26 | } 27 | 28 | // End RuleSet.java 29 | -------------------------------------------------------------------------------- /linq4j/src/main/java/org/apache/calcite/linq4j/tree/MemberBinding.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.calcite.linq4j.tree; 18 | 19 | /** 20 | * Provides the base class from which the classes that represent bindings that 21 | * are used to initialize members of a newly created object derive. 22 | */ 23 | public class MemberBinding { 24 | } 25 | 26 | // End MemberBinding.java 27 | -------------------------------------------------------------------------------- /linq4j/src/main/java/org/apache/calcite/linq4j/tree/Node.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.calcite.linq4j.tree; 18 | 19 | /** 20 | *

Parse tree node.

21 | */ 22 | public interface Node { 23 | R accept(Visitor visitor); 24 | 25 | Node accept(Shuttle shuttle); 26 | 27 | void accept(ExpressionWriter expressionWriter); 28 | } 29 | 30 | // End Node.java 31 | -------------------------------------------------------------------------------- /site/_includes/news_contents.html: -------------------------------------------------------------------------------- 1 |
2 | 30 |
31 | -------------------------------------------------------------------------------- /core/src/main/java/org/apache/calcite/rel/metadata/MetadataHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.calcite.rel.metadata; 18 | 19 | /** 20 | * Marker interface for a handler of metadata. 21 | * 22 | * @param Kind of metadata 23 | */ 24 | public interface MetadataHandler { 25 | MetadataDef getDef(); 26 | } 27 | 28 | // End MetadataHandler.java 29 | -------------------------------------------------------------------------------- /core/src/main/java/org/apache/calcite/rel/type/RelDataTypeFamily.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.calcite.rel.type; 18 | 19 | /** 20 | * RelDataTypeFamily represents a family of related types. The specific criteria 21 | * for membership in a type family are type-system dependent. 22 | */ 23 | public interface RelDataTypeFamily { 24 | } 25 | 26 | // End RelDataTypeFamily.java 27 | -------------------------------------------------------------------------------- /core/src/main/java/org/apache/calcite/sql/SqlJsonQueryWrapperBehavior.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.calcite.sql; 18 | 19 | /** 20 | * How json query function handle array result. 21 | */ 22 | public enum SqlJsonQueryWrapperBehavior { 23 | WITHOUT_ARRAY, 24 | WITH_CONDITIONAL_ARRAY, 25 | WITH_UNCONDITIONAL_ARRAY 26 | } 27 | 28 | // End SqlJsonQueryWrapperBehavior.java 29 | -------------------------------------------------------------------------------- /core/src/main/java/org/apache/calcite/statistic/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Implementations of statistics providers. 20 | * 21 | * @see org.apache.calcite.materialize.SqlStatisticProvider 22 | */ 23 | @PackageMarker 24 | package org.apache.calcite.statistic; 25 | 26 | import org.apache.calcite.avatica.util.PackageMarker; 27 | 28 | // End package-info.java 29 | -------------------------------------------------------------------------------- /mongodb/src/test/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to you under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # Root logger is configured at INFO and is sent to A1 17 | log4j.rootLogger=INFO, A1 18 | 19 | # A1 goes to the console 20 | log4j.appender.A1=org.apache.log4j.ConsoleAppender 21 | 22 | # Set the pattern for each log message 23 | log4j.appender.A1.layout=org.apache.log4j.PatternLayout 24 | log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p - %m%n 25 | -------------------------------------------------------------------------------- /plus/src/main/java/org/apache/calcite/chinook/ChosenCustomerEmail.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.calcite.chinook; 18 | 19 | /** 20 | * Example UDF for where clause to check pushing to JDBC 21 | */ 22 | public class ChosenCustomerEmail { 23 | 24 | public String eval() { 25 | return "ftremblay@gmail.com"; 26 | } 27 | 28 | } 29 | 30 | // End ChosenCustomerEmail.java 31 | -------------------------------------------------------------------------------- /splunk/src/test/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to you under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # Root logger is configured at INFO and is sent to A1 17 | log4j.rootLogger=INFO, A1 18 | 19 | # A1 goes to the console 20 | log4j.appender.A1=org.apache.log4j.ConsoleAppender 21 | 22 | # Set the pattern for each log message 23 | log4j.appender.A1.layout=org.apache.log4j.PatternLayout 24 | log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p - %m%n 25 | -------------------------------------------------------------------------------- /cassandra/src/main/java/org/apache/calcite/adapter/cassandra/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Cassandra query provider. 20 | * 21 | *

There is one table for each Cassandra column family.

22 | */ 23 | @PackageMarker 24 | package org.apache.calcite.adapter.cassandra; 25 | 26 | import org.apache.calcite.avatica.util.PackageMarker; 27 | 28 | // End package-info.java 29 | -------------------------------------------------------------------------------- /core/src/main/java/org/apache/calcite/rel/externalize/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Facilities to externalize {@link org.apache.calcite.rel.RelNode}s to and from 20 | * XML and JSON format. 21 | */ 22 | @PackageMarker 23 | package org.apache.calcite.rel.externalize; 24 | 25 | import org.apache.calcite.avatica.util.PackageMarker; 26 | 27 | // End package-info.java 28 | -------------------------------------------------------------------------------- /core/src/main/java/org/apache/calcite/sql/validate/SqlMonikerType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.calcite.sql.validate; 18 | 19 | /** 20 | * An enumeration of moniker types. 21 | * 22 | *

Used in {@link SqlMoniker}. 23 | */ 24 | public enum SqlMonikerType { 25 | COLUMN, TABLE, VIEW, SCHEMA, CATALOG, REPOSITORY, FUNCTION, KEYWORD 26 | } 27 | 28 | // End SqlMonikerType.java 29 | -------------------------------------------------------------------------------- /linq4j/src/main/java/org/apache/calcite/linq4j/function/EqualityComparer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.calcite.linq4j.function; 18 | 19 | /** 20 | * Compares values for equality. 21 | * 22 | * @param Value type 23 | */ 24 | public interface EqualityComparer { 25 | boolean equal(T v1, T v2); 26 | 27 | int hashCode(T t); 28 | } 29 | 30 | // End EqualityComparer.java 31 | -------------------------------------------------------------------------------- /piglet/src/test/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to you under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # Root logger is configured at ERROR and is sent to A1 17 | log4j.rootLogger=ERROR, A1 18 | 19 | # A1 goes to the console 20 | log4j.appender.A1=org.apache.log4j.ConsoleAppender 21 | 22 | # Set the pattern for each log message 23 | log4j.appender.A1.layout=org.apache.log4j.PatternLayout 24 | log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p - %m%n 25 | -------------------------------------------------------------------------------- /babel/src/main/java/org/apache/calcite/sql/babel/Babel.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.calcite.sql.babel; 18 | 19 | /** SQL parser that accepts a wide variety of dialects. */ 20 | @SuppressWarnings("unused") 21 | public class Babel { 22 | // This class is currently a place-holder. Javadoc gets upset 23 | // if there are no classes in babel/java/main. 24 | } 25 | 26 | // End Babel.java 27 | -------------------------------------------------------------------------------- /plus/src/main/java/org/apache/calcite/adapter/os/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * The OS adapter contains various table functions that let you query data 20 | * sources in your operating system and environment. 21 | */ 22 | @PackageMarker 23 | package org.apache.calcite.adapter.os; 24 | 25 | import org.apache.calcite.avatica.util.PackageMarker; 26 | 27 | // End package-info.java 28 | -------------------------------------------------------------------------------- /core/src/main/java/org/apache/calcite/adapter/jdbc/JdbcRel.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.calcite.adapter.jdbc; 18 | 19 | import org.apache.calcite.rel.RelNode; 20 | 21 | /** 22 | * Relational expression that uses JDBC calling convention. 23 | */ 24 | public interface JdbcRel extends RelNode { 25 | JdbcImplementor.Result implement(JdbcImplementor implementor); 26 | } 27 | 28 | // End JdbcRel.java 29 | -------------------------------------------------------------------------------- /site/_sass/_mixins.scss: -------------------------------------------------------------------------------- 1 | @mixin box-shadow($shadow...) { 2 | -webkit-box-shadow: $shadow; 3 | -moz-box-shadow: $shadow; 4 | box-shadow: $shadow; 5 | } 6 | 7 | @mixin border-radius($radius...) { 8 | -webkit-border-radius: $radius; 9 | -moz-border-radius: $radius; 10 | border-radius: $radius; 11 | } 12 | 13 | @mixin border-top-left-radius($radius...) { 14 | -webkit-border-top-left-radius: $radius; 15 | -moz-border-radius-topleft: $radius; 16 | border-top-left-radius: $radius; 17 | } 18 | 19 | @mixin border-top-right-radius($radius...) { 20 | -webkit-border-top-right-radius: $radius; 21 | -moz-border-radius-topright: $radius; 22 | border-top-right-radius: $radius; 23 | } 24 | 25 | @mixin transition($transition...) { 26 | -webkit-transition: $transition; 27 | -moz-transition: $transition; 28 | -o-transition: $transition; 29 | transition: $transition; 30 | } 31 | 32 | @mixin user-select($select...) { 33 | -webkit-user-select: $select; /* Chrome all / Safari all */ 34 | -moz-user-select: $select; /* Firefox all */ 35 | -ms-user-select: $select; /* IE 10+ */ 36 | -o-user-select: $select; 37 | user-select: $select; 38 | } 39 | -------------------------------------------------------------------------------- /druid/src/main/java/org/apache/calcite/adapter/druid/ExtractionFunction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.calcite.adapter.druid; 18 | 19 | /** 20 | * Interface for Druid extraction functions. 21 | * 22 | *

Extraction functions define the transformation applied to each dimension value. 23 | */ 24 | public interface ExtractionFunction extends DruidJson { 25 | } 26 | 27 | // End ExtractionFunction.java 28 | -------------------------------------------------------------------------------- /linq4j/src/main/java/org/apache/calcite/linq4j/OrderedQueryable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.calcite.linq4j; 18 | 19 | /** 20 | * Represents the result of applying a sorting operation to a {@link Queryable}. 21 | * 22 | * @param Element type 23 | */ 24 | public interface OrderedQueryable 25 | extends Queryable, ExtendedOrderedQueryable { 26 | } 27 | 28 | // End OrderedQueryable.java 29 | -------------------------------------------------------------------------------- /linq4j/src/main/java/org/apache/calcite/linq4j/function/LongFunction1.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.calcite.linq4j.function; 18 | 19 | /** 20 | * Function that takes one parameter and returns a native {@code long} value. 21 | * 22 | * @param Type of argument #0 23 | */ 24 | public interface LongFunction1 extends Function { 25 | long apply(T0 v0); 26 | } 27 | 28 | // End LongFunction1.java 29 | -------------------------------------------------------------------------------- /core/src/main/codegen/includes/parserImpls.ftl: -------------------------------------------------------------------------------- 1 | <#-- 2 | // Licensed to the Apache Software Foundation (ASF) under one or more 3 | // contributor license agreements. See the NOTICE file distributed with 4 | // this work for additional information regarding copyright ownership. 5 | // The ASF licenses this file to you under the Apache License, Version 2.0 6 | // (the "License"); you may not use this file except in compliance with 7 | // the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | --> 17 | 18 | <#-- 19 | Add implementations of additional parser statements, literals or 20 | data types. 21 | 22 | Example of SqlShowTables() implementation: 23 | SqlNode SqlShowTables() 24 | { 25 | ...local variables... 26 | } 27 | { 28 | 29 | ... 30 | { 31 | return SqlShowTables(...) 32 | } 33 | } 34 | --> 35 | -------------------------------------------------------------------------------- /core/src/main/java/org/apache/calcite/adapter/enumerable/WinAggContext.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.calcite.adapter.enumerable; 18 | 19 | /** 20 | * Marker interface to allow 21 | * {@link org.apache.calcite.adapter.enumerable.AggImplementor} 22 | * to tell if it is used in regular or windowed context. 23 | */ 24 | public interface WinAggContext extends AggContext { 25 | } 26 | 27 | // End WinAggContext.java 28 | -------------------------------------------------------------------------------- /core/src/main/java/org/apache/calcite/interpreter/Source.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.calcite.interpreter; 18 | 19 | /** 20 | * Source of rows. 21 | * 22 | *

Corresponds to an input of a relational expression. 23 | */ 24 | public interface Source extends AutoCloseable { 25 | /** Reads a row. Null means end of data. */ 26 | Row receive(); 27 | 28 | void close(); 29 | } 30 | 31 | // End Source.java 32 | -------------------------------------------------------------------------------- /core/src/main/resources/version/org-apache-calcite-jdbc.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to you under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | driver.name=Calcite JDBC Driver 17 | driver.version=${pom.version} 18 | product.name=Calcite 19 | product.version=${pom.version} 20 | jdbc.compliant=true 21 | driver.version.major=${version.major} 22 | driver.version.minor=${version.minor} 23 | database.version.major=${version.major} 24 | database.version.minor=${version.minor} 25 | build.timestamp=${build.timestamp} 26 | -------------------------------------------------------------------------------- /linq4j/src/main/java/org/apache/calcite/linq4j/function/FloatFunction1.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.calcite.linq4j.function; 18 | 19 | /** 20 | * Function that takes one parameter and returns a native {@code float} value. 21 | * 22 | * @param Type of argument #0 23 | */ 24 | public interface FloatFunction1 extends Function { 25 | float apply(T0 v0); 26 | } 27 | 28 | // End FloatFunction1.java 29 | -------------------------------------------------------------------------------- /plus/src/main/java/org/apache/calcite/chinook/StringConcatFunction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.calcite.chinook; 18 | 19 | /** 20 | * Example query for checking query projections 21 | */ 22 | public class StringConcatFunction { 23 | 24 | public String eval(String first, String second) { 25 | return "CONCAT = [" + first + "+" + second + "]"; 26 | } 27 | 28 | } 29 | 30 | // End StringConcatFunction.java 31 | -------------------------------------------------------------------------------- /site/_posts/2014-06-27-release-0.8.0-incubating.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: news_item 3 | date: "2014-06-27 00:00:00 -0800" 4 | author: jhyde 5 | version: 0.8 6 | tag: v0-8 7 | sha: 3da850a1 8 | categories: [release] 9 | --- 10 | 28 | 29 | Several new features, including a heuristic rule to plan queries with 30 | a large number of joins, a number of windowed aggregate functions, and 31 | new utility, `SqlRun`. 32 | -------------------------------------------------------------------------------- /core/src/main/codegen/includes/compoundIdentifier.ftl: -------------------------------------------------------------------------------- 1 | <#-- 2 | // Licensed to the Apache Software Foundation (ASF) under one or more 3 | // contributor license agreements. See the NOTICE file distributed with 4 | // this work for additional information regarding copyright ownership. 5 | // The ASF licenses this file to you under the Apache License, Version 2.0 6 | // (the "License"); you may not use this file except in compliance with 7 | // the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | --> 17 | 18 | <#-- 19 | Add implementations of additional parser statements, literals or 20 | data types. 21 | 22 | Example of SqlShowTables() implementation: 23 | SqlNode SqlShowTables() 24 | { 25 | ...local variables... 26 | } 27 | { 28 | 29 | ... 30 | { 31 | return SqlShowTables(...) 32 | } 33 | } 34 | --> 35 | -------------------------------------------------------------------------------- /core/src/main/java/org/apache/calcite/util/CalciteParserException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.calcite.util; 18 | 19 | /** 20 | * Tagging interface to allow a 21 | * {@link org.apache.calcite.sql.parser.SqlParseException} 22 | * to be identified without adding a 23 | * dependency on it from client-side code. 24 | */ 25 | public interface CalciteParserException { 26 | } 27 | 28 | // End CalciteParserException.java 29 | -------------------------------------------------------------------------------- /core/src/test/codegen/includes/compoundIdentifier.ftl: -------------------------------------------------------------------------------- 1 | <#-- 2 | // Licensed to the Apache Software Foundation (ASF) under one or more 3 | // contributor license agreements. See the NOTICE file distributed with 4 | // this work for additional information regarding copyright ownership. 5 | // The ASF licenses this file to you under the Apache License, Version 2.0 6 | // (the "License"); you may not use this file except in compliance with 7 | // the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, software 12 | // distributed under the License is distributed on an "AS IS" BASIS, 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | // See the License for the specific language governing permissions and 15 | // limitations under the License. 16 | --> 17 | 18 | <#-- 19 | Add implementations of additional parser statements, literals or 20 | data types. 21 | 22 | Example of SqlShowTables() implementation: 23 | SqlNode SqlShowTables() 24 | { 25 | ...local variables... 26 | } 27 | { 28 | 29 | ... 30 | { 31 | return SqlShowTables(...) 32 | } 33 | } 34 | --> 35 | -------------------------------------------------------------------------------- /core/src/test/resources/mysql-foodmart-model.json: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | { 18 | "version": "1.0", 19 | "defaultSchema": "foodmart", 20 | "schemas": [ 21 | { 22 | "type": "jdbc", 23 | "name": "foodmart", 24 | "jdbcUser": "foodmart", 25 | "jdbcPassword": "foodmart", 26 | "jdbcUrl": "jdbc:mysql://localhost", 27 | "jdbcCatalog": "foodmart", 28 | "jdbcSchema": null 29 | } 30 | ] 31 | } 32 | -------------------------------------------------------------------------------- /example/csv/src/test/resources/model-with-view.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to you under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | # 17 | # A JSON model of a Calcite schema that includes a view. 18 | # 19 | version: 1.0 20 | defaultSchema: SALES 21 | schemas: 22 | - name: SALES 23 | type: custom 24 | factory: org.apache.calcite.adapter.csv.CsvSchemaFactory 25 | operand: 26 | directory: sales 27 | tables: 28 | - name: FEMALE_EMPS 29 | type: view 30 | sql: SELECT * FROM emps WHERE gender = 'F' 31 | -------------------------------------------------------------------------------- /example/csv/src/test/resources/model.json: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | * A JSON model of a simple Calcite schema. 18 | */ 19 | { 20 | "version": "1.0", 21 | "defaultSchema": "SALES", 22 | "schemas": [ 23 | { 24 | "name": "SALES", 25 | "type": "custom", 26 | "factory": "org.apache.calcite.adapter.csv.CsvSchemaFactory", 27 | "operand": { 28 | "directory": "sales" 29 | } 30 | } 31 | ] 32 | } 33 | -------------------------------------------------------------------------------- /linq4j/src/main/java/org/apache/calcite/linq4j/function/IntegerFunction1.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.calcite.linq4j.function; 18 | 19 | /** 20 | * Function that takes one parameter and returns a native {@code int} value. 21 | * 22 | * @param Type of argument #0 23 | */ 24 | public interface IntegerFunction1 extends Function { 25 | int apply(T0 v0); 26 | } 27 | 28 | // End IntegerFunction1.java 29 | -------------------------------------------------------------------------------- /linq4j/src/main/java/org/apache/calcite/linq4j/function/DoubleFunction1.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.calcite.linq4j.function; 18 | 19 | /** 20 | * Function that takes one parameter and returns a native {@code double} value. 21 | * 22 | * @param Type of argument #0 23 | */ 24 | public interface DoubleFunction1 extends Function { 25 | double apply(T0 v0); 26 | } 27 | 28 | // End DoubleFunction1.java 29 | -------------------------------------------------------------------------------- /file/src/main/java/org/apache/calcite/adapter/file/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Calcite query provider that reads from web tables (HTML). 20 | * 21 | *

A Calcite schema that maps onto multiple URLs / HTML Tables. 22 | * Each HTML table appears as a table. 23 | * Full select SQL operations are available on those tables. 24 | */ 25 | package org.apache.calcite.adapter.file; 26 | 27 | // End package-info.java 28 | -------------------------------------------------------------------------------- /file/src/test/resources/tableNoTheadTbody.html: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 |
H0H1H2
R0C0R0C1R0C2
R1C0R1C1R1C2
R2C0R2C1R2C2
43 | 44 | 45 | -------------------------------------------------------------------------------- /linq4j/src/main/java/org/apache/calcite/linq4j/function/NullableLongFunction1.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.calcite.linq4j.function; 18 | 19 | /** 20 | * Function that takes one parameter and returns a {@link Long} value that 21 | * may be null. 22 | * 23 | * @param Type of argument #0 24 | */ 25 | public interface NullableLongFunction1 extends Function1 { 26 | } 27 | 28 | // End NullableLongFunction1.java 29 | -------------------------------------------------------------------------------- /core/src/main/java/org/apache/calcite/util/CalciteValidatorException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.calcite.util; 18 | 19 | /** 20 | * Tagging interface to allow a 21 | * {@link org.apache.calcite.sql.validate.SqlValidatorException} 22 | * to be identified without 23 | * adding a dependency on it from client-side code. 24 | */ 25 | public interface CalciteValidatorException { 26 | } 27 | 28 | // End CalciteValidatorException.java 29 | -------------------------------------------------------------------------------- /core/src/test/java/RootHr.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** Equivalent to 19 | * {@link org.apache.calcite.examples.foodmart.java.JdbcExample.Hr}, but 20 | * belongs to the unnamed (root) package. */ 21 | public class RootHr { 22 | public final RootEmployee[] emps = { 23 | new RootEmployee(100, "Bill"), 24 | new RootEmployee(200, "Eric"), 25 | new RootEmployee(150, "Sebastian"), 26 | }; 27 | } 28 | 29 | // End RootHr.java 30 | -------------------------------------------------------------------------------- /file/src/test/resources/sales-csv.json: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | * A JSON model of a Calcite schema based on CSV files. 18 | */ 19 | { 20 | "version": "1.0", 21 | "defaultSchema": "SALES", 22 | "schemas": [ 23 | { 24 | "name": "SALES", 25 | "type": "custom", 26 | "factory": "org.apache.calcite.adapter.file.FileSchemaFactory", 27 | "operand": { 28 | "directory": "sales-csv" 29 | } 30 | } 31 | ] 32 | } 33 | -------------------------------------------------------------------------------- /file/src/test/resources/sales-json.json: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | * A JSON model of a Calcite schema based on CSV files. 18 | */ 19 | { 20 | "version": "1.0", 21 | "defaultSchema": "SALES", 22 | "schemas": [ 23 | { 24 | "name": "SALES", 25 | "type": "custom", 26 | "factory": "org.apache.calcite.adapter.file.FileSchemaFactory", 27 | "operand": { 28 | "directory": "sales-json" 29 | } 30 | } 31 | ] 32 | } 33 | -------------------------------------------------------------------------------- /geode/src/test/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to you under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # Root logger is configured at INFO and is sent to A1 17 | log4j.rootLogger=INFO, A1 18 | 19 | log4j.logger.org.apache.calcite.adapter.geode=WARN 20 | 21 | # A1 goes to the console 22 | log4j.appender.A1=org.apache.log4j.ConsoleAppender 23 | 24 | # Set the pattern for each log message 25 | log4j.appender.A1.layout=org.apache.log4j.PatternLayout 26 | log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p - %m%n 27 | -------------------------------------------------------------------------------- /linq4j/src/main/java/org/apache/calcite/linq4j/function/Function2.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.calcite.linq4j.function; 18 | 19 | /** 20 | * Function with two parameters. 21 | * 22 | * @param Result type 23 | * @param Type of argument #0 24 | * @param Type of argument #1 25 | */ 26 | public interface Function2 extends Function { 27 | R apply(T0 v0, T1 v1); 28 | } 29 | 30 | // End Function2.java 31 | -------------------------------------------------------------------------------- /linq4j/src/main/java/org/apache/calcite/linq4j/function/NullableFloatFunction1.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.calcite.linq4j.function; 18 | 19 | /** 20 | * Function that takes one parameter and returns a {@link Float} value that 21 | * may be null. 22 | * 23 | * @param Type of argument #0 24 | */ 25 | public interface NullableFloatFunction1 extends Function1 { 26 | } 27 | 28 | // End NullableFloatFunction1.java 29 | -------------------------------------------------------------------------------- /core/src/main/java/org/apache/calcite/runtime/Typed.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.calcite.runtime; 18 | 19 | import java.lang.reflect.Type; 20 | 21 | /** 22 | * Adds type information to a {@link org.apache.calcite.linq4j.Enumerable}. 23 | */ 24 | public interface Typed { 25 | /** 26 | * Gets the type of the element(s) that are returned in this collection. 27 | */ 28 | Type getElementType(); 29 | } 30 | 31 | // End Typed.java 32 | -------------------------------------------------------------------------------- /core/src/main/java/org/apache/calcite/schema/Wrapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.calcite.schema; 18 | 19 | /** 20 | * Mix-in interface that allows you to find sub-objects. 21 | */ 22 | public interface Wrapper { 23 | /** Finds an instance of an interface implemented by this object, 24 | * or returns null if this object does not support that interface. */ 25 | C unwrap(Class aClass); 26 | } 27 | 28 | // End Wrapper.java 29 | -------------------------------------------------------------------------------- /core/src/test/resources/hsqldb-foodmart-auto-lattice-model.json: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | { 18 | "version": "1.0", 19 | "defaultSchema": "foodmart", 20 | "schemas": [ { 21 | "type": "jdbc", 22 | "name": "foodmart", 23 | "jdbcUser": "FOODMART", 24 | "jdbcPassword": "FOODMART", 25 | "jdbcUrl": "jdbc:hsqldb:res:foodmart", 26 | "jdbcSchema": "foodmart" 27 | }, { 28 | "name": "adhoc", 29 | "autoLattice": true 30 | } ] 31 | } 32 | -------------------------------------------------------------------------------- /linq4j/src/main/java/org/apache/calcite/linq4j/Grouping.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to you under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.calcite.linq4j; 18 | 19 | /** 20 | * Represents a collection of objects that have a common key. 21 | * 22 | * @param Key type 23 | * @param Element type 24 | */ 25 | public interface Grouping extends Enumerable { 26 | /** 27 | * Gets the key of this Grouping. 28 | */ 29 | K getKey(); 30 | } 31 | 32 | // End Grouping.java 33 | --------------------------------------------------------------------------------