Skip to content

Commit

Permalink
Add short-circuit evaluation and use Freemarker to generate filters f…
Browse files Browse the repository at this point in the history
…or different data types.
  • Loading branch information
FearfulTomcat27 authored Aug 12, 2024
1 parent eaf93d2 commit da9a7ce
Show file tree
Hide file tree
Showing 50 changed files with 4,624 additions and 1,593 deletions.
24 changes: 18 additions & 6 deletions java/tsfile/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@
<configuration>
<sources>
<source>${project.build.directory}/generated-sources/antlr4</source>
<source>${project.build.directory}/generated-sources/freemarker</source>
</sources>
</configuration>
</execution>
Expand Down Expand Up @@ -214,12 +215,23 @@
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>8</source>
<target>8</target>
</configuration>
<!-- generate sources from fmpp -->
<groupId>org.apache.drill.tools</groupId>
<artifactId>drill-fmpp-maven-plugin</artifactId>
<executions>
<execution>
<id>generate-fmpp</id>
<goals>
<goal>generate</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<config>${project.basedir}/src/main/codegen/config.fmpp</config>
<output>${project.build.directory}/generated-sources/freemarker</output>
<templates>${project.basedir}/src/main/codegen/templates/</templates>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
Expand Down
21 changes: 21 additions & 0 deletions java/tsfile/src/main/codegen/config.fmpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<#--
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
-->

data:{
tdd(../dataModel/AllFilter.tdd)
}
57 changes: 57 additions & 0 deletions java/tsfile/src/main/codegen/dataModel/AllFilter.tdd
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<#--
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
-->

{
"filters": [
{
"dataType": "boolean",
"javaBoxName": "Boolean",
"classSerializeName": "BOOLEAN"
},
{
"dataType": "int",
"javaBoxName": "Integer",
"classSerializeName": "INTEGER"
},
{
"dataType": "long",
"javaBoxName": "Long",
"classSerializeName": "LONG"
},
{
"dataType": "double",
"javaBoxName": "Double",
"classSerializeName": "DOUBLE"
},
{
"dataType": "float",
"javaBoxName": "Float",
"classSerializeName": "FLOAT"
},
{
"dataType": "Binary",
"javaBoxName": "Binary",
"classSerializeName": "BINARY"
},
{
"dataType": "Binary",
"javaBoxName": "String",
"classSerializeName": "STRING"
}
]
}
Loading

0 comments on commit da9a7ce

Please sign in to comment.