You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@avro.apache.org by "glywk (via GitHub)" <gi...@apache.org> on 2024/08/05 10:16:44 UTC
Re: [PR] [NO JIRA] [C++] Add local-timestamp-millis, local-timestamp-micros logical types [avro]
glywk commented on code in PR #3053:
URL: https://github.com/apache/avro/pull/3053#discussion_r1703889714
##########
lang/c++/impl/Node.cc:
##########
@@ -189,6 +190,18 @@ void Node::setLogicalType(LogicalType logicalType) {
"LONG type");
}
break;
+ case LogicalType::LOCAL_TIMESTAMP_MILLIS:
+ if (type_ != AVRO_LONG) {
+ throw Exception("LOCAL_TIMESTAMP-MILLIS logical type can only annotate "
+ "LONG type");
+ }
+ break;
+ case LogicalType::LOCAL_TIMESTAMP_MICROS:
+ if (type_ != AVRO_LONG) {
+ throw Exception("LOCAL_TIMESTAMP-MICROS logical type can only annotate "
+ "LONG type");
Review Comment:
I have update with your suggestion. Thanks.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@avro.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org