CurtHagenlocher commented on code in PR #46190:
URL: https://github.com/apache/arrow/pull/46190#discussion_r2101569618


##########
csharp/src/Apache.Arrow/Ipc/ICompressionCodec.cs:
##########
@@ -44,5 +44,21 @@ void Compress(ReadOnlyMemory<byte> source, Stream 
destination)
 #else
         ;
 #endif
+
+        /// <summary>
+        /// try to write compressed data to span
+        /// </summary>
+        /// <param name="source">The data to compress</param>
+        /// <param name="destination">Span to write compressed data to</param>
+        /// <param name="bytesWritten">The number of bytes written to the 
destination</param>
+        /// <returns>true if compressed was successful, false if the 
destination buffer is too small</returns>
+        bool TryCompress(ReadOnlyMemory<byte> source, Memory<byte> 
destination, out int bytesWritten)
+#if NET6_0_OR_GREATER
+        {
+            throw new NotImplementedException("This codec does not support 
compression");

Review Comment:
   The problem is that default interface implementations aren't supported on 
downlevel .NET. I think the only way to make this not be a breaking change is 
to have a new interface and check dynamically for the capability at runtime (at 
least for Desktop framework).



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to