[
https://issues.apache.org/jira/browse/AVRO-1702?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16421708#comment-16421708
]
Pietro Menna commented on AVRO-1702:
------------------------------------
[image: Earn.com] <https://earn.com/>
[image: Pietro] Pietro bounced your email
Pay to resend
<https://earn.com/pietromennaruizdiaz/?bounce_signup_code=7c77cabf-6052-433a-8b3d-203fe1fce66e>
Hi there, I'm using Earn.com to automatically bounce emails from outside my
network. It helps me prioritize my inbox and save time! If you're a friend
of mine, click below to request a spot on my whitelist. Your emails will
get through as normal. If I don't know you, go ahead and send me a paid
message. You'll only pay if you get a response. Thanks, Pietro Menna Ruiz
Diaz
How to reach Pietro:
Send a paid message
<https://earn.com/pietromennaruizdiaz/?bounce_signup_code=7c77cabf-6052-433a-8b3d-203fe1fce66e>
Request to join free whitelist
<https://earn.com/pietromennaruizdiaz/request/?id=5d723e18-0a33-4ec3-9187-b83c3997d52d&bounce_signup_code=7c77cabf-6052-433a-8b3d-203fe1fce66e>
This email was sent automatically by Earn.com <https://earn.com/>
[image: medium] <https://medium.com/@earndotcom> [image: facebook]
<https://www.facebook.com/earndotcom> [image: twitter]
<https://twitter.com/earndotcom>
-------------------------------------------------
*This message was generated in reply to the following message:*
[
https://issues.apache.org/jira/browse/AVRO-1702?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16421705#comment-16421705
] ASF GitHub Bot commented on AVRO-1702:
-------------------------------------- thiru-apache commented on a change
in pull request #302: AVRO-1702: Added support for logical types in the C++
client. URL: https://github.com/apache/avro/pull/302#discussion_r178462148
########## File path: lang/c++/impl/LogicalType.cc ########## @@ -0,0 +1,89
@@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + *
or more contributor license agreements. See the NOTICE file + * distributed
with this work for additional information + * regarding copyright
ownership. The ASF licenses this file + * to you under the Apache License,
Version 2.0 (the + * "License"); you may not use this file except in
compliance + * with the License. You may obtain a copy of the License at +
* + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by
applicable law or agreed to in writing, software + * distributed under the
License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. + * See the License for
the specific language governing permissions and + * limitations under the
License. + */ + +#include "Exception.hh" +#include "LogicalType.hh" +
+namespace avro { + +LogicalType::LogicalType(Type type) + : type_(type),
precision_(0), scale_(0) {} + +LogicalType::Type LogicalType::type() const
{ + return type_; +} + +void LogicalType::setPrecision(int precision) { +
if (type_ != DECIMAL) { + throw Exception("Only logical type DECIMAL can
have precision"); + } + if (precision <= 0) { + throw
Exception(boost::format("Precision cannot be: %1%") % precision); + } +
precision_ = precision; +} + +int LogicalType::precision() const { Review
comment: As a convention in Avro C++, we inline these kind of functions.
That is the body of the function is specified along with the declaration in
`.hpp` file.
---------------------------------------------------------------- This is an
automated message from the Apache Git Service. To respond to the message,
please log on GitHub and use the URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected] > Add LogicalType support to c++ library >
-------------------------------------- > > Key: AVRO-1702 > URL:
https://issues.apache.org/jira/browse/AVRO-1702 > Project: Avro > Issue
Type: New Feature > Components: c++ > Reporter: peter liu > Assignee: peter
liu > Priority: Major > > I'd like to port the logicaltype support to c++
library -- This message was sent by Atlassian JIRA (v7.6.3#76005)
> Add LogicalType support to c++ library
> --------------------------------------
>
> Key: AVRO-1702
> URL: https://issues.apache.org/jira/browse/AVRO-1702
> Project: Avro
> Issue Type: New Feature
> Components: c++
> Reporter: peter liu
> Assignee: peter liu
> Priority: Major
>
> I'd like to port the logicaltype support to c++ library
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)