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

Add tests for max LOB size #1623

Closed
wants to merge 24 commits into from
Closed

Conversation

sfc-gh-ext-simba-jf
Copy link
Collaborator

Overview

SNOW-XXXXX

External contributors - please answer these questions before submitting a pull request. Thanks!

Please answer these questions before submitting your pull requests. Thanks!

  1. What GitHub issue is this PR addressing? Make sure that there is an accompanying issue to your PR.

    Fixes #NNNN

  2. Fill out the following pre-review checklist:

    • I am adding a new automated test(s) to verify correctness of my new code
    • I am adding new logging messages
    • I am modifying authorization mechanisms
    • I am adding new credentials
    • I am modifying OCSP code
    • I am adding a new dependency
  3. Please describe how your code solves the related issue.

    Please write a short description of how your code change solves the related issue.

Pre-review checklist

  • This change has passed precommit
  • I have reviewed code coverage report for my PR in (Sonarqube)

protected static String jsonQueryResultFormat = "json";

//TODO: increase max size to 128 * 1024 * 1024
public static int maxLobSize = 16 * 1024 * 1024;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please prefer private than public for fields


public static Connection getConnection() throws SQLException {
Connection con = BaseJDBCTest.getConnection();
Statement stmt = con.createStatement();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's use try-with-resources in all the places where it is possible

return con;
}

public static void setJSONResultFormat(Connection con) throws SQLException {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

those non-test methods should be private?

pstmt.close();
}
@Test
public void testSmallLobSize() throws SQLException {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's make those tests parameterized with the size of the lob and just comment out or ignore not supported yet entries

sfc-gh-dprzybysz and others added 22 commits February 7, 2024 07:02
…if pattern searches for some DatabaseMetaData methods are allowed (#1639)
#1624)

* SNOW-970859 Implement getObject for structured types for JSON response

* SNOW-974576 Create FieldsMetadata

* SNOW-974576 Add JsonConverters in ArrowResultSet for struct

---------

Co-authored-by: Przemyslaw Motacki <[email protected]>
@sfc-gh-ext-simba-jf
Copy link
Collaborator Author

This branch got messed up when I was trying to commit my latest changes. For simplicity I've opened a new PR here #1653 and will close this one to not add clutter.

@github-actions github-actions bot locked and limited conversation to collaborators Feb 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants