[
https://issues.apache.org/jira/browse/DRILL-2288?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14934413#comment-14934413
]
ASF GitHub Bot commented on DRILL-2288:
---------------------------------------
GitHub user dsbos opened a pull request:
https://github.com/apache/drill/pull/175
DRILL-2288: Fix: No OK_NEW_SCHEMA for 0-row source; missing downstream
schema.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/dsbos/incubator-drill
bugs/drill-2288-3641-3659_no-rows_schema
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/drill/pull/175.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #175
----
commit eee7c29785b1ae6545c2e02aa7676aa4509e1963
Author: dbarclay <[email protected]>
Date: 2015-09-27T20:55:21Z
DRILL-3641: Doc. RecordBatch.IterOutcome (enumerators and possible
sequences). [RecordBatch, AbstractRecordBatch]
Documented RecordBatch.IterOutcome (RecordBatch.next() protocol) much more.
Also moved AbstractRecordBatch.BatchState's documentation text from
non-documentation comments to documentation comments.
commit ec5a9d0af8647af1472591549be1a9964f6a9151
Author: dbarclay <[email protected]>
Date: 2015-09-27T20:49:45Z
DRILL-2288: Fix: No OK_NEW_SCHEMA for 0-row source; missing downstream
schema.
Core fix:
- Fixed ScanBatch.Mutator's isNewSchema() to stop reporting "new schema"
spuriously at end of JSON file with complex types.
- Fixed ScanBatch.next() to return OK_NEW_SCHEMA instead of NONE for certain
case of zero-row source/reader with new schema.
- Fixed UnionAllRecordBatch to handle correct IterOutcome sequence from
now-corrected ScanBatch.next(). (Was DRILL-3659.)
Also:
- Added unit test (checking involved metadata at JDBC level).
[Drill2288GetColumnsMetadataWhenNoRowsTest, empty.json]
- Enhanced IteratorValidatorBatchIterator, mainly to validate IterOutcome
value sequence from next().
- Documented SchemaChangeCallBack and renamed method for clarity.
[SchemaChangeCallBack, ScanBatch, AbstractSingleRecordBatch]
- Other [ScanBatch]:
- Added/edited various code and doc. comments.
- Renamed boolean schemaChange -> schemaChanged.
- Various code cleanup (e.g., "final", SuppressWarnings, whitespace).
----
> ResultSetMetaData not set for zero-row results
> (DatabaseMetaData.getColumns(...)) [ScanBatch problem]
> -----------------------------------------------------------------------------------------------------
>
> Key: DRILL-2288
> URL: https://issues.apache.org/jira/browse/DRILL-2288
> Project: Apache Drill
> Issue Type: Bug
> Components: Storage - Information Schema
> Reporter: Daniel Barclay (Drill)
> Assignee: Daniel Barclay (Drill)
> Fix For: 1.2.0
>
> Attachments: Drill2288NoResultSetMetadataWhenZeroRowsTest.java
>
>
> The ResultSetMetaData object from getMetadata() of a ResultSet is not set up
> (getColumnCount() returns zero, and trying to access any other metadata
> throws IndexOutOfBoundsException) for a result set with zero rows, at least
> for one from DatabaseMetaData.getColumns(...).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)