-
Notifications
You must be signed in to change notification settings - Fork 2.2k
[Feature][Connector-V2] Support use EasyExcel as read excel engine #8064
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
86 commits
Select commit
Hold shift + click to select a range
6f3bdc1
bugfix read more than 65000 rows excle oom,change poi to easyexcel
dwave 90c2429
rollbak bin
dwave 5b43718
修改注释
dwave 41a8376
代码检查调整
dwave 3145657
读取方式切换为inputStream
dwave eec6dcf
Add matching format types for DateTime and DateTime classes
dwave 7efacad
Added matching time format based on time string, and fixed the proble…
dwave 8184f0a
Code formatting adjustments
dwave eca2c5d
Allows user-defined time formatting configuration
dwave 7246245
change code style
dwave 366d052
Modify the test case to reduce the test data set
dwave 2151c94
change code style
dwave c428f1a
remove date_format config in
dwave a523335
if don't have SHEET_NAME , read sheet0
dwave c4eac91
if don't have SHEET_NAME , read sheet0
dwave 98f20ac
add e2e.xls test case ,add matchTimeFormatter,fix cellData NullPointE…
dwave bbb39ea
code style
dwave c384fa1
Update seatunnel-connectors-v2/connector-file/connector-file-base/src…
dwave e778ab0
add JsonProcessingException
dwave c5dc517
TODO xls can't read
dwave 91958d7
back to EasyExcel
dwave 7c60b9e
add EXCEL_ENGIN config
dwave ff4f95f
add EXCEL_ENGIN config
dwave 85cb62b
add EXCEL_ENGIN config
dwave 9c58b0f
Merge remote-tracking branch 'origin/dev' into bugfix-large-excel
dwave c3a1568
marge
dwave 5d106b2
Support read blank string
dwave 2f8aac1
Support read blank string
dwave 08c2b24
Adjust the excel parsing engine config to enumeration type
dwave 866d034
Adjust the excel parsing engine config to enumeration type
dwave 085e2a7
remove LocalFile sink excel engine change
dwave 5c3f545
Update seatunnel-connectors-v2/connector-file/connector-file-base/src…
Hisoka-X 0b60e58
cell convert reuse
dwave 7bc928e
cell convert reuse
dwave e1aa84a
cell convert reuse \ BaseSourceConfigOptions enumType\log.error to debug
dwave 053548e
Merge branch 'bugfix-large-excel' of https://github.com/dwave/seatunn…
dwave d0027a2
cell convert reuse
dwave 9e481ed
cell convert reuse
dwave e359316
bugfix read more than 65000 rows excle oom,change poi to easyexcel
dwave 659c657
rollbak bin
dwave 8ec975b
修改注释
dwave ce4f31a
代码检查调整
dwave dceeedb
读取方式切换为inputStream
dwave 559ea1a
Add matching format types for DateTime and DateTime classes
dwave 933118e
Added matching time format based on time string, and fixed the proble…
dwave c293c36
Code formatting adjustments
dwave 871b48d
Allows user-defined time formatting configuration
dwave def3160
change code style
dwave aa982d3
Modify the test case to reduce the test data set
dwave 6e0945a
change code style
dwave 4682d47
remove date_format config in
dwave 5fda410
if don't have SHEET_NAME , read sheet0
dwave 27fe99a
if don't have SHEET_NAME , read sheet0
dwave cbdf959
add e2e.xls test case ,add matchTimeFormatter,fix cellData NullPointE…
dwave 7f82bc9
code style
dwave 546f4e7
Update seatunnel-connectors-v2/connector-file/connector-file-base/src…
dwave c37afd4
add JsonProcessingException
dwave 623db3f
TODO xls can't read
dwave 20b363c
back to EasyExcel
dwave b75c1a7
add EXCEL_ENGIN config
dwave 59726d8
add EXCEL_ENGIN config
dwave 0a89946
add EXCEL_ENGIN config
dwave 4162b65
marge
dwave 84ce08c
Support read blank string
dwave 03bfc54
Support read blank string
dwave e8e0e8e
Adjust the excel parsing engine config to enumeration type
dwave 988c1ff
Adjust the excel parsing engine config to enumeration type
dwave 1f0eee4
remove LocalFile sink excel engine change
dwave 65ec13a
Update seatunnel-connectors-v2/connector-file/connector-file-base/src…
Hisoka-X eb2da1c
cell convert reuse
dwave 3c48e74
cell convert reuse \ BaseSourceConfigOptions enumType\log.error to debug
dwave b4604d7
cell convert reuse
dwave 76d85c6
cell convert reuse
dwave cb3bfca
bugfix read more than 65000 rows excle oom,change poi to easyexcel
dwave 311b143
Merge remote-tracking branch 'origin/bugfix-large-excel' into bugfix-…
dwave b9f5f08
plugin_output
dwave 21ef01c
Merge branch 'dev' into bugfix-large-excel-backup
dwave 33983a3
merge
dwave 3d339c5
code style
dwave 30a313f
DateUtils merge
dwave 136ac66
code style
dwave 60b2e3e
fix SneakyThrows
dwave 7218036
fix SneakyThrows
dwave 1bf9441
code style
dwave 2c7b6fb
DateTimeUtils TimeUtils DateUtils add test case
dwave e474534
DateTimeUtils TimeUtils DateUtils add test case
dwave File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
seatunnel-common/src/test/java/org/apache/seatunnel/common/utils/TimeUtilsTest.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| /* | ||
| * 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. | ||
| */ | ||
|
|
||
| package org.apache.seatunnel.common.utils; | ||
|
|
||
| import org.junit.jupiter.api.Assertions; | ||
| import org.junit.jupiter.api.Test; | ||
|
|
||
| public class TimeUtilsTest { | ||
| @Test | ||
| public void testMatchTimeFormatter() { | ||
| String timeStr = "12:12:12"; | ||
| Assertions.assertEquals( | ||
| "12:12:12", | ||
| TimeUtils.parse(timeStr, TimeUtils.matchTimeFormatter(timeStr)).toString()); | ||
|
|
||
| timeStr = "12:12:12.123"; | ||
| Assertions.assertEquals( | ||
| "12:12:12.123", | ||
| TimeUtils.parse(timeStr, TimeUtils.matchTimeFormatter(timeStr)).toString()); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
...base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/config/ExcelEngine.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| /* | ||
| * 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. | ||
| */ | ||
|
|
||
| package org.apache.seatunnel.connectors.seatunnel.file.config; | ||
|
|
||
| import java.io.Serializable; | ||
|
|
||
| public enum ExcelEngine implements Serializable { | ||
| POI("POI"), | ||
| EASY_EXCEL("EasyExcel"); | ||
|
|
||
| private final String excelEngineName; | ||
|
|
||
| ExcelEngine(String excelEngineName) { | ||
| this.excelEngineName = excelEngineName; | ||
| } | ||
|
|
||
| public String getExcelEngineName() { | ||
| return excelEngineName; | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As we all know, easyexcel is no longer maintained. It doesn't seem good to introduce it at this time. We can try other alternatives, such as fastexcel. There are also reports online that it is faster than easyexcel. What do you think? cc @hailin0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or easyexcel-plus?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will give it a try
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
easyexcel-plus was only on GitHub last night, and I haven't seen it in the maven repository yet
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried using fastexcel, but there is a problem with its xls support for excel97-2003
dhatim/fastexcel#287

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can set poi version in https://github.com/apache/seatunnel/pull/8064/files#diff-1fb7018c76d4a71faced6c343bcbff3a7d20464c8c9f80338fa2a50e57fae254R142 consistent with that in easyexcel.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a configuration item for excel reading to select the engine for excel reading. POI is used by default. EaseExcel can be used through configuration. The configuration item name is excel_engine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the CI phase, there are errors in the test cases of other modules, causing CI to fail
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
retry, many reasons can be resolved by retrying[/dog]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Finally succeeded