You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@drill.apache.org by pa...@apache.org on 2015/03/19 18:10:07 UTC

drill git commit: DRILL-2415: Export Drill C++ Client symbols so as to provide dynamic linking

Repository: drill
Updated Branches:
  refs/heads/master ee5b0bc13 -> ff9882be7


DRILL-2415: Export Drill C++ Client symbols so as to provide dynamic linking


Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/ff9882be
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/ff9882be
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/ff9882be

Branch: refs/heads/master
Commit: ff9882be766828f39340f579e1de7b7e1bb3cfec
Parents: ee5b0bc
Author: alzarei <az...@ece.ubc.ca>
Authored: Wed Mar 18 20:07:01 2015 -0700
Committer: Parth Chandra <pc...@maprtech.com>
Committed: Thu Mar 19 10:09:26 2015 -0700

----------------------------------------------------------------------
 contrib/native/client/src/clientlib/drillClient.cpp     |  4 ++++
 contrib/native/client/src/include/drill/drillClient.hpp |  8 ++++++++
 contrib/native/client/src/include/drill/recordBatch.hpp | 10 +++++-----
 3 files changed, 17 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/ff9882be/contrib/native/client/src/clientlib/drillClient.cpp
----------------------------------------------------------------------
diff --git a/contrib/native/client/src/clientlib/drillClient.cpp b/contrib/native/client/src/clientlib/drillClient.cpp
index 878dad4..71907e0 100644
--- a/contrib/native/client/src/clientlib/drillClient.cpp
+++ b/contrib/native/client/src/clientlib/drillClient.cpp
@@ -349,4 +349,8 @@ void DrillClient::freeQueryResources(QueryHandle_t* handle){
     *handle=NULL;
 }
 
+void DrillClient::freeRecordBatch(RecordBatch* pRecordBatch){
+    delete pRecordBatch;
+}
+
 } // namespace Drill

http://git-wip-us.apache.org/repos/asf/drill/blob/ff9882be/contrib/native/client/src/include/drill/drillClient.hpp
----------------------------------------------------------------------
diff --git a/contrib/native/client/src/include/drill/drillClient.hpp b/contrib/native/client/src/include/drill/drillClient.hpp
index 19fec69..71a5c80 100644
--- a/contrib/native/client/src/include/drill/drillClient.hpp
+++ b/contrib/native/client/src/include/drill/drillClient.hpp
@@ -307,6 +307,14 @@ class DECLSPEC_DRILL_CLIENT DrillClient{
          */
         void freeQueryIterator(RecordIterator** pIter){ delete *pIter; *pIter=NULL;};
 
+        /*
+         * Applications using the async query submit method should call freeRecordBatch to free up resources
+         * once the RecordBatch is processed and no longer needed.
+         */
+        void freeRecordBatch(RecordBatch* pRecordBatch);
+
+
+
     private:
         static DrillClientInitializer s_init;
         static DrillClientConfig s_config;

http://git-wip-us.apache.org/repos/asf/drill/blob/ff9882be/contrib/native/client/src/include/drill/recordBatch.hpp
----------------------------------------------------------------------
diff --git a/contrib/native/client/src/include/drill/recordBatch.hpp b/contrib/native/client/src/include/drill/recordBatch.hpp
index 4abc2de..92a4c3ad 100644
--- a/contrib/native/client/src/include/drill/recordBatch.hpp
+++ b/contrib/native/client/src/include/drill/recordBatch.hpp
@@ -460,7 +460,7 @@ template <typename VALUE_TYPE>
 // We don't really need a destructor here, but we declare a virtual dtor in the base class in case we ever get
 // more complex and start doing dynamic allocations in these classes.
 
-struct DateTimeBase{
+struct DECLSPEC_DRILL_CLIENT DateTimeBase{
     DateTimeBase():m_datetime(0){}
     virtual ~DateTimeBase(){}
     int64_t m_datetime;
@@ -469,7 +469,7 @@ struct DateTimeBase{
     virtual std::string toString()=0;
 };
 
-struct DateHolder: public virtual DateTimeBase{
+struct DECLSPEC_DRILL_CLIENT DateHolder: public virtual DateTimeBase{
     DateHolder(){};
     DateHolder(int64_t d){m_datetime=d; load();}
     int32_t m_year;
@@ -479,7 +479,7 @@ struct DateHolder: public virtual DateTimeBase{
     std::string toString();
 };
 
-struct TimeHolder: public virtual DateTimeBase{
+struct DECLSPEC_DRILL_CLIENT TimeHolder: public virtual DateTimeBase{
     TimeHolder(){};
     TimeHolder(uint32_t d){m_datetime=d; load();}
     uint32_t m_hr;
@@ -490,14 +490,14 @@ struct TimeHolder: public virtual DateTimeBase{
     std::string toString();
 };
 
-struct DateTimeHolder: public DateHolder, public TimeHolder{
+struct DECLSPEC_DRILL_CLIENT DateTimeHolder: public DateHolder, public TimeHolder{
     DateTimeHolder(){};
     DateTimeHolder(int64_t d){m_datetime=d; load();}
     void load();
     std::string toString();
 };
 
-struct DateTimeTZHolder: public DateTimeHolder{
+struct DECLSPEC_DRILL_CLIENT DateTimeTZHolder: public DateTimeHolder{
     DateTimeTZHolder(ByteBuf_t b){
         m_datetime=*(int64_t*)b;
         m_tzIndex=*(uint32_t*)(b+sizeof(uint64_t));