[jira] [Commented] (DRILL-5301) Add server metadata API

2017-03-02 Thread Sudheesh Katkam (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-5301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15893654#comment-15893654
 ] 

Sudheesh Katkam commented on DRILL-5301:


Fixed in 
[d2e0f41|https://github.com/apache/drill/commit/d2e0f415c9cbaf609805708586832b6771883f53]
 and 
[d3238b1|https://github.com/apache/drill/commit/d3238b1b2270533285025d69b35906506212f492]

> Add server metadata API
> ---
>
> Key: DRILL-5301
> URL: https://issues.apache.org/jira/browse/DRILL-5301
> Project: Apache Drill
>  Issue Type: Improvement
>  Components:  Server, Client - C++, Client - Java, Client - JDBC, 
> Client - ODBC
>Reporter: Laurent Goujon
>Assignee: Laurent Goujon
>  Labels: ready-to-commit
> Fix For: 1.10.0
>
>
> JDBC and ODBC clients exposes lots of metadata regarding server version and 
> support of various parts of the SQL standard.
> Currently the returned information is hardcoded in both clients/drivers which 
> means that the infomation returned is support as of the client version, not 
> the server version.
> Instead, a new method should be provided to the clients to query the actual 
> server support. Support on the client or the server should be optional (for 
> example a client should not use this API if the server doesn't support it and 
> fallback to default values).



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (DRILL-5301) Add server metadata API

2017-03-02 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-5301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15892994#comment-15892994
 ] 

ASF GitHub Bot commented on DRILL-5301:
---

Github user asfgit closed the pull request at:

https://github.com/apache/drill/pull/764


> Add server metadata API
> ---
>
> Key: DRILL-5301
> URL: https://issues.apache.org/jira/browse/DRILL-5301
> Project: Apache Drill
>  Issue Type: Improvement
>  Components:  Server, Client - C++, Client - Java, Client - JDBC, 
> Client - ODBC
>Reporter: Laurent Goujon
>Assignee: Laurent Goujon
>  Labels: ready-to-commit
>
> JDBC and ODBC clients exposes lots of metadata regarding server version and 
> support of various parts of the SQL standard.
> Currently the returned information is hardcoded in both clients/drivers which 
> means that the infomation returned is support as of the client version, not 
> the server version.
> Instead, a new method should be provided to the clients to query the actual 
> server support. Support on the client or the server should be optional (for 
> example a client should not use this API if the server doesn't support it and 
> fallback to default values).



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (DRILL-5301) Add server metadata API

2017-03-01 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-5301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15891489#comment-15891489
 ] 

ASF GitHub Bot commented on DRILL-5301:
---

Github user laurentgo commented on the issue:

https://github.com/apache/drill/pull/764
  
The cursor change belongs to DRILL-4994


> Add server metadata API
> ---
>
> Key: DRILL-5301
> URL: https://issues.apache.org/jira/browse/DRILL-5301
> Project: Apache Drill
>  Issue Type: Improvement
>  Components:  Server, Client - C++, Client - Java, Client - JDBC, 
> Client - ODBC
>Reporter: Laurent Goujon
>Assignee: Laurent Goujon
>  Labels: ready-to-commit
>
> JDBC and ODBC clients exposes lots of metadata regarding server version and 
> support of various parts of the SQL standard.
> Currently the returned information is hardcoded in both clients/drivers which 
> means that the infomation returned is support as of the client version, not 
> the server version.
> Instead, a new method should be provided to the clients to query the actual 
> server support. Support on the client or the server should be optional (for 
> example a client should not use this API if the server doesn't support it and 
> fallback to default values).



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (DRILL-5301) Add server metadata API

2017-03-01 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-5301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15891372#comment-15891372
 ] 

ASF GitHub Bot commented on DRILL-5301:
---

Github user jinfengni commented on the issue:

https://github.com/apache/drill/pull/764
  
Which JIRA should the last commit (Refactor DrillCursor) belong to, 
DRILL-4994, 4730, OR 5301?
  


