Skip to content

Commit 57f2d67

Browse files
committed
Merge branch '1.8_3.8.1_fieldTrim' into '1.8_v3.8.1'
属性trim See merge request !75
2 parents a876b55 + 64ba57e commit 57f2d67

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
@@ -37,6 +37,7 @@
3737
import com.dtstack.flink.sql.sink.StreamSinkFactory;
3838
import com.dtstack.flink.sql.source.StreamSourceFactory;
3939
import com.dtstack.flink.sql.util.DtStringUtil;
40+
import com.dtstack.flink.sql.util.PropertiesUtils;
4041
import com.dtstack.flink.sql.watermarker.WaterMarkerAssigner;
4142
import com.dtstack.flink.sql.util.FlinkUtil;
4243
import com.dtstack.flink.sql.util.PluginUtil;
@@ -329,6 +330,8 @@ private static void registerTable(SqlTree sqlTree, StreamExecutionEnvironment en
329330
}
330331

331332
private static StreamExecutionEnvironment getStreamExeEnv(Properties confProperties, String deployMode) throws Exception {
333+
confProperties = PropertiesUtils.propertiesTrim(confProperties);
334+
332335
StreamExecutionEnvironment env = !ClusterMode.local.name().equals(deployMode) ?
333336
StreamExecutionEnvironment.getExecutionEnvironment() :
334337
new MyLocalStreamEnvironment();
@@ -370,4 +373,5 @@ private static StreamExecutionEnvironment getStreamExeEnv(Properties confPropert
370373

371374
return env;
372375
}
376+
373377
}

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)