HashidaTKS commented on a change in pull request #10527:
URL: https://github.com/apache/arrow/pull/10527#discussion_r654753770
##########
File path: csharp/src/Apache.Arrow/Arrays/ArrayData.cs
##########
@@ -30,10 +30,25 @@ public sealed class ArrayData : IDisposable
public readonly int Offset;
public readonly ArrowBuffer[] Buffers;
public readonly ArrayData[] Children;
+ public readonly ArrayData Dictionary; //Only used for dictionary type
public ArrayData(
IArrowType dataType,
int length, int nullCount = 0, int offset = 0,
+ IEnumerable<ArrowBuffer> buffers = null, IEnumerable<ArrayData>
children = null) :
+ this(dataType, null, length, nullCount, offset, buffers, children)
+ { }
+
+ public ArrayData(
+ IArrowType dataType,
+ int length, int nullCount = 0, int offset = 0,
+ ArrowBuffer[] buffers = null, ArrayData[] children = null) :
+ this(dataType, null, length, nullCount, offset, buffers, children)
+ { }
+
+ public ArrayData(
+ IArrowType dataType, ArrayData dictionary,
Review comment:
I noticed that changing original ctor's optional parameters to normal
parameters can avoid the ambiguity and keep backward binary compatibility.
Please excuse my ignorance...
```
public ArrayData(
IArrowType dataType,
int length, int nullCount, int offset,
IEnumerable<ArrowBuffer> buffers, IEnumerable<ArrayData>
children) :
this(dataType, length, nullCount, offset, buffers, children,
null)
{ }
public ArrayData(
IArrowType dataType,
int length, int nullCount = 0, int offset = 0,
IEnumerable<ArrowBuffer> buffers = null, IEnumerable<ArrayData>
children = null, ArrayData dictionary = null)
{
...
}
```
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]