ryan-syed commented on code in PR #1884:
URL: https://github.com/apache/arrow-adbc/pull/1884#discussion_r1618000782


##########
csharp/test/Drivers/Apache/Spark/DriverTests.cs:
##########
@@ -309,6 +341,39 @@ public void CanGetObjectsAll()
 
             Assert.True(columns != null, "Columns cannot be null");
             Assert.Equal(TestConfiguration.Metadata.ExpectedColumnCount, 
columns.Count);
+
+            for (int i = 0; i < columns.Count; i++)
+            {
+                // Verify column metadata is returned/consistent.
+                AdbcColumn column = columns[i];
+                Assert.Equal(i + 1, column.OrdinalPosition);
+                Assert.NotNull(column.Name);
+                Assert.False(string.IsNullOrEmpty(column.Name));
+                var types = 
Enum.GetValues(typeof(SupportedSparkDataType)).Cast<SupportedSparkDataType>();
+                
Assert.Contains((SupportedSparkDataType)column.XdbcSqlDataType!, types);
+                Assert.NotNull(column.XdbcDataType);
+                Assert.Contains((SupportedSparkDataType)column.XdbcDataType!, 
types);
+                Assert.Equal(column.XdbcDataType, column.XdbcSqlDataType);
+                bool isDecimalType = column.XdbcDataType == 
(short)SupportedSparkDataType.DECIMAL_TYPE || column.XdbcDataType == 
(short)SupportedSparkDataType.NUMERIC_TYPE;
+                Assert.Equal(column.XdbcColumnSize.HasValue, isDecimalType);
+                Assert.Equal(column.XdbcDecimalDigits.HasValue, isDecimalType);
+                Assert.Equal(column.XdbcDataType, column.XdbcSqlDataType);
+                Assert.NotNull(column.Remarks);

Review Comment:
   redundant, similar to above. There is `string.IsNullOrEmpty` check in the 
following 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]

Reply via email to