> Add server metadata API
> ---
>
> Key: DRILL-5301
> URL: https://issues.apache.org/jira/browse/DRILL-5301
> Project: Apache Drill
>  Issue Type: Improvement
>  Components:  Server, Client - C++, Client - Java, Client - JDBC, 
> Client - ODBC
>Reporter: Laurent Goujon
>Assignee: Laurent Goujon
>  Labels: ready-to-commit
>
> JDBC and ODBC clients exposes lots of metadata regarding server version and 
> support of various parts of the SQL standard.
> Currently the returned information is hardcoded in both clients/drivers which 
> means that the infomation returned is support as of the client version, not 
> the server version.
> Instead, a new method should be provided to the clients to query the actual 
> server support. Support on the client or the server should be optional (for 
> example a client should not use this API if the server doesn't support it and 
> fallback to default values).



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (DRILL-5301) Add server metadata API

2017-03-01 Thread Jinfeng Ni (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-5301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15891367#comment-15891367
 ] 

Jinfeng Ni commented on DRILL-5301:
---

[~laurentgo]

PR #764 contains 5 commits, including the patches for DRILL-4994 and 
DRILL-4730, which also show up in PR#613. 

What commits should I use for DRILL-4994/DRILL-4730 ( the commits in PR#764, or 
PR#613), or they are same?

Thanks,


> Add server metadata API
> ---
>
> Key: DRILL-5301
> URL: https://issues.apache.org/jira/browse/DRILL-5301
> Project: Apache Drill
>  Issue Type: Improvement
>  Components:  Server, Client - C++, Client - Java, Client - JDBC, 
> Client - ODBC
>Reporter: Laurent Goujon
>Assignee: Laurent Goujon
>  Labels: ready-to-commit
>
> JDBC and ODBC clients exposes lots of metadata regarding server version and 
> support of various parts of the SQL standard.
> Currently the returned information is hardcoded in both clients/drivers which 
> means that the infomation returned is support as of the client version, not 
> the server version.
> Instead, a new method should be provided to the clients to query the actual 
> server support. Support on the client or the server should be optional (for 
> example a client should not use this API if the server doesn't support it and 
> fallback to default values).



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (DRILL-5301) Add server metadata API

2017-03-01 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-5301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15890210#comment-15890210
 ] 

ASF GitHub Bot commented on DRILL-5301:
---

Github user laurentgo commented on the issue:

https://github.com/apache/drill/pull/764
  
yes, pull requests have been kept in sync


> Add server metadata API
> ---
>
> Key: DRILL-5301
> URL: https://issues.apache.org/jira/browse/DRILL-5301
> Project: Apache Drill
>  Issue Type: Improvement
>  Components:  Server, Client - C++, Client - Java, Client - JDBC, 
> Client - ODBC
>Reporter: Laurent Goujon
>Assignee: Laurent Goujon
>  Labels: ready-to-commit
>
> JDBC and ODBC clients exposes lots of metadata regarding server version and 
> support of various parts of the SQL standard.
> Currently the returned information is hardcoded in both clients/drivers which 
> means that the infomation returned is support as of the client version, not 
> the server version.
> Instead, a new method should be provided to the clients to query the actual 
> server support. Support on the client or the server should be optional (for 
> example a client should not use this API if the server doesn't support it and 
> fallback to default values).



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (DRILL-5301) Add server metadata API

2017-03-01 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-5301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15889756#comment-15889756
 ] 

ASF GitHub Bot commented on DRILL-5301:
---

Github user sudheeshkatkam commented on the issue:

https://github.com/apache/drill/pull/764
  
+1

Is this PR inclusive of comments in #613 (for DRILL-4994, DRILL-4730)?


> Add server metadata API
> ---
>
> Key: DRILL-5301
> URL: https://issues.apache.org/jira/browse/DRILL-5301
> Project: Apache Drill
>  Issue Type: Improvement
>  Components:  Server, Client - C++, Client - Java, Client - JDBC, 
> Client - ODBC
>Reporter: Laurent Goujon
>Assignee: Laurent Goujon
>
> JDBC and ODBC clients exposes lots of metadata regarding server version and 
> support of various parts of the SQL standard.
> Currently the returned information is hardcoded in both clients/drivers which 
> means that the infomation returned is support as of the client version, not 
> the server version.
> Instead, a new method should be provided to the clients to query the actual 
> server support. Support on the client or the server should be optional (for 
> example a client should not use this API if the server doesn't support it and 
> fallback to default values).



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (DRILL-5301) Add server metadata API

2017-02-28 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-5301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15888358#comment-15888358
 ] 

ASF GitHub Bot commented on DRILL-5301:
---

Github user laurentgo commented on a diff in the pull request:

https://github.com/apache/drill/pull/764#discussion_r103492488
  
--- Diff: protocol/src/main/protobuf/User.proto ---
@@ -439,6 +439,211 @@ message CreatePreparedStatementResp {
 }
 
 /*
+ * Request message for getting server metadata
+ */
+message GetServerMetaReq {
+}
+
+enum CollateSupport {
--- End diff --

done


> Add server metadata API
> ---
>
> Key: DRILL-5301
> URL: https://issues.apache.org/jira/browse/DRILL-5301
> Project: Apache Drill
>  Issue Type: Improvement
>  Components:  Server, Client - C++, Client - Java, Client - JDBC, 
> Client - ODBC
>Reporter: Laurent Goujon
>Assignee: Laurent Goujon
>
> JDBC and ODBC clients exposes lots of metadata regarding server version and 
> support of various parts of the SQL standard.
> Currently the returned information is hardcoded in both clients/drivers which 
> means that the infomation returned is support as of the client version, not 
> the server version.
> Instead, a new method should be provided to the clients to query the actual 
> server support. Support on the client or the server should be optional (for 
> example a client should not use this API if the server doesn't support it and 
> fallback to default values).



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (DRILL-5301) Add server metadata API

2017-02-28 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-5301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15888257#comment-15888257
 ] 

ASF GitHub Bot commented on DRILL-5301:
---

Github user laurentgo commented on a diff in the pull request:

https://github.com/apache/drill/pull/764#discussion_r103481448
  
--- Diff: contrib/native/client/src/clientlib/drillClientImpl.cpp ---
@@ -1722,8 +1774,68 @@ void DrillClientImpl::shutdownSocket(){
 DRILL_MT_LOG(DRILL_LOG(LOG_TRACE) << "Socket shutdown" << std::endl;)
 }
 
+namespace { // anonymous
--- End diff --

no, it's an anonymous namespace: the actual name is generated at 
compilation time, and it prevents symbols to leak from outside object file, or 
clash with other symbols (if not declared static).


> Add server metadata API
> ---
>
> Key: DRILL-5301
> URL: https://issues.apache.org/jira/browse/DRILL-5301
> Project: Apache Drill
>  Issue Type: Improvement
>  Components:  Server, Client - C++, Client - Java, Client - JDBC, 
> Client - ODBC
>Reporter: Laurent Goujon
>Assignee: Laurent Goujon
>
> JDBC and ODBC clients exposes lots of metadata regarding server version and 
> support of various parts of the SQL standard.
> Currently the returned information is hardcoded in both clients/drivers which 
> means that the infomation returned is support as of the client version, not 
> the server version.
> Instead, a new method should be provided to the clients to query the actual 
> server support. Support on the client or the server should be optional (for 
> example a client should not use this API if the server doesn't support it and 
> fallback to default values).



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (DRILL-5301) Add server metadata API

2017-02-28 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-5301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15887793#comment-15887793
 ] 

ASF GitHub Bot commented on DRILL-5301:
---

Github user sudheeshkatkam commented on a diff in the pull request:

https://github.com/apache/drill/pull/764#discussion_r103426496
  
