[jira] [Comment Edited] (SOLR-8602) Implement ResultSetImpl.wasNull()

2016-01-28 Thread Joel Bernstein (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-8602?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15121667#comment-15121667
 ] 

Joel Bernstein edited comment on SOLR-8602 at 1/28/16 3:17 PM:
---

I think the error handling in ResultSetImpl constructor is correct in the 
latest patch.




was (Author: joel.bernstein):
I think the error handling in ResultSetImpl constructor is correct. 



> Implement ResultSetImpl.wasNull()
> -
>
> Key: SOLR-8602
> URL: https://issues.apache.org/jira/browse/SOLR-8602
> Project: Solr
>  Issue Type: Sub-task
>  Components: SolrJ
>Affects Versions: Trunk
>Reporter: Kevin Risden
>Assignee: Joel Bernstein
> Fix For: Trunk
>
> Attachments: SOLR-8602.patch, SOLR-8602.patch, SOLR-8602.patch, 
> SOLR-8602.patch, SOLR-8602.patch, SOLR-8602.patch, SOLR-8602.patch
>
>
> ResultSetImpl.wasNull is necessary for SQL clients to display a SQL NULL 
> instead of 0 or false for certain get* commands.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Comment Edited] (SOLR-8602) Implement ResultSetImpl.wasNull()

2016-01-28 Thread Kevin Risden (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-8602?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15121492#comment-15121492
 ] 

Kevin Risden edited comment on SOLR-8602 at 1/28/16 2:08 PM:
-

For reference, on MySQL "select id, bad from test" results in an invalid field 
bad error. This means that limit statements are doing the wrong thing right 
now. Filed SOLR-8613 for this issue.


was (Author: risdenk):
For reference, on MySQL "select id, bad from test" results in an invalid field 
bad error. This means that limit statements are doing the wrong thing right 
now. I will file a JIRA for this issue.

> Implement ResultSetImpl.wasNull()
> -
>
> Key: SOLR-8602
> URL: https://issues.apache.org/jira/browse/SOLR-8602
> Project: Solr
>  Issue Type: Sub-task
>  Components: SolrJ
>Affects Versions: Trunk
>Reporter: Kevin Risden
>Assignee: Joel Bernstein
> Fix For: Trunk
>
> Attachments: SOLR-8602.patch, SOLR-8602.patch, SOLR-8602.patch, 
> SOLR-8602.patch, SOLR-8602.patch, SOLR-8602.patch, SOLR-8602.patch
>
>
> ResultSetImpl.wasNull is necessary for SQL clients to display a SQL NULL 
> instead of 0 or false for certain get* commands.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Comment Edited] (SOLR-8602) Implement ResultSetImpl.wasNull()

2016-01-27 Thread Joel Bernstein (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-8602?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15120429#comment-15120429
 ] 

Joel Bernstein edited comment on SOLR-8602 at 1/27/16 11:47 PM:


I believe in the case of the /export handler numerics will never be null. This 
is because numerics are read from NumericDocValues which I believe treats nulls 
as 0. But as you've proven with the test case, the /select handler will return 
null values for numerics. 

I was surprised to see that you could put a null value in an int field and that 
would behave properly.  I'm assuming the field is not added to the document if 
the field value is null.


was (Author: joel.bernstein):
I believe in the case of the /export handler numerics will never be null. This 
is because numerics are read from NumericDocValues which I believe treats nulls 
as 0. But as you proven with the test case the /select handler will return null 
values for numerics. 

I was surprised to see that you could put a null value in an int field and that 
would behave properly.  I'm assuming the field is not added to the document if 
the field value is null.

> Implement ResultSetImpl.wasNull()
> -
>
> Key: SOLR-8602
> URL: https://issues.apache.org/jira/browse/SOLR-8602
> Project: Solr
>  Issue Type: Sub-task
>  Components: SolrJ
>Affects Versions: Trunk
>Reporter: Kevin Risden
>Assignee: Joel Bernstein
> Fix For: Trunk
>
> Attachments: SOLR-8602.patch, SOLR-8602.patch, SOLR-8602.patch
>
>
> ResultSetImpl.wasNull is necessary for SQL clients to display a SQL NULL 
> instead of 0 or false for certain get* commands.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Comment Edited] (SOLR-8602) Implement ResultSetImpl.wasNull()

