The data type `NUMBER(p,s)` of oracle has some different of doris decimal type in semantics. For Oracle Number(p,s) type: 1. if s<0 , it means this is an Interger. This `NUMBER(p,s)` has (p+|s| ) significant digit, and rounding will be performed at s position. eg: if we insert 1234567 into `NUMBER(5,-2)` type, then the oracle will store 1234500. In this case, Doris will use int type (`TINYINT/SMALLINT/INT/.../LARGEINT`). 2. if s>=0 && s<p , it just like doris Decimal(p,s) behavior. 3. if s>=0 && s>p, it means this is a decimal(like 0.xxxxx). p represents how many digits can be left to the left after the decimal point, the figure after the decimal point s will be rounded. eg: we can not insert 0.0123456 into `NUMBER(5,7)` type, because there must be two zeros on the right side of the decimal point, we can insert 0.0012345 into `NUMBER(5,7)` type. In this case, Doris will use `DECIMAL(s,s)` 4. if we don't specify p and s for `NUMBER(p,s)` like `NUMBER`, the p and s of `NUMBER` are uncertain. In this case, doris can not determine p and s, so doris can not determine data type.
Doris Develop Environment based on docker
Preparation
-
Download the Doris code repo
$ cd /to/your/workspace/ $ git clone https://github.com/apache/doris.gitYou can remove the
.gitdir indoris/to make the dir size smaller. So that the following generated docker image can be smaller. -
Copy Dockerfile
$ cd /to/your/workspace/ $ cp doris/docker/Dockerfile ./
After preparation, your workspace should like this:
.
├── Dockerfile
├── doris
│ ├── be
│ ├── bin
│ ├── build.sh
│ ├── conf
│ ├── DISCLAIMER-WIP
│ ├── docker
│ ├── docs
│ ├── env.sh
│ ├── fe
│ ├── ...
Build docker image
$ cd /to/your/workspace/
$ docker build -t doris:v1.0 .
dorisis docker image repository name andv1.0is tag name, you can change them to whatever you like.
Use docker image
This docker image you just built does not contain Doris source code repo. You need to download it first and map it to the container. (You can just use the one you used to build this image before)
$ docker run -it -v /your/local/path/doris/:/root/doris/ doris:v1.0
$ docker run -it -v /your/local/.m2:/root/.m2 -v /your/local/doris-DORIS-x.x.x-release/:/root/doris-DORIS-x.x.x-release/ doris:v1.0
Then you can build source code inside the container.
$ cd /root/doris/
$ sh build.sh
NOTICE
The default JDK version is openjdk 11, if you want to use openjdk 8, you can run the command:
$ alternatives --set java java-1.8.0-openjdk.x86_64
$ alternatives --set javac java-1.8.0-openjdk.x86_64
$ export JAVA_HOME=/usr/lib/jvm/java-1.8.0
The version of jdk you used to run FE must be the same version you used to compile FE.
Latest update time
2022-1-23