Skip to content

Commit

Permalink
apacheGH-10: Add basic pre-commit-config with Apache RAT
Browse files Browse the repository at this point in the history
Fixes apache#10.
  • Loading branch information
lidavidm committed Nov 28, 2024
1 parent 4ed7c73 commit 7d346b7
Show file tree
Hide file tree
Showing 106 changed files with 338 additions and 183 deletions.
26 changes: 13 additions & 13 deletions .github/ISSUE_TEMPLATE/usage_question.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,30 +23,30 @@ body:
- type: markdown
attributes:
value: >
While we enable issues as a mechanism for new contributors and passers-by who
are unfamiliar with Apache Software Foundation projects to ask questions and
interact with the project, we encourage users to ask such questions on public
While we enable issues as a mechanism for new contributors and passers-by who
are unfamiliar with Apache Software Foundation projects to ask questions and
interact with the project, we encourage users to ask such questions on public
mailing lists:
* Development discussions: [email protected] (first subscribe by sending an
* Development discussions: [email protected] (first subscribe by sending an
e-mail to [email protected]).
* User discussions: [email protected] (first subscribe by sending an e-mail
* User discussions: [email protected] (first subscribe by sending an e-mail
to [email protected]).
* Mailing list archives: https://arrow.apache.org/community/
Do not be surprised by responses to issues raised here directing you to those
Do not be surprised by responses to issues raised here directing you to those
mailing lists, or to report a bug or feature request here.
Thank you!
- type: textarea
id: description
attributes:
label: >
Describe the usage question you have. Please include as many useful details as
label: >
Describe the usage question you have. Please include as many useful details as
possible.
validations:
required: true
52 changes: 52 additions & 0 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

name: Dev

on:
pull_request: {}
push: {}

concurrency:
group: ${{ github.repository }}-${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true

permissions:
contents: read

jobs:
pre-commit:
name: "pre-commit"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false

- uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: pre-commit (cache)
uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
- name: pre-commit (--all-files)
run: |
python -m pip install pre-commit
pre-commit run --show-diff-on-failure --color=always --all-files
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,18 @@
.idea/
.project
.settings/
/build/
/*-build/
/.mvn/.develocity/
/build/
/dev/release/apache-rat-0.16.1.jar
/dev/release/filtered_rat.txt
/dev/release/rat.xml
CMakeCache.txt
CMakeFiles/
Makefile
TAGS
arrow-git.properties
cmake_install.cmake
dependency-reduced-pom.xml
install_manifest.txt
target/
41 changes: 41 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: cef0300fd0fc4d2a87a85fa2093c6b283ea36f4b # v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- id: file-contents-sorter
files: .gitignore

- repo: local
hooks:
- id: rat
name: Release Audit Tool
language: system
entry: |
bash -c " \
git archive HEAD \
--prefix=apache-arrow-go/ \
--output=apache-arrow-go.tar.gz && \
dev/release/run_rat.sh apache-arrow-go.tar.gz"
always_run: true
pass_filenames: false
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@

* [Code of Conduct for The Apache Software Foundation][1]

[1]: https://www.apache.org/foundation/policies/conduct.html
[1]: https://www.apache.org/foundation/policies/conduct.html
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@

## Did you find a bug?

The Arrow Java project uses GitHub as a bug tracker. To report a bug, sign in
The Arrow Java project uses GitHub as a bug tracker. To report a bug, sign in
to your GitHub account, navigate to [GitHub issues](https://github.com/apache/arrow-java/issues)
and click on **New issue** .

Before you create a new bug entry, we recommend you first search among
Before you create a new bug entry, we recommend you first search among
existing Arrow issues in [GitHub](https://github.com/apache/arrow-java/issues).

## Did you write a patch that fixes a bug or brings an improvement?
Expand Down
2 changes: 1 addition & 1 deletion adapter/jdbc/src/test/resources/h2/comment.sql
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ create table table1(
COMMENT ON TABLE table1 IS 'This is super special table with valuable data';
COMMENT ON COLUMN table1.id IS 'Record identifier';
COMMENT ON COLUMN table1.name IS 'Name of record';
COMMENT ON COLUMN table1.columnN IS 'Informative description of columnN';
COMMENT ON COLUMN table1.columnN IS 'Informative description of columnN';
6 changes: 3 additions & 3 deletions adapter/jdbc/src/test/resources/h2/test1_all_datatypes_h2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ data:
PARSEDATETIME(''2018-02-12 GMT'', ''yyyy-MM-dd z''), PARSEDATETIME(''2018-02-12 12:45:35 GMT'', ''yyyy-MM-dd HH:mm:ss z''),
''736f6d6520746578742074686174206e6565647320746f20626520636f6e76657274656420746f2062696e617279'', ''some text that needs to be converted to varchar'',
''736f6d6520746578742074686174206e6565647320746f20626520636f6e76657274656420746f2062696e617279'', ''some text that needs to be converted to clob'', ''some char text'', 1, null, ARRAY[],''{"s":"t"}'');'

query: 'select int_field1, bool_field2, tinyint_field3, smallint_field4, bigint_field5, decimal_field6, double_field7, real_field8,
time_field9, date_field10, timestamp_field11, binary_field12, varchar_field13, blob_field14, clob_field15, char_field16, bit_field17, null_field18, list_field19, map_field20 from table1'

Expand All @@ -77,7 +77,7 @@ rowCount: '10'
values:
- 'INT_FIELD1=101,102,103,104,null,null,107,108,109,110'
- 'BOOL_FIELD2=1,1,1,1,1,1,1,1,1,1'
- 'BIT_FIELD17=1,1,1,1,1,1,1,1,1,1'
- 'BIT_FIELD17=1,1,1,1,1,1,1,1,1,1'
- 'TINYINT_FIELD3=45,45,45,45,45,45,45,45,45,45'
- 'SMALLINT_FIELD4=12000,12000,12000,12000,12000,12000,12000,12000,12000,12000'
- 'BIGINT_FIELD5=92233720,92233720,92233720,92233720,92233720,92233720,92233720,92233720,92233720,92233720'
Expand Down Expand Up @@ -120,4 +120,4 @@ values:
some text that needs to be converted to clob,some text that needs to be converted to clob,
some text that needs to be converted to clob,some text that needs to be converted to clob'
- 'LIST_FIELD19=(1;2;3),(1;2),(1),(2;3;4),(2;3),(2),(3;4;5),(3;4),(3),()'
- 'MAP_FIELD20={"a":"b"|"key":"12345"},{"c":"d"},{"e":"f"},{"g":"h"},{"i":"j"},{"k":"l"},{"m":"n"},{"o":"p"},{"q":"r"},{"s":"t"}'
- 'MAP_FIELD20={"a":"b"|"key":"12345"},{"c":"d"},{"e":"f"},{"g":"h"},{"i":"j"},{"k":"l"},{"m":"n"},{"o":"p"},{"q":"r"},{"s":"t"}'
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ vectors:
- 'TINYINT_FIELD3'
- 'SMALLINT_FIELD4'
- 'BIGINT_FIELD5'
- 'DECIMAL_FIELD6'
- 'DECIMAL_FIELD6'
- 'DOUBLE_FIELD7'
- 'REAL_FIELD8'
- 'TIME_FIELD9'
- 'DATE_FIELD10'
- 'DATE_FIELD10'
- 'TIMESTAMP_FIELD11'
- 'BINARY_FIELD12'
- 'VARCHAR_FIELD13'
- 'BLOB_FIELD14'
- 'CLOB_FIELD15'
- 'CLOB_FIELD15'
- 'CHAR_FIELD16'
- 'BIT_FIELD17'
- 'LIST_FIELD19'
Expand All @@ -52,4 +52,4 @@ query: 'select int_field1, bool_field2, tinyint_field3, smallint_field4, bigint_
time_field9, date_field10, timestamp_field11, binary_field12, varchar_field13, blob_field14, clob_field15, char_field16, bit_field17,
list_field19 from table1'

drop: 'DROP table table1;'
drop: 'DROP table table1;'
2 changes: 1 addition & 1 deletion adapter/jdbc/src/test/resources/h2/test1_charset_ch_h2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ values:
一些帶有char編碼的文本需要轉換為varchar,一些帶有char編碼的文本需要轉換為varchar'
- 'CLOB_FIELD15=一些带有char编码的文本需要转换为clob,一些带有char编码的文本需要转换为clob,一些带有char编码的文本需要转换为clob,
一些带有char编码的文本需要转换为clob,一些带有char编码的文本需要转换为clob'
- 'CHAR_FIELD16=一些char编码的字符文本,一些char编码的字符文本,一些char编码的字符文本,一些char编码的字符文本,一些char编码的字符文本'
- 'CHAR_FIELD16=一些char编码的字符文本,一些char编码的字符文本,一些char编码的字符文本,一些char编码的字符文本,一些char编码的字符文本'
2 changes: 1 addition & 1 deletion adapter/jdbc/src/test/resources/h2/test1_charset_h2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ values:
some text with char encoding that needs to be converted to clob,some text with char encoding that needs to be converted to clob,
some text with char encoding that needs to be converted to clob,some text with char encoding that needs to be converted to clob'
- 'CHAR_FIELD16=some char text with char encoding,some char text with char encoding,some char text with char encoding,some char text with char encoding,some char text with char encoding,
some char text with char encoding,some char text with char encoding,some char text with char encoding,some char text with char encoding,some char text with char encoding'
some char text with char encoding,some char text with char encoding,some char text with char encoding,some char text with char encoding,some char text with char encoding'
2 changes: 1 addition & 1 deletion adapter/jdbc/src/test/resources/h2/test1_charset_jp_h2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ values:
varcharに変換する必要があるcharエンコーディングのテキスト,varcharに変換する必要があるcharエンコーディングのテキスト'
- 'CLOB_FIELD15=charエンコーディングのあるテキストをclobに変換する必要がある,charエンコーディングのあるテキストをclobに変換する必要がある,charエンコーディングのあるテキストをclobに変換する必要がある,
charエンコーディングのあるテキストをclobに変換する必要がある,charエンコーディングのあるテキストをclobに変換する必要がある'
- 'CHAR_FIELD16=charエンコーディングのあるcharテキスト,charエンコーディングのあるcharテキスト,charエンコーディングのあるcharテキスト,charエンコーディングのあるcharテキスト,charエンコーディングのあるcharテキスト'
- 'CHAR_FIELD16=charエンコーディングのあるcharテキスト,charエンコーディングのあるcharテキスト,charエンコーディングのあるcharテキスト,charエンコーディングのあるcharテキスト,charエンコーディングのあるcharテキスト'
2 changes: 1 addition & 1 deletion adapter/jdbc/src/test/resources/h2/test1_charset_kr_h2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ values:
char 인코딩을 사용하는 일부 텍스트를 varchar로 변환해야합니다.,char 인코딩을 사용하는 일부 텍스트를 varchar로 변환해야합니다.'
- 'CLOB_FIELD15=clob로 변환해야하는 char 인코딩을 가진 텍스트,clob로 변환해야하는 char 인코딩을 가진 텍스트,clob로 변환해야하는 char 인코딩을 가진 텍스트,
clob로 변환해야하는 char 인코딩을 가진 텍스트,clob로 변환해야하는 char 인코딩을 가진 텍스트'
- 'CHAR_FIELD16=char 인코딩을 사용한 char 텍스트,char 인코딩을 사용한 char 텍스트,char 인코딩을 사용한 char 텍스트,char 인코딩을 사용한 char 텍스트,char 인코딩을 사용한 char 텍스트'
- 'CHAR_FIELD16=char 인코딩을 사용한 char 텍스트,char 인코딩을 사용한 char 텍스트,char 인코딩을 사용한 char 텍스트,char 인코딩을 사용한 char 텍스트,char 인코딩을 사용한 char 텍스트'
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,3 @@ values:
- '1518457535000'
- '1518457535000'
- '1518457535000'

2 changes: 1 addition & 1 deletion adapter/jdbc/src/test/resources/h2/test1_gmt_date_h2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ values:
- '17574'
- '17574'
- '17574'
- '17574'
- '17574'
2 changes: 1 addition & 1 deletion adapter/jdbc/src/test/resources/h2/test1_gmt_time_h2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ values:
- '45935000'
- '45935000'
- '45935000'
- '45935000'
- '45935000'
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ values:
- '1518439535000'
- '1518439535000'
- '1518439535000'
- '1518439535000'
- '1518439535000'
16 changes: 8 additions & 8 deletions adapter/jdbc/src/test/resources/h2/test1_int_h2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,16 @@ data:

values:
- '101'
- '101'
- '101'
- '101'
- '101'
- '101'
- '101'
- '101'
- '101'
- '101'

- '101'
- '101'
- '101'
- '101'
- '101'
- '101'
- '101'

query: 'select int_field1 from table1;'

drop: 'DROP table table1;'
2 changes: 1 addition & 1 deletion adapter/jdbc/src/test/resources/h2/test1_map_h2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ query: 'select map_field20 from table1;'
drop: 'DROP table table1;'

values:
- 'MAP_FIELD20={"a":"b"|"123":"qwerty"|"zxcvb":"!"},{"a":"b"|"123":"qwerty"|"c":"d"},{"":"value"},{"nonEmptyKey":null|"someOtherKey":""}'
- 'MAP_FIELD20={"a":"b"|"123":"qwerty"|"zxcvb":"!"},{"a":"b"|"123":"qwerty"|"c":"d"},{"":"value"},{"nonEmptyKey":null|"someOtherKey":""}'
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ rowCount: '2'

query: 'select int_field_null, int_field_notnull from table1;'

drop: 'DROP table table1;'
drop: 'DROP table table1;'
2 changes: 1 addition & 1 deletion adapter/jdbc/src/test/resources/h2/test1_null_h2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ data:
- 'INSERT INTO table1 VALUES (null);'
- 'INSERT INTO table1 VALUES (null);'
- 'INSERT INTO table1 VALUES (null);'

query: 'select null_field18 from table1;'

drop: 'DROP table table1;'
2 changes: 1 addition & 1 deletion adapter/jdbc/src/test/resources/h2/test1_pst_date_h2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ values:
- '17574'
- '17574'
- '17574'
- '17574'
- '17574'
2 changes: 1 addition & 1 deletion adapter/jdbc/src/test/resources/h2/test1_pst_time_h2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ values:
- '74735000'
- '74735000'
- '74735000'
- '74735000'
- '74735000'
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ values:
- '1518468335000'
- '1518468335000'
- '1518468335000'
- '1518468335000'
- '1518468335000'
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ type: 'selected_null_column'

vectors:
- 'BIGINT_FIELD5'
- 'DECIMAL_FIELD6'
- 'DECIMAL_FIELD6'
- 'DOUBLE_FIELD7'
- 'REAL_FIELD8'
- 'TIME_FIELD9'
- 'DATE_FIELD10'
- 'DATE_FIELD10'
- 'TIMESTAMP_FIELD11'
- 'BINARY_FIELD12'
- 'VARCHAR_FIELD13'
- 'BLOB_FIELD14'
- 'CLOB_FIELD15'
- 'CLOB_FIELD15'
- 'CHAR_FIELD16'
- 'BIT_FIELD17'
- 'LIST_FIELD19'
Expand All @@ -46,4 +46,4 @@ data:

query: 'select bigint_field5, decimal_field6, double_field7, real_field8, time_field9, date_field10, timestamp_field11, binary_field12, varchar_field13, blob_field14, clob_field15, char_field16, bit_field17, list_field19, map_field20 from table1'

drop: 'DROP table table1;'
drop: 'DROP table table1;'
Loading

0 comments on commit 7d346b7

Please sign in to comment.