2016-01-27 Thread Kevin Risden (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-8602?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15120719#comment-15120719
 ] 

Kevin Risden edited comment on SOLR-8602 at 1/28/16 4:10 AM:
-

It looks good except that lines 372 and 373 are commented out. in JdbcTest. 
Those 2 lines are tests for a sql statement without a limit. "missingcol" isn't 
a real column in the schema, but is part of the select statement. This may or 
may not be valid SQL, but I thought it was.

If those tests are run, then the following error occurs at the client:

{code}
java.sql.SQLException: java.lang.RuntimeException: Couldn't get the first tuple

at 
__randomizedtesting.SeedInfo.seed([26B9AF1BDBAE7536:81FD17BFB615668F]:0)
at 
org.apache.solr.client.solrj.io.sql.StatementImpl.executeQuery(StatementImpl.java:78)
at 
org.apache.solr.client.solrj.io.sql.JdbcTest.testJDBCMethods(JdbcTest.java:400)
at 
org.apache.solr.client.solrj.io.sql.JdbcTest.testDriverMetadata(JdbcTest.java:372)
at 
org.apache.solr.client.solrj.io.sql.JdbcTest.doTest(JdbcTest.java:353)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at 
com.carrotsearch.randomizedtesting.RandomizedRunner.invoke(RandomizedRunner.java:1764)
at 
com.carrotsearch.randomizedtesting.RandomizedRunner$8.evaluate(RandomizedRunner.java:871)
at 
com.carrotsearch.randomizedtesting.RandomizedRunner$9.evaluate(RandomizedRunner.java:907)
at 
com.carrotsearch.randomizedtesting.RandomizedRunner$10.evaluate(RandomizedRunner.java:921)
at 
org.apache.solr.BaseDistributedSearchTestCase$ShardsRepeatRule$ShardsFixedStatement.callStatement(BaseDistributedSearchTestCase.java:965)
at 
org.apache.solr.BaseDistributedSearchTestCase$ShardsRepeatRule$ShardsStatement.evaluate(BaseDistributedSearchTestCase.java:940)
at 
com.carrotsearch.randomizedtesting.rules.SystemPropertiesRestoreRule$1.evaluate(SystemPropertiesRestoreRule.java:57)
at 
org.apache.lucene.util.TestRuleSetupTeardownChained$1.evaluate(TestRuleSetupTeardownChained.java:50)
at 
org.apache.lucene.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:46)
at 
org.apache.lucene.util.TestRuleThreadAndTestName$1.evaluate(TestRuleThreadAndTestName.java:49)
at 
org.apache.lucene.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:65)
at 
org.apache.lucene.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:48)
at 
com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
at 
com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:367)
at 
com.carrotsearch.randomizedtesting.ThreadLeakControl.forkTimeoutingTask(ThreadLeakControl.java:809)
at 
com.carrotsearch.randomizedtesting.ThreadLeakControl$3.evaluate(ThreadLeakControl.java:460)
at 
com.carrotsearch.randomizedtesting.RandomizedRunner.runSingleTest(RandomizedRunner.java:880)
at 
com.carrotsearch.randomizedtesting.RandomizedRunner$5.evaluate(RandomizedRunner.java:781)
at 
com.carrotsearch.randomizedtesting.RandomizedRunner$6.evaluate(RandomizedRunner.java:816)
at 
com.carrotsearch.randomizedtesting.RandomizedRunner$7.evaluate(RandomizedRunner.java:827)
at 
com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
at 
com.carrotsearch.randomizedtesting.rules.SystemPropertiesRestoreRule$1.evaluate(SystemPropertiesRestoreRule.java:57)
at 
org.apache.lucene.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:46)
at 
com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
at 
org.apache.lucene.util.TestRuleStoreClassName$1.evaluate(TestRuleStoreClassName.java:42)
at 
com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
at 
com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
at 
com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
at 
com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
at 
com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
at 
org.apache.lucene.util.TestRuleAssertionsRequired$1.evaluate(TestRuleAssertionsRequired.java:54)
at