Clone Tools
  • last updated 23 mins ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
DRILL-5783, DRILL-5841, DRILL-5894: Rationalize test temp directories

This change includes:

DRILL-5783:

- A unit test is created for the priority queue in the TopN operator.

- The code generation classes passed around a completely unused function registry reference in some places so it is removed.

- The priority queue had unused parameters for some of its methods so it is removed.

DRILL-5841:

- Created standardized temp directory classes DirTestWatcher, SubDirTestWatcher, and BaseDirTestWatcher. And updated all unit tests to use them.

DRILL-5894:

- Removed the dfs_test storage plugin for tests and replaced it with the already existing dfs storage plugin.

Misc:

- General code cleanup.

- Removed unnecessary use of String.format in the tests.

This closes #984

  1. … 365 more files in changeset.
DRILL-3993: Fix unit test failures connected with support Calcite 1.13

- Use root schema as default for describe table statement.

Fix TestOpenTSDBPlugin.testDescribe() and TestInfoSchemaOnHiveStorage.varCharMaxLengthAndDecimalPrecisionInInfoSchema() unit tests.

- Modify expected results for tests:

TestPreparedStatementProvider.invalidQueryValidationError();

TestProjectPushDown.testTPCH1();

TestProjectPushDown.testTPCH3();

TestStorageBasedHiveAuthorization.selectUser1_db_u0_only();

TestStorageBasedHiveAuthorization.selectUser0_db_u1g1_only()

- Fix TestCTAS.whenTableQueryColumnHasStarAndTableFiledListIsSpecified(), TestViewSupport.createViewWhenViewQueryColumnHasStarAndViewFiledListIsSpecified(), TestInbuiltHiveUDFs.testIf(), testDisableUtf8SupportInQueryString unit tests.

- Fix UnsupportedOperationException and NPE for jdbc tests.

- Fix AssertionError: Conversion to relational algebra failed to preserve datatypes

*DrillCompoundIdentifier:

According to the changes, made in [CALCITE-546], star Identifier is replaced by empty string during parsing the query. Since Drill uses its own DrillCompoundIdentifier, it should also replace star by empty string before creating SqlIdentifier instance to avoid further errors connected with star column. see SqlIdentifier.isStar() method.

*SqlConverter:

In [CALCITE-1417] added simplification of expressions which should be projected every time when a new project rel node is created using RelBuilder. It causes assertion errors connected with types nullability. This hook was set to false to avoid project expressions simplification. See usage of this hook and RelBuilder.project() method.

In Drill the type nullability of the function depends on only the nullability of its arguments. In some cases, a function may return null value even if it had non-nullable arguments. When Calice simplifies expressions, it checks that the type of the result is the same as the type of the expression. Otherwise, makeCast() method is called. But when a function returns null literal, this cast does nothing, even when the function has a non-nullable type. So to avoid this issue, method makeCast() was overridden.

*DrillAvgVarianceConvertlet:

Problem with sum0 and specific changes in old Calcite (it is CALCITE-777). (see HistogramShuttle.visitCall method) Changes were made to avoid changes in Calcite.

*SqlConverter, DescribeTableHandler, ShowTablesHandler:

New Calcite tries to combine both default and specified workspaces during the query validation. In some cases, for example, when describe table statement is used, Calcite tries to find INFORMATION_SCHEMA in the schema used as default. When it does not find the schema, it tries to find a table with such name. For some storage plugins, such as opentsdb and hbase, when a table was not found, the error is thrown, and the query fails. To avoid this issue, default schema was changed to root schema for validation stage for describe table and show tables queries.

    • -5
    • +9
    ./apache/drill/jdbc/impl/DrillMetaImpl.java
  1. … 16 more files in changeset.
DRILL-3993: Changes to support Calcite 1.13

- fixed all compiling errors (main changes were: Maven changes, chenges RelNode -> RelRoot, implementing some new methods from updated interfaces, chenges some literals, logger changes);

