The Wayback Machine - https://web.archive.org/web/20201204063511/https://github.com/strapdata/elassandra/issues/355
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

Support for Cassandra Duration type #355

Open
RyanQuey opened this issue Jun 29, 2020 · 3 comments
Open

Support for Cassandra Duration type #355

RyanQuey opened this issue Jun 29, 2020 · 3 comments

Comments

@RyanQuey
Copy link

@RyanQuey RyanQuey commented Jun 29, 2020

Describe the feature: Support for duration data type
Currently, unless I am mistaken there does not seem to be support for Cassandra's duration data type. When I try to create an ES index for my existing C* table of type duration, I get the following error:

{"error":{
  "root_cause": [{"type":"mapper_parsing_exception","reason":"Failed to execute query:null : Existing column [duration] type [duration] mismatch with inferred type [text]"}],
  "type":"mapper_parsing_exception",
  "reason":"Failed to execute query:null : Existing column [duration] type [duration] mismatch with inferred type [text]",
  "caused_by": {"type":"configuration_exception","reason":"Existing column [duration] type [duration] mismatch with inferred type [text]"}},
  "status":400
}

Furthermore, the duration type is not mentioned in Elassandra's docs related to type mapping.

It would be nice to have support for this if possible, though I'm not sure how it would be implemented exactly

@vroyer
Copy link
Collaborator

@vroyer vroyer commented Jun 29, 2020

@RyanQuey
Copy link
Author

@RyanQuey RyanQuey commented Jun 29, 2020

Ok that makes sense. Is there a recommended best practice then for handling Cassandra durations? Or is there a way to convert one into an integer (probably integer in milliseconds or nanoseconds) or something like that?

@vroyer
Copy link
Collaborator

@vroyer vroyer commented Jun 29, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.