You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "wuwenchi (via GitHub)" <gi...@apache.org> on 2024/07/17 09:27:44 UTC
[PR] [feature](paimon/iceberg)add a docker that can directly pull up all the relevant environments of paimon/iceberg/doris [doris]
wuwenchi opened a new pull request, #38009:
URL: https://github.com/apache/doris/pull/38009
## Proposed changes
add a docker that can directly pull up all the relevant environments of paimon/iceberg/doris
--
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-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [feature](paimon/iceberg)add a docker that can directly pull up all the relevant environments of paimon/iceberg/doris [doris]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #38009:
URL: https://github.com/apache/doris/pull/38009#issuecomment-2233377900
#### `sh-checker report`
To get the full details, please check in the [job]("https://github.com/apache/doris/actions/runs/9975484106") output.
<details>
<summary>shellcheck errors</summary>
```
'shellcheck ' found no issues.
```
</details>
<details>
<summary>shfmt errors</summary>
```
'shfmt ' returned error 1 finding the following formatting issues:
----------
--- samples/datalake/iceberg_and_paimon/start_doris_client.sh.orig
+++ samples/datalake/iceberg_and_paimon/start_doris_client.sh
--- samples/datalake/iceberg_and_paimon/start_flink_client.sh.orig
+++ samples/datalake/iceberg_and_paimon/start_flink_client.sh
--- samples/datalake/iceberg_and_paimon/start_spark_iceberg_client.sh.orig
+++ samples/datalake/iceberg_and_paimon/start_spark_iceberg_client.sh
--- samples/datalake/iceberg_and_paimon/start_spark_paimon_client.sh.orig
+++ samples/datalake/iceberg_and_paimon/start_spark_paimon_client.sh
--- samples/datalake/iceberg_and_paimon/stop_all.sh.orig
+++ samples/datalake/iceberg_and_paimon/stop_all.sh
----------
You can reformat the above files to meet shfmt's requirements by typing:
shfmt -w filename
```
</details>
--
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-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [feature](paimon/iceberg)add a docker that can directly pull up all the relevant environments of paimon/iceberg/doris [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #38009:
URL: https://github.com/apache/doris/pull/38009#issuecomment-2232855597
Thank you for your contribution to Apache Doris.
Don't know what should be done next? See [How to process your PR](https://cwiki.apache.org/confluence/display/DORIS/How+to+process+your+PR)
Since 2024-03-18, the Document has been moved to [doris-website](https://github.com/apache/doris-website).
See [Doris Document](https://cwiki.apache.org/confluence/display/DORIS/Doris+Document).
--
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-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [feature](paimon/iceberg)add a docker that can directly pull up all the relevant environments of paimon/iceberg/doris [doris]
Posted by "morningman (via GitHub)" <gi...@apache.org>.
morningman commented on code in PR #38009:
URL: https://github.com/apache/doris/pull/38009#discussion_r1680849770
##########
samples/datalake/iceberg_and_paimon/start_all.sh:
##########
@@ -0,0 +1,104 @@
+set -e
+
+DORIS_PACKAGE=apache-doris-2.1.4-bin-x64
+DORIS_DOWNLOAD_URL=https://apache-doris-releases.oss-accelerate.aliyuncs.com
+
+download_source_file() {
+ local FILE_PATH="$1"
+ local EXPECTED_MD5="$2"
+ local DOWNLOAD_URL="$3"
+
+ echo "solve for ${FILE_PATH} ..."
+
+ if [[ -f "${FILE_PATH}" ]]; then
+ local FILE_MD5
+ echo "compare md5sum ..."
+ FILE_MD5=$(md5sum "${FILE_PATH}" | awk '{ print $1 }')
+
+ if [[ "${FILE_MD5}" = "${EXPECTED_MD5}" ]]; then
+ echo "${FILE_PATH} is ready!"
+ else
+ echo "${FILE_PATH} is broken, Redownloading ..."
+ rm "${FILE_PATH}"
+ wget "${DOWNLOAD_URL}"/"${FILE_PATH}"
+ fi
+ else
+ echo "downloading ${FILE_PATH} ..."
+ wget "${DOWNLOAD_URL}"/"${FILE_PATH}"
+ fi
+}
+
+
+curdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
+cd ${curdir} || exit
+
+if [[ ! -d "packages" ]]; then
+ mkdir packages
+fi
+cd packages || exit
+
+download_source_file "${DORIS_PACKAGE}.tar.gz" "a4d8bc9730aca3a51294e87d7d5b3e8e" "$DORIS_DOWNLOAD_URL"
+download_source_file "jdk-8u202-linux-x64.tar.gz" "0029351f7a946f6c05b582100c7d45b7" "https://repo.huaweicloud.com/java/jdk/8u202-b08"
+download_source_file "iceberg-aws-bundle-1.5.2.jar" "7087ac697254f8067d0f813521542263" "https://repo1.maven.org/maven2/org/apache/iceberg/iceberg-aws-bundle/1.5.2"
+download_source_file "iceberg-flink-runtime-1.18-1.5.2.jar" "8e895288e6770eea69ea05ffbc918c1b" "https://repo1.maven.org/maven2/org/apache/iceberg/iceberg-flink-runtime-1.18/1.5.2"
+download_source_file "flink-connector-jdbc-3.1.2-1.18.jar" "5c99b637721dd339e10725b81ccedb60" "https://repo1.maven.org/maven2/org/apache/flink/flink-connector-jdbc/3.1.2-1.18"
+download_source_file "paimon-s3-0.8.0.jar" "3e510c634a21cbcdca4fd3b85786a20c" "https://repo1.maven.org/maven2/org/apache/paimon/paimon-s3/0.8.0"
+download_source_file "paimon-flink-1.18-0.8.0.jar" "f590d94af1b923a7c68152b558d5b25b" "https://repo1.maven.org/maven2/org/apache/paimon/paimon-flink-1.18/0.8.0"
+download_source_file "paimon-spark-3.5-0.8.0.jar" "963d0c17d69034ecf77816f64863fc51" "https://repo1.maven.org/maven2/org/apache/paimon/paimon-spark-3.5/0.8.0"
+download_source_file "flink-shaded-hadoop-2-uber-2.8.3-10.0.jar" "f6f0be5b9cbebfd43e38121b209f4ecc" "https://repo1.maven.org/maven2/org/apache/flink/flink-shaded-hadoop-2-uber/2.8.3-10.0"
+download_source_file "flink-s3-fs-hadoop-1.18.0.jar" "60b75e0fdc5ed05f1213b593c4b66556" "https://repo1.maven.org/maven2/org/apache/flink/flink-s3-fs-hadoop/1.18.0"
+
+if [[ ! -f "jdk1.8.0_202/SUCCESS" ]]; then
+ echo "Prepare jdk8 environment"
+ if [[ -d "jdk1.8.0_202" ]]; then
+ echo "Remove broken jdk1.8.0_202"
+ rm -rf jdk1.8.0_202
+ fi
+ echo "Unpackage jdk1.8.0_202"
+ tar xzf jdk-8u202-linux-x64.tar.gz
+ touch jdk1.8.0_202/SUCCESS
+fi
+
+if [[ ! -f "doris-bin/SUCCESS" ]]; then
+ echo "Prepare ${DORIS_PACKAGE} environment"
+ if [[ -d "doris-bin" ]]; then
+ echo "Remove broken ${DORIS_PACKAGE}"
+ rm -rf doris-bin
+ fi
+ echo "Unpackage ${DORIS_PACKAGE}"
+ tar xzf "${DORIS_PACKAGE}".tar.gz
+ mv "${DORIS_PACKAGE}" doris-bin
+ touch doris-bin/SUCCESS
+fi
+
+if [[ ! -f "jars/SUCCESS" ]]; then
+ echo "Prepare jars environment"
+ if [[ -d "jars" ]]; then
+ echo "Remove broken jars"
+ rm -rf jars
+ fi
+ mkdir jars
+ cp *.jar jars/
+ touch jars/SUCCESS
+fi
+
+cd ../
+echo $PWD
+
+echo "Start docker-compose..."
+docker compose -f docker-compose.yml --env-file docker-compose.env up -d
Review Comment:
add `sudo` for all `docker` command
##########
samples/datalake/iceberg_and_paimon/README.md:
##########
@@ -0,0 +1,343 @@
+# doris-iceberg-paimon-compose
+
+
+## Launch Docker Compose
+First, we need to ensure the environmental parameters of the machine.
+
+```
+sysctl -w vm.max_map_count=2000000
+```
+
+We can then start all the required containers via the script.
+
+```
+bash start_all.sh
+```
+It will start a set of docker, the environment includes:
+- doris
+- iceberg
+- paimon
+- flink
+- spark
+
+And it will automatically create an iceberg table and a paimon table. We can use these tables directly to experience doris.
+
+
+## paimon table test
+
+Enter the flink client.
+
+```
+bash start_flink_client.sh
+```
+
+Here is a table that has been created.
+
+```sql
+
+Flink SQL> use paimon.db_paimon;
+[INFO] Execute statement succeed.
+
+Flink SQL> show tables;
++------------+
+| table name |
++------------+
+| customer |
++------------+
+1 row in set
+
+Flink SQL> show create table tb_paimon;
Review Comment:
```suggestion
Flink SQL> show create table custom;
```
##########
samples/datalake/iceberg_and_paimon/start_all.sh:
##########
@@ -0,0 +1,104 @@
+set -e
+
+DORIS_PACKAGE=apache-doris-2.1.4-bin-x64
+DORIS_DOWNLOAD_URL=https://apache-doris-releases.oss-accelerate.aliyuncs.com
+
+download_source_file() {
+ local FILE_PATH="$1"
+ local EXPECTED_MD5="$2"
+ local DOWNLOAD_URL="$3"
+
+ echo "solve for ${FILE_PATH} ..."
+
+ if [[ -f "${FILE_PATH}" ]]; then
+ local FILE_MD5
+ echo "compare md5sum ..."
+ FILE_MD5=$(md5sum "${FILE_PATH}" | awk '{ print $1 }')
+
+ if [[ "${FILE_MD5}" = "${EXPECTED_MD5}" ]]; then
+ echo "${FILE_PATH} is ready!"
+ else
+ echo "${FILE_PATH} is broken, Redownloading ..."
+ rm "${FILE_PATH}"
+ wget "${DOWNLOAD_URL}"/"${FILE_PATH}"
+ fi
+ else
+ echo "downloading ${FILE_PATH} ..."
+ wget "${DOWNLOAD_URL}"/"${FILE_PATH}"
+ fi
+}
+
+
+curdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
+cd ${curdir} || exit
+
+if [[ ! -d "packages" ]]; then
+ mkdir packages
+fi
+cd packages || exit
+
+download_source_file "${DORIS_PACKAGE}.tar.gz" "a4d8bc9730aca3a51294e87d7d5b3e8e" "$DORIS_DOWNLOAD_URL"
+download_source_file "jdk-8u202-linux-x64.tar.gz" "0029351f7a946f6c05b582100c7d45b7" "https://repo.huaweicloud.com/java/jdk/8u202-b08"
+download_source_file "iceberg-aws-bundle-1.5.2.jar" "7087ac697254f8067d0f813521542263" "https://repo1.maven.org/maven2/org/apache/iceberg/iceberg-aws-bundle/1.5.2"
+download_source_file "iceberg-flink-runtime-1.18-1.5.2.jar" "8e895288e6770eea69ea05ffbc918c1b" "https://repo1.maven.org/maven2/org/apache/iceberg/iceberg-flink-runtime-1.18/1.5.2"
+download_source_file "flink-connector-jdbc-3.1.2-1.18.jar" "5c99b637721dd339e10725b81ccedb60" "https://repo1.maven.org/maven2/org/apache/flink/flink-connector-jdbc/3.1.2-1.18"
+download_source_file "paimon-s3-0.8.0.jar" "3e510c634a21cbcdca4fd3b85786a20c" "https://repo1.maven.org/maven2/org/apache/paimon/paimon-s3/0.8.0"
+download_source_file "paimon-flink-1.18-0.8.0.jar" "f590d94af1b923a7c68152b558d5b25b" "https://repo1.maven.org/maven2/org/apache/paimon/paimon-flink-1.18/0.8.0"
+download_source_file "paimon-spark-3.5-0.8.0.jar" "963d0c17d69034ecf77816f64863fc51" "https://repo1.maven.org/maven2/org/apache/paimon/paimon-spark-3.5/0.8.0"
+download_source_file "flink-shaded-hadoop-2-uber-2.8.3-10.0.jar" "f6f0be5b9cbebfd43e38121b209f4ecc" "https://repo1.maven.org/maven2/org/apache/flink/flink-shaded-hadoop-2-uber/2.8.3-10.0"
+download_source_file "flink-s3-fs-hadoop-1.18.0.jar" "60b75e0fdc5ed05f1213b593c4b66556" "https://repo1.maven.org/maven2/org/apache/flink/flink-s3-fs-hadoop/1.18.0"
+
+if [[ ! -f "jdk1.8.0_202/SUCCESS" ]]; then
+ echo "Prepare jdk8 environment"
+ if [[ -d "jdk1.8.0_202" ]]; then
+ echo "Remove broken jdk1.8.0_202"
+ rm -rf jdk1.8.0_202
+ fi
+ echo "Unpackage jdk1.8.0_202"
+ tar xzf jdk-8u202-linux-x64.tar.gz
+ touch jdk1.8.0_202/SUCCESS
+fi
+
+if [[ ! -f "doris-bin/SUCCESS" ]]; then
+ echo "Prepare ${DORIS_PACKAGE} environment"
+ if [[ -d "doris-bin" ]]; then
+ echo "Remove broken ${DORIS_PACKAGE}"
+ rm -rf doris-bin
+ fi
+ echo "Unpackage ${DORIS_PACKAGE}"
+ tar xzf "${DORIS_PACKAGE}".tar.gz
+ mv "${DORIS_PACKAGE}" doris-bin
+ touch doris-bin/SUCCESS
+fi
+
+if [[ ! -f "jars/SUCCESS" ]]; then
+ echo "Prepare jars environment"
+ if [[ -d "jars" ]]; then
+ echo "Remove broken jars"
+ rm -rf jars
+ fi
+ mkdir jars
+ cp *.jar jars/
+ touch jars/SUCCESS
+fi
+
+cd ../
+echo $PWD
+
+echo "Start docker-compose..."
+docker compose -f docker-compose.yml --env-file docker-compose.env up -d
+
+echo "Start init iceberg and paimon tables..."
+docker exec -it doris-iceberg-paimon-jobmanager sql-client.sh -f /opt/flink/sql/init_tables.sql >> init.log
+
+echo "Start prepare data for tables..."
+docker exec -it doris-iceberg-paimon-spark spark-sql --conf spark.sql.extensions=org.apache.paimon.spark.extensions.PaimonSparkSessionExtensions -f /opt/sql/prepare_data.sql >> init.log
+
+echo "============================================================================="
+echo "Success to launch doris+iceberg+paimon+flink+spark+minio environments!"
+echo "You can:"
+echo " 'bash start_doris.sh' to login into doris"
Review Comment:
```suggestion
echo " 'bash start_doris_client.sh' to login into doris"
```
##########
samples/datalake/iceberg_and_paimon/README.md:
##########
@@ -0,0 +1,343 @@
+# doris-iceberg-paimon-compose
+
+
+## Launch Docker Compose
+First, we need to ensure the environmental parameters of the machine.
+
+```
+sysctl -w vm.max_map_count=2000000
+```
+
+We can then start all the required containers via the script.
+
+```
+bash start_all.sh
+```
+It will start a set of docker, the environment includes:
+- doris
+- iceberg
+- paimon
+- flink
+- spark
+
+And it will automatically create an iceberg table and a paimon table. We can use these tables directly to experience doris.
+
+
+## paimon table test
+
+Enter the flink client.
+
+```
+bash start_flink_client.sh
+```
+
+Here is a table that has been created.
+
+```sql
+
+Flink SQL> use paimon.db_paimon;
+[INFO] Execute statement succeed.
+
+Flink SQL> show tables;
++------------+
+| table name |
++------------+
+| customer |
++------------+
+1 row in set
+
+Flink SQL> show create table tb_paimon;
++------------------------------------------------------------------------+
+| result |
++------------------------------------------------------------------------+
+| CREATE TABLE `paimon`.`db_paimon`.`customer` (
+ `c_custkey` INT NOT NULL,
+ `c_name` VARCHAR(25),
+ `c_address` VARCHAR(40),
+ `c_nationkey` INT NOT NULL,
+ `c_phone` CHAR(15),
+ `c_acctbal` DECIMAL(12, 2),
+ `c_mktsegment` CHAR(10),
+ `c_comment` VARCHAR(117),
+ CONSTRAINT `PK_c_custkey_c_nationkey` PRIMARY KEY (`c_custkey`, `c_nationkey`) NOT ENFORCED
+) PARTITIONED BY (`c_nationkey`)
+WITH (
+ 'bucket' = '1',
+ 'path' = 's3://warehouse/wh/db_paimon.db/customer',
+ 'deletion-vectors.enabled' = 'true'
+)
+ |
++-------------------------------------------------------------------------+
+1 row in set
+
+Flink SQL> desc customer;
++--------------+----------------+-------+-----------------------------+--------+-----------+
+| name | type | null | key | extras | watermark |
++--------------+----------------+-------+-----------------------------+--------+-----------+
+| c_custkey | INT | FALSE | PRI(c_custkey, c_nationkey) | | |
+| c_name | VARCHAR(25) | TRUE | | | |
+| c_address | VARCHAR(40) | TRUE | | | |
+| c_nationkey | INT | FALSE | PRI(c_custkey, c_nationkey) | | |
+| c_phone | CHAR(15) | TRUE | | | |
+| c_acctbal | DECIMAL(12, 2) | TRUE | | | |
+| c_mktsegment | CHAR(10) | TRUE | | | |
+| c_comment | VARCHAR(117) | TRUE | | | |
++--------------+----------------+-------+-----------------------------+--------+-----------+
+8 rows in set
+```
+
+This table already has some data.
+
+```sql
+Flink SQL> select * from customer order by c_custkey limit 4;
++-----------+--------------------+--------------------------------+-------------+-----------------+-----------+--------------+--------------------------------+
+| c_custkey | c_name | c_address | c_nationkey | c_phone | c_acctbal | c_mktsegment | c_comment |
++-----------+--------------------+--------------------------------+-------------+-----------------+-----------+--------------+--------------------------------+
+| 1 | Customer#000000001 | IVhzIApeRb ot,c,E | 15 | 25-989-741-2988 | 711.56 | BUILDING | to the even, regular platel... |
+| 2 | Customer#000000002 | XSTf4,NCwDVaWNe6tEgvwfmRchLXak | 13 | 23-768-687-3665 | 121.65 | AUTOMOBILE | l accounts. blithely ironic... |
+| 3 | Customer#000000003 | MG9kdTD2WBHm | 1 | 11-719-748-3364 | 7498.12 | AUTOMOBILE | deposits eat slyly ironic,... |
+| 32 | Customer#000000032 | jD2xZzi UmId,DCtNBLXKj9q0Tl... | 15 | 25-430-914-2194 | 3471.53 | BUILDING | cial ideas. final, furious ... |
++-----------+--------------------+--------------------------------+-------------+-----------------+-----------+--------------+--------------------------------+
+4 rows in set
+
+Flink SQL> select * from customer order by c_custkey desc limit 4;
++-----------+--------------------+--------------------------------+-------------+-----------------+-----------+--------------+--------------------------------+
+| c_custkey | c_name | c_address | c_nationkey | c_phone | c_acctbal | c_mktsegment | c_comment |
++-----------+--------------------+--------------------------------+-------------+-----------------+-----------+--------------+--------------------------------+
+| 149987 | Customer#000149987 | P6z8nSIgW55cSydfa1bZ | 8 | 18-187-349-6326 | 5338.96 | HOUSEHOLD | aggle carefully quickly reg... |
+| 149986 | Customer#000149986 | HyEJpj2jvEqt,,pA50NOvuTP | 7 | 17-654-752-5642 | 1251.17 | BUILDING | enticingly carefully carefu... |
+| 149985 | Customer#000149985 | y4m,kcxXX6ZtGTJGxavBTJf52OM... | 22 | 32-595-455-4078 | 6012.98 | MACHINERY | kages affix against the bli... |
+| 149984 | Customer#000149984 | ZBEyUfjRsVtUNSIv9dnnyoPYeQw... | 12 | 22-283-613-7016 | 6567.62 | HOUSEHOLD | ges integrate along the bli... |
++-----------+--------------------+--------------------------------+-------------+-----------------+-----------+--------------+--------------------------------+
+4 rows in set
+```
+
+Now we can query this table through doris.
+
+```
+bash start_doris_client.sh
+```
+
+After entering the doris client, the paimon catalog has been created here, so the data of the paimon table can be directly queried.
+
+```sql
+mysql> use paimon.db_paimon;
+Reading table information for completion of table and column names
+You can turn off this feature to get a quicker startup with -A
+
+Database changed
+mysql> show tables;
++---------------------+
+| Tables_in_db_paimon |
++---------------------+
+| customer |
++---------------------+
+1 row in set (0.00 sec)
+
+mysql> select * from customer order by c_custkey limit 4;
++-----------+--------------------+---------------------------------------+-------------+-----------------+-----------+--------------+--------------------------------------------------------------------------------------------------------+
+| c_custkey | c_name | c_address | c_nationkey | c_phone | c_acctbal | c_mktsegment | c_comment |
++-----------+--------------------+---------------------------------------+-------------+-----------------+-----------+--------------+--------------------------------------------------------------------------------------------------------+
+| 1 | Customer#000000001 | IVhzIApeRb ot,c,E | 15 | 25-989-741-2988 | 711.56 | BUILDING | to the even, regular platelets. regular, ironic epitaphs nag e |
+| 2 | Customer#000000002 | XSTf4,NCwDVaWNe6tEgvwfmRchLXak | 13 | 23-768-687-3665 | 121.65 | AUTOMOBILE | l accounts. blithely ironic theodolites integrate boldly: caref |
+| 3 | Customer#000000003 | MG9kdTD2WBHm | 1 | 11-719-748-3364 | 7498.12 | AUTOMOBILE | deposits eat slyly ironic, even instructions. express foxes detect slyly. blithely even accounts abov |
+| 32 | Customer#000000032 | jD2xZzi UmId,DCtNBLXKj9q0Tlp2iQ6ZcO3J | 15 | 25-430-914-2194 | 3471.53 | BUILDING | cial ideas. final, furious requests across the e |
++-----------+--------------------+---------------------------------------+-------------+-----------------+-----------+--------------+--------------------------------------------------------------------------------------------------------+
+4 rows in set (1.89 sec)
+
+mysql> select * from customer order by c_custkey desc limit 4;
++-----------+--------------------+---------------------------------------+-------------+-----------------+-----------+--------------+-------------------------------------------------------------------------------------------------------+
+| c_custkey | c_name | c_address | c_nationkey | c_phone | c_acctbal | c_mktsegment | c_comment |
++-----------+--------------------+---------------------------------------+-------------+-----------------+-----------+--------------+-------------------------------------------------------------------------------------------------------+
+| 149987 | Customer#000149987 | P6z8nSIgW55cSydfa1bZ | 8 | 18-187-349-6326 | 5338.96 | HOUSEHOLD | aggle carefully quickly regular ideas-- ironic, bold packages are. regular tithes cajole regular requ |
+| 149986 | Customer#000149986 | HyEJpj2jvEqt,,pA50NOvuTP | 7 | 17-654-752-5642 | 1251.17 | BUILDING | enticingly carefully careful courts. furiously |
+| 149985 | Customer#000149985 | y4m,kcxXX6ZtGTJGxavBTJf52OMqBK9z | 22 | 32-595-455-4078 | 6012.98 | MACHINERY | kages affix against the blithely pending foxes. slyly final packages boost |
+| 149984 | Customer#000149984 | ZBEyUfjRsVtUNSIv9dnnyoPYeQwi7czgCeeeM | 12 | 22-283-613-7016 | 6567.62 | HOUSEHOLD | ges integrate along the blithely unusual |
++-----------+--------------------+---------------------------------------+-------------+-----------------+-----------+--------------+-------------------------------------------------------------------------------------------------------+
+4 rows in set (0.35 sec)
+```
+
+Doris can perform partition pruning on Paimon and speed up the query process through native reading. We can check this through `explain verbose`.
+
+```sql
+mysql> explain verbose select * from customer where c_nationkey < 3;
++------------------------------------------------------------------------------------------------------------------------------------------------+
+| Explain String(Nereids Planner) |
++------------------------------------------------------------------------------------------------------------------------------------------------+
+| PLAN FRAGMENT 0 |
+| OUTPUT EXPRS: |
+| c_custkey[#0] |
+| c_name[#1] |
+| c_address[#2] |
+| c_nationkey[#3] |
+| c_phone[#4] |
+| c_acctbal[#5] |
+| c_mktsegment[#6] |
+| c_comment[#7] |
+| PARTITION: UNPARTITIONED |
+| |
+| HAS_COLO_PLAN_NODE: false |
+| |
+| VRESULT SINK |
+| MYSQL_PROTOCAL |
+| |
+| 1:VEXCHANGE |
+| offset: 0 |
+| distribute expr lists: |
+| tuple ids: 0 |
+| |
+| PLAN FRAGMENT 1 |
+| |
+| PARTITION: RANDOM |
+| |
+| HAS_COLO_PLAN_NODE: false |
+| |
+| STREAM DATA SINK |
+| EXCHANGE ID: 01 |
+| UNPARTITIONED |
+| |
+| 0:VPAIMON_SCAN_NODE(68) |
+| table: customer |
+| predicates: (c_nationkey[#3] < 3) |
+| inputSplitNum=3, totalFileSize=193823, scanRanges=3 |
+| partition=3/0 |
+| backends: |
+| 10002 |
+| s3://warehouse/wh/db_paimon.db/customer/c_nationkey=1/bucket-0/data-15cee5b7-1bd7-42ca-9314-56d92c62c03b-0.orc start: 0 length: 66600 |
+| s3://warehouse/wh/db_paimon.db/customer/c_nationkey=2/bucket-0/data-e98fb7ef-ec2b-4ad5-a496-713cb9481d56-0.orc start: 0 length: 64059 |
+| s3://warehouse/wh/db_paimon.db/customer/c_nationkey=0/bucket-0/data-431be05d-50fa-401f-9680-d646757d0f95-0.orc start: 0 length: 63164 |
+| cardinality=18751, numNodes=1 |
+| pushdown agg=NONE |
+| paimonNativeReadSplits=3/3 |
+| PaimonSplitStats: |
+| SplitStat [type=NATIVE, rowCount=771, rawFileConvertable=true, hasDeletionVector=false] |
+| SplitStat [type=NATIVE, rowCount=750, rawFileConvertable=true, hasDeletionVector=false] |
+| SplitStat [type=NATIVE, rowCount=750, rawFileConvertable=true, hasDeletionVector=false] |
+| tuple ids: 0 |
+| |
+| Tuples: |
+| TupleDescriptor{id=0, tbl=customer} |
+| SlotDescriptor{id=0, col=c_custkey, colUniqueId=0, type=INT, nullable=true, isAutoIncrement=false, subColPath=null} |
+| SlotDescriptor{id=1, col=c_name, colUniqueId=1, type=TEXT, nullable=true, isAutoIncrement=false, subColPath=null} |
+| SlotDescriptor{id=2, col=c_address, colUniqueId=2, type=TEXT, nullable=true, isAutoIncrement=false, subColPath=null} |
+| SlotDescriptor{id=3, col=c_nationkey, colUniqueId=3, type=INT, nullable=true, isAutoIncrement=false, subColPath=null} |
+| SlotDescriptor{id=4, col=c_phone, colUniqueId=4, type=TEXT, nullable=true, isAutoIncrement=false, subColPath=null} |
+| SlotDescriptor{id=5, col=c_acctbal, colUniqueId=5, type=DECIMALV3(12, 2), nullable=true, isAutoIncrement=false, subColPath=null} |
+| SlotDescriptor{id=6, col=c_mktsegment, colUniqueId=6, type=TEXT, nullable=true, isAutoIncrement=false, subColPath=null} |
+| SlotDescriptor{id=7, col=c_comment, colUniqueId=7, type=TEXT, nullable=true, isAutoIncrement=false, subColPath=null} |
+| |
+| |
+| |
+| Statistics |
+| planed with unknown column statistics |
++------------------------------------------------------------------------------------------------------------------------------------------------+
+66 rows in set (0.17 sec)
+```
+
+Through the query plan, we can see that doris only reads three partition files whose c_nationkey is less than 3, and the file reading method is native.
+In addition, doris supports the `deletion vectors` of paimon.
+First, we will modify some data through flink.
+
+```sql
+Flink SQL> update customer set c_address='c_address_update' where c_nationkey = 1;
+[INFO] Submitting SQL update statement to the cluster...
+[INFO] SQL update statement has been successfully submitted to the cluster:
+Job ID: ff838b7b778a94396b332b0d93c8f7ac
+
+```
+
+After waiting for the task to be completed, we can view the modified data through doris.
+
+```sql
+mysql> refresh table customer;
Review Comment:
No need to refresh
##########
samples/datalake/iceberg_and_paimon/README.md:
##########
@@ -0,0 +1,343 @@
+# doris-iceberg-paimon-compose
+
+
+## Launch Docker Compose
+First, we need to ensure the environmental parameters of the machine.
+
+```
+sysctl -w vm.max_map_count=2000000
+```
+
+We can then start all the required containers via the script.
+
+```
+bash start_all.sh
+```
+It will start a set of docker, the environment includes:
+- doris
+- iceberg
+- paimon
+- flink
+- spark
+
+And it will automatically create an iceberg table and a paimon table. We can use these tables directly to experience doris.
+
+
+## paimon table test
+
+Enter the flink client.
+
+```
+bash start_flink_client.sh
+```
+
+Here is a table that has been created.
+
+```sql
+
+Flink SQL> use paimon.db_paimon;
+[INFO] Execute statement succeed.
+
+Flink SQL> show tables;
++------------+
+| table name |
++------------+
+| customer |
++------------+
+1 row in set
+
+Flink SQL> show create table tb_paimon;
++------------------------------------------------------------------------+
+| result |
++------------------------------------------------------------------------+
+| CREATE TABLE `paimon`.`db_paimon`.`customer` (
+ `c_custkey` INT NOT NULL,
+ `c_name` VARCHAR(25),
+ `c_address` VARCHAR(40),
+ `c_nationkey` INT NOT NULL,
+ `c_phone` CHAR(15),
+ `c_acctbal` DECIMAL(12, 2),
+ `c_mktsegment` CHAR(10),
+ `c_comment` VARCHAR(117),
+ CONSTRAINT `PK_c_custkey_c_nationkey` PRIMARY KEY (`c_custkey`, `c_nationkey`) NOT ENFORCED
+) PARTITIONED BY (`c_nationkey`)
+WITH (
+ 'bucket' = '1',
+ 'path' = 's3://warehouse/wh/db_paimon.db/customer',
+ 'deletion-vectors.enabled' = 'true'
+)
+ |
++-------------------------------------------------------------------------+
+1 row in set
+
+Flink SQL> desc customer;
++--------------+----------------+-------+-----------------------------+--------+-----------+
+| name | type | null | key | extras | watermark |
++--------------+----------------+-------+-----------------------------+--------+-----------+
+| c_custkey | INT | FALSE | PRI(c_custkey, c_nationkey) | | |
+| c_name | VARCHAR(25) | TRUE | | | |
+| c_address | VARCHAR(40) | TRUE | | | |
+| c_nationkey | INT | FALSE | PRI(c_custkey, c_nationkey) | | |
+| c_phone | CHAR(15) | TRUE | | | |
+| c_acctbal | DECIMAL(12, 2) | TRUE | | | |
+| c_mktsegment | CHAR(10) | TRUE | | | |
+| c_comment | VARCHAR(117) | TRUE | | | |
++--------------+----------------+-------+-----------------------------+--------+-----------+
+8 rows in set
+```
+
+This table already has some data.
+
+```sql
+Flink SQL> select * from customer order by c_custkey limit 4;
++-----------+--------------------+--------------------------------+-------------+-----------------+-----------+--------------+--------------------------------+
+| c_custkey | c_name | c_address | c_nationkey | c_phone | c_acctbal | c_mktsegment | c_comment |
++-----------+--------------------+--------------------------------+-------------+-----------------+-----------+--------------+--------------------------------+
+| 1 | Customer#000000001 | IVhzIApeRb ot,c,E | 15 | 25-989-741-2988 | 711.56 | BUILDING | to the even, regular platel... |
+| 2 | Customer#000000002 | XSTf4,NCwDVaWNe6tEgvwfmRchLXak | 13 | 23-768-687-3665 | 121.65 | AUTOMOBILE | l accounts. blithely ironic... |
+| 3 | Customer#000000003 | MG9kdTD2WBHm | 1 | 11-719-748-3364 | 7498.12 | AUTOMOBILE | deposits eat slyly ironic,... |
+| 32 | Customer#000000032 | jD2xZzi UmId,DCtNBLXKj9q0Tl... | 15 | 25-430-914-2194 | 3471.53 | BUILDING | cial ideas. final, furious ... |
++-----------+--------------------+--------------------------------+-------------+-----------------+-----------+--------------+--------------------------------+
+4 rows in set
+
+Flink SQL> select * from customer order by c_custkey desc limit 4;
++-----------+--------------------+--------------------------------+-------------+-----------------+-----------+--------------+--------------------------------+
+| c_custkey | c_name | c_address | c_nationkey | c_phone | c_acctbal | c_mktsegment | c_comment |
++-----------+--------------------+--------------------------------+-------------+-----------------+-----------+--------------+--------------------------------+
+| 149987 | Customer#000149987 | P6z8nSIgW55cSydfa1bZ | 8 | 18-187-349-6326 | 5338.96 | HOUSEHOLD | aggle carefully quickly reg... |
+| 149986 | Customer#000149986 | HyEJpj2jvEqt,,pA50NOvuTP | 7 | 17-654-752-5642 | 1251.17 | BUILDING | enticingly carefully carefu... |
+| 149985 | Customer#000149985 | y4m,kcxXX6ZtGTJGxavBTJf52OM... | 22 | 32-595-455-4078 | 6012.98 | MACHINERY | kages affix against the bli... |
+| 149984 | Customer#000149984 | ZBEyUfjRsVtUNSIv9dnnyoPYeQw... | 12 | 22-283-613-7016 | 6567.62 | HOUSEHOLD | ges integrate along the bli... |
++-----------+--------------------+--------------------------------+-------------+-----------------+-----------+--------------+--------------------------------+
+4 rows in set
+```
+
+Now we can query this table through doris.
+
+```
+bash start_doris_client.sh
+```
+
+After entering the doris client, the paimon catalog has been created here, so the data of the paimon table can be directly queried.
+
+```sql
+mysql> use paimon.db_paimon;
+Reading table information for completion of table and column names
+You can turn off this feature to get a quicker startup with -A
+
+Database changed
+mysql> show tables;
++---------------------+
+| Tables_in_db_paimon |
++---------------------+
+| customer |
++---------------------+
+1 row in set (0.00 sec)
+
+mysql> select * from customer order by c_custkey limit 4;
++-----------+--------------------+---------------------------------------+-------------+-----------------+-----------+--------------+--------------------------------------------------------------------------------------------------------+
+| c_custkey | c_name | c_address | c_nationkey | c_phone | c_acctbal | c_mktsegment | c_comment |
++-----------+--------------------+---------------------------------------+-------------+-----------------+-----------+--------------+--------------------------------------------------------------------------------------------------------+
+| 1 | Customer#000000001 | IVhzIApeRb ot,c,E | 15 | 25-989-741-2988 | 711.56 | BUILDING | to the even, regular platelets. regular, ironic epitaphs nag e |
+| 2 | Customer#000000002 | XSTf4,NCwDVaWNe6tEgvwfmRchLXak | 13 | 23-768-687-3665 | 121.65 | AUTOMOBILE | l accounts. blithely ironic theodolites integrate boldly: caref |
+| 3 | Customer#000000003 | MG9kdTD2WBHm | 1 | 11-719-748-3364 | 7498.12 | AUTOMOBILE | deposits eat slyly ironic, even instructions. express foxes detect slyly. blithely even accounts abov |
+| 32 | Customer#000000032 | jD2xZzi UmId,DCtNBLXKj9q0Tlp2iQ6ZcO3J | 15 | 25-430-914-2194 | 3471.53 | BUILDING | cial ideas. final, furious requests across the e |
++-----------+--------------------+---------------------------------------+-------------+-----------------+-----------+--------------+--------------------------------------------------------------------------------------------------------+
+4 rows in set (1.89 sec)
+
+mysql> select * from customer order by c_custkey desc limit 4;
++-----------+--------------------+---------------------------------------+-------------+-----------------+-----------+--------------+-------------------------------------------------------------------------------------------------------+
+| c_custkey | c_name | c_address | c_nationkey | c_phone | c_acctbal | c_mktsegment | c_comment |
++-----------+--------------------+---------------------------------------+-------------+-----------------+-----------+--------------+-------------------------------------------------------------------------------------------------------+
+| 149987 | Customer#000149987 | P6z8nSIgW55cSydfa1bZ | 8 | 18-187-349-6326 | 5338.96 | HOUSEHOLD | aggle carefully quickly regular ideas-- ironic, bold packages are. regular tithes cajole regular requ |
+| 149986 | Customer#000149986 | HyEJpj2jvEqt,,pA50NOvuTP | 7 | 17-654-752-5642 | 1251.17 | BUILDING | enticingly carefully careful courts. furiously |
+| 149985 | Customer#000149985 | y4m,kcxXX6ZtGTJGxavBTJf52OMqBK9z | 22 | 32-595-455-4078 | 6012.98 | MACHINERY | kages affix against the blithely pending foxes. slyly final packages boost |
+| 149984 | Customer#000149984 | ZBEyUfjRsVtUNSIv9dnnyoPYeQwi7czgCeeeM | 12 | 22-283-613-7016 | 6567.62 | HOUSEHOLD | ges integrate along the blithely unusual |
++-----------+--------------------+---------------------------------------+-------------+-----------------+-----------+--------------+-------------------------------------------------------------------------------------------------------+
+4 rows in set (0.35 sec)
+```
+
+Doris can perform partition pruning on Paimon and speed up the query process through native reading. We can check this through `explain verbose`.
+
+```sql
+mysql> explain verbose select * from customer where c_nationkey < 3;
++------------------------------------------------------------------------------------------------------------------------------------------------+
+| Explain String(Nereids Planner) |
++------------------------------------------------------------------------------------------------------------------------------------------------+
+| PLAN FRAGMENT 0 |
+| OUTPUT EXPRS: |
+| c_custkey[#0] |
+| c_name[#1] |
+| c_address[#2] |
+| c_nationkey[#3] |
+| c_phone[#4] |
+| c_acctbal[#5] |
+| c_mktsegment[#6] |
+| c_comment[#7] |
+| PARTITION: UNPARTITIONED |
+| |
+| HAS_COLO_PLAN_NODE: false |
+| |
+| VRESULT SINK |
+| MYSQL_PROTOCAL |
+| |
+| 1:VEXCHANGE |
+| offset: 0 |
+| distribute expr lists: |
+| tuple ids: 0 |
+| |
+| PLAN FRAGMENT 1 |
+| |
+| PARTITION: RANDOM |
+| |
+| HAS_COLO_PLAN_NODE: false |
+| |
+| STREAM DATA SINK |
+| EXCHANGE ID: 01 |
+| UNPARTITIONED |
+| |
+| 0:VPAIMON_SCAN_NODE(68) |
+| table: customer |
+| predicates: (c_nationkey[#3] < 3) |
+| inputSplitNum=3, totalFileSize=193823, scanRanges=3 |
+| partition=3/0 |
+| backends: |
+| 10002 |
+| s3://warehouse/wh/db_paimon.db/customer/c_nationkey=1/bucket-0/data-15cee5b7-1bd7-42ca-9314-56d92c62c03b-0.orc start: 0 length: 66600 |
+| s3://warehouse/wh/db_paimon.db/customer/c_nationkey=2/bucket-0/data-e98fb7ef-ec2b-4ad5-a496-713cb9481d56-0.orc start: 0 length: 64059 |
+| s3://warehouse/wh/db_paimon.db/customer/c_nationkey=0/bucket-0/data-431be05d-50fa-401f-9680-d646757d0f95-0.orc start: 0 length: 63164 |
+| cardinality=18751, numNodes=1 |
+| pushdown agg=NONE |
+| paimonNativeReadSplits=3/3 |
+| PaimonSplitStats: |
+| SplitStat [type=NATIVE, rowCount=771, rawFileConvertable=true, hasDeletionVector=false] |
+| SplitStat [type=NATIVE, rowCount=750, rawFileConvertable=true, hasDeletionVector=false] |
+| SplitStat [type=NATIVE, rowCount=750, rawFileConvertable=true, hasDeletionVector=false] |
+| tuple ids: 0 |
+| |
+| Tuples: |
+| TupleDescriptor{id=0, tbl=customer} |
+| SlotDescriptor{id=0, col=c_custkey, colUniqueId=0, type=INT, nullable=true, isAutoIncrement=false, subColPath=null} |
+| SlotDescriptor{id=1, col=c_name, colUniqueId=1, type=TEXT, nullable=true, isAutoIncrement=false, subColPath=null} |
+| SlotDescriptor{id=2, col=c_address, colUniqueId=2, type=TEXT, nullable=true, isAutoIncrement=false, subColPath=null} |
+| SlotDescriptor{id=3, col=c_nationkey, colUniqueId=3, type=INT, nullable=true, isAutoIncrement=false, subColPath=null} |
+| SlotDescriptor{id=4, col=c_phone, colUniqueId=4, type=TEXT, nullable=true, isAutoIncrement=false, subColPath=null} |
+| SlotDescriptor{id=5, col=c_acctbal, colUniqueId=5, type=DECIMALV3(12, 2), nullable=true, isAutoIncrement=false, subColPath=null} |
+| SlotDescriptor{id=6, col=c_mktsegment, colUniqueId=6, type=TEXT, nullable=true, isAutoIncrement=false, subColPath=null} |
+| SlotDescriptor{id=7, col=c_comment, colUniqueId=7, type=TEXT, nullable=true, isAutoIncrement=false, subColPath=null} |
+| |
+| |
+| |
+| Statistics |
+| planed with unknown column statistics |
++------------------------------------------------------------------------------------------------------------------------------------------------+
+66 rows in set (0.17 sec)
+```
+
+Through the query plan, we can see that doris only reads three partition files whose c_nationkey is less than 3, and the file reading method is native.
+In addition, doris supports the `deletion vectors` of paimon.
+First, we will modify some data through flink.
+
+```sql
+Flink SQL> update customer set c_address='c_address_update' where c_nationkey = 1;
+[INFO] Submitting SQL update statement to the cluster...
+[INFO] SQL update statement has been successfully submitted to the cluster:
+Job ID: ff838b7b778a94396b332b0d93c8f7ac
+
+```
+
+After waiting for the task to be completed, we can view the modified data through doris.
+
+```sql
+mysql> refresh table customer;
+Query OK, 0 rows affected (0.02 sec)
+
+mysql> explain verbose select * from customer where c_nationkey < 3;
++------------------------------------------------------------------------------------------------------------------------------------------------+
+| Explain String(Nereids Planner) |
++------------------------------------------------------------------------------------------------------------------------------------------------+
+| PLAN FRAGMENT 0 |
+| OUTPUT EXPRS: |
+| c_custkey[#0] |
+| c_name[#1] |
+| c_address[#2] |
+| c_nationkey[#3] |
+| c_phone[#4] |
+| c_acctbal[#5] |
+| c_mktsegment[#6] |
+| c_comment[#7] |
+| PARTITION: UNPARTITIONED |
+| |
+| HAS_COLO_PLAN_NODE: false |
+| |
+| VRESULT SINK |
+| MYSQL_PROTOCAL |
+| |
+| 1:VEXCHANGE |
+| offset: 0 |
+| distribute expr lists: |
+| tuple ids: 0 |
+| |
+| PLAN FRAGMENT 1 |
+| |
+| PARTITION: RANDOM |
+| |
+| HAS_COLO_PLAN_NODE: false |
+| |
+| STREAM DATA SINK |
+| EXCHANGE ID: 01 |
+| UNPARTITIONED |
+| |
+| 0:VPAIMON_SCAN_NODE(68) |
Review Comment:
Only show this part
##########
samples/datalake/iceberg_and_paimon/README.md:
##########
@@ -0,0 +1,343 @@
+# doris-iceberg-paimon-compose
+
+
+## Launch Docker Compose
+First, we need to ensure the environmental parameters of the machine.
+
+```
+sysctl -w vm.max_map_count=2000000
+```
+
+We can then start all the required containers via the script.
+
+```
+bash start_all.sh
+```
+It will start a set of docker, the environment includes:
+- doris
+- iceberg
+- paimon
+- flink
+- spark
+
+And it will automatically create an iceberg table and a paimon table. We can use these tables directly to experience doris.
+
+
+## paimon table test
+
+Enter the flink client.
+
+```
+bash start_flink_client.sh
+```
+
+Here is a table that has been created.
+
+```sql
+
+Flink SQL> use paimon.db_paimon;
+[INFO] Execute statement succeed.
+
+Flink SQL> show tables;
++------------+
+| table name |
++------------+
+| customer |
++------------+
+1 row in set
+
+Flink SQL> show create table tb_paimon;
++------------------------------------------------------------------------+
+| result |
++------------------------------------------------------------------------+
+| CREATE TABLE `paimon`.`db_paimon`.`customer` (
+ `c_custkey` INT NOT NULL,
+ `c_name` VARCHAR(25),
+ `c_address` VARCHAR(40),
+ `c_nationkey` INT NOT NULL,
+ `c_phone` CHAR(15),
+ `c_acctbal` DECIMAL(12, 2),
+ `c_mktsegment` CHAR(10),
+ `c_comment` VARCHAR(117),
+ CONSTRAINT `PK_c_custkey_c_nationkey` PRIMARY KEY (`c_custkey`, `c_nationkey`) NOT ENFORCED
+) PARTITIONED BY (`c_nationkey`)
+WITH (
+ 'bucket' = '1',
+ 'path' = 's3://warehouse/wh/db_paimon.db/customer',
+ 'deletion-vectors.enabled' = 'true'
+)
+ |
++-------------------------------------------------------------------------+
+1 row in set
+
+Flink SQL> desc customer;
++--------------+----------------+-------+-----------------------------+--------+-----------+
+| name | type | null | key | extras | watermark |
++--------------+----------------+-------+-----------------------------+--------+-----------+
+| c_custkey | INT | FALSE | PRI(c_custkey, c_nationkey) | | |
+| c_name | VARCHAR(25) | TRUE | | | |
+| c_address | VARCHAR(40) | TRUE | | | |
+| c_nationkey | INT | FALSE | PRI(c_custkey, c_nationkey) | | |
+| c_phone | CHAR(15) | TRUE | | | |
+| c_acctbal | DECIMAL(12, 2) | TRUE | | | |
+| c_mktsegment | CHAR(10) | TRUE | | | |
+| c_comment | VARCHAR(117) | TRUE | | | |
++--------------+----------------+-------+-----------------------------+--------+-----------+
+8 rows in set
+```
+
+This table already has some data.
+
+```sql
+Flink SQL> select * from customer order by c_custkey limit 4;
++-----------+--------------------+--------------------------------+-------------+-----------------+-----------+--------------+--------------------------------+
+| c_custkey | c_name | c_address | c_nationkey | c_phone | c_acctbal | c_mktsegment | c_comment |
++-----------+--------------------+--------------------------------+-------------+-----------------+-----------+--------------+--------------------------------+
+| 1 | Customer#000000001 | IVhzIApeRb ot,c,E | 15 | 25-989-741-2988 | 711.56 | BUILDING | to the even, regular platel... |
+| 2 | Customer#000000002 | XSTf4,NCwDVaWNe6tEgvwfmRchLXak | 13 | 23-768-687-3665 | 121.65 | AUTOMOBILE | l accounts. blithely ironic... |
+| 3 | Customer#000000003 | MG9kdTD2WBHm | 1 | 11-719-748-3364 | 7498.12 | AUTOMOBILE | deposits eat slyly ironic,... |
+| 32 | Customer#000000032 | jD2xZzi UmId,DCtNBLXKj9q0Tl... | 15 | 25-430-914-2194 | 3471.53 | BUILDING | cial ideas. final, furious ... |
++-----------+--------------------+--------------------------------+-------------+-----------------+-----------+--------------+--------------------------------+
+4 rows in set
+
+Flink SQL> select * from customer order by c_custkey desc limit 4;
++-----------+--------------------+--------------------------------+-------------+-----------------+-----------+--------------+--------------------------------+
+| c_custkey | c_name | c_address | c_nationkey | c_phone | c_acctbal | c_mktsegment | c_comment |
++-----------+--------------------+--------------------------------+-------------+-----------------+-----------+--------------+--------------------------------+
+| 149987 | Customer#000149987 | P6z8nSIgW55cSydfa1bZ | 8 | 18-187-349-6326 | 5338.96 | HOUSEHOLD | aggle carefully quickly reg... |
+| 149986 | Customer#000149986 | HyEJpj2jvEqt,,pA50NOvuTP | 7 | 17-654-752-5642 | 1251.17 | BUILDING | enticingly carefully carefu... |
+| 149985 | Customer#000149985 | y4m,kcxXX6ZtGTJGxavBTJf52OM... | 22 | 32-595-455-4078 | 6012.98 | MACHINERY | kages affix against the bli... |
+| 149984 | Customer#000149984 | ZBEyUfjRsVtUNSIv9dnnyoPYeQw... | 12 | 22-283-613-7016 | 6567.62 | HOUSEHOLD | ges integrate along the bli... |
++-----------+--------------------+--------------------------------+-------------+-----------------+-----------+--------------+--------------------------------+
+4 rows in set
+```
+
+Now we can query this table through doris.
+
+```
+bash start_doris_client.sh
+```
+
+After entering the doris client, the paimon catalog has been created here, so the data of the paimon table can be directly queried.
+
+```sql
+mysql> use paimon.db_paimon;
+Reading table information for completion of table and column names
+You can turn off this feature to get a quicker startup with -A
+
+Database changed
+mysql> show tables;
++---------------------+
+| Tables_in_db_paimon |
++---------------------+
+| customer |
++---------------------+
+1 row in set (0.00 sec)
+
+mysql> select * from customer order by c_custkey limit 4;
++-----------+--------------------+---------------------------------------+-------------+-----------------+-----------+--------------+--------------------------------------------------------------------------------------------------------+
+| c_custkey | c_name | c_address | c_nationkey | c_phone | c_acctbal | c_mktsegment | c_comment |
++-----------+--------------------+---------------------------------------+-------------+-----------------+-----------+--------------+--------------------------------------------------------------------------------------------------------+
+| 1 | Customer#000000001 | IVhzIApeRb ot,c,E | 15 | 25-989-741-2988 | 711.56 | BUILDING | to the even, regular platelets. regular, ironic epitaphs nag e |
+| 2 | Customer#000000002 | XSTf4,NCwDVaWNe6tEgvwfmRchLXak | 13 | 23-768-687-3665 | 121.65 | AUTOMOBILE | l accounts. blithely ironic theodolites integrate boldly: caref |
+| 3 | Customer#000000003 | MG9kdTD2WBHm | 1 | 11-719-748-3364 | 7498.12 | AUTOMOBILE | deposits eat slyly ironic, even instructions. express foxes detect slyly. blithely even accounts abov |
+| 32 | Customer#000000032 | jD2xZzi UmId,DCtNBLXKj9q0Tlp2iQ6ZcO3J | 15 | 25-430-914-2194 | 3471.53 | BUILDING | cial ideas. final, furious requests across the e |
++-----------+--------------------+---------------------------------------+-------------+-----------------+-----------+--------------+--------------------------------------------------------------------------------------------------------+
+4 rows in set (1.89 sec)
+
+mysql> select * from customer order by c_custkey desc limit 4;
++-----------+--------------------+---------------------------------------+-------------+-----------------+-----------+--------------+-------------------------------------------------------------------------------------------------------+
+| c_custkey | c_name | c_address | c_nationkey | c_phone | c_acctbal | c_mktsegment | c_comment |
++-----------+--------------------+---------------------------------------+-------------+-----------------+-----------+--------------+-------------------------------------------------------------------------------------------------------+
+| 149987 | Customer#000149987 | P6z8nSIgW55cSydfa1bZ | 8 | 18-187-349-6326 | 5338.96 | HOUSEHOLD | aggle carefully quickly regular ideas-- ironic, bold packages are. regular tithes cajole regular requ |
+| 149986 | Customer#000149986 | HyEJpj2jvEqt,,pA50NOvuTP | 7 | 17-654-752-5642 | 1251.17 | BUILDING | enticingly carefully careful courts. furiously |
+| 149985 | Customer#000149985 | y4m,kcxXX6ZtGTJGxavBTJf52OMqBK9z | 22 | 32-595-455-4078 | 6012.98 | MACHINERY | kages affix against the blithely pending foxes. slyly final packages boost |
+| 149984 | Customer#000149984 | ZBEyUfjRsVtUNSIv9dnnyoPYeQwi7czgCeeeM | 12 | 22-283-613-7016 | 6567.62 | HOUSEHOLD | ges integrate along the blithely unusual |
++-----------+--------------------+---------------------------------------+-------------+-----------------+-----------+--------------+-------------------------------------------------------------------------------------------------------+
+4 rows in set (0.35 sec)
+```
+
+Doris can perform partition pruning on Paimon and speed up the query process through native reading. We can check this through `explain verbose`.
+
+```sql
+mysql> explain verbose select * from customer where c_nationkey < 3;
++------------------------------------------------------------------------------------------------------------------------------------------------+
+| Explain String(Nereids Planner) |
++------------------------------------------------------------------------------------------------------------------------------------------------+
+| PLAN FRAGMENT 0 |
+| OUTPUT EXPRS: |
+| c_custkey[#0] |
+| c_name[#1] |
+| c_address[#2] |
+| c_nationkey[#3] |
+| c_phone[#4] |
+| c_acctbal[#5] |
+| c_mktsegment[#6] |
+| c_comment[#7] |
+| PARTITION: UNPARTITIONED |
+| |
+| HAS_COLO_PLAN_NODE: false |
+| |
+| VRESULT SINK |
+| MYSQL_PROTOCAL |
+| |
+| 1:VEXCHANGE |
+| offset: 0 |
+| distribute expr lists: |
+| tuple ids: 0 |
+| |
+| PLAN FRAGMENT 1 |
+| |
+| PARTITION: RANDOM |
+| |
+| HAS_COLO_PLAN_NODE: false |
+| |
+| STREAM DATA SINK |
+| EXCHANGE ID: 01 |
+| UNPARTITIONED |
+| |
+| 0:VPAIMON_SCAN_NODE(68) |
Review Comment:
Only show this `VPAIMON_SCAN_NODE` part is enough
--
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-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [feature](paimon/iceberg)add a docker that can directly pull up all the relevant environments of paimon/iceberg/doris [doris]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #38009:
URL: https://github.com/apache/doris/pull/38009#issuecomment-2233598319
PR approved by anyone and no changes requested.
--
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-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [feature](paimon/iceberg)add a docker that can directly pull up all the relevant environments of paimon/iceberg/doris [doris]
Posted by "morningman (via GitHub)" <gi...@apache.org>.
morningman commented on code in PR #38009:
URL: https://github.com/apache/doris/pull/38009#discussion_r1680857931
##########
samples/datalake/iceberg_and_paimon/README.md:
##########
@@ -0,0 +1,343 @@
+# doris-iceberg-paimon-compose
+
+
+## Launch Docker Compose
+First, we need to ensure the environmental parameters of the machine.
+
+```
+sysctl -w vm.max_map_count=2000000
+```
+
+We can then start all the required containers via the script.
+
+```
+bash start_all.sh
+```
+It will start a set of docker, the environment includes:
+- doris
+- iceberg
+- paimon
+- flink
+- spark
+
+And it will automatically create an iceberg table and a paimon table. We can use these tables directly to experience doris.
+
+
+## paimon table test
+
+Enter the flink client.
+
+```
+bash start_flink_client.sh
+```
+
+Here is a table that has been created.
+
+```sql
+
+Flink SQL> use paimon.db_paimon;
+[INFO] Execute statement succeed.
+
+Flink SQL> show tables;
++------------+
+| table name |
++------------+
+| customer |
++------------+
+1 row in set
+
+Flink SQL> show create table tb_paimon;
++------------------------------------------------------------------------+
+| result |
++------------------------------------------------------------------------+
+| CREATE TABLE `paimon`.`db_paimon`.`customer` (
+ `c_custkey` INT NOT NULL,
+ `c_name` VARCHAR(25),
+ `c_address` VARCHAR(40),
+ `c_nationkey` INT NOT NULL,
+ `c_phone` CHAR(15),
+ `c_acctbal` DECIMAL(12, 2),
+ `c_mktsegment` CHAR(10),
+ `c_comment` VARCHAR(117),
+ CONSTRAINT `PK_c_custkey_c_nationkey` PRIMARY KEY (`c_custkey`, `c_nationkey`) NOT ENFORCED
+) PARTITIONED BY (`c_nationkey`)
+WITH (
+ 'bucket' = '1',
+ 'path' = 's3://warehouse/wh/db_paimon.db/customer',
+ 'deletion-vectors.enabled' = 'true'
+)
+ |
++-------------------------------------------------------------------------+
+1 row in set
+
+Flink SQL> desc customer;
++--------------+----------------+-------+-----------------------------+--------+-----------+
+| name | type | null | key | extras | watermark |
++--------------+----------------+-------+-----------------------------+--------+-----------+
+| c_custkey | INT | FALSE | PRI(c_custkey, c_nationkey) | | |
+| c_name | VARCHAR(25) | TRUE | | | |
+| c_address | VARCHAR(40) | TRUE | | | |
+| c_nationkey | INT | FALSE | PRI(c_custkey, c_nationkey) | | |
+| c_phone | CHAR(15) | TRUE | | | |
+| c_acctbal | DECIMAL(12, 2) | TRUE | | | |
+| c_mktsegment | CHAR(10) | TRUE | | | |
+| c_comment | VARCHAR(117) | TRUE | | | |
++--------------+----------------+-------+-----------------------------+--------+-----------+
+8 rows in set
+```
+
+This table already has some data.
+
+```sql
+Flink SQL> select * from customer order by c_custkey limit 4;
++-----------+--------------------+--------------------------------+-------------+-----------------+-----------+--------------+--------------------------------+
+| c_custkey | c_name | c_address | c_nationkey | c_phone | c_acctbal | c_mktsegment | c_comment |
++-----------+--------------------+--------------------------------+-------------+-----------------+-----------+--------------+--------------------------------+
+| 1 | Customer#000000001 | IVhzIApeRb ot,c,E | 15 | 25-989-741-2988 | 711.56 | BUILDING | to the even, regular platel... |
+| 2 | Customer#000000002 | XSTf4,NCwDVaWNe6tEgvwfmRchLXak | 13 | 23-768-687-3665 | 121.65 | AUTOMOBILE | l accounts. blithely ironic... |
+| 3 | Customer#000000003 | MG9kdTD2WBHm | 1 | 11-719-748-3364 | 7498.12 | AUTOMOBILE | deposits eat slyly ironic,... |
+| 32 | Customer#000000032 | jD2xZzi UmId,DCtNBLXKj9q0Tl... | 15 | 25-430-914-2194 | 3471.53 | BUILDING | cial ideas. final, furious ... |
++-----------+--------------------+--------------------------------+-------------+-----------------+-----------+--------------+--------------------------------+
+4 rows in set
+
+Flink SQL> select * from customer order by c_custkey desc limit 4;
++-----------+--------------------+--------------------------------+-------------+-----------------+-----------+--------------+--------------------------------+
+| c_custkey | c_name | c_address | c_nationkey | c_phone | c_acctbal | c_mktsegment | c_comment |
++-----------+--------------------+--------------------------------+-------------+-----------------+-----------+--------------+--------------------------------+
+| 149987 | Customer#000149987 | P6z8nSIgW55cSydfa1bZ | 8 | 18-187-349-6326 | 5338.96 | HOUSEHOLD | aggle carefully quickly reg... |
+| 149986 | Customer#000149986 | HyEJpj2jvEqt,,pA50NOvuTP | 7 | 17-654-752-5642 | 1251.17 | BUILDING | enticingly carefully carefu... |
+| 149985 | Customer#000149985 | y4m,kcxXX6ZtGTJGxavBTJf52OM... | 22 | 32-595-455-4078 | 6012.98 | MACHINERY | kages affix against the bli... |
+| 149984 | Customer#000149984 | ZBEyUfjRsVtUNSIv9dnnyoPYeQw... | 12 | 22-283-613-7016 | 6567.62 | HOUSEHOLD | ges integrate along the bli... |
++-----------+--------------------+--------------------------------+-------------+-----------------+-----------+--------------+--------------------------------+
+4 rows in set
+```
+
+Now we can query this table through doris.
+
+```
+bash start_doris_client.sh
+```
+
+After entering the doris client, the paimon catalog has been created here, so the data of the paimon table can be directly queried.
+
+```sql
+mysql> use paimon.db_paimon;
+Reading table information for completion of table and column names
+You can turn off this feature to get a quicker startup with -A
+
+Database changed
+mysql> show tables;
++---------------------+
+| Tables_in_db_paimon |
++---------------------+
+| customer |
++---------------------+
+1 row in set (0.00 sec)
+
+mysql> select * from customer order by c_custkey limit 4;
++-----------+--------------------+---------------------------------------+-------------+-----------------+-----------+--------------+--------------------------------------------------------------------------------------------------------+
+| c_custkey | c_name | c_address | c_nationkey | c_phone | c_acctbal | c_mktsegment | c_comment |
++-----------+--------------------+---------------------------------------+-------------+-----------------+-----------+--------------+--------------------------------------------------------------------------------------------------------+
+| 1 | Customer#000000001 | IVhzIApeRb ot,c,E | 15 | 25-989-741-2988 | 711.56 | BUILDING | to the even, regular platelets. regular, ironic epitaphs nag e |
+| 2 | Customer#000000002 | XSTf4,NCwDVaWNe6tEgvwfmRchLXak | 13 | 23-768-687-3665 | 121.65 | AUTOMOBILE | l accounts. blithely ironic theodolites integrate boldly: caref |
+| 3 | Customer#000000003 | MG9kdTD2WBHm | 1 | 11-719-748-3364 | 7498.12 | AUTOMOBILE | deposits eat slyly ironic, even instructions. express foxes detect slyly. blithely even accounts abov |
+| 32 | Customer#000000032 | jD2xZzi UmId,DCtNBLXKj9q0Tlp2iQ6ZcO3J | 15 | 25-430-914-2194 | 3471.53 | BUILDING | cial ideas. final, furious requests across the e |
++-----------+--------------------+---------------------------------------+-------------+-----------------+-----------+--------------+--------------------------------------------------------------------------------------------------------+
+4 rows in set (1.89 sec)
+
+mysql> select * from customer order by c_custkey desc limit 4;
++-----------+--------------------+---------------------------------------+-------------+-----------------+-----------+--------------+-------------------------------------------------------------------------------------------------------+
+| c_custkey | c_name | c_address | c_nationkey | c_phone | c_acctbal | c_mktsegment | c_comment |
++-----------+--------------------+---------------------------------------+-------------+-----------------+-----------+--------------+-------------------------------------------------------------------------------------------------------+
+| 149987 | Customer#000149987 | P6z8nSIgW55cSydfa1bZ | 8 | 18-187-349-6326 | 5338.96 | HOUSEHOLD | aggle carefully quickly regular ideas-- ironic, bold packages are. regular tithes cajole regular requ |
+| 149986 | Customer#000149986 | HyEJpj2jvEqt,,pA50NOvuTP | 7 | 17-654-752-5642 | 1251.17 | BUILDING | enticingly carefully careful courts. furiously |
+| 149985 | Customer#000149985 | y4m,kcxXX6ZtGTJGxavBTJf52OMqBK9z | 22 | 32-595-455-4078 | 6012.98 | MACHINERY | kages affix against the blithely pending foxes. slyly final packages boost |
+| 149984 | Customer#000149984 | ZBEyUfjRsVtUNSIv9dnnyoPYeQwi7czgCeeeM | 12 | 22-283-613-7016 | 6567.62 | HOUSEHOLD | ges integrate along the blithely unusual |
++-----------+--------------------+---------------------------------------+-------------+-----------------+-----------+--------------+-------------------------------------------------------------------------------------------------------+
+4 rows in set (0.35 sec)
+```
+
+Doris can perform partition pruning on Paimon and speed up the query process through native reading. We can check this through `explain verbose`.
+
+```sql
+mysql> explain verbose select * from customer where c_nationkey < 3;
++------------------------------------------------------------------------------------------------------------------------------------------------+
+| Explain String(Nereids Planner) |
++------------------------------------------------------------------------------------------------------------------------------------------------+
+| PLAN FRAGMENT 0 |
+| OUTPUT EXPRS: |
+| c_custkey[#0] |
+| c_name[#1] |
+| c_address[#2] |
+| c_nationkey[#3] |
+| c_phone[#4] |
+| c_acctbal[#5] |
+| c_mktsegment[#6] |
+| c_comment[#7] |
+| PARTITION: UNPARTITIONED |
+| |
+| HAS_COLO_PLAN_NODE: false |
+| |
+| VRESULT SINK |
+| MYSQL_PROTOCAL |
+| |
+| 1:VEXCHANGE |
+| offset: 0 |
+| distribute expr lists: |
+| tuple ids: 0 |
+| |
+| PLAN FRAGMENT 1 |
+| |
+| PARTITION: RANDOM |
+| |
+| HAS_COLO_PLAN_NODE: false |
+| |
+| STREAM DATA SINK |
+| EXCHANGE ID: 01 |
+| UNPARTITIONED |
+| |
+| 0:VPAIMON_SCAN_NODE(68) |
+| table: customer |
+| predicates: (c_nationkey[#3] < 3) |
+| inputSplitNum=3, totalFileSize=193823, scanRanges=3 |
+| partition=3/0 |
+| backends: |
+| 10002 |
+| s3://warehouse/wh/db_paimon.db/customer/c_nationkey=1/bucket-0/data-15cee5b7-1bd7-42ca-9314-56d92c62c03b-0.orc start: 0 length: 66600 |
+| s3://warehouse/wh/db_paimon.db/customer/c_nationkey=2/bucket-0/data-e98fb7ef-ec2b-4ad5-a496-713cb9481d56-0.orc start: 0 length: 64059 |
+| s3://warehouse/wh/db_paimon.db/customer/c_nationkey=0/bucket-0/data-431be05d-50fa-401f-9680-d646757d0f95-0.orc start: 0 length: 63164 |
+| cardinality=18751, numNodes=1 |
+| pushdown agg=NONE |
+| paimonNativeReadSplits=3/3 |
+| PaimonSplitStats: |
+| SplitStat [type=NATIVE, rowCount=771, rawFileConvertable=true, hasDeletionVector=false] |
+| SplitStat [type=NATIVE, rowCount=750, rawFileConvertable=true, hasDeletionVector=false] |
+| SplitStat [type=NATIVE, rowCount=750, rawFileConvertable=true, hasDeletionVector=false] |
+| tuple ids: 0 |
+| |
+| Tuples: |
+| TupleDescriptor{id=0, tbl=customer} |
+| SlotDescriptor{id=0, col=c_custkey, colUniqueId=0, type=INT, nullable=true, isAutoIncrement=false, subColPath=null} |
+| SlotDescriptor{id=1, col=c_name, colUniqueId=1, type=TEXT, nullable=true, isAutoIncrement=false, subColPath=null} |
+| SlotDescriptor{id=2, col=c_address, colUniqueId=2, type=TEXT, nullable=true, isAutoIncrement=false, subColPath=null} |
+| SlotDescriptor{id=3, col=c_nationkey, colUniqueId=3, type=INT, nullable=true, isAutoIncrement=false, subColPath=null} |
+| SlotDescriptor{id=4, col=c_phone, colUniqueId=4, type=TEXT, nullable=true, isAutoIncrement=false, subColPath=null} |
+| SlotDescriptor{id=5, col=c_acctbal, colUniqueId=5, type=DECIMALV3(12, 2), nullable=true, isAutoIncrement=false, subColPath=null} |
+| SlotDescriptor{id=6, col=c_mktsegment, colUniqueId=6, type=TEXT, nullable=true, isAutoIncrement=false, subColPath=null} |
+| SlotDescriptor{id=7, col=c_comment, colUniqueId=7, type=TEXT, nullable=true, isAutoIncrement=false, subColPath=null} |
+| |
+| |
+| |
+| Statistics |
+| planed with unknown column statistics |
++------------------------------------------------------------------------------------------------------------------------------------------------+
+66 rows in set (0.17 sec)
+```
+
+Through the query plan, we can see that doris only reads three partition files whose c_nationkey is less than 3, and the file reading method is native.
+In addition, doris supports the `deletion vectors` of paimon.
+First, we will modify some data through flink.
+
+```sql
+Flink SQL> update customer set c_address='c_address_update' where c_nationkey = 1;
+[INFO] Submitting SQL update statement to the cluster...
+[INFO] SQL update statement has been successfully submitted to the cluster:
+Job ID: ff838b7b778a94396b332b0d93c8f7ac
+
+```
+
+After waiting for the task to be completed, we can view the modified data through doris.
+
+```sql
+mysql> refresh table customer;
+Query OK, 0 rows affected (0.02 sec)
+
+mysql> explain verbose select * from customer where c_nationkey < 3;
++------------------------------------------------------------------------------------------------------------------------------------------------+
+| Explain String(Nereids Planner) |
++------------------------------------------------------------------------------------------------------------------------------------------------+
+| PLAN FRAGMENT 0 |
+| OUTPUT EXPRS: |
+| c_custkey[#0] |
+| c_name[#1] |
+| c_address[#2] |
+| c_nationkey[#3] |
+| c_phone[#4] |
+| c_acctbal[#5] |
+| c_mktsegment[#6] |
+| c_comment[#7] |
+| PARTITION: UNPARTITIONED |
+| |
+| HAS_COLO_PLAN_NODE: false |
+| |
+| VRESULT SINK |
+| MYSQL_PROTOCAL |
+| |
+| 1:VEXCHANGE |
+| offset: 0 |
+| distribute expr lists: |
+| tuple ids: 0 |
+| |
+| PLAN FRAGMENT 1 |
+| |
+| PARTITION: RANDOM |
+| |
+| HAS_COLO_PLAN_NODE: false |
+| |
+| STREAM DATA SINK |
+| EXCHANGE ID: 01 |
+| UNPARTITIONED |
+| |
+| 0:VPAIMON_SCAN_NODE(68) |
Review Comment:
Only show this part
--
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-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [feature](paimon/iceberg)add a docker that can directly pull up all the relevant environments of paimon/iceberg/doris [doris]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #38009:
URL: https://github.com/apache/doris/pull/38009#issuecomment-2232857097
#### `sh-checker report`
To get the full details, please check in the [job]("https://github.com/apache/doris/actions/runs/9971693288") output.
<details>
<summary>shellcheck errors</summary>
```
'shellcheck ' returned error 1 finding the following syntactical issues:
----------
In samples/datalake/iceberg_and_paimon/scripts/start_doris.sh line 3:
export PATH=$JAVA_HOME/bin:$PATH
^--------^ SC2154 (warning): JAVA_HOME is referenced but not assigned.
^--------^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.
^---^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.
Did you mean:
export PATH=${JAVA_HOME}/bin:${PATH}
In samples/datalake/iceberg_and_paimon/scripts/start_doris.sh line 16:
while [ ! -f "/opt/doris/fe/log/fe.log" ]
^-- SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.
Did you mean:
while [[ ! -f "/opt/doris/fe/log/fe.log" ]]
In samples/datalake/iceberg_and_paimon/scripts/start_doris.sh line 22:
QE=$(cat /opt/doris/fe/log/fe.log|grep "QE service start.")
^----------------------^ SC2002 (style): Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.
In samples/datalake/iceberg_and_paimon/scripts/start_doris.sh line 23:
echo $QE
^-^ SC2086 (info): Double quote to prevent globbing and word splitting.
^-^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.
Did you mean:
echo "${QE}"
In samples/datalake/iceberg_and_paimon/scripts/start_doris.sh line 24:
while [ -z "$QE" ]
^----------^ SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.
^-^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.
Did you mean:
while [[ -z "${QE}" ]]
In samples/datalake/iceberg_and_paimon/scripts/start_doris.sh line 28:
QE=$(cat /opt/doris/fe/log/fe.log|grep "QE service start.")
^----------------------^ SC2002 (style): Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.
In samples/datalake/iceberg_and_paimon/scripts/start_doris.sh line 34:
ERR=$(echo $MYSQL_ERROR|grep "Can't connect to MySQL")
^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.
^----------^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.
Did you mean:
ERR=$(echo "${MYSQL_ERROR}"|grep "Can't connect to MySQL")
In samples/datalake/iceberg_and_paimon/scripts/start_doris.sh line 35:
echo $ERR
^--^ SC2086 (info): Double quote to prevent globbing and word splitting.
^--^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.
Did you mean:
echo "${ERR}"
In samples/datalake/iceberg_and_paimon/scripts/start_doris.sh line 36:
while [ ! -z "$ERR" ]
^-------------^ SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.
^-- SC2236 (style): Use -n instead of ! -z.
^--^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.
Did you mean:
while [[ ! -z "${ERR}" ]]
In samples/datalake/iceberg_and_paimon/scripts/start_doris.sh line 41:
ERR=$(echo $MYSQL_ERROR|grep "Can't connect to MySQL")
^----------^ SC2086 (info): Double quote to prevent globbing and word splitting.
^----------^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.
Did you mean:
ERR=$(echo "${MYSQL_ERROR}"|grep "Can't connect to MySQL")
In samples/datalake/iceberg_and_paimon/start_all.sh line 1:
set -e
^-- SC2148 (error): Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
In samples/datalake/iceberg_and_paimon/start_all.sh line 33:
cd ${curdir} || exit
^-------^ SC2086 (info): Double quote to prevent globbing and word splitting.
Did you mean:
cd "${curdir}" || exit
In samples/datalake/iceberg_and_paimon/start_all.sh line 40:
download_source_file "${DORIS_PACKAGE}.tar.gz" "a4d8bc9730aca3a51294e87d7d5b3e8e" "$DORIS_DOWNLOAD_URL"
^-----------------^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.
Did you mean:
download_source_file "${DORIS_PACKAGE}.tar.gz" "a4d8bc9730aca3a51294e87d7d5b3e8e" "${DORIS_DOWNLOAD_URL}"
In samples/datalake/iceberg_and_paimon/start_all.sh line 81:
cp *.jar jars/
^-- SC2035 (info): Use ./*glob* or -- *glob* so names with dashes won't become options.
In samples/datalake/iceberg_and_paimon/start_all.sh line 86:
echo $PWD
^--^ SC2086 (info): Double quote to prevent globbing and word splitting.
^--^ SC2250 (style): Prefer putting braces around variable references even when not strictly required.
Did you mean:
echo "${PWD}"
In samples/datalake/iceberg_and_paimon/start_doris_client.sh line 1:
docker exec -it doris-iceberg-paimon-doris sh -c "mysql -u root -h doris -P 9030"
^-- SC2148 (error): Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
In samples/datalake/iceberg_and_paimon/start_flink_client.sh line 1:
docker exec -it doris-iceberg-paimon-jobmanager sql-client.sh -i /opt/flink/sql/init_tables.sql
^-- SC2148 (error): Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
In samples/datalake/iceberg_and_paimon/start_spark_iceberg_client.sh line 1:
docker exec -it doris-iceberg-paimon-spark spark-sql --conf spark.sql.extensions=org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions
^-- SC2148 (error): Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
In samples/datalake/iceberg_and_paimon/start_spark_paimon_client.sh line 1:
docker exec -it doris-iceberg-paimon-spark spark-sql --conf spark.sql.extensions=org.apache.paimon.spark.extensions.PaimonSparkSessionExtensions
^-- SC2148 (error): Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
In samples/datalake/iceberg_and_paimon/stop_all.sh line 1:
docker compose -f docker-compose.yml --env-file docker-compose.env down
^-- SC2148 (error): Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
For more information:
https://www.shellcheck.net/wiki/SC2148 -- Tips depend on target shell and y...
https://www.shellcheck.net/wiki/SC2154 -- JAVA_HOME is referenced but not a...
https://www.shellcheck.net/wiki/SC2035 -- Use ./*glob* or -- *glob* so name...
----------
You can address the above issues in one of three ways:
1. Manually correct the issue in the offending shell script;
2. Disable specific issues by adding the comment:
# shellcheck disable=NNNN
above the line that contains the issue, where NNNN is the error code;
3. Add '-e NNNN' to the SHELLCHECK_OPTS setting in your .yml action file.
```
</details>
<details>
<summary>shfmt errors</summary>
```
'shfmt ' returned error 1 finding the following formatting issues:
----------
--- samples/datalake/iceberg_and_paimon/scripts/start_doris.sh.orig
+++ samples/datalake/iceberg_and_paimon/scripts/start_doris.sh
@@ -13,32 +13,29 @@
rm -rf /opt/doris/be/storage/*
/opt/doris/be/bin/start_be.sh --daemon
-while [ ! -f "/opt/doris/fe/log/fe.log" ]
-do
+while [ ! -f "/opt/doris/fe/log/fe.log" ]; do
echo "wait log..."
sleep 2
done
-QE=$(cat /opt/doris/fe/log/fe.log|grep "QE service start.")
+QE=$(cat /opt/doris/fe/log/fe.log | grep "QE service start.")
echo $QE
-while [ -z "$QE" ]
-do
+while [ -z "$QE" ]; do
echo "wait fe..."
sleep 2
- QE=$(cat /opt/doris/fe/log/fe.log|grep "QE service start.")
+ QE=$(cat /opt/doris/fe/log/fe.log | grep "QE service start.")
done
echo 'doris is started'
-MYSQL_ERROR=$(mysql -u root -P 9030 -h doris < /opt/doris-bin/init_doris.sql 2>&1)
-ERR=$(echo $MYSQL_ERROR|grep "Can't connect to MySQL")
+MYSQL_ERROR=$(mysql -u root -P 9030 -h doris </opt/doris-bin/init_doris.sql 2>&1)
+ERR=$(echo $MYSQL_ERROR | grep "Can't connect to MySQL")
echo $ERR
-while [ ! -z "$ERR" ]
-do
+while [ ! -z "$ERR" ]; do
echo "wait mysql..."
sleep 2
- MYSQL_ERROR=$(mysql -u root -P 9030 -h doris < /opt/doris-bin/init_doris.sql 2>&1)
- ERR=$(echo $MYSQL_ERROR|grep "Can't connect to MySQL")
+ MYSQL_ERROR=$(mysql -u root -P 9030 -h doris </opt/doris-bin/init_doris.sql 2>&1)
+ ERR=$(echo $MYSQL_ERROR | grep "Can't connect to MySQL")
done
echo 'doris is inited'
--- samples/datalake/iceberg_and_paimon/start_all.sh.orig
+++ samples/datalake/iceberg_and_paimon/start_all.sh
@@ -28,7 +28,6 @@
fi
}
-
curdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
cd ${curdir} || exit
@@ -49,14 +48,14 @@
download_source_file "flink-s3-fs-hadoop-1.18.0.jar" "60b75e0fdc5ed05f1213b593c4b66556" "https://repo1.maven.org/maven2/org/apache/flink/flink-s3-fs-hadoop/1.18.0"
if [[ ! -f "jdk1.8.0_202/SUCCESS" ]]; then
- echo "Prepare jdk8 environment"
- if [[ -d "jdk1.8.0_202" ]]; then
- echo "Remove broken jdk1.8.0_202"
- rm -rf jdk1.8.0_202
- fi
- echo "Unpackage jdk1.8.0_202"
- tar xzf jdk-8u202-linux-x64.tar.gz
- touch jdk1.8.0_202/SUCCESS
+ echo "Prepare jdk8 environment"
+ if [[ -d "jdk1.8.0_202" ]]; then
+ echo "Remove broken jdk1.8.0_202"
+ rm -rf jdk1.8.0_202
+ fi
+ echo "Unpackage jdk1.8.0_202"
+ tar xzf jdk-8u202-linux-x64.tar.gz
+ touch jdk1.8.0_202/SUCCESS
fi
if [[ ! -f "doris-bin/SUCCESS" ]]; then
@@ -72,14 +71,14 @@
fi
if [[ ! -f "jars/SUCCESS" ]]; then
- echo "Prepare jars environment"
- if [[ -d "jars" ]]; then
- echo "Remove broken jars"
- rm -rf jars
- fi
- mkdir jars
- cp *.jar jars/
- touch jars/SUCCESS
+ echo "Prepare jars environment"
+ if [[ -d "jars" ]]; then
+ echo "Remove broken jars"
+ rm -rf jars
+ fi
+ mkdir jars
+ cp *.jar jars/
+ touch jars/SUCCESS
fi
cd ../
@@ -89,10 +88,10 @@
docker compose -f docker-compose.yml --env-file docker-compose.env up -d
echo "Start init iceberg and paimon tables..."
-docker exec -it doris-iceberg-paimon-jobmanager sql-client.sh -f /opt/flink/sql/init_tables.sql >> init.log
+docker exec -it doris-iceberg-paimon-jobmanager sql-client.sh -f /opt/flink/sql/init_tables.sql >>init.log
echo "Start prepare data for tables..."
-docker exec -it doris-iceberg-paimon-spark spark-sql --conf spark.sql.extensions=org.apache.paimon.spark.extensions.PaimonSparkSessionExtensions -f /opt/sql/prepare_data.sql >> init.log
+docker exec -it doris-iceberg-paimon-spark spark-sql --conf spark.sql.extensions=org.apache.paimon.spark.extensions.PaimonSparkSessionExtensions -f /opt/sql/prepare_data.sql >>init.log
echo "============================================================================="
echo "Success to launch doris+iceberg+paimon+flink+spark+minio environments!"
--- samples/datalake/iceberg_and_paimon/start_doris_client.sh.orig
+++ samples/datalake/iceberg_and_paimon/start_doris_client.sh
--- samples/datalake/iceberg_and_paimon/start_flink_client.sh.orig
+++ samples/datalake/iceberg_and_paimon/start_flink_client.sh
--- samples/datalake/iceberg_and_paimon/start_spark_iceberg_client.sh.orig
+++ samples/datalake/iceberg_and_paimon/start_spark_iceberg_client.sh
--- samples/datalake/iceberg_and_paimon/start_spark_paimon_client.sh.orig
+++ samples/datalake/iceberg_and_paimon/start_spark_paimon_client.sh
--- samples/datalake/iceberg_and_paimon/stop_all.sh.orig
+++ samples/datalake/iceberg_and_paimon/stop_all.sh
----------
You can reformat the above files to meet shfmt's requirements by typing:
shfmt -w filename
```
</details>
--
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-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [feature](paimon/iceberg)add a docker that can directly pull up all the relevant environments of paimon/iceberg/doris [doris]
Posted by "morningman (via GitHub)" <gi...@apache.org>.
morningman commented on PR #38009:
URL: https://github.com/apache/doris/pull/38009#issuecomment-2233596797
run buildall
--
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-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [feature](paimon/iceberg)add a docker that can directly pull up all the relevant environments of paimon/iceberg/doris [doris]
Posted by "morningman (via GitHub)" <gi...@apache.org>.
morningman merged PR #38009:
URL: https://github.com/apache/doris/pull/38009
--
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-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [feature](paimon/iceberg)add a docker that can directly pull up all the relevant environments of paimon/iceberg/doris [doris]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #38009:
URL: https://github.com/apache/doris/pull/38009#issuecomment-2233598207
PR approved by at least one committer and no changes requested.
--
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-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org