healchow commented on code in PR #5502:
URL: https://github.com/apache/inlong/pull/5502#discussion_r947484121


##########
inlong-sort/sort-connectors/doris/README.md:
##########
@@ -0,0 +1,48 @@
+# Overview
+The sort-connector-doris connector comes from doris-flink-connector officially 
provided by apache doris.
+The flink-doris-connector-1.13_2.12 version is currently introduced. If you 
need to use scala 2.11, you need to 
+download the flink-doris-connector source code of the apache doris community 
and create a new branch from 
+tag 1.13_2.11-1.0.3.
+
+# checkout and new branch
+checkout new branch: `git checkout -b 1.13_2.11-1.0.3`
+
+# Install thrift 0.13.0
+The flink-doris-connector source code uses thrift, and thrift needs to be 
installed before compiling.
+The installation steps are as follows:
+
+## Windows:
+1. Download: `http://archive.apache.org/dist/thrift/0.13.0/thrift-0.13.0.exe`
+2. Modify thrift-0.13.0.exe to thrift
+
+## MacOS:
+1. Download: `brew install thrift@0.13.0`
+2. Default address: /opt/homebrew/Cellar/thrift@0.13.0/0.13.0/bin/thrift
+
+Note: Executing `brew install thrift@0.13.0` on MacOS may report an error that 
the version cannot be found. 
+The solution is as follows, execute it in the terminal:
+1. `brew tap-new $USER/local-tap`
+2. `brew extract --version='0.13.0' thrift $USER/local-tap`
+3. `brew install thrift@0.13.0`
+   Reference link: 
`https://gist.github.com/tonydeng/02e571f273d6cce4230dc8d5f394493c`
+
+## Linux:
+1. Download source package:`wget 
https://archive.apache.org/dist/thrift/0.13.0/thrift-0.13.0.tar.gz`
+2. Install dependencies:`yum install -y autoconf automake libtool cmake 
ncurses-devel openssl-devel 
+lzo-devel zlib-devel gcc gcc-c++`
+3. `tar zxvf thrift-0.13.0.tar.gz`
+4. `cd thrift-0.13.0`
+5. `./configure --without-tests`
+6. `make`
+7. `make install`
+
+Check the version after installation is complete:thrift --version
+
+# package flink-doris-connector

Review Comment:
   Change to "Package flink-doris-connector".



##########
inlong-sort/sort-connectors/doris/README.md:
##########
@@ -0,0 +1,48 @@
+# Overview
+The sort-connector-doris connector comes from doris-flink-connector officially 
provided by apache doris.
+The flink-doris-connector-1.13_2.12 version is currently introduced. If you 
need to use scala 2.11, you need to 
+download the flink-doris-connector source code of the apache doris community 
and create a new branch from 
+tag 1.13_2.11-1.0.3.
+
+# checkout and new branch

Review Comment:
   Change to "Checkout a new branch".



