Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(csharp/test/Drivers/Snowflake): Adding numeric value tests #1274

Closed
wants to merge 73 commits into from

Conversation

vleslief-ms
Copy link
Contributor

@vleslief-ms vleslief-ms commented Nov 8, 2023

Adding tests which do a simple insert, select and delete for the numeric data types in Snowflake, to validate that they can be added and read correctly through ADBC. The target values are usually problematic for reading and writing, such as infinity, min and max values and NaN, but some more standard values are included for sanity.

Tests structure:

  1. Create a temporary table with a single column of the chosen numeric data type. Snowflake has effectively two: NUMBER and FLOAT, with NUMBER having variations depending on the precision and scale. The table will use the config specified catalog and schema, but the table itself will be a generated name to avoid collisions or overwriting other data.
  2. A single value of the correct type is inserted into the table.
  3. The value is queried from the table, and validated for correctness.
  4. The row is deleted from the table, using the value in the WHERE clause.

@CurtHagenlocher
Copy link
Contributor

Can you rebase from master instead of merging the changes? Otherwise the PR in GitHub has more changes than we want.

vleslief-ms and others added 14 commits November 9, 2023 13:12
…ADME, generify expected table name in CanClientExecuteUpdateUsingExecuteReader test (apache#1240)

README currently lists the field name as "database", when it should be
"catalog". Also add a few small notes that the config file is JSON and
there's a template in resources to use.

CanClientExecuteUpdateUsingExecuteReader() currently has the table name
ADBC_ALLTYPES hardcoded, ignoring the table value set in the
configuration. It can be made to use the config table name instead.
This PR:

- Adds support for SqlDecimal for Decimal128 (follow up to
apache/arrow#38481)
- Treats Decimal256 values as string (follow up to
apache/arrow#38508)
- Adds a new DecimalBehavior to the Client to allow the caller to
determine how to treat decimal values
- Standardizes the test frameworks to Xunit

Addresses apache#1230

---------

Co-authored-by: David Coe <coedavid@umich.edu>
CurtHagenlocher and others added 17 commits November 14, 2023 08:52
….dll (apache#1295)

Test dependency is not required for product code.
…#1290)

# What?
Add implementation for `GetObjects` in CGO wrapper for
`adbc_driver_manager`

# Why?
Functionality exists in C++ driver manager but not yet accessible via Go
driver interface.

# Notes
I haven't worked with CGO before so I wanted to limit the scope of this
PR to just one of the unimplemented methods in the wrapper. I would like
to continue implementing the other methods once I know I'm going about
this correctly.

Closes part of apache#1291
…pache#1298)

In sync with arrow-glib, GADBC should name its Vala's VAPI file's name
to adbc-glib and is the same as the pkg-config adbc-glib.pc file's name

https://wiki.gnome.org/Projects/Vala/LibraryWritingNamingAndBuilding


> The name of the VAPI file should be the same as the pkg-config file for the library.
This PR:

- Adds support for SqlDecimal for Decimal128 (follow up to
apache/arrow#38481)
- Treats Decimal256 values as string (follow up to
apache/arrow#38508)
- Adds a new DecimalBehavior to the Client to allow the caller to
determine how to treat decimal values
- Standardizes the test frameworks to Xunit

Addresses apache#1230

---------

Co-authored-by: David Coe <coedavid@umich.edu>
@vleslief-ms
Copy link
Contributor Author

Think my rebasing messed up the branch, may just make a new PR that's cleaner...

@vleslief-ms vleslief-ms deleted the snowflakeNumericTests branch November 15, 2023 21:42
CurtHagenlocher pushed a commit that referenced this pull request Nov 17, 2023
Adding tests which do a simple insert, select and delete for the numeric
data types in Snowflake, to validate that they can be added and read
correctly through ADBC. The target values are usually problematic for
reading and writing, such as infinity, min and max values and NaN, but
some more standard values are included for sanity.

Tests structure:

1. Create a temporary table with a single column of the chosen numeric
data type. Snowflake has effectively two: NUMBER and FLOAT, with NUMBER
having variations depending on the precision and scale. The table will
use the config specified catalog and schema, but the table itself will
be a generated name to avoid collisions or overwriting other data.
2. A single value of the correct type is inserted into the table.
3. The value is queried from the table, and validated for correctness.
4. The row is deleted from the table, using the value in the WHERE
clause.

Remake of #1274
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants