This is an automated email from the ASF dual-hosted git repository.

opwvhk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/avro.git


The following commit(s) were added to refs/heads/main by this push:
     new c200b4e76 AVRO-3841: [Spec] Align the specification of the way to 
encode NaN to the actual implementations (#2463)
c200b4e76 is described below

commit c200b4e766c40011e1e64300de222192c3046f48
Author: Kousuke Saruta <[email protected]>
AuthorDate: Fri Apr 5 17:15:19 2024 +0900

    AVRO-3841: [Spec] Align the specification of the way to encode NaN to the 
actual implementations (#2463)
---
 doc/content/en/docs/++version++/Specification/_index.md           | 4 ++--
 lang/csharp/src/apache/main/IO/BinaryDecoder.netstandard2.0.cs    | 4 ++--
 lang/csharp/src/apache/main/IO/BinaryDecoder.notnetstandard2.0.cs | 4 ++--
 lang/csharp/src/apache/main/IO/BinaryEncoder.cs                   | 4 ++--
 lang/py/avro/io.py                                                | 8 ++++----
 lang/ruby/lib/avro/io.rb                                          | 8 ++++----
 6 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/doc/content/en/docs/++version++/Specification/_index.md 
b/doc/content/en/docs/++version++/Specification/_index.md
index 1c16d8783..2994c6d77 100755
--- a/doc/content/en/docs/++version++/Specification/_index.md
+++ b/doc/content/en/docs/++version++/Specification/_index.md
@@ -314,8 +314,8 @@ Primitive types are encoded in binary as follows:
 |64 | 80 01|
 |...|...|
 
-* a _float_ is written as 4 bytes. The float is converted into a 32-bit 
integer using a method equivalent to Java's 
[floatToIntBits](https://docs.oracle.com/javase/8/docs/api/java/lang/Float.html#floatToIntBits-float-)
 and then encoded in little-endian format.
-* a _double_ is written as 8 bytes. The double is converted into a 64-bit 
integer using a method equivalent to Java's 
[doubleToLongBits](https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html#doubleToLongBits-double-)
 and then encoded in little-endian format.
+* a _float_ is written as 4 bytes. The float is converted into a 32-bit 
integer using a method equivalent to Java's 
[floatToRawIntBits](https://docs.oracle.com/javase/8/docs/api/java/lang/Float.html#floatToRawIntBits-float-)
 and then encoded in little-endian format.
+* a _double_ is written as 8 bytes. The double is converted into a 64-bit 
integer using a method equivalent to Java's 
[doubleToRawLongBits](https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html#doubleToRawLongBits-double-)
 and then encoded in little-endian format.
 * _bytes_ are encoded as a long followed by that many bytes of data.
 * a _string_ is encoded as a long followed by that many bytes of UTF-8 encoded 
character data.
 For example, the three-character string "foo" would be encoded as the long 
value 3 (encoded as hex 06) followed by the UTF-8 encoding of 'f', 'o', and 'o' 
(the hex bytes 66 6f 6f):
diff --git a/lang/csharp/src/apache/main/IO/BinaryDecoder.netstandard2.0.cs 
b/lang/csharp/src/apache/main/IO/BinaryDecoder.netstandard2.0.cs
index 8c6cb7e5c..a37d6fa6c 100644
--- a/lang/csharp/src/apache/main/IO/BinaryDecoder.netstandard2.0.cs
+++ b/lang/csharp/src/apache/main/IO/BinaryDecoder.netstandard2.0.cs
@@ -34,7 +34,7 @@ namespace Avro.IO
         /// <summary>
         /// A float is written as 4 bytes.
         /// The float is converted into a 32-bit integer using a method 
equivalent to
-        /// Java's floatToIntBits and then encoded in little-endian format.
+        /// Java's floatToRawIntBits and then encoded in little-endian format.
         /// </summary>
         /// <returns></returns>
         public float ReadFloat()
@@ -56,7 +56,7 @@ namespace Avro.IO
         /// <summary>
         /// A double is written as 8 bytes.
         /// The double is converted into a 64-bit integer using a method 
equivalent to
-        /// Java's doubleToLongBits and then encoded in little-endian format.
+        /// Java's doubleToRawLongBits and then encoded in little-endian 
format.
         /// </summary>
         /// <returns>A double value.</returns>
         public double ReadDouble()
diff --git a/lang/csharp/src/apache/main/IO/BinaryDecoder.notnetstandard2.0.cs 
b/lang/csharp/src/apache/main/IO/BinaryDecoder.notnetstandard2.0.cs
index a3bd2174e..c4a0dfaaf 100644
--- a/lang/csharp/src/apache/main/IO/BinaryDecoder.notnetstandard2.0.cs
+++ b/lang/csharp/src/apache/main/IO/BinaryDecoder.notnetstandard2.0.cs
@@ -35,7 +35,7 @@ namespace Avro.IO
         /// <summary>
         /// A float is written as 4 bytes.
         /// The float is converted into a 32-bit integer using a method 
equivalent to
-        /// Java's floatToIntBits and then encoded in little-endian format.
+        /// Java's floatToRawIntBits and then encoded in little-endian format.
         /// </summary>
         /// <returns></returns>
         public float ReadFloat()
@@ -49,7 +49,7 @@ namespace Avro.IO
         /// <summary>
         /// A double is written as 8 bytes.
         /// The double is converted into a 64-bit integer using a method 
equivalent to
-        /// Java's doubleToLongBits and then encoded in little-endian format.
+        /// Java's doubleToRawLongBits and then encoded in little-endian 
format.
         /// </summary>
         /// <returns>A double value.</returns>
         public double ReadDouble()
diff --git a/lang/csharp/src/apache/main/IO/BinaryEncoder.cs 
b/lang/csharp/src/apache/main/IO/BinaryEncoder.cs
index 72af5f3a5..91eb0e555 100644
--- a/lang/csharp/src/apache/main/IO/BinaryEncoder.cs
+++ b/lang/csharp/src/apache/main/IO/BinaryEncoder.cs
@@ -87,7 +87,7 @@ namespace Avro.IO
         /// <summary>
         /// A float is written as 4 bytes.
         /// The float is converted into a 32-bit integer using a method 
equivalent to
-        /// Java's floatToIntBits and then encoded in little-endian format.
+        /// Java's floatToRawIntBits and then encoded in little-endian format.
         /// </summary>
         /// <param name="value"></param>
         public void WriteFloat(float value)
@@ -99,7 +99,7 @@ namespace Avro.IO
         /// <summary>
         ///A double is written as 8 bytes.
         ///The double is converted into a 64-bit integer using a method 
equivalent to
-        ///Java's doubleToLongBits and then encoded in little-endian format.
+        ///Java's doubleToRawLongBits and then encoded in little-endian format.
         /// </summary>
         /// <param name="value"></param>
         public void WriteDouble(double value)
diff --git a/lang/py/avro/io.py b/lang/py/avro/io.py
index 5e3ffa6c5..c43002a02 100644
--- a/lang/py/avro/io.py
+++ b/lang/py/avro/io.py
@@ -256,7 +256,7 @@ class BinaryDecoder:
         """
         A float is written as 4 bytes.
         The float is converted into a 32-bit integer using a method equivalent 
to
-        Java's floatToIntBits and then encoded in little-endian format.
+        Java's floatToRawIntBits and then encoded in little-endian format.
         """
         return float(STRUCT_FLOAT.unpack(self.read(4))[0])
 
@@ -264,7 +264,7 @@ class BinaryDecoder:
         """
         A double is written as 8 bytes.
         The double is converted into a 64-bit integer using a method 
equivalent to
-        Java's doubleToLongBits and then encoded in little-endian format.
+        Java's doubleToRawLongBits and then encoded in little-endian format.
         """
         return float(STRUCT_DOUBLE.unpack(self.read(8))[0])
 
@@ -453,7 +453,7 @@ class BinaryEncoder:
         """
         A float is written as 4 bytes.
         The float is converted into a 32-bit integer using a method equivalent 
to
-        Java's floatToIntBits and then encoded in little-endian format.
+        Java's floatToRawIntBits and then encoded in little-endian format.
         """
         self.write(STRUCT_FLOAT.pack(datum))
 
@@ -461,7 +461,7 @@ class BinaryEncoder:
         """
         A double is written as 8 bytes.
         The double is converted into a 64-bit integer using a method 
equivalent to
-        Java's doubleToLongBits and then encoded in little-endian format.
+        Java's doubleToRawLongBits and then encoded in little-endian format.
         """
         self.write(STRUCT_DOUBLE.pack(datum))
 
diff --git a/lang/ruby/lib/avro/io.rb b/lang/ruby/lib/avro/io.rb
index 0d2f31358..091b35446 100644
--- a/lang/ruby/lib/avro/io.rb
+++ b/lang/ruby/lib/avro/io.rb
@@ -75,7 +75,7 @@ module Avro
       def read_float
         # A float is written as 4 bytes.
         # The float is converted into a 32-bit integer using a method
-        # equivalent to Java's floatToIntBits and then encoded in
+        # equivalent to Java's floatToRawIntBits and then encoded in
         # little-endian format.
         read_and_unpack(4, 'e')
       end
@@ -83,7 +83,7 @@ module Avro
       def read_double
         #  A double is written as 8 bytes.
         # The double is converted into a 64-bit integer using a method
-        # equivalent to Java's doubleToLongBits and then encoded in
+        # equivalent to Java's doubleToRawLongBits and then encoded in
         # little-endian format.
         read_and_unpack(8, 'E')
       end
@@ -203,7 +203,7 @@ module Avro
 
       # A float is written as 4 bytes.
       # The float is converted into a 32-bit integer using a method
-      # equivalent to Java's floatToIntBits and then encoded in
+      # equivalent to Java's floatToRawIntBits and then encoded in
       # little-endian format.
       def write_float(datum)
         @writer.write([datum].pack('e'))
@@ -211,7 +211,7 @@ module Avro
 
       # A double is written as 8 bytes.
       # The double is converted into a 64-bit integer using a method
-      # equivalent to Java's doubleToLongBits and then encoded in
+      # equivalent to Java's doubleToRawLongBits and then encoded in
       # little-endian format.
       def write_double(datum)
         @writer.write([datum].pack('E'))

Reply via email to