CurtHagenlocher commented on code in PR #2741:
URL: https://github.com/apache/arrow-adbc/pull/2741#discussion_r2056455359
##########
csharp/src/Client/SchemaConverter.cs:
##########
@@ -89,7 +89,7 @@ public static DataTable ConvertArrowSchema(Schema schema,
AdbcStatement adbcStat
row[SchemaTableColumn.NumericPrecision] =
decimal32Type.Precision;
row[SchemaTableColumn.NumericScale] = decimal32Type.Scale;
}
- else if (f.DataType is Decimal128Type decimal64Type)
+ else if (f.DataType is Decimal64Type decimal64Type)
Review Comment:
derp
##########
csharp/src/Apache.Arrow.Adbc/Extensions/IArrowArrayExtensions.cs:
##########
@@ -1,19 +1,19 @@
/*
- * 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.
- */
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
Review Comment:
Please restore the previous formatting.
##########
csharp/src/Apache.Arrow.Adbc/Extensions/IArrowArrayExtensions.cs:
##########
@@ -111,22 +111,20 @@ public static class IArrowArrayExtensions
#else
case ArrowTypeId.Time32:
Time32Array time32Array = (Time32Array)arrowArray;
- int? time32 = time32Array.GetValue(index);
- if (time32 == null) { return null; }
+ if (time32Array.IsNull(index)) { return null; }
Review Comment:
Applies to the other locations as well
##########
csharp/src/Apache.Arrow.Adbc/Extensions/IArrowArrayExtensions.cs:
##########
@@ -111,22 +111,20 @@ public static class IArrowArrayExtensions
#else
case ArrowTypeId.Time32:
Time32Array time32Array = (Time32Array)arrowArray;
- int? time32 = time32Array.GetValue(index);
- if (time32 == null) { return null; }
+ if (time32Array.IsNull(index)) { return null; }
Review Comment:
FWIW, if this were `true` we would have already returned at line 68. The
only reason I put a null check in was because null checks are cheap and I
wanted to avoid the null-forgiving operator. As this variation requires
forgiveness anyway we may as well skip the (slightly more expensive) check.
##########
csharp/test/Apache.Arrow.Adbc.Tests/IArrowArrayExtensionsTests.cs:
##########
@@ -0,0 +1,81 @@
+/*
+ * 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.
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Xunit;
+using Apache.Arrow.Adbc.Extensions;
+
+namespace Apache.Arrow.Adbc.Tests
+{
+ public class IArrowArrayExtensionsTests
+ {
+
Review Comment:
nit: remove blank line
--
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]