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

returned Datetime type for proton datetime and datetime64 #68

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

leo-cai-timeplus
Copy link
Contributor

similar to #38

  • returned Datetime type for proton datetime and datetime64
  • implement json.Marshaler, json.Unmarshaler, yaml.Marshaler, yaml.Unmarshaler interface for types.Date and types.Datetime

@leo-cai-timeplus leo-cai-timeplus added the enhancement New feature or request label Jan 26, 2024
@leo-cai-timeplus leo-cai-timeplus self-assigned this Jan 26, 2024
…Marshaler and Unmarshaler interface of json and yaml for types.Date and types.Datetime
@qijun-niu-timeplus
Copy link
Collaborator

I think it's a breaking change. Why do we do this?
Is there a issue about this PR? What's the context of it?

@qijun-niu-timeplus
Copy link
Collaborator

If we have to make this change, @ye11ow could you please help to estimate the influence to neutron?

@leo-cai-timeplus leo-cai-timeplus marked this pull request as draft January 26, 2024 07:46
@leo-cai-timeplus
Copy link
Contributor Author

This pr can make it easier for user to read data from proton, then marshal data they read to json in the same format as proton do.

Run select * from example format JSONEachRow with proton client, the col whose type is datetime is in format of 1970-01-01 00:00:00. However, if user read the col via proton go driver, they will get a value whose type is time.Time. Using encoding/json to marshal time.Time and the format will be like 2006-01-02T15:04:05Z07:00.

Type datetime and time.Time can easily be solved, but if user want complex type for example map(string,array(array(map(string,datetime)))), to marshal all time.Time with format 1970-01-01 00:00:00 will not be easy.

@leo-cai-timeplus
Copy link
Contributor Author

This pr is of low priority

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants