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

[Improve][Connector-V2] Time supports default value #7639

Merged
merged 5 commits into from
Sep 13, 2024

Conversation

corgy-w
Copy link
Contributor

@corgy-w corgy-w commented Sep 11, 2024

Purpose of this pull request

Time supports default value and keyword

eg:

{
              name = book_publication_time
              type = timestamp
              defaultValue = "2024-09-12 15:45:30"
              comment = "book publication time"
           },
           {
              name = book_publication_time2
              type = timestamp
              defaultValue = CURRENT_TIMESTAMP
              comment = "book publication time2"
           },
           {
              name = book_publication_time3
              type = time
              defaultValue = "15:45:30"
              comment = "book publication time3"
           },
           {
              name = book_publication_time4
              type = time
              defaultValue = CURRENT_TIME
              comment = "book publication time4"
           },
           {
              name = book_publication_time5
              type = date
              defaultValue = "2024-09-12"
              comment = "book publication time5"
           },
           {
              name = book_publication_time6
              type = date
              defaultValue = CURRENT_DATE
              comment = "book publication time6"
           }

or 

schema = {
      fields {
        c_map = "map<string, string>"
        c_double = double
        c_timestamp = timestamp
      }
    }
    rows = [
       {
         kind = INSERT
         fields = [{"__name__": "test1"},  1.23, CURRENT_TIMESTAMP]
     }]

Does this PR introduce any user-facing change?

How was this patch tested?

Check list

@github-actions github-actions bot removed the format label Sep 12, 2024
Hisoka-X
Hisoka-X previously approved these changes Sep 12, 2024
Copy link
Member

@Hisoka-X Hisoka-X left a comment

Choose a reason for hiding this comment

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

Please update the doc

Copy link
Member

@Hisoka-X Hisoka-X left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks @corgy-w

@hailin0 hailin0 merged commit 3397868 into apache:dev Sep 13, 2024
7 checks passed
@nianliuu nianliuu mentioned this pull request Sep 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants