[jira] [Commented] (DRILL-5219) Remove DrillUserProperties filtering in C++ driver

2017-02-04 Thread Laurent Goujon (JIRA)

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

Laurent Goujon commented on DRILL-5219:
---

The idea is that an older client can provide information for a newer server 
without protocol change like the default quoting mechanism, or some special 
behavior an application might require. I consider that user properties are 
similar to HTTP header fields where some are part of the specs, and that client 
and server should abide by them, but clients can send any header, with the 
assumption that the server might not recognize it and will ignore it. 

Having user properties being filtered by the client means that if the end user 
wants to provide extra context to the server, it needs to update to a new 
client, which is sometimes an issue in some organizations. Also the ODBC driver 
release process is a long and complex one, so I believe that there is value of 
keeping a way to pass informations around without having to change the client.

> Remove DrillUserProperties filtering in C++ driver
> --
>
> Key: DRILL-5219
> URL: https://issues.apache.org/jira/browse/DRILL-5219
> Project: Apache Drill
>  Issue Type: Bug
>  Components: Client - C++
>Reporter: Laurent Goujon
>Assignee: Laurent Goujon
>Priority: Minor
>
> Unlike the Java client, the C++ connector filter out unknown Drill user 
> properties:
> https://github.com/apache/drill/blob/master/contrib/native/client/src/clientlib/drillClientImpl.cpp#L374
> This prevents a client (like the ODBC driver) to pass extra properties to the 
> server (like extra metainformation, or some specific behavior for a given 
> software)



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


[jira] [Commented] (DRILL-5088) Error when reading DBRef column

2017-02-04 Thread Gautam Kumar Parai (JIRA)

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

Gautam Kumar Parai commented on DRILL-5088:
---

[~cshi] I think you should mark this issue as `blocked by` DRILL-5196 (using 
issue links)? Putting a `ready-to-commit` tag may cause this to be committed 
prior to DRILL-5196 which will break the testcase.

> Error when reading DBRef column
> ---
>
> Key: DRILL-5088
> URL: https://issues.apache.org/jira/browse/DRILL-5088
> Project: Apache Drill
>  Issue Type: Bug
>  Components: Execution - Data Types
> Environment: drill 1.9.0
> mongo 3.2
>Reporter: Guillaume Champion
>Assignee: Chunhui Shi
>
> In a mongo database with DBRef, when a DBRef is inserted in the first line of 
> a mongo's collection drill query failed :
> {code}
> 0: jdbc:drill:zk=local> select * from mongo.mydb.contact2;
> Error: SYSTEM ERROR: CodecConfigurationException: Can't find a codec for 
> class com.mongodb.DBRef.
> {code}
> Simple example to reproduce:
> In mongo instance
> {code}
> db.contact2.drop();
> db.contact2.insert({ "_id" : ObjectId("582081d96b69060001fd8938"), "account" 
> : DBRef("contact", ObjectId("999cbf116b69060001fd8611")) });
> {code}
> In drill :
> {code}
> 0: jdbc:drill:zk=local> select * from mongo.mydb.contact2;
> Error: SYSTEM ERROR: CodecConfigurationException: Can't find a codec for 
> class com.mongodb.DBRef.
> [Error Id: 2944d766-e483-4453-a706-3d481397b186 on Analytics-Biznet:31010] 
> (state=,code=0)
> {code}
> If the first line doesn't contain de DBRef, drill will querying correctly :
> In a mongo instance :
> {code}
> db.contact2.drop();
> db.contact2.insert({ "_id" : ObjectId("582081d96b69060001fd8939") });
> db.contact2.insert({ "_id" : ObjectId("582081d96b69060001fd8938"), "account" 
> : DBRef("contact", ObjectId("999cbf116b69060001fd8611")) });
> {code}
> In drill :
> {code}
> 0: jdbc:drill:zk=local> select * from mongo.mydb.contact2;
> +--+---+
> | _id  |account   
>  |
> +--+---+
> | {"$oid":"582081d96b69060001fd8939"}  | {"$id":{}}   
>  |
> | {"$oid":"582081d96b69060001fd8938"}  | 
> {"$ref":"contact","$id":{"$oid":"999cbf116b69060001fd8611"}}  |
> +--+---+
> 2 rows selected (0,563 seconds)
> {code}



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


[jira] [Commented] (DRILL-5088) Error when reading DBRef column

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

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

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

Github user gparai commented on the issue:

https://github.com/apache/drill/pull/702
  
Thanks for adding the testcase. 
+1 LGTM.


