[ 
https://issues.apache.org/jira/browse/AVRO-2825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18079825#comment-18079825
 ] 

ASF subversion and git services commented on AVRO-2825:
-------------------------------------------------------

Commit c5f66c7cb5f522f7c6fa7ce68e640e3833525d8a in avro's branch 
refs/heads/main from RawScape
[ https://gitbox.apache.org/repos/asf?p=avro.git;h=c5f66c7cb5 ]

AVRO-2825: [csharp] Resolve: C# Logical Types throw exception on unknown (#3727)

* AVRO-2825: [csharp] Resolve: C# Logical Types throw exception on unknown 
logical type

(cherry picked from commit ad61af02da435652ba0662d34205f60fa88537cb)

* [AVRO-3941] CSharp Resolve missing namespace issue

(cherry picked from commit e5a7dedf9959687637f621bfdecbe478a5a89cc4)

* Resolve requested changes on PR 2751

(cherry picked from commit 89095295036d0dbd180fa4265205f0d666b3c0d9)

* uncomment testcase after testing

(cherry picked from commit 235d329118764005c2ace77bc7b26e472bcd5e14)

* savepoint remove local setting files

(cherry picked from commit f7b4872a347938d090193a55beba3ff2a31bcefa)

* backout chags for a different pr, adjust unit test

(cherry picked from commit 60463b5da7c885ce4e90ff9cf2d81c7682d59b0b)

* changes from code review

(cherry picked from commit 42b0fbd0a665cf409b85e329151f5b5d3e2a07e8)

* Resolve remaining feedback for AVRO-2825 and fix complex logical type parsing

* Fix CodeQL warning: Use pattern matching to assert logicalSchema type safely

* Remove accidentally tracked launchSettings.json

---------

Co-authored-by: Tom Bruns <[email protected]>

> C# Logical Types throw exception on unknown logical type
> --------------------------------------------------------
>
>                 Key: AVRO-2825
>                 URL: https://issues.apache.org/jira/browse/AVRO-2825
>             Project: Apache Avro
>          Issue Type: Bug
>          Components: csharp
>    Affects Versions: 1.9.2
>            Reporter: William Pickett
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 5h 50m
>  Remaining Estimate: 0h
>
> In the C# avro implementation of logical types, the logical type 
> functionality throws an exception whenever the an unknown logical type is 
> used. The LogicalTypeFacory implements a boolean to ignore this exception, 
> however, the calling function forces the exception to be thrown.
> LogicalSchema calling function: 
> [https://github.com/apache/avro/blob/75e8f58c95e2b8c69af1a6f60c35a848a6781f0c/lang/csharp/src/apache/main/Schema/LogicalSchema.cs#L58]
> LogicalTypeFactory: 
> [https://github.com/apache/avro/blob/8199b9626e4badd34a85946cd223a91863f44cee/lang/csharp/src/apache/main/Util/LogicalTypeFactory.cs]
>  
>  
> According to the AVRO spec:
> Language implementations must ignore unknown logical types when reading, and 
> should use the underlying Avro type. If a logical type is invalid, for 
> example a decimal with scale greater than its precision, then implementations 
> should ignore the logical type and use the underlying Avro type. 
> ([https://avro.apache.org/docs/1.9.2/spec.html#Logical+Types])
> So this functionality should not throw an exception when encountering an 
> unknown type and instead use the underlying type.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to