-
Notifications
You must be signed in to change notification settings - Fork 95
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(java): add Checker Framework annotations #1495
Conversation
64c312d
to
a3959a4
Compare
bc0a946
to
be3ed8b
Compare
e5f9508
to
b8f843d
Compare
@@ -145,7 +150,12 @@ VectorSchemaRoot build() throws AdbcException { | |||
|
|||
root.setRowCount(dstIndex); | |||
VectorSchemaRoot result = root; | |||
root = null; | |||
try { | |||
root = VectorSchemaRoot.create(StandardSchemas.GET_INFO_SCHEMA, allocator); |
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.
Why does an empty root get recreated here?
FYI I'm reworking some of this code for the getObjects() impl. Planning to make this class an Iterator and have RootArrowReader consume the iterator to avoid front-loading the client when there are lots of metadata objects.
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.
The class overall is AutoCloseable, and when it is closed it will clear the root. So in this method, we need to "transfer ownership" of the root out. Instead of dealing with making the root nullable, I decided to just give it an empty root always.
@@ -85,27 +85,27 @@ protected void timestamp4WithoutTimeZoneType() throws Exception { | |||
protected void timestamp3WithoutTimeZoneType() throws Exception { | |||
final Schema schema = connection.getTableSchema(null, null, "adbc_alltypes"); | |||
assertThat(schema.findField("timestamp_without_time_zone_p3_t").getType()) | |||
.isEqualTo(new ArrowType.Timestamp(TimeUnit.MICROSECOND, null)); | |||
.isEqualTo(new ArrowType.Timestamp(TimeUnit.MILLISECOND, null)); |
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.
I'm not sure how this change is related to the CheckerFramework.
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.
I noticed there were two different type mapping functions and unified on the more comprehensive one.
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.
Since I didn't want to null-annotate two copies of basically the same function.
Fixes #624.