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
Refactor decoding arrays #1194
Refactor decoding arrays #1194
Conversation
checkstyle issues and test for unsupported character
checkstyle
Add binary support for varchar[]. Add array support for bytea[]. Add binary support for multi-dimensional arrays when the base type supports binary representation.
# Conflicts: # pgjdbc/src/test/java/org/postgresql/test/jdbc2/Jdbc2TestSuite.java
code style
code style
code style
address handling of reading offsets into binary multi-dimensional array
code style
documentation
fix unit test for `Object[]`
explicitly set null elements when reading binary array
chain append calls
Rename class to make clear only support for encoding arrays
Refactor decoding arrays to make more extensible and to more closely align the binary and String processing.
Add missing type mappings.
code style, remove incorret asserts
Codecov Report
@@ Coverage Diff @@
## master #1194 +/- ##
============================================
+ Coverage 70.02% 70.05% +0.02%
Complexity 4160 4160
============================================
Files 188 188
Lines 17537 17550 +13
Branches 2872 2874 +2
============================================
+ Hits 12281 12294 +13
+ Misses 3977 3976 -1
- Partials 1279 1280 +1 |
use List.subList to handle index/count
add support for OID_ARRAY as binary type
@vlsi or @davecramer
It does not seem like this is code related, but I am not familiar enough with travis to know what exiting with 8 means. |
That means We might want to use https://ci.adoptopenjdk.net/job/openjdk9_openj9_build_x86-64_linux/ (or even OpenJDK10-Open9J), however filename is different for each build there. |
This makes me think that the openj9 is not production-ready and that it actually does not provide any benefit in testing, after all it's the same openjdk with a different engine, and in fact it slows down the testing... I will send a PR drooping that job for consideration. |
@vlsi and @davecramer, is there a page in the documentation covering what data types are supported for binary transfer? This PR adds support for binary transfer of OID_ARRAY and it is not clear to me if that should be documented somewhere. |
@bokken Good question. I suspect not, but I would like to see it documented somewhere |
Can we target this for 42.3? |
@bokken , there's a default qualifier for pgjdbc/pgjdbc/src/main/java/org/postgresql/package-info.java Lines 6 to 9 in 5801e32
@NonNull in trivial cases like arr and connection below
|
|
||
} | ||
|
||
private interface ArrayDecoder<@NonNull A> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you tried ArrayDecoder<A extends @NonNull Object>
here? (I assume you intend that A should be non-nullable
)
https://checkerframework.org/manual/#inherited-wildcard-annotations
Parameters and return values are not null by default => remove NonNull Generics are nullable by default => add NonNull when needed.
@bokken is this ready to merge ? |
@davecramer Yes!!! |
…2.3.3. This required adding support for smallserial and applying changes after refactoring pgjdbc/pgjdbc#1194. This closes apache#18604
…2.3.3. This required adding support for smallserial and applying changes after refactoring pgjdbc/pgjdbc#1194. This closes apache#18604 Co-authored-by: Sergey Nuyanzin <snuyanzin@gmail.com>
…2.3.3. This required adding support for smallserial and applying changes after refactoring pgjdbc/pgjdbc#1194. This closes apache#18604 Co-authored-by: Sergey Nuyanzin <snuyanzin@gmail.com>
…2.3.3. This required adding support for smallserial and applying changes after refactoring pgjdbc/pgjdbc#1194. PG's bytea[] now uses primitive arrays. This closes apache#18604 Co-authored-by: Sergey Nuyanzin <snuyanzin@gmail.com>
…2.3.3. This required adding support for smallserial and applying changes after refactoring pgjdbc/pgjdbc#1194. PG's bytea[] now uses primitive arrays. This closes #18604 Co-authored-by: Sergey Nuyanzin <snuyanzin@gmail.com>
…2.3.3. This required adding support for smallserial and applying changes after refactoring pgjdbc/pgjdbc#1194. PG's bytea[] now uses primitive arrays. This closes apache#18604 Co-authored-by: Sergey Nuyanzin <snuyanzin@gmail.com>
…2.3.3. This required adding support for smallserial and applying changes after refactoring pgjdbc/pgjdbc#1194. PG's bytea[] now uses primitive arrays. This closes apache#18604 Co-authored-by: Sergey Nuyanzin <snuyanzin@gmail.com>
…2.3.3. This required adding support for smallserial and applying changes after refactoring pgjdbc/pgjdbc#1194. PG's bytea[] now uses primitive arrays. This closes #18604 Co-authored-by: Sergey Nuyanzin <snuyanzin@gmail.com>
…2.3.3. This required adding support for smallserial and applying changes after refactoring pgjdbc/pgjdbc#1194. PG's bytea[] now uses primitive arrays. This closes #18604 Co-authored-by: Sergey Nuyanzin <snuyanzin@gmail.com>
…2.3.3. This required adding support for smallserial and applying changes after refactoring pgjdbc/pgjdbc#1194. PG's bytea[] now uses primitive arrays. This closes #18604 Co-authored-by: Sergey Nuyanzin <snuyanzin@gmail.com>
Refactor decoding arrays to make more extensible and to more closely align the binary and String processing.