Skip to content

Commit 8fbfddc

Browse files
committed
Remove built-in jexl function in tree mode (#17092)
(cherry picked from commit b40b74b)
1 parent d57e80a commit 8fbfddc

12 files changed

Lines changed: 36 additions & 627 deletions

File tree

dependencies.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
"io.netty:netty-codec",
5353
"io.netty:netty-codec-dns",
5454
"io.netty:netty-codec-http",
55-
"io.netty:netty-codec-http",
5655
"io.netty:netty-codec-http2",
5756
"io.netty:netty-codec-mqtt",
5857
"io.netty:netty-codec-socks",
@@ -97,7 +96,6 @@
9796
"org.antlr:antlr4-runtime",
9897
"org.apache.commons:commons-collections4",
9998
"org.apache.commons:commons-csv",
100-
"org.apache.commons:commons-jexl3",
10199
"org.apache.commons:commons-lang3",
102100
"org.apache.commons:commons-math3",
103101
"org.apache.commons:commons-pool2",

example/pipe-count-point-processor/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
<groupId>org.apache.maven.plugins</groupId>
6060
<artifactId>maven-jar-plugin</artifactId>
6161
<version>3.2.2</version>
62-
<configuration />
62+
<configuration/>
6363
</plugin>
6464
</plugins>
6565
</build>

integration-test/pom.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,16 @@
2929
<artifactId>integration-test</artifactId>
3030
<name>IoTDB: Integration-Test</name>
3131
<properties>
32-
<integrationTest.excludedGroups />
32+
<integrationTest.excludedGroups/>
3333
<integrationTest.forkCount>1</integrationTest.forkCount>
34-
<integrationTest.includedGroups />
34+
<integrationTest.includedGroups/>
3535
<integrationTest.launchNodeInSameJVM>true</integrationTest.launchNodeInSameJVM>
3636
<integrationTest.nodeMaxHeapSize>200m</integrationTest.nodeMaxHeapSize>
3737
<integrationTest.nodeNewHeapSize>200m</integrationTest.nodeNewHeapSize>
3838
<integrationTest.randomSelectWriteNode>true</integrationTest.randomSelectWriteNode>
3939
<integrationTest.readAndVerifyWithMultiNode>true</integrationTest.readAndVerifyWithMultiNode>
4040
<integrationTest.dataRegionPerDataNode>0</integrationTest.dataRegionPerDataNode>
41-
<integrationTest.testEnv />
41+
<integrationTest.testEnv/>
4242
<lightWeightStandaloneMode.configNodeConsensus>Simple</lightWeightStandaloneMode.configNodeConsensus>
4343
<!-- -DClusterConfigurations values configured here -->
4444
<lightWeightStandaloneMode.configNodeNumber>1</lightWeightStandaloneMode.configNodeNumber>
@@ -672,7 +672,7 @@
672672
<activeByDefault>false</activeByDefault>
673673
</activation>
674674
<properties>
675-
<integrationTest.excludedGroups />
675+
<integrationTest.excludedGroups/>
676676
<integrationTest.includedGroups>org.apache.iotdb.itbase.category.DailyIT</integrationTest.includedGroups>
677677
<integrationTest.launchNodeInSameJVM>false</integrationTest.launchNodeInSameJVM>
678678
<integrationTest.randomSelectWriteNode>true</integrationTest.randomSelectWriteNode>
@@ -714,7 +714,7 @@
714714
<activeByDefault>false</activeByDefault>
715715
</activation>
716716
<properties>
717-
<integrationTest.excludedGroups />
717+
<integrationTest.excludedGroups/>
718718
<integrationTest.includedGroups>org.apache.iotdb.itbase.category.ManualIT</integrationTest.includedGroups>
719719
<integrationTest.launchNodeInSameJVM>false</integrationTest.launchNodeInSameJVM>
720720
<integrationTest.randomSelectWriteNode>true</integrationTest.randomSelectWriteNode>

integration-test/src/main/java/org/apache/iotdb/itbase/constant/BuiltinTimeSeriesGeneratingFunctionEnum.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ public enum BuiltinTimeSeriesGeneratingFunctionEnum {
7272
EQUAL_SIZE_BUCKET_AGG_SAMPLE("EQUAL_SIZE_BUCKET_AGG_SAMPLE"),
7373
EQUAL_SIZE_BUCKET_M4_SAMPLE("EQUAL_SIZE_BUCKET_M4_SAMPLE"),
7474
EQUAL_SIZE_BUCKET_OUTLIER_SAMPLE("EQUAL_SIZE_BUCKET_OUTLIER_SAMPLE"),
75-
JEXL("JEXL"),
7675
MASTER_REPAIR("MASTER_REPAIR"),
7776
FORECAST("FORECAST"),
7877
M4("M4");

integration-test/src/test/java/org/apache/iotdb/db/it/udf/IoTDBUDTFBuiltinFunctionIT.java

Lines changed: 0 additions & 235 deletions
Original file line numberDiff line numberDiff line change
@@ -1490,241 +1490,6 @@ private void test_M4_constantTimeSeries() {
14901490
}
14911491
}
14921492

1493-
@Test
1494-
public void testUDTFJexl() {
1495-
try (Connection connection = EnvFactory.getEnv().getConnection();
1496-
Statement statement = connection.createStatement()) {
1497-
statement.execute("CREATE TIMESERIES root.sg.d7.s1 with datatype=INT32,encoding=PLAIN");
1498-
statement.execute("CREATE TIMESERIES root.sg.d7.s2 with datatype=FLOAT,encoding=PLAIN");
1499-
statement.execute("CREATE TIMESERIES root.sg.d7.s3 with datatype=DOUBLE,encoding=PLAIN");
1500-
statement.execute("CREATE TIMESERIES root.sg.d7.s4 with datatype=TEXT,encoding=PLAIN");
1501-
statement.execute("CREATE TIMESERIES root.sg.d7.s5 with datatype=BOOLEAN,encoding=PLAIN");
1502-
statement.execute("CREATE TIMESERIES root.sg.d7.s6 with datatype=INT64,encoding=PLAIN");
1503-
statement.execute("CREATE TIMESERIES root.sg.d7.s7 with datatype=INT64,encoding=PLAIN");
1504-
statement.execute("CREATE TIMESERIES root.sg.d7.s8 with datatype=FLOAT,encoding=PLAIN");
1505-
statement.execute("CREATE TIMESERIES root.sg.d7.s9 with datatype=TEXT,encoding=PLAIN");
1506-
} catch (SQLException throwable) {
1507-
fail(throwable.getMessage());
1508-
}
1509-
String[] SQL_FOR_SAMPLE_1 = new String[6];
1510-
String[] SQL_FOR_SAMPLE_2 = new String[6];
1511-
String[] SQL_FOR_SAMPLE_3 = new String[6];
1512-
String[] SQL_FOR_SAMPLE_4 = new String[6];
1513-
String[] SQL_FOR_SAMPLE_5 = new String[6];
1514-
String[] SQL_FOR_SAMPLE_6 = new String[6];
1515-
String[] SQL_FOR_SAMPLE_7 = new String[6];
1516-
String[] SQL_FOR_SAMPLE_8 = new String[6];
1517-
String[] SQL_FOR_SAMPLE_9 = new String[6];
1518-
for (int i = 0; i < 5; i++) {
1519-
SQL_FOR_SAMPLE_1[i] =
1520-
String.format(
1521-
Locale.ENGLISH, "insert into root.sg.d7(time, s1) values (%d, %d)", i, i + 1);
1522-
SQL_FOR_SAMPLE_2[i] =
1523-
String.format(
1524-
Locale.ENGLISH, "insert into root.sg.d7(time, s2) values (%d, %f)", i, i + 1.0);
1525-
SQL_FOR_SAMPLE_3[i] =
1526-
String.format(
1527-
Locale.ENGLISH, "insert into root.sg.d7(time, s3) values (%d, %f)", i, i + 1.0);
1528-
SQL_FOR_SAMPLE_4[i] =
1529-
String.format(
1530-
Locale.ENGLISH, "insert into root.sg.d7(time, s4) values (%d, '%s')", i, "string");
1531-
SQL_FOR_SAMPLE_5[i] = String.format("insert into root.sg.d7(time, s5) values (%d, true)", i);
1532-
SQL_FOR_SAMPLE_6[i] =
1533-
String.format(
1534-
Locale.ENGLISH, "insert into root.sg.d7(time, s6) values (%d, %d)", i, i + 8);
1535-
SQL_FOR_SAMPLE_7[i] =
1536-
String.format(
1537-
Locale.ENGLISH, "insert into root.sg.d7(time, s7) values (%d, %d)", i, i + 1);
1538-
SQL_FOR_SAMPLE_8[i] =
1539-
String.format(
1540-
Locale.ENGLISH, "insert into root.sg.d7(time, s8) values (%d, %f)", i, i + 1.0);
1541-
SQL_FOR_SAMPLE_9[i] =
1542-
String.format(
1543-
Locale.ENGLISH, "insert into root.sg.d7(time, s9) values (%d, '%s')", i, "string");
1544-
}
1545-
SQL_FOR_SAMPLE_1[5] =
1546-
String.format(
1547-
Locale.ENGLISH,
1548-
"insert into root.sg.d7(time, s1) values (%d, %d)",
1549-
10000000000L,
1550-
5 + 1);
1551-
SQL_FOR_SAMPLE_2[5] =
1552-
String.format(
1553-
Locale.ENGLISH,
1554-
"insert into root.sg.d7(time, s2) values (%d, %f)",
1555-
10000000000L,
1556-
5 + 1.0);
1557-
SQL_FOR_SAMPLE_3[5] =
1558-
String.format(
1559-
Locale.ENGLISH,
1560-
"insert into root.sg.d7(time, s3) values (%d, %f)",
1561-
10000000000L,
1562-
5 + 1.0);
1563-
SQL_FOR_SAMPLE_4[5] =
1564-
String.format(
1565-
Locale.ENGLISH,
1566-
"insert into root.sg.d7(time, s4) values (%d, '%s')",
1567-
10000000000L,
1568-
"string");
1569-
SQL_FOR_SAMPLE_5[5] = String.format("insert into root.sg.d7(time, s5) values (%d, true)", 5);
1570-
SQL_FOR_SAMPLE_6[5] =
1571-
String.format(
1572-
Locale.ENGLISH,
1573-
"insert into root.sg.d7(time, s6) values (%d, %d)",
1574-
10000000000L,
1575-
5 + 8);
1576-
SQL_FOR_SAMPLE_7[5] =
1577-
String.format(
1578-
Locale.ENGLISH,
1579-
"insert into root.sg.d7(time, s7) values (%d, %d)",
1580-
10000000000L,
1581-
5 + 1);
1582-
SQL_FOR_SAMPLE_8[5] =
1583-
String.format(
1584-
Locale.ENGLISH,
1585-
"insert into root.sg.d7(time, s8) values (%d, %f)",
1586-
10000000000L,
1587-
5 + 1.0);
1588-
SQL_FOR_SAMPLE_9[5] =
1589-
String.format(
1590-
Locale.ENGLISH,
1591-
"insert into root.sg.d7(time, s9) values (%d, '%s')",
1592-
10000000000L,
1593-
"string");
1594-
double[] ANSWER1 = new double[] {2, 4, 6, 8, 10, 12};
1595-
double[] ANSWER2 = new double[] {2, 4, 6, 8, 10, 12};
1596-
double[] ANSWER3 = new double[] {4, 7, 10, 13, 16, 19};
1597-
String[] ANSWER4 =
1598-
new String[] {"string2", "string2", "string2", "string2", "string2", "string2"};
1599-
double[] ANSWER7 = new double[] {1, 4, 9, 16, 25, 36};
1600-
String[] ANSWER8 =
1601-
new String[] {"string1", "string4", "string9", "string16", "string25", "string36"};
1602-
double[] ANSWER9 = new double[] {2, 9, 28, 65, 126, 469};
1603-
try (Connection connection = EnvFactory.getEnv().getConnection();
1604-
Statement statement = connection.createStatement()) {
1605-
for (int i = 0; i < 5; i++) {
1606-
statement.execute(SQL_FOR_SAMPLE_1[i]);
1607-
statement.execute(SQL_FOR_SAMPLE_2[i]);
1608-
statement.execute(SQL_FOR_SAMPLE_3[i]);
1609-
statement.execute(SQL_FOR_SAMPLE_4[i]);
1610-
statement.execute(SQL_FOR_SAMPLE_5[i]);
1611-
statement.execute(SQL_FOR_SAMPLE_6[i]);
1612-
statement.execute(SQL_FOR_SAMPLE_7[i]);
1613-
statement.execute(SQL_FOR_SAMPLE_8[i]);
1614-
statement.execute(SQL_FOR_SAMPLE_9[i]);
1615-
}
1616-
} catch (SQLException throwable) {
1617-
fail(throwable.getMessage());
1618-
}
1619-
1620-
try (Connection connection = EnvFactory.getEnv().getConnection();
1621-
Statement statement = connection.createStatement()) {
1622-
String functionName = "JEXL";
1623-
String expr1 = "x -> {2 * x}";
1624-
String expr2 = "x -> {x + x}";
1625-
String expr3 = "x -> {x * 3 + 1}";
1626-
String expr4 = "x -> {x + 2}";
1627-
String expr5 = "x -> {x == true}";
1628-
String expr6 = "x -> {x == x}";
1629-
String expr7 = "(x, y) -> {x * y}";
1630-
String expr8 = "(x, y, z) -> {x + y * z}";
1631-
String expr9 = "(x, y, z, a) -> {x * y * z + (a ? 1 : -1)}";
1632-
ResultSet resultSet =
1633-
statement.executeQuery(
1634-
String.format(
1635-
"select %s(s1, 'expr'='%s'), "
1636-
+ "%s(s2, 'expr'='%s'), "
1637-
+ "%s(s3, 'expr'='%s'), "
1638-
+ "%s(s4, 'expr'='%s'), "
1639-
+ "%s(s5, 'expr'='%s'), "
1640-
+ "%s(s6, 'expr'='%s'), "
1641-
+ "%s(s7, s8, 'expr'='%s'), "
1642-
+ "%s(s4, s7, s1, 'expr'='%s'), "
1643-
+ "%s(s1, s7, s8, s5, 'expr'='%s') "
1644-
+ "from root.sg.d7",
1645-
functionName,
1646-
expr1,
1647-
functionName,
1648-
expr2,
1649-
functionName,
1650-
expr3,
1651-
functionName,
1652-
expr4,
1653-
functionName,
1654-
expr5,
1655-
functionName,
1656-
expr6,
1657-
functionName,
1658-
expr7,
1659-
functionName,
1660-
expr8,
1661-
functionName,
1662-
expr9));
1663-
int columnCount = resultSet.getMetaData().getColumnCount();
1664-
assertEquals(1 + 9, columnCount);
1665-
for (int i = 0; i < 5; i++) {
1666-
resultSet.next();
1667-
assertEquals(ANSWER1[i], resultSet.getDouble(2), 0.01);
1668-
assertEquals(ANSWER2[i], resultSet.getDouble(3), 0.01);
1669-
assertEquals(ANSWER3[i], resultSet.getDouble(4), 0.01);
1670-
assertEquals(ANSWER4[i], resultSet.getString(5));
1671-
assertTrue(resultSet.getBoolean(6));
1672-
assertTrue(resultSet.getBoolean(7));
1673-
assertEquals(ANSWER7[i], resultSet.getDouble(8), 0.01);
1674-
assertEquals(ANSWER8[i], resultSet.getString(9));
1675-
assertEquals(ANSWER9[i], resultSet.getDouble(10), 0.01);
1676-
}
1677-
1678-
resultSet =
1679-
statement.executeQuery(
1680-
String.format(
1681-
"select %s(s1, 'expr'='%s'), "
1682-
+ "%s(s2, 'expr'='%s'), "
1683-
+ "%s(s3, 'expr'='%s'), "
1684-
+ "%s(s4, 'expr'='%s'), "
1685-
+ "%s(s5, 'expr'='%s'), "
1686-
+ "%s(s6, 'expr'='%s'), "
1687-
+ "%s(s7, s8, 'expr'='%s'), "
1688-
+ "%s(s4, s7, s1, 'expr'='%s'), "
1689-
+ "%s(s1, s7, s8, s5, 'expr'='%s') "
1690-
+ "from root.sg.d7 align by device",
1691-
functionName,
1692-
expr1,
1693-
functionName,
1694-
expr2,
1695-
functionName,
1696-
expr3,
1697-
functionName,
1698-
expr4,
1699-
functionName,
1700-
expr5,
1701-
functionName,
1702-
expr6,
1703-
functionName,
1704-
expr7,
1705-
functionName,
1706-
expr8,
1707-
functionName,
1708-
expr9));
1709-
columnCount = resultSet.getMetaData().getColumnCount();
1710-
assertEquals(2 + 9, columnCount);
1711-
for (int i = 0; i < 5; i++) {
1712-
resultSet.next();
1713-
assertEquals(ANSWER1[i], resultSet.getDouble(2 + 1), 0.01);
1714-
assertEquals(ANSWER2[i], resultSet.getDouble(3 + 1), 0.01);
1715-
assertEquals(ANSWER3[i], resultSet.getDouble(4 + 1), 0.01);
1716-
assertEquals(ANSWER4[i], resultSet.getString(5 + 1));
1717-
assertTrue(resultSet.getBoolean(6 + 1));
1718-
assertTrue(resultSet.getBoolean(7 + 1));
1719-
assertEquals(ANSWER7[i], resultSet.getDouble(8 + 1), 0.01);
1720-
assertEquals(ANSWER8[i], resultSet.getString(9 + 1));
1721-
assertEquals(ANSWER9[i], resultSet.getDouble(10 + 1), 0.01);
1722-
}
1723-
} catch (Exception e) {
1724-
e.printStackTrace();
1725-
}
1726-
}
1727-
17281493
@Test
17291494
public void testStringFunctions() {
17301495
String[] createSQLs =

iotdb-client/jdbc/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@
266266
</goals>
267267
</pluginExecutionFilter>
268268
<action>
269-
<ignore />
269+
<ignore/>
270270
</action>
271271
</pluginExecution>
272272
</pluginExecutions>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#Generated by Git-Commit-Id-Plugin
2+
git.commit.id.abbrev=370df98
3+
git.dirty=false
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one
3+
# or more contributor license agreements. See the NOTICE file
4+
# distributed with this work for additional information
5+
# regarding copyright ownership. The ASF licenses this file
6+
# to you under the Apache License, Version 2.0 (the
7+
# "License"); you may not use this file except in compliance
8+
# with 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,
13+
# software distributed under the License is distributed on an
14+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
# KIND, either express or implied. See the License for the
16+
# specific language governing permissions and limitations
17+
# under the License.
18+
19+
artifactId=iotdb-ainode
20+
groupId=org.apache.iotdb
21+
version=1.3.7-SNAPSHOT

iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/udf/BuiltinTimeSeriesGeneratingFunction.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
import org.apache.iotdb.commons.udf.builtin.UDTFExp;
5252
import org.apache.iotdb.commons.udf.builtin.UDTFFloor;
5353
import org.apache.iotdb.commons.udf.builtin.UDTFInRange;
54-
import org.apache.iotdb.commons.udf.builtin.UDTFJexl;
5554
import org.apache.iotdb.commons.udf.builtin.UDTFLog;
5655
import org.apache.iotdb.commons.udf.builtin.UDTFLog10;
5756
import org.apache.iotdb.commons.udf.builtin.UDTFM4;
@@ -136,7 +135,6 @@ public enum BuiltinTimeSeriesGeneratingFunction {
136135
EQUAL_SIZE_BUCKET_M4_SAMPLE("EQUAL_SIZE_BUCKET_M4_SAMPLE", UDTFEqualSizeBucketM4Sample.class),
137136
EQUAL_SIZE_BUCKET_OUTLIER_SAMPLE(
138137
"EQUAL_SIZE_BUCKET_OUTLIER_SAMPLE", UDTFEqualSizeBucketOutlierSample.class),
139-
JEXL("JEXL", UDTFJexl.class),
140138
MASTER_REPAIR("MASTER_REPAIR", UDTFMasterRepair.class),
141139
M4("M4", UDTFM4.class),
142140
FORECAST("FORECAST", UDTFForecast.class),

iotdb-core/node-commons/pom.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,6 @@
159159
<groupId>com.github.ben-manes.caffeine</groupId>
160160
<artifactId>caffeine</artifactId>
161161
</dependency>
162-
<dependency>
163-
<groupId>org.apache.commons</groupId>
164-
<artifactId>commons-jexl3</artifactId>
165-
</dependency>
166162
<dependency>
167163
<groupId>com.github.luben</groupId>
168164
<artifactId>zstd-jni</artifactId>

0 commit comments

Comments
 (0)