-
Notifications
You must be signed in to change notification settings - Fork 990
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
[spark] Add tag ddl sytnax for create/delete/rename tag #4329
Conversation
docs/content/spark/sql-ddl.md
Outdated
### Create Tag | ||
Create a tag based on snapshot or retention. | ||
```sql | ||
-- create a tag based on lastest snapshot and no retention. |
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.
lastest -> the latest
docs/content/spark/sql-ddl.md
Outdated
-- create a tag based on lastest snapshot and no retention. | ||
ALTER TABLE T CREATE TAG `TAG-1`; | ||
|
||
-- create a tag based on lastest snapshot and no retention if it doesn't exist. |
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.
lastest -> the latest
docs/content/spark/sql-ddl.md
Outdated
-- create a tag based on lastest snapshot and no retention if it doesn't exist. | ||
ALTER TABLE T CREATE TAG IF NOT EXISTS `TAG-1`; | ||
|
||
-- create a tag based on lastest snapshot and retain it for 7 day. |
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.
lastest -> the latest
docs/content/spark/sql-ddl.md
Outdated
-- create a tag based on lastest snapshot and retain it for 7 day. | ||
ALTER TABLE T CREATE TAG `TAG-2` RETAIN 7 DAYS; | ||
|
||
-- create a tag based on snapshot 1 and no retention. |
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.
snapshot-1
docs/content/spark/sql-ddl.md
Outdated
-- create a tag based on snapshot 1 and no retention. | ||
ALTER TABLE T CREATE TAG `TAG-3` AS OF VERSION 1; | ||
|
||
-- create a tag based on snapshot 2 and retain it for 12 hour. |
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.
snapshot-2
* @param number a digital number | ||
* @param unitLabel time unit label | ||
*/ | ||
public static Duration parseDuration(Long number, String unitLabel) { |
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.
long number
*/ | ||
public static Duration parseDuration(Long number, String unitLabel) { | ||
ChronoUnit unit = LABEL_TO_UNIT_MAP.get(unitLabel.toLowerCase(Locale.US)); | ||
if (unit != null) { |
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.
checkNotNull(xxx);
return Duration.of(number, unit);
addressed, thanks @wwj6591812 |
+1 |
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.
+1
Purpose
Linked issue: close #xxx
Tests
API and Format
Documentation