##########
inlong-sort/sort-connectors/doris/README.md:
##########
@@ -0,0 +1,48 @@
+# Overview
+The sort-connector-doris connector comes from doris-flink-connector officially 
provided by apache doris.
+The flink-doris-connector-1.13_2.12 version is currently introduced. If you 
need to use scala 2.11, you need to 
+download the flink-doris-connector source code of the apache doris community 
and create a new branch from 
+tag 1.13_2.11-1.0.3.
+
+# checkout and new branch
+checkout new branch: `git checkout -b 1.13_2.11-1.0.3`
+
+# Install thrift 0.13.0
+The flink-doris-connector source code uses thrift, and thrift needs to be 
installed before compiling.
+The installation steps are as follows:
+
+## Windows:
+1. Download: `http://archive.apache.org/dist/thrift/0.13.0/thrift-0.13.0.exe`
+2. Modify thrift-0.13.0.exe to thrift
+
+## MacOS:
+1. Download: `brew install thrift@0.13.0`
+2. Default address: /opt/homebrew/Cellar/thrift@0.13.0/0.13.0/bin/thrift
+
+Note: Executing `brew install thrift@0.13.0` on MacOS may report an error that 
the version cannot be found. 
+The solution is as follows, execute it in the terminal:
+1. `brew tap-new $USER/local-tap`
+2. `brew extract --version='0.13.0' thrift $USER/local-tap`
+3. `brew install thrift@0.13.0`
+   Reference link: 
`https://gist.github.com/tonydeng/02e571f273d6cce4230dc8d5f394493c`
+
+## Linux:
+1. Download source package:`wget 
https://archive.apache.org/dist/thrift/0.13.0/thrift-0.13.0.tar.gz`
+2. Install dependencies:`yum install -y autoconf automake libtool cmake 
ncurses-devel openssl-devel 
+lzo-devel zlib-devel gcc gcc-c++`
+3. `tar zxvf thrift-0.13.0.tar.gz`
+4. `cd thrift-0.13.0`
+5. `./configure --without-tests`
+6. `make`
+7. `make install`
+
+Check the version after installation is complete:thrift --version
+
+# package flink-doris-connector
+`mvn clean package -Dscala.version=2.11 -Dflink.version=1.13.5 
-Dflink.minor.version=1.13 

Review Comment:
   For more than one line code, suggested use three \`, such as:
   ```
   \``` (remove the \)
   mvn clean package -Dscala.version=2.11 -Dflink.version=1.13.5 
-Dflink.minor.version=1.13 
   -Denv.THRIFT_BIN=/path/to/thrift
   \```
   ```



##########
inlong-sort/sort-core/src/test/java/org/apache/inlong/sort/parser/DorisExtractToMySqlLoadTest.java:
##########
@@ -0,0 +1,141 @@
+/*
+ * 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.
+ */
+
+package org.apache.inlong.sort.parser;
+
+import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
+import org.apache.flink.table.api.EnvironmentSettings;
+import org.apache.flink.table.api.bridge.java.StreamTableEnvironment;
+import org.apache.flink.test.util.AbstractTestBase;
+import org.apache.inlong.sort.formats.common.DecimalFormatInfo;
+import org.apache.inlong.sort.formats.common.DoubleFormatInfo;
+import org.apache.inlong.sort.formats.common.IntFormatInfo;
+import org.apache.inlong.sort.formats.common.StringFormatInfo;
+import org.apache.inlong.sort.parser.impl.FlinkSqlParser;
+import org.apache.inlong.sort.parser.result.ParseResult;
+import org.apache.inlong.sort.protocol.FieldInfo;
+import org.apache.inlong.sort.protocol.GroupInfo;
+import org.apache.inlong.sort.protocol.StreamInfo;
+import org.apache.inlong.sort.protocol.node.Node;
+import org.apache.inlong.sort.protocol.node.extract.DorisExtractNode;
+import org.apache.inlong.sort.protocol.node.load.MySqlLoadNode;
+import org.apache.inlong.sort.protocol.transformation.FieldRelation;
+import org.apache.inlong.sort.protocol.transformation.FilterFunction;
+import org.apache.inlong.sort.protocol.transformation.relation.NodeRelation;
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * Test for {@link DorisExtractNode}
+ */
+public class DorisExtractToMySqlLoadTest extends AbstractTestBase {
+
+    private DorisExtractNode buildDorisExtractNode() {
+        List<FieldInfo> fields = Arrays.asList(
+                new FieldInfo("dt", new StringFormatInfo()),
+                new FieldInfo("id", new IntFormatInfo()),
+                new FieldInfo("name", new StringFormatInfo()),
+                new FieldInfo("age", new IntFormatInfo()),
+                new FieldInfo("price", new DecimalFormatInfo()),
+                new FieldInfo("sale", new DoubleFormatInfo())
+        );
+        return new DorisExtractNode("1", "doris_input", fields,
+                null, null, "localhost:8030", "root",
+                "000000", "test.test1");
+    }
+
+    private Node buildMysqlLoadNode() {

Review Comment:
   `buildMySqlLoadNode`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@inlong.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to