- fixed unexpected column errors, validation errors and assertion errors after Calcite update;

- fixed describe table/schema statement according to updated logic;

- added fixes with time-intervals;

- changed precision of BINARY to 65536 (was 1048576) according to updated logic (Calcite overrides bigger precision to own maxPrecision);

- ignored some incorrect tests with DRILL-3244;

- changed "Table not found" message to "Object not found within" according to new Calcite changes.

    • -10
    • +63
    ./apache/drill/jdbc/impl/DrillMetaImpl.java
  1. … 66 more files in changeset.
DRILL-4264: Allow field names to include dots

  1. … 98 more files in changeset.
DRILL-5431: SSL Support (Java) - Java client server SSL implementation

Also enable OpenSSL support

Also fix exclusions and java-exec pom file to eliminate netty-tcnative as a transitive dependency on all projects

  1. … 30 more files in changeset.
DRILL-5568: Include hadoop-common jars inside drill-jdbc-all.jar 1) Introduce a new file inside exec/jdbc-all resource package which contains the property key/value pair for prefix 2) At build time based upon the profile choosen this property value is set inside the file 3) It is later consumed by SecurityConfiguration class to rename classpath for classes inside hadoop package.

DRILL-5568: Code review changes

close apache/drill#849

    • -3
    • +3
    ./apache/drill/jdbc/impl/DrillFactory.java
  1. … 5 more files in changeset.
DRILL-5413: DrillConnectionImpl.isReadOnly() throws NullPointerException

change is in CALCITE-843.

update drill's calcite version to 1.4.0-drill-r21

close #806

  1. … 2 more files in changeset.
DRILL-5326: Unit tests failures related to the SERVER_METADTA

- adding of the sql type name for the "GENERIC_OBJECT";

- changing "NullCollation" in the "ServerMetaProvider" to the correct default value;

- changing RpcType to GET_SERVER_META in the appropriate ServerMethod

close #775

  1. … 3 more files in changeset.
DRILL-5301: Server metadata API

Add a Server metadata API to the User protocol, to query server support

of various SQL features.

Add support to the client (DrillClient) to query this information.

Add support to the JDBC driver to query this information, if the server supports

the new API, or fallback to the previous behaviour (rely on Avatica defaults) otherwise.

close #764

    • -3
    • +2
    ./apache/drill/jdbc/DrillConnectionConfig.java
    • -4
    • +4
    ./apache/drill/jdbc/impl/DrillMetaImpl.java
  1. … 32 more files in changeset.
DRILL-4280: CORE (user to bit authentication, Java)

+ Add logic for authentication in UserClient and UserServer with

backward compatibility in both directions

+ Add abstract extension to ServerConnection and ClientConnection

+ Add concrete extensions to abstract connections:

BitToUserConnection and UserToBitConnection

+ Add ConnectionConfig interface with abstract and concrete

implementations to encapsulate configuration for server-side

connections

+ Encapsulate all requests handled by UserServer in

UserServerRequestHandler

+ Clear UserSession when connection is closed either by user or

bit

+ Add DrillProperties to encapsulate all connection properties

used during connection time

  1. … 15 more files in changeset.
DRILL-5241: JDBC proxy driver: Do not put null value in map

This closes #724

    • -1
    • +1
    ./apache/drill/jdbc/proxy/ProxiesManager.java
DRILL-5015: Randomly select the drillbit from the list provided by user in connection string Note: Improved the connection string validation and error handling during parsing. Added unit test for the new parsing mechanism.

close apache/drill#648

  1. … 3 more files in changeset.
DRILL-4994: Add back JDBC prepared statement for older servers

When the JDBC client is connected to an older Drill server, it always

attempted to use server-side prepared statement with no fallback.

With this change, client will check server version and will fallback to the

previous client-side prepared statement (which is still limited to only execute

queries and does not provide metadata).

