Skip to content

Commit e9cd336

Browse files
MuLeiSY2021imbajin
andauthored
feat(loader): support jdbc date type & sync .editorconfig (#648)
* feat(loader): add jdbc date type support, include DATE、TIME、 DATETIME、 TIMESTAMP and YEAR * feat(test): add test resource * refact(test): rollback DBUtil.java * refactor(style): Synchronized the main module's .editorconfig with toolchain * feat(loader): Restore functions rolled back due to force push and ensure date compatibility * fix(loader): Add casting not support exception * fix some tiny problems * chore(loader): remove unnecessary if-else logic * fix(loader): fix hdfs type not support bug * fix(hubble-ci): specified python version to fix ModuleNotFoundError * chore(ci): unite all ci style * fix(ci): test ci working * fix(hubble-ci): fix tiny problem * fix(hubble-ci): update ci's pip env * fix(hubble-ci): try remove cache * fix(hubble-ci): try remove install pip * fix(hubble-ci): fix python version problem * empty test for ci * Update codeql-analysis.yml * revert codeql * tiny improve * Update DataTypeUtil.java --------- Co-authored-by: imbajin <[email protected]>
1 parent ed4660c commit e9cd336

File tree

14 files changed

+388
-153
lines changed

14 files changed

+388
-153
lines changed

.editorconfig

+72-3
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,80 @@ root = true
2121
charset = utf-8
2222
end_of_line = lf
2323
insert_final_newline = true
24+
max_line_length = 100
25+
ij_wrap_on_typing = true
26+
ij_visual_guides = 100
2427

25-
[*.{java, xml, py}]
28+
29+
[*.{java,xml,py}]
2630
indent_style = space
2731
indent_size = 4
2832

29-
[*.{java, xml}]
30-
# Ignore the IDEA unsupported warning & it works well (indeed)
33+
[*.{java,xml}]
3134
continuation_indent_size = 8
35+
# IDEA need their self argument
36+
ij_continuation_indent_size = 8
37+
38+
[*.md]
39+
max_line_length = off
40+
41+
[*.java]
42+
ij_java_doc_add_p_tag_on_empty_lines = true
43+
ij_java_doc_do_not_wrap_if_one_line = true
44+
ij_java_annotation_parameter_wrap = normal
45+
ij_java_align_multiline_annotation_parameters = true
46+
ij_java_class_count_to_use_import_on_demand = 100
47+
ij_java_names_count_to_use_import_on_demand = 100
48+
ij_java_imports_layout = $*, |, java.**, |, javax.**, |, org.**, |, com.**, |, *
49+
50+
ij_java_line_comment_at_first_column = false
51+
ij_java_align_multiline_chained_methods = true
52+
ij_java_align_multiline_parameters_in_calls = true
53+
ij_java_align_multiline_binary_operation = true
54+
ij_java_align_multiline_assignment = true
55+
ij_java_align_multiline_ternary_operation = true
56+
ij_java_align_multiline_throws_list = true
57+
ij_java_align_multiline_extends_list = true
58+
ij_java_align_multiline_array_initializer_expression = true
59+
60+
ij_java_call_parameters_wrap = normal
61+
ij_java_method_parameters_wrap = normal
62+
ij_java_resource_list_wrap = normal
63+
ij_java_extends_list_wrap = normal
64+
ij_java_throws_list_wrap = normal
65+
ij_java_method_call_chain_wrap = normal
66+
ij_java_binary_operation_wrap = normal
67+
ij_java_ternary_operation_wrap = normal
68+
ij_java_for_statement_wrap = normal
69+
ij_java_array_initializer_wrap = normal
70+
ij_java_assignment_wrap = normal
71+
ij_java_assert_statement_wrap = normal
72+
ij_java_if_brace_force = if_multiline
73+
ij_java_do_while_brace_force = always
74+
ij_java_while_brace_force = if_multiline
75+
ij_java_for_brace_force = if_multiline
76+
ij_java_wrap_long_lines = true
77+
ij_java_parameter_annotation_wrap = normal
78+
ij_java_enum_constants_wrap = split_into_lines
79+
80+
ij_java_keep_blank_lines_in_declarations = 1
81+
ij_java_keep_blank_lines_in_code = 1
82+
ij_java_keep_blank_lines_between_package_declaration_and_header = 1
83+
ij_java_keep_blank_lines_before_right_brace = 1
84+
ij_java_blank_lines_around_class = 1
85+
ij_java_blank_lines_after_class_header = 1
86+
87+
ij_smart_tabs = true
88+
89+
[*.xml]
90+
max_line_length = 120
91+
ij_visual_guides = 120
92+
ij_xml_text_wrap = off
93+
ij_xml_space_inside_empty_tag = true
94+
95+
[.yaml]
96+
ij_yaml_spaces_within_braces = false
97+
ij_yaml_spaces_within_brackets = false
98+
99+
[.properties]
100+
ij_properties_keep_blank_lines = true

.github/outdated/release.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ jobs:
1111
env:
1212
STATIC_DIR: assembly/static
1313
steps:
14+
- name: Fetch Code
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 2
18+
1419
- name: Install JDK 8
1520
uses: actions/setup-java@v3
1621
with:
@@ -24,11 +29,6 @@ jobs:
2429
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
2530
restore-keys: ${{ runner.os }}-m2
2631

27-
- name: Checkout
28-
uses: actions/checkout@v3
29-
with:
30-
fetch-depth: 2
31-
3232
- name: Package
3333
run: |
3434
mvn clean package -DskipTests

.github/workflows/client-go-ci.yml

+6-5
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,13 @@ jobs:
3030
fail-fast: false
3131
matrix:
3232
JAVA_VERSION: ['11']
33+
3334
steps:
35+
- name: Fetch Code
36+
uses: actions/checkout@v4
37+
with:
38+
fetch-depth: 2
39+
3440
- name: Install JDK 11
3541
uses: actions/setup-java@v3
3642
with:
@@ -44,11 +50,6 @@ jobs:
4450
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
4551
restore-keys: ${{ runner.os }}-m2
4652

47-
- name: Checkout
48-
uses: actions/checkout@v4
49-
with:
50-
fetch-depth: 2
51-
5253
- name: Use staged maven repo
5354
if: ${{ env.USE_STAGE == 'true' }}
5455
run: |

.github/workflows/codeql-analysis.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
run: |
5252
cp $HOME/.m2/settings.xml /tmp/settings.xml
5353
mv -vf .github/configs/settings.xml $HOME/.m2/settings.xml
54-
54+
5555
- name: Use Node.js 16
5656
uses: actions/setup-node@v3
5757
with:
@@ -64,11 +64,11 @@ jobs:
6464
# If you wish to specify custom queries, you can do so here or in a config file.
6565
# By default, queries listed here will override any specified in a config file.
6666
# Prefix the list here with "+" to use these queries and those in the config file.
67-
67+
6868
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
6969
# queries: security-extended,security-and-quality
7070

71-
71+
7272
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
7373
# If this step fails, then you should remove it and run the build manually (see below)
7474
- if: matrix.language == 'python' || matrix.language == 'javascript'
@@ -83,7 +83,7 @@ jobs:
8383
# ℹ️ Command-line programs to run using the OS shell.
8484
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
8585

86-
# If the Autobuild fails above, remove it and uncomment the following three lines.
86+
# If the Autobuild fails above, remove it and uncomment the following three lines.
8787
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
8888

8989
# - run: |

.github/workflows/hubble-ci.yml

+20-15
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,29 @@ jobs:
3333
env:
3434
USE_STAGE: 'true' # Whether to include the stage repository.
3535
STATIC_DIR: hugegraph-hubble/hubble-dist/assembly/static
36+
strategy:
37+
matrix:
38+
JAVA_VERSION: ['11']
39+
python-version: ["3.11"]
40+
3641
steps:
42+
- name: Fetch Code
43+
uses: actions/checkout@v4
44+
with:
45+
fetch-depth: 2
46+
3747
- name: Install JDK 11
3848
uses: actions/setup-java@v3
3949
with:
40-
java-version: '11'
50+
java-version: ${{ matrix.JAVA_VERSION }}
4151
distribution: 'adopt'
52+
53+
- name: Set up Python ${{ matrix.python-version }}
54+
uses: actions/setup-python@v5
55+
with:
56+
python-version: ${{ matrix.python-version }}
57+
cache: 'pip'
58+
4259
# we also should cache python & yarn & downloads to avoid useless work
4360
- name: Cache Maven packages
4461
uses: actions/cache@v3
@@ -48,19 +65,6 @@ jobs:
4865
restore-keys: |
4966
${{ runner.os }}-maven-
5067
51-
- name: Cache Python packages
52-
uses: actions/cache@v3
53-
with:
54-
path: ~/.cache/pip
55-
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
56-
restore-keys: |
57-
${{ runner.os }}-pip-
58-
59-
- name: Checkout
60-
uses: actions/checkout@v3
61-
with:
62-
fetch-depth: 2
63-
6468
- name: use staged maven repo settings
6569
if: ${{ env.USE_STAGE == 'true' }}
6670
run: |
@@ -75,7 +79,8 @@ jobs:
7579
7680
- name: Prepare env and service
7781
run: |
78-
sudo pip install -r ${TRAVIS_DIR}/requirements.txt
82+
83+
python -m pip install -r ${TRAVIS_DIR}/requirements.txt
7984
cd hugegraph-hubble
8085
mvn package -Dmaven.test.skip=true
8186
cd apache-hugegraph-hubble-incubating*

.github/workflows/license-checker.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ jobs:
3030
check-license-header:
3131
runs-on: ubuntu-latest
3232
steps:
33-
- uses: actions/checkout@v4
33+
- name: Fetch Code
34+
uses: actions/checkout@v4
3435
# More info could refer to: https://github.com/apache/skywalking-eyes
3536
- name: Check License Header
3637
uses: apache/skywalking-eyes@main

.github/workflows/loader-ci.yml

+10-6
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,20 @@ jobs:
3232
DB_USER: root
3333
DB_PASS: root
3434
DB_DATABASE: load_test
35+
strategy:
36+
matrix:
37+
JAVA_VERSION: ['11']
38+
3539
steps:
40+
- name: Fetch Code
41+
uses: actions/checkout@v4
42+
with:
43+
fetch-depth: 2
44+
3645
- name: Install JDK 11
3746
uses: actions/setup-java@v3
3847
with:
39-
java-version: '11'
48+
java-version: ${{ matrix.JAVA_VERSION }}
4049
distribution: 'adopt'
4150

4251
- name: Cache Maven packages
@@ -46,11 +55,6 @@ jobs:
4655
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
4756
restore-keys: ${{ runner.os }}-m2
4857

49-
- name: Checkout
50-
uses: actions/checkout@v3
51-
with:
52-
fetch-depth: 2
53-
5458
- name: use staged maven repo settings
5559
if: ${{ env.USE_STAGE == 'true' }}
5660
run: |

.github/workflows/spark-connector-ci.yml

+9-5
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,16 @@ jobs:
2727
TRAVIS_DIR: hugegraph-spark-connector/assembly/travis
2828
# hugegraph commit date: 2024-12-09
2929
COMMIT_ID: f838897
30+
strategy:
31+
matrix:
32+
JAVA_VERSION: [ '11' ]
33+
3034
steps:
35+
- name: Fetch Code
36+
uses: actions/checkout@v4
37+
with:
38+
fetch-depth: 2
39+
3140
- name: Install JDK 11
3241
uses: actions/setup-java@v4
3342
with:
@@ -41,11 +50,6 @@ jobs:
4150
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
4251
restore-keys: ${{ runner.os }}-m2
4352

44-
- name: Checkout
45-
uses: actions/checkout@v4
46-
with:
47-
fetch-depth: 2
48-
4953
- name: use staged maven repo settings
5054
if: ${{ env.USE_STAGE == 'true' }}
5155
run: |

.github/workflows/tools-ci.yml

+15-5
Original file line numberDiff line numberDiff line change
@@ -27,36 +27,46 @@ jobs:
2727
# TODO: could we use one param to unify it? or use a action template (could use one ci file)
2828
# TODO: replace it with the (latest - n) commit id (n >= 15)
2929
COMMIT_ID: 29ecc0
30+
strategy:
31+
matrix:
32+
JAVA_VERSION: [ '11' ]
33+
3034
steps:
35+
- name: Fetch Code
36+
uses: actions/checkout@v4
37+
with:
38+
fetch-depth: 2
39+
3140
- name: Install JDK 11
3241
uses: actions/setup-java@v3
3342
with:
34-
java-version: '11'
43+
java-version: ${{ matrix.JAVA_VERSION }}
3544
distribution: 'adopt'
3645
- name: Cache Maven packages
3746
uses: actions/cache@v3
3847
with:
3948
path: ~/.m2
4049
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
4150
restore-keys: ${{ runner.os }}-m2
42-
- name: Checkout
43-
uses: actions/checkout@v3
44-
with:
45-
fetch-depth: 2
51+
4652
- name: use staged maven repo settings
4753
if: ${{ env.USE_STAGE == 'true' }}
4854
run: |
4955
cp $HOME/.m2/settings.xml /tmp/settings.xml
5056
mv -vf .github/configs/settings.xml $HOME/.m2/settings.xml
57+
5158
- name: Compile
5259
run: |
5360
mvn install -pl hugegraph-client,hugegraph-tools -am -Dmaven.javadoc.skip=true -DskipTests -ntp
61+
5462
- name: Prepare env and service
5563
run: |
5664
$TRAVIS_DIR/install-hugegraph-from-source.sh $COMMIT_ID
65+
5766
- name: Run test
5867
run: |
5968
mvn test -Dtest=FuncTestSuite -pl hugegraph-tools -ntp
69+
6070
- name: Upload coverage to Codecov
6171
uses: codecov/codecov-action@v3
6272
with:

hugegraph-hubble/hubble-dist/assembly/travis/requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ pytest >= 3.0
33
six >= 1.11
44
behave >= 1.2.6
55
assertpy >= 0.15
6+
requests

0 commit comments

Comments
 (0)