Skip to content

Commit 3ba6e49

Browse files
committed
Merge remote-tracking branch 'origin/1.8_v3.8.1' into v1.8.0_dev
2 parents 6cde615 + 57f2d67 commit 3ba6e49

File tree

6 files changed

+131
-2
lines changed

6 files changed

+131
-2
lines changed

core/src/main/java/com/dtstack/flink/sql/Main.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
import com.dtstack.flink.sql.sink.StreamSinkFactory;
4141
import com.dtstack.flink.sql.source.StreamSourceFactory;
4242
import com.dtstack.flink.sql.util.DtStringUtil;
43+
import com.dtstack.flink.sql.util.PropertiesUtils;
4344
import com.dtstack.flink.sql.watermarker.WaterMarkerAssigner;
4445
import com.dtstack.flink.sql.util.FlinkUtil;
4546
import com.dtstack.flink.sql.util.PluginUtil;
@@ -305,6 +306,8 @@ private static void registerTable(SqlTree sqlTree, StreamExecutionEnvironment en
305306
}
306307

307308
private static StreamExecutionEnvironment getStreamExeEnv(Properties confProperties, String deployMode) throws Exception {
309+
confProperties = PropertiesUtils.propertiesTrim(confProperties);
310+
308311
StreamExecutionEnvironment env = !ClusterMode.local.name().equals(deployMode) ?
309312
StreamExecutionEnvironment.getExecutionEnvironment() :
310313
new MyLocalStreamEnvironment();
@@ -340,4 +343,5 @@ private static StreamExecutionEnvironment getStreamExeEnv(Properties confPropert
340343
FlinkUtil.openCheckpoint(env, confProperties);
341344
return env;
342345
}
346+
343347
}

core/src/main/java/com/dtstack/flink/sql/udf/TimestampUdf.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
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, 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+
19+
120
package com.dtstack.flink.sql.udf;
221

322
import org.apache.flink.table.functions.FunctionContext;

core/src/main/java/com/dtstack/flink/sql/util/JDBCUtils.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
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, 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+
19+
120
package com.dtstack.flink.sql.util;
221

322
import org.slf4j.Logger;

core/src/main/java/com/dtstack/flink/sql/util/ParseUtils.java

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,47 @@
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, 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+
19+
/*
20+
* Licensed to the Apache Software Foundation (ASF) under one
21+
* or more contributor license agreements. See the NOTICE file
22+
* distributed with this work for additional information
23+
* regarding copyright ownership. The ASF licenses this file
24+
* to you under the Apache License, Version 2.0 (the
25+
* "License"); you may not use this file except in compliance
26+
* with the License. You may obtain a copy of the License at
27+
*
28+
* http://www.apache.org/licenses/LICENSE-2.0
29+
*
30+
* Unless required by applicable law or agreed to in writing, software
31+
* distributed under the License is distributed on an "AS IS" BASIS,
32+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
33+
* See the License for the specific language governing permissions and
34+
* limitations under the License.
35+
*/
36+
137
package com.dtstack.flink.sql.util;
238

339
import org.apache.calcite.sql.SqlBasicCall;
440
import org.apache.calcite.sql.SqlKind;
541
import org.apache.calcite.sql.SqlNode;
642
import org.apache.commons.lang3.StringUtils;
743

8-
import java.util.HashSet;
944
import java.util.List;
10-
import java.util.Set;
1145

1246
/**
1347
* @Auther: jiangjunjie
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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, 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+
19+
20+
package com.dtstack.flink.sql.util;
21+
22+
import java.util.Properties;
23+
24+
public class PropertiesUtils {
25+
public static Properties propertiesTrim(Properties confProperties) {
26+
Properties properties = new Properties();
27+
confProperties.forEach(
28+
(k, v) -> {
29+
properties.put(k.toString().trim(), v.toString().trim());
30+
}
31+
);
32+
return properties;
33+
}
34+
}

core/src/main/java/com/dtstack/flink/sql/watermarker/AbsCustomerWaterMarker.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
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, 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+
19+
120
package com.dtstack.flink.sql.watermarker;
221

322
import com.dtstack.flink.sql.metric.EventDelayGauge;

0 commit comments

Comments
 (0)