close #613

    • -0
    • +4
    ./apache/drill/jdbc/DrillConnectionConfig.java
    • -1
    • +10
    ./apache/drill/jdbc/impl/DrillCursor.java
  1. … 19 more files in changeset.
DRILL-4730: Update JDBC DatabaseMetaData implementation to use new Metadata APIs

Update JDBC driver to use Metadata APIs instead of executing SQL queries

close #613

    • -1
    • +5
    ./apache/drill/jdbc/DrillConnectionConfig.java
    • -14
    • +649
    ./apache/drill/jdbc/impl/DrillMetaImpl.java
    • -0
    • +448
    ./apache/drill/jdbc/impl/WrappedAccessor.java
  1. … 13 more files in changeset.
DRILL-4994: Refactor DrillCursor

Refactor DrillCursor to be more self-contained.

    • -22
    • +301
    ./apache/drill/jdbc/impl/DrillCursor.java
    • -288
    • +14
    ./apache/drill/jdbc/impl/DrillResultSetImpl.java
DRILL-4969: Basic implementation of display size for column metadata

Add a simple implementation of display size, based on the ODBC table

available at: https://msdn.microsoft.com/en-us/library/ms713974(v=vs.85).aspx

closes #632

  1. … 5 more files in changeset.
DRILL-4369: Exchange name and version infos during handshake

There's no name and version exchanged between client and server over the User RPC

channel.

On client side, having access to the server name and version is useful to expose it

