DRILL-3216: Part 2--Fix existing(+) INFORMATION_SCHEMA.COLUMNS columns.
Added unit test. [TempInformationSchemaColumnsTest]
Fixed/added INFORMATION_SCHEMA.COLUMNS columns:
- Changed -1 to NULL.
- Moved column NUMERIC_PRECISION to correct position.
- Fixed column ORDINAL_POSITION from 0-based to 1-based.
- Moved CHAR length to column CHARACTER_MAXIMUM_LENGTH.
- Moved BINARY and VARBINARY length to columnCHARACTER_MAXIMUM_LENGTH.
- Added precision and scale values for integer types and floating-point types.
- Added column COLUMN_DEFAULT.
- Added column CHARACTER_OCTET_LENGTH.
- Added column DATETIME_PRECISION.
- Added column INTERVAL_TYPE.
- Added column INTERVAL_PRECISION.
- Fixed column DATA_TYPE to correct form of type names:
- "INTERVAL_..." -> "INTERVAL"
- short (e.g., "CHAR") to specified (e.g., "CHARACTER")
Applied COLUMNS to JDBC DatabaseMetaData.getColumns() implementation:
- Changed some getColumns() result values:
- type names (DATA_TYPE changes)
- precision radix for some cases
- Adapted existing uses of COLUMNS data.
- Applied new COLUMNS data (e.g., interval precision).
- Updated getColumns() test (re changed result values).
- Augmented getColumns() test (e.g., more intervals).
Updated other tests using INFORMATION_SCHEMA.COLUMNS:
- -1 -> NULL
- integer types have precision and scale values
- "CHAR" -> "CHARACTER", etc.
[TestInfoSchema, TestInfoSchemaOnHiveStorage, TestInformationSchemaColumns,
TestViewSupport]