Skip to content
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

[AMORO-2656] Enhance TimeUtils and fix config parsing error #2657

Open
wants to merge 21 commits into
base: master
Choose a base branch
from

Conversation

XBaith
Copy link
Contributor

@XBaith XBaith commented Mar 20, 2024

Why are the changes needed?

Close #2656.

Brief change log

  • Support month/year time unit
  • Stability enhancement

How was this patch tested?

  • Add some test cases that check the changes thoroughly including negative and positive cases if possible

  • Add screenshots for manual tests if appropriate

  • Run test locally before making a pull request

Documentation

  • Does this pull request introduce a new feature? ( no)
  • If yes, how is the feature documented? (not documented)

@github-actions github-actions bot added module:core Core module module:ams-server Ams server module labels Mar 20, 2024
Copy link

codecov bot commented Mar 20, 2024

Codecov Report

Attention: Patch coverage is 46.82540% with 67 lines in your changes are missing coverage. Please review.

Project coverage is 34.12%. Comparing base (82691aa) to head (43044f6).

Files Patch % Lines
...c/main/java/com/netease/arctic/utils/TimeUtil.java 60.82% 34 Missing and 4 partials ⚠️
...etease/arctic/api/config/DataExpirationConfig.java 0.00% 26 Missing ⚠️
...a/com/netease/arctic/api/config/ConfigHelpers.java 0.00% 1 Missing ⚠️
.../optimizing/maintainer/IcebergTableMaintainer.java 0.00% 0 Missing and 1 partial ⚠️
...er/optimizing/maintainer/MixedTableMaintainer.java 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #2657      +/-   ##
============================================
+ Coverage     33.96%   34.12%   +0.15%     
- Complexity     4357     4377      +20     
============================================
  Files           604      605       +1     
  Lines         50754    50774      +20     
  Branches       6673     6668       -5     
============================================
+ Hits          17241    17328      +87     
+ Misses        32124    32043      -81     
- Partials       1389     1403      +14     
Flag Coverage Δ
core 32.41% <46.82%> (+0.11%) ⬆️
trino 50.93% <ø> (+0.57%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@zhoujinsong zhoujinsong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@XBaith I left some comments. PTAL.

core/src/main/java/com/netease/arctic/utils/TimeUtils.java Outdated Show resolved Hide resolved
core/src/main/java/com/netease/arctic/utils/TimeUtils.java Outdated Show resolved Hide resolved
core/src/main/java/com/netease/arctic/utils/TimeUtils.java Outdated Show resolved Hide resolved
*
* @param text string to parse.
*/
public static Period parsePeriod(String text) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems there are some unused methods here. Do we need to keep them?

core/src/main/java/com/netease/arctic/utils/TimeUtils.java Outdated Show resolved Hide resolved
@zhoujinsong
Copy link
Contributor

We may need to remove one of the duplicated classes in ams-api and ams-server like com.netease.arctic.server.table.DataExpirationConfig. Keeping them for a long time may bring too much additional work.

@majin1102 @XBaith

@XBaith
Copy link
Contributor Author

XBaith commented Mar 21, 2024

We may need to remove one of the duplicated classes in ams-api and ams-server like com.netease.arctic.server.table.DataExpirationConfig

+1 👍

# Conflicts:
#	ams/api/src/main/java/com/netease/arctic/api/config/DataExpirationConfig.java
#	ams/server/src/main/java/com/netease/arctic/server/optimizing/maintainer/IcebergTableMaintainer.java
#	ams/server/src/main/java/com/netease/arctic/server/table/DataExpirationConfig.java
#	ams/server/src/main/java/com/netease/arctic/server/table/TableConfiguration.java
@XBaith XBaith requested a review from zhoujinsong March 28, 2024 01:50
@XBaith XBaith closed this Apr 15, 2024
@XBaith XBaith reopened this Apr 15, 2024
# Conflicts:
#	amoro-ams/amoro-ams-api/src/main/java/org/apache/amoro/api/config/DataExpirationConfig.java
#	amoro-core/src/main/java/org/apache/amoro/utils/TimeUtil.java
#	amoro-core/src/test/java/org/apache/amoro/utils/TestTimeUtil.java
@github-actions github-actions bot removed module:core Core module module:ams-server Ams server module labels Apr 24, 2024
@github-actions github-actions bot added the module:core Core module label May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module:core Core module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Table optimization skipped due to configuration parsing error
3 participants