to the user (through JDBC or ODBC api like DatabaseMetadata#getDatabaseProductVersion()),

or to implement fallback strategy when some recent API are not available (like

metadata API).

On the server side, having access to the client version might be useful for audit

purposes and eventually to implement fallback strategy if it doesn't require a RPC

version change.

this closes #622

    • -1
    • +2
    ./apache/drill/jdbc/impl/DriverImpl.java
  1. … 19 more files in changeset.
DRILL-4950: Remove incorrect false condition; consume all empty batches

closes #621

    • -13
    • +0
    ./apache/drill/jdbc/impl/DrillCursor.java
DRILL-4452: Uses Apache Calcite Avatica driver vs Optiq driver for Drill JDBC

Drill JDBC driver uses Optiq Avatica as its basis, but this dependency has

been moved over to Calcite, for quite some time without Drill code being

updated for it.

This patch updates Avatica version to the version from Calcite

(1.4.0-drill-r19). It also refactors Drill JDBC driver to comply with the

packages and API changes in Avatica. Finally it fixes the the SQL types for

lists and structs, since Drill doesn't support java.sql.Array and

java.sql.Struct interfaces.

this closes #395

Change-Id: Ia608adf900e8708d9e6f6f58ed41e104321a9914

    • -1
    • +1
    ./apache/drill/jdbc/DrillConnectionConfig.java
    • -2
    • +2
    ./apache/drill/jdbc/impl/DrillAccessorList.java
    • -10
    • +8
    ./apache/drill/jdbc/impl/DrillCursor.java
    • -3
    • +3
    ./apache/drill/jdbc/impl/DrillFactory.java
    • -3
    • +3
    ./apache/drill/jdbc/impl/DrillHandler.java
    • -0
    • +477
    ./apache/drill/jdbc/impl/DrillMetaImpl.java
  1. … 8 more files in changeset.
DRILL-4732: Update JDBC driver to use the new prepared statement APIs on DrillClient

this closes #532

  1. … 3 more files in changeset.
DRILL-3510: Add ANSI_QUOTES option so that Drill's SQL Parser will recognize ANSI_SQL identifiers

- added supporing of quoting identifiers with DOUBLE_QUOTES or BRACKETS via setting new

sys/sess EnumString option QUOTING_IDENTIFIERS;

- added possibility of setting QUOTING_IDENTIFIERS by the jdbc connection URL string;

- added relevant unit tests;

close #520

    • -6
    • +10
    ./apache/drill/jdbc/DrillDatabaseMetaData.java
  1. … 19 more files in changeset.
DRILL-4184: Support variable length decimal fields in parquet

  1. … 68 more files in changeset.
DRILL-4382: Remove dependency on drill-logical from vector package

  1. … 80 more files in changeset.
DRILL-3987: (CLEANUP) Final cleanups to get complete working build/distribution

- small cleanups

- move Hook to drill-adbc

- update distribution assembly to include new modules

This closes #250

  1. … 30 more files in changeset.
DRILL-3927: use OutOfMemoryException in more places Some code cleanup required for the upcoming introduction of the rewritten direct memory allocator. Chiefly the introduction of OutOfMemoryException handling in a few spots, the use of DrillAutoCloseables for some allocator close() calls, and some other minor cleanup. - removed the exclusion of exec/work from the jdbc-all jar, because it now depends on OutOfMemoryException, and that is derived from FragmentSetupException and Foreman Exception

this closes #199

  1. … 14 more files in changeset.
DRILL-3766: Fix ResultSet.getRow() (make 1-based; return 0 at end).

Corrected for Avatica's non-JDBC-compliant behavior.

Also purged unused imports.

  1. … 1 more file in changeset.
DRILL-3778: Add missed part of DRILL-3160 (making JDBC Javadoc available).

This closes #158

Main:

Configured Javadoc generation (title, package groups, version in headers).

Added link to JDBC page in Drill documentation site.

Edited/fixed some JDBC Javadoc comments.

Added explicit SQLConversionOverflowException to throws clauses for Javadoc

effect.

Added some imports for Javadoc references.

Misc.:

Fixed a couple Javadoc syntax errors.

Fixed POM indentation.

    • -1
    • +1
    ./apache/drill/jdbc/DrillConnection.java
    • -1
    • +0
    ./apache/drill/jdbc/DrillConnectionConfig.java
    • -18
    • +30
    ./apache/drill/jdbc/DrillResultSet.java
    • -2
    • +3
    ./apache/drill/jdbc/JdbcApiSqlException.java
    • -0
    • +1
    ./apache/drill/jdbc/proxy/package-info.java
  1. … 3 more files in changeset.
DRILL-3661: Update: Added a @link and a @code.

This closes #119

    • -5
    • +4
    ./apache/drill/jdbc/impl/DrillCursor.java
DRILL-3661: Update: Fixed "DRILL-xxxx" reference.

    • -2
    • +2
    ./apache/drill/jdbc/DrillConnectionConfig.java
DRILL-2769: Fix most non-SQLException not-supported-yet exceptions.

Core:

Added (auto-scanning) unit test. [Drill2769UnsupportedReportsUseSqlExceptionTest]

Added translation of lots of UnsupportedOperationExceptions (and some

RuntimeExceptions) from Avatica code to SQLFeatureNotSupportedExceptions (tons

of method overrides).

Also:

Added explicit bounds checks in ResultSetMetaData methods and checking of

last-accessed column in DrillAccessorList.wasNull() (to fix other

RuntimeExceptions to SQLExceptions).

Added resetting of last-accessed column to fix latent bug in DrillAccessorList.

Hygiene:

- Renamed some zero-based index/ordinal-position parameters to "...Offset".

- Renamed some one-based index/ordinal-position parameters to "...Number".

- Renamed DrillAccessorList lastColumn to rowLastColumnOffset; declared

explicit logical null value for rowLastColumnOffset.

    • -9
    • +41
    ./apache/drill/jdbc/impl/DrillAccessorList.java
    • -22
    • +135
    ./apache/drill/jdbc/impl/DrillConnectionImpl.java
    • -0
    • +1
    ./apache/drill/jdbc/impl/DrillCursor.java
    • -100
    • +601
    ./apache/drill/jdbc/impl/DrillResultSetImpl.java
    • -20
    • +120
    ./apache/drill/jdbc/impl/DrillStatementImpl.java
  1. … 1 more file in changeset.