--- Diff: protocol/src/main/protobuf/User.proto ---
@@ -439,6 +439,211 @@ message CreatePreparedStatementResp {
 }
 
 /*
+ * Request message for getting server metadata
+ */
+message GetServerMetaReq {
+}
+
+enum CollateSupport {
--- End diff --

For all enums below, use UNKNOWN as the zero-th value to avoid the problem 
[mentioned 
here](http://androiddevblog.com/protocol-buffers-pitfall-adding-enum-values/)?


> Add server metadata API
> ---
>
> Key: DRILL-5301
> URL: https://issues.apache.org/jira/browse/DRILL-5301
> Project: Apache Drill
>  Issue Type: Improvement
>  Components:  Server, Client - C++, Client - Java, Client - JDBC, 
> Client - ODBC
>Reporter: Laurent Goujon
>Assignee: Laurent Goujon
>
> JDBC and ODBC clients exposes lots of metadata regarding server version and 
> support of various parts of the SQL standard.
> Currently the returned information is hardcoded in both clients/drivers which 
> means that the infomation returned is support as of the client version, not 
> the server version.
> Instead, a new method should be provided to the clients to query the actual 
> server support. Support on the client or the server should be optional (for 
> example a client should not use this API if the server doesn't support it and 
> fallback to default values).



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (DRILL-5301) Add server metadata API

2017-02-28 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-5301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15887794#comment-15887794
 ] 

ASF GitHub Bot commented on DRILL-5301:
---

Github user sudheeshkatkam commented on a diff in the pull request:

https://github.com/apache/drill/pull/764#discussion_r103427709
  
--- Diff: contrib/native/client/src/clientlib/drillClientImpl.cpp ---
@@ -1722,8 +1774,68 @@ void DrillClientImpl::shutdownSocket(){
 DRILL_MT_LOG(DRILL_LOG(LOG_TRACE) << "Socket shutdown" << std::endl;)
 }
 
+namespace { // anonymous
--- End diff --

empty block?


> Add server metadata API
> ---
>
> Key: DRILL-5301
> URL: https://issues.apache.org/jira/browse/DRILL-5301
> Project: Apache Drill
>  Issue Type: Improvement
>  Components:  Server, Client - C++, Client - Java, Client - JDBC, 
> Client - ODBC
>Reporter: Laurent Goujon
>Assignee: Laurent Goujon
>
> JDBC and ODBC clients exposes lots of metadata regarding server version and 
> support of various parts of the SQL standard.
> Currently the returned information is hardcoded in both clients/drivers which 
> means that the infomation returned is support as of the client version, not 
> the server version.
> Instead, a new method should be provided to the clients to query the actual 
> server support. Support on the client or the server should be optional (for 
> example a client should not use this API if the server doesn't support it and 
> fallback to default values).



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (DRILL-5301) Add server metadata API

2017-02-27 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-5301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15886202#comment-15886202
 ] 

ASF GitHub Bot commented on DRILL-5301:
---

GitHub user laurentgo opened a pull request:

https://github.com/apache/drill/pull/764

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.

Add support to the Server metadata API to the C++ client if available. If 
the API is not supported to the server, fallback to the previous hard-coded 
values.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/laurentgo/drill laurent/server-meta

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/drill/pull/764.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 #764


commit 48bf728c88b8244c0fc51ae8856d0f786bd9e986
Author: Laurent Goujon 
Date:   2016-11-04T20:31:19Z

Refactor DrillCursor

Refactor DrillCursor to be more self-contained.

commit 6583d69df3b972270e146e53ab2ddcf9c4aff93c
Author: Laurent Goujon 
Date:   2016-11-04T20:32:44Z

DRILL-4730: Update JDBC DatabaseMetaData implementation to use new Metadata 
APIs

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

commit 17ce38a44d098e744620a28b25c93fd352e7c76d
Author: Laurent Goujon 
Date:   2016-11-05T00:36:42Z

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).

commit 5048bb650bf3a42e9f7920727e19e33ae59f0188
Author: Laurent Goujon 
Date:   2017-02-24T23:41:07Z

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.

commit d912267efad379e3730f800bc7b3af57bee2aa06
Author: Laurent Goujon 
Date:   2017-02-26T18:23:59Z

DRILL-5301: Add C++ client support for Server metadata API

Add support to the Server metadata API to the C++ client if
available. If the API is not supported to the server, fallback
to the previous hard-coded values.

Update the querySubmitter example program to query the information.




> Add server metadata API
> ---
>
> Key: DRILL-5301
> URL: https://issues.apache.org/jira/browse/DRILL-5301
> Project: Apache Drill
>  Issue Type: Improvement
>  Components:  Server, Client - C++, Client - Java, Client - JDBC, 
> Client - ODBC
>Reporter: Laurent Goujon
>Assignee: Laurent Goujon
>
> JDBC and ODBC clients exposes lots of metadata regarding server version and 
> support of various parts of the SQL standard.
> Currently the returned information is hardcoded in both clients/drivers which 
> means that the infomation returned is support as of the client version, not 
> the server version.
> Instead, a new method should be provided to the clients to query the actual 
> server support. Support on the client or the server should be optional (for 
> example a client should not use this API if the server doesn't support it and 
> fallback to default values).



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)