Skip to content

Commit

Permalink
feat(scripts/setup): Install jdk
Browse files Browse the repository at this point in the history
Signed-off-by: Xuanwo <github@xuanwo.io>
  • Loading branch information
Xuanwo authored and Veeupup committed May 9, 2022
1 parent 3e51bca commit e2332ed
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Copyright 2022 Datafuse Labs.
//
// Licensed 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.

use crate::pipelines::new::processors::HashJoinState;

pub struct NewHashTable {}


impl HashJoinState for NewHashTable {

}
32 changes: 32 additions & 0 deletions scripts/setup/dev_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,37 @@ function install_thrift {
esac
}

function install_jdk {
PACKAGE_MANAGER=$1

echo "==> installing java development kit..."

case "$PACKAGE_MANAGER" in
apt-get)
install_pkg openjdk-11-jre-headless "$PACKAGE_MANAGER"
;;
pacman)
install_pkg jre11-openjdk-headless "$PACKAGE_MANAGER"
;;
apk)
install_pkg openjdk11 "$PACKAGE_MANAGER"
;;
yum)
install_pkg java-11-openjdk "$PACKAGE_MANAGER"
;;
dnf)
install_pkg java-11-openjdk "$PACKAGE_MANAGER"
;;
brew)
install_pkg java11 "$PACKAGE_MANAGER"
;;
*)
echo "Unable to install jdk with package manager: $PACKAGE_MANAGER"
exit 1
;;
esac
}

function install_pkg_config {
PACKAGE_MANAGER=$1

Expand Down Expand Up @@ -455,6 +486,7 @@ if [[ "$INSTALL_BUILD_TOOLS" == "true" ]]; then
install_openssl "$PACKAGE_MANAGER"
install_protobuf "$PACKAGE_MANAGER"
install_thrift "$PACKAGE_MANAGER"
install_jdk "$PACKAGE_MANAGER"

install_pkg cmake "$PACKAGE_MANAGER"
install_pkg clang "$PACKAGE_MANAGER"
Expand Down
18 changes: 9 additions & 9 deletions tests/suites/0_stateless/20+_others/20_0001_planner_v2.sql
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
set enable_planner_v2 = 1;

select '====SELECT_FROM_NUMBERS===='
select '====SELECT_FROM_NUMBERS====';
select * from numbers(10);

-- Comparison expressions
select '====COMPARSION===='
select '====COMPARSION====';
select * from numbers(10) where number between 1 and 9 and number > 2 and number < 8 and number is not null and number = 5 and number >= 5 and number <= 5;

-- Cast expression
select '====CAST===='
select '====CAST====';
select * from numbers(10) where cast(number as string) = '5';

-- Binary operator
select '====BINARY_OPERATOR===='
select '====BINARY_OPERATOR====';
select (number + 1 - 2) * 3 / 4 from numbers(1);

-- Functions
select '====FUNCTIONS===='
select '====FUNCTIONS====';
select sin(cos(number)) from numbers(1);

-- In list
select '====IN_LIST===='
select '====IN_LIST====';
select * from numbers(5) where number in (1, 3);

-- Aggregator operator
select '====AGGREGATER===='
select '====AGGREGATER====';
create table t(a int, b int);
insert into t values(1, 2), (2, 3), (3, 4);
select sum(a) + 1 from t group by a;
Expand Down Expand Up @@ -52,7 +52,7 @@ SELECT max(number) FROM numbers_mt (10) where number > 99999999998;
SELECT max(number) FROM numbers_mt (10) where number > 2;

-- Inner join
select '====INNER_JOIN===='
select '====INNER_JOIN====';
create table t(a int);
insert into t values(1),(2),(3);
create table t1(b float);
Expand All @@ -76,7 +76,7 @@ drop table t2;
select count(*) from numbers(1000) as t inner join numbers(1000) as t1 on t.number = t1.number;

-- Select without from
select '====SELECT_WITHOUT_FROM===='
select '====SELECT_WITHOUT_FROM====';
select 1 + 1;
select to_int(8);
select "new_planner";
Expand Down

0 comments on commit e2332ed

Please sign in to comment.