Github user sudheeshkatkam commented on a diff in the pull request:
https://github.com/apache/drill/pull/613#discussion_r86275226
--- Diff:
exec/jdbc/src/main/java/org/apache/drill/jdbc/impl/DrillMetaImpl.java ---
@@ -61,77 +91,271 @@ private static Signature newSignature(String sql) {
sql,
Collections.<AvaticaParameter> emptyList(),
Collections.<String, Object>emptyMap(),
- CursorFactory.OBJECT);
+ null // CursorFactory set to null, as SQL requests use DrillCursor
+ );
}
- private MetaResultSet s(String s) {
- try {
- logger.debug("Running {}", s);
-
- AvaticaStatement statement = connection.createStatement();
- return MetaResultSet.create(connection.id, statement.getId(), true,
- newSignature(s), null);
- } catch (Exception e) {
- // Wrap in RuntimeException because Avatica's abstract method
declarations
- // didn't allow for SQLException!
- throw new DrillRuntimeException("Failure while attempting to get
DatabaseMetadata.", e);
+
+ /** Information about type mapping. */
+ private static class TypeInfo {
+ private static Map<Class<?>, TypeInfo> MAPPING =
ImmutableMap.<Class<?>, TypeInfo> builder()
+ .put(boolean.class, of(Types.BOOLEAN, "BOOLEAN"))
--- End diff --
Given this, how about `int.class` and others?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---