> Error when reading DBRef column
> ---
>
> Key: DRILL-5088
> URL: https://issues.apache.org/jira/browse/DRILL-5088
> Project: Apache Drill
>  Issue Type: Bug
>  Components: Execution - Data Types
> Environment: drill 1.9.0
> mongo 3.2
>Reporter: Guillaume Champion
>Assignee: Chunhui Shi
>
> In a mongo database with DBRef, when a DBRef is inserted in the first line of 
> a mongo's collection drill query failed :
> {code}
> 0: jdbc:drill:zk=local> select * from mongo.mydb.contact2;
> Error: SYSTEM ERROR: CodecConfigurationException: Can't find a codec for 
> class com.mongodb.DBRef.
> {code}
> Simple example to reproduce:
> In mongo instance
> {code}
> db.contact2.drop();
> db.contact2.insert({ "_id" : ObjectId("582081d96b69060001fd8938"), "account" 
> : DBRef("contact", ObjectId("999cbf116b69060001fd8611")) });
> {code}
> In drill :
> {code}
> 0: jdbc:drill:zk=local> select * from mongo.mydb.contact2;
> Error: SYSTEM ERROR: CodecConfigurationException: Can't find a codec for 
> class com.mongodb.DBRef.
> [Error Id: 2944d766-e483-4453-a706-3d481397b186 on Analytics-Biznet:31010] 
> (state=,code=0)
> {code}
> If the first line doesn't contain de DBRef, drill will querying correctly :
> In a mongo instance :
> {code}
> db.contact2.drop();
> db.contact2.insert({ "_id" : ObjectId("582081d96b69060001fd8939") });
> db.contact2.insert({ "_id" : ObjectId("582081d96b69060001fd8938"), "account" 
> : DBRef("contact", ObjectId("999cbf116b69060001fd8611")) });
> {code}
> In drill :
> {code}
> 0: jdbc:drill:zk=local> select * from mongo.mydb.contact2;
> +--+---+
> | _id  |account   
>  |
> +--+---+
> | {"$oid":"582081d96b69060001fd8939"}  | {"$id":{}}   
>  |
> | {"$oid":"582081d96b69060001fd8938"}  | 
> {"$ref":"contact","$id":{"$oid":"999cbf116b69060001fd8611"}}  |
> +--+---+
> 2 rows selected (0,563 seconds)
> {code}



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


[jira] [Commented] (DRILL-5196) Could not run a single MongoDB unit test case through command line or IDE

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

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

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

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

https://github.com/apache/drill/pull/741#discussion_r99470619
  
--- Diff: contrib/storage-mongo/src/test/resources/datatype.json ---
@@ -0,0 +1 @@
+[{"_id": {"$oid" : "582081d96b69060001fd8938"}, "account" : { "$ref": 
"contact", "$id": {"$oid": "999cbf116b69060001fd8611"} }}, {"_id" : {"$oid" : 
"582081d96b69060001fd8939" } } ]
--- End diff --

Should we rename it to something like datatype_dbref.json? The name seems 
to suggest we have all datatypes in this document


> Could not run a single MongoDB unit test case through command line or IDE
> -
>
> Key: DRILL-5196
> URL: https://issues.apache.org/jira/browse/DRILL-5196
> Project: Apache Drill
>  Issue Type: Bug
>Reporter: Chunhui Shi
>Assignee: Chunhui Shi
>
> Could not run a single MongoDB's unit test through IDE or command line. The 
> reason is when running a single test case, the MongoDB instance did not get 
> started thus a 'table not found' error for 'mongo.employee.empinfo' would be 
> raised.



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


[jira] [Commented] (DRILL-5196) Could not run a single MongoDB unit test case through command line or IDE

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

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

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

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

https://github.com/apache/drill/pull/741#discussion_r99470421
  
--- Diff: 
contrib/storage-mongo/src/test/java/org/apache/drill/exec/store/mongo/TestTableGenerator.java
 ---
@@ -58,7 +59,12 @@ public static void generateTable(String dbName, String 
collection,
 .jsonArray(jsonArray).importFile(jsonFile).build();
 MongoImportExecutable importExecutable = MongoImportStarter
 .getDefaultInstance().prepare(mongoImportConfig);
-importExecutable.start();
+MongoImportProcess importProcess = importExecutable.start();
+
+while (importProcess.isProcessRunning()) {
--- End diff --

Please add a comment explaining the change - Import process is running in a 
different thread/process and we do not to start running any test prior to 
import complete?


> Could not run a single MongoDB unit test case through command line or IDE
> -
>
> Key: DRILL-5196
> URL: https://issues.apache.org/jira/browse/DRILL-5196
> Project: Apache Drill
>  Issue Type: Bug
>Reporter: Chunhui Shi
>Assignee: Chunhui Shi
>
> Could not run a single MongoDB's unit test through IDE or command line. The 
> reason is when running a single test case, the MongoDB instance did not get 
> started thus a 'table not found' error for 'mongo.employee.empinfo' would be 
> raised.



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