Skip to content

Commit

Permalink
Merge branch 'master' into fix-remaining-time
Browse files Browse the repository at this point in the history
  • Loading branch information
VGalaxies committed Oct 17, 2024
2 parents eec9af2 + 88ef922 commit 9bc6c8f
Show file tree
Hide file tree
Showing 331 changed files with 16,356 additions and 5,480 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/compile-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# This workflow will compile IoTDB under jdk8 to check for compatibility issues

name: Compile Check

on:
push:
branches:
- master
- 'rel/1.*'
- 'rc/1.*'
paths-ignore:
- 'docs/**'
- 'site/**'
pull_request:
branches:
- master
- 'rel/1.*'
- 'rc/1.*'
paths-ignore:
- 'docs/**'
- 'site/**'
# allow manually run the action:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3
MAVEN_ARGS: --batch-mode --no-transfer-progress
DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}

jobs:
compile-check:
strategy:
fail-fast: false
matrix:
java: [8]
os: [ ubuntu-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
distribution: liberica
java-version: ${{ matrix.java }}
- name: Compiler Test
shell: bash
run: |
mvn clean compile -P with-integration-tests -ntp
8 changes: 8 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -267,3 +267,11 @@ which is under Apache License 2.0:
./iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/LocalExecutionPlanner.java
./iotdb-core/tsfile/src/main/java/org/apache/iotdb/tsfile/read/common/block/*

--------------------------------------------------------------------------------

The following files include code modified from Apache Kafka project.

./iotdb-client/session/src/main/java/org/apache/iotdb/session/subscription/util/PollTimer.java

Project page: https://github.com/apache/kafka
License: http://www.apache.org/licenses/LICENSE-2.0
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public void initClusterEnvironment() {

@Override
public void initClusterEnvironment(int configNodesNum, int dataNodesNum) {
super.initEnvironment(configNodesNum, dataNodesNum, 500, true);
super.initEnvironment(configNodesNum, dataNodesNum, 1000, true);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public class TestConstant {
public static boolean testFlag = true;
public static String[] stringValue = new String[] {"A", "B", "C", "D", "E"};
public static String[] booleanValue = new String[] {"true", "false"};
public static final String TIMESEIRES_STR = ColumnHeaderConstant.TIMESERIES;
public static final String TIMESERIES_STR = ColumnHeaderConstant.TIMESERIES;
public static final String VALUE_STR = ColumnHeaderConstant.VALUE;
public static final String DATA_TYPE_STR = ColumnHeaderConstant.DATATYPE;
public static final String FUNCTION_TYPE_NATIVE = "native";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,27 +135,36 @@ public void ModelOperationTest() {
try (Connection connection = EnvFactory.getEnv().getConnection();
Statement statement = connection.createStatement()) {
statement.execute(registerSql);
try (ResultSet resultSet = statement.executeQuery(showSql)) {
ResultSetMetaData resultSetMetaData = resultSet.getMetaData();
checkHeader(resultSetMetaData, "ModelId,ModelType,State,Configs,Notes");
int count = 0;
while (resultSet.next()) {
String modelName = resultSet.getString(1);
String modelType = resultSet.getString(2);
String status = resultSet.getString(3);

assertEquals("operationTest", modelName);
assertEquals("USER_DEFINED", modelType);
assertEquals("ACTIVE", status);
count++;
boolean loading = true;
int count = 0;
while (loading) {
try (ResultSet resultSet = statement.executeQuery(showSql)) {
ResultSetMetaData resultSetMetaData = resultSet.getMetaData();
checkHeader(resultSetMetaData, "ModelId,ModelType,State,Configs,Notes");
while (resultSet.next()) {
String modelName = resultSet.getString(1);
String modelType = resultSet.getString(2);
String status = resultSet.getString(3);

assertEquals("operationTest", modelName);
assertEquals("USER_DEFINED", modelType);
if (status.equals("ACTIVE")) {
loading = false;
count++;
} else if (status.equals("LOADING")) {
break;
} else {
fail("Unexpected status of model: " + status);
}
}
}
assertEquals(1, count);
}
assertEquals(1, count);
statement.execute(dropSql);
try (ResultSet resultSet = statement.executeQuery(showSql)) {
ResultSetMetaData resultSetMetaData = resultSet.getMetaData();
checkHeader(resultSetMetaData, "ModelId,ModelType,State,Configs,Notes");
int count = 0;
count = 0;
while (resultSet.next()) {
count++;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -624,12 +624,8 @@ public void testRegularLikeInExpressions() {
try (Connection connection = EnvFactory.getEnv().getConnection();
Statement statement = connection.createStatement()) {
String query =
"SELECT s1 FROM root.vehicle.d1 WHERE s3 LIKE '_' && s3 REGEXP '[0-9]' && s3 IN ('4', '2', '3')";
"SELECT s1 FROM root.vehicle.d1 WHERE s3 LIKE '_' && s3 not REGEXP '[0-9]' && s3 IN ('4', '2', '3')";
try (ResultSet rs = statement.executeQuery(query)) {
for (int i = 2; i <= 4; i++) {
Assert.assertTrue(rs.next());
Assert.assertEquals(i, rs.getLong(1));
}
Assert.assertFalse(rs.next());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
import java.util.Set;

import static org.apache.iotdb.itbase.constant.TestConstant.DATA_TYPE_STR;
import static org.apache.iotdb.itbase.constant.TestConstant.TIMESEIRES_STR;
import static org.apache.iotdb.itbase.constant.TestConstant.TIMESERIES_STR;
import static org.apache.iotdb.itbase.constant.TestConstant.TIMESTAMP_STR;
import static org.apache.iotdb.itbase.constant.TestConstant.VALUE_STR;
import static org.junit.Assert.assertEquals;
Expand Down Expand Up @@ -136,7 +136,7 @@ public void selectAllAlignedAndNonAlignedLastTest() {
String ans =
resultSet.getString(TIMESTAMP_STR)
+ ","
+ resultSet.getString(TIMESEIRES_STR)
+ resultSet.getString(TIMESERIES_STR)
+ ","
+ resultSet.getString(VALUE_STR)
+ ","
Expand Down Expand Up @@ -171,7 +171,7 @@ public void selectAllAlignedLastWithTimeFilterTest() {
String ans =
resultSet.getString(TIMESTAMP_STR)
+ ","
+ resultSet.getString(TIMESEIRES_STR)
+ resultSet.getString(TIMESERIES_STR)
+ ","
+ resultSet.getString(VALUE_STR)
+ ","
Expand Down Expand Up @@ -208,7 +208,7 @@ public void selectSomeAlignedLastTest1() {
String ans =
resultSet.getString(TIMESTAMP_STR)
+ ","
+ resultSet.getString(TIMESEIRES_STR)
+ resultSet.getString(TIMESERIES_STR)
+ ","
+ resultSet.getString(VALUE_STR)
+ ","
Expand Down Expand Up @@ -241,7 +241,7 @@ public void selectSomeAlignedLastTest2() {
String ans =
resultSet.getString(TIMESTAMP_STR)
+ ","
+ resultSet.getString(TIMESEIRES_STR)
+ resultSet.getString(TIMESERIES_STR)
+ ","
+ resultSet.getString(VALUE_STR)
+ ","
Expand Down Expand Up @@ -275,7 +275,7 @@ public void selectSomeAlignedLastWithTimeFilterTest() {
String ans =
resultSet.getString(TIMESTAMP_STR)
+ ","
+ resultSet.getString(TIMESEIRES_STR)
+ resultSet.getString(TIMESERIES_STR)
+ ","
+ resultSet.getString(VALUE_STR)
+ ","
Expand Down Expand Up @@ -313,7 +313,7 @@ public void selectSomeAlignedAndNonAlignedLastWithTimeFilterTest() {
String ans =
resultSet.getString(TIMESTAMP_STR)
+ ","
+ resultSet.getString(TIMESEIRES_STR)
+ resultSet.getString(TIMESERIES_STR)
+ ","
+ resultSet.getString(VALUE_STR)
+ ","
Expand Down Expand Up @@ -397,13 +397,14 @@ public void testNullInMemtable() {
Statement statement = connection.createStatement()) {

try (ResultSet resultSet =
statement.executeQuery("select last gongnengma,wenben from root.ln_1.tb_6141;")) {
statement.executeQuery(
"select last gongnengma,wenben from root.ln_1.tb_6141 order by timeseries asc;")) {
int cnt = 0;
while (resultSet.next()) {
String ans =
resultSet.getString(TIMESTAMP_STR)
+ ","
+ resultSet.getString(TIMESEIRES_STR)
+ resultSet.getString(TIMESERIES_STR)
+ ","
+ resultSet.getString(VALUE_STR)
+ ","
Expand Down Expand Up @@ -431,13 +432,13 @@ public void testNullInMemtable() {

try (ResultSet resultSet =
statement.executeQuery(
"select last gongnengma,mochanshuizhuangtai,wenben from root.ln_1.tb_6141;")) {
"select last gongnengma,mochanshuizhuangtai,wenben from root.ln_1.tb_6141 order by timeseries asc;")) {
int cnt = 0;
while (resultSet.next()) {
String ans =
resultSet.getString(TIMESTAMP_STR)
+ ","
+ resultSet.getString(TIMESEIRES_STR)
+ resultSet.getString(TIMESERIES_STR)
+ ","
+ resultSet.getString(VALUE_STR)
+ ","
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
import java.util.Set;

import static org.apache.iotdb.itbase.constant.TestConstant.DATA_TYPE_STR;
import static org.apache.iotdb.itbase.constant.TestConstant.TIMESEIRES_STR;
import static org.apache.iotdb.itbase.constant.TestConstant.TIMESERIES_STR;
import static org.apache.iotdb.itbase.constant.TestConstant.TIMESTAMP_STR;
import static org.apache.iotdb.itbase.constant.TestConstant.VALUE_STR;
import static org.junit.Assert.assertEquals;
Expand Down Expand Up @@ -96,7 +96,7 @@ public void selectAllAlignedLastTest() {
String ans =
resultSet.getString(TIMESTAMP_STR)
+ ","
+ resultSet.getString(TIMESEIRES_STR)
+ resultSet.getString(TIMESERIES_STR)
+ ","
+ resultSet.getString(VALUE_STR)
+ ","
Expand Down Expand Up @@ -137,7 +137,7 @@ public void selectAllAlignedAndNonAlignedLastTest() {
String ans =
resultSet.getString(TIMESTAMP_STR)
+ ","
+ resultSet.getString(TIMESEIRES_STR)
+ resultSet.getString(TIMESERIES_STR)
+ ","
+ resultSet.getString(VALUE_STR)
+ ","
Expand Down Expand Up @@ -169,7 +169,7 @@ public void selectAllAlignedLastWithTimeFilterTest() {
String ans =
resultSet.getString(TIMESTAMP_STR)
+ ","
+ resultSet.getString(TIMESEIRES_STR)
+ resultSet.getString(TIMESERIES_STR)
+ ","
+ resultSet.getString(VALUE_STR)
+ ","
Expand Down Expand Up @@ -203,7 +203,7 @@ public void selectSomeAlignedLastTest1() {
String ans =
resultSet.getString(TIMESTAMP_STR)
+ ","
+ resultSet.getString(TIMESEIRES_STR)
+ resultSet.getString(TIMESERIES_STR)
+ ","
+ resultSet.getString(VALUE_STR)
+ ","
Expand Down Expand Up @@ -234,7 +234,7 @@ public void selectSomeAlignedLastTest2() {
String ans =
resultSet.getString(TIMESTAMP_STR)
+ ","
+ resultSet.getString(TIMESEIRES_STR)
+ resultSet.getString(TIMESERIES_STR)
+ ","
+ resultSet.getString(VALUE_STR)
+ ","
Expand Down Expand Up @@ -267,7 +267,7 @@ public void selectSomeAlignedLastWithTimeFilterTest() {
String ans =
resultSet.getString(TIMESTAMP_STR)
+ ","
+ resultSet.getString(TIMESEIRES_STR)
+ resultSet.getString(TIMESERIES_STR)
+ ","
+ resultSet.getString(VALUE_STR)
+ ","
Expand Down Expand Up @@ -303,7 +303,7 @@ public void selectSomeAlignedAndNonAlignedLastWithTimeFilterTest() {
String ans =
resultSet.getString(TIMESTAMP_STR)
+ ","
+ resultSet.getString(TIMESEIRES_STR)
+ resultSet.getString(TIMESERIES_STR)
+ ","
+ resultSet.getString(VALUE_STR)
+ ","
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
import java.util.Set;

import static org.apache.iotdb.itbase.constant.TestConstant.DATA_TYPE_STR;
import static org.apache.iotdb.itbase.constant.TestConstant.TIMESEIRES_STR;
import static org.apache.iotdb.itbase.constant.TestConstant.TIMESERIES_STR;
import static org.apache.iotdb.itbase.constant.TestConstant.TIMESTAMP_STR;
import static org.apache.iotdb.itbase.constant.TestConstant.VALUE_STR;
import static org.junit.Assert.assertEquals;
Expand Down Expand Up @@ -90,7 +90,7 @@ public void selectAllAlignedLastTest() {
String ans =
resultSet.getString(TIMESTAMP_STR)
+ ","
+ resultSet.getString(TIMESEIRES_STR)
+ resultSet.getString(TIMESERIES_STR)
+ ","
+ resultSet.getString(VALUE_STR)
+ ","
Expand Down Expand Up @@ -134,7 +134,7 @@ public void selectAllAlignedAndNonAlignedLastTest() {
String ans =
resultSet.getString(TIMESTAMP_STR)
+ ","
+ resultSet.getString(TIMESEIRES_STR)
+ resultSet.getString(TIMESERIES_STR)
+ ","
+ resultSet.getString(VALUE_STR)
+ ","
Expand Down Expand Up @@ -169,7 +169,7 @@ public void selectAllAlignedLastWithTimeFilterTest() {
String ans =
resultSet.getString(TIMESTAMP_STR)
+ ","
+ resultSet.getString(TIMESEIRES_STR)
+ resultSet.getString(TIMESERIES_STR)
+ ","
+ resultSet.getString(VALUE_STR)
+ ","
Expand Down Expand Up @@ -206,7 +206,7 @@ public void selectSomeAlignedLastTest1() {
String ans =
resultSet.getString(TIMESTAMP_STR)
+ ","
+ resultSet.getString(TIMESEIRES_STR)
+ resultSet.getString(TIMESERIES_STR)
+ ","
+ resultSet.getString(VALUE_STR)
+ ","
Expand Down Expand Up @@ -239,7 +239,7 @@ public void selectSomeAlignedLastTest2() {
String ans =
resultSet.getString(TIMESTAMP_STR)
+ ","
+ resultSet.getString(TIMESEIRES_STR)
+ resultSet.getString(TIMESERIES_STR)
+ ","
+ resultSet.getString(VALUE_STR)
+ ","
Expand Down Expand Up @@ -273,7 +273,7 @@ public void selectSomeAlignedLastWithTimeFilterTest() {
String ans =
resultSet.getString(TIMESTAMP_STR)
+ ","
+ resultSet.getString(TIMESEIRES_STR)
+ resultSet.getString(TIMESERIES_STR)
+ ","
+ resultSet.getString(VALUE_STR)
+ ","
Expand Down Expand Up @@ -310,7 +310,7 @@ public void selectSomeAlignedAndNonAlignedLastWithTimeFilterTest() {
String ans =
resultSet.getString(TIMESTAMP_STR)
+ ","
+ resultSet.getString(TIMESEIRES_STR)
+ resultSet.getString(TIMESERIES_STR)
+ ","
+ resultSet.getString(VALUE_STR)
+ ","
Expand Down
Loading

0 comments on commit 9bc6c8f

Please sign in to comment.