You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (JIRA)" <ji...@apache.org> on 2017/03/03 08:07:45 UTC

[jira] [Commented] (CALCITE-1667) Forbid calls to JDK APIs that use the default locale, time zone or character set

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

Julian Hyde commented on CALCITE-1667:
--------------------------------------

I've been working on this also. My work is in https://github.com/julianhyde/calcite/tree/1667-forbidden-apis. I think it's complete (but I need to run the test suite). Sorry we seem to have overlapped work; I only just noticed your comment.

> Forbid calls to JDK APIs that use the default locale, time zone or character set
> --------------------------------------------------------------------------------
>
>                 Key: CALCITE-1667
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1667
>             Project: Calcite
>          Issue Type: Bug
>          Components: avatica, core
>            Reporter: Kevin Risden
>            Assignee: Julian Hyde
>             Fix For: avatica-1.10.0, 1.12.0
>
>
> Calcite and Avatica currently have multiple failures when run using the Turkish locale.
> This was found with SOLR-8593. My steps to try to reproduce are posted in a comment below.
> Here is the Solr log:
> {noformat}
> Policeman Jenkins found a reproducing seed for a TestSQLHandler failure https://jenkins.thetaphi.de/job/Lucene-Solr-master-Linux/19059/:
>   [junit4]   2> NOTE: reproduce with: ant test  -Dtestcase=TestSQLHandler -Dtests.method=doTest -Dtests.seed=F875A6E80D435C44 -Dtests.multiplier=3 -Dtests.slow=true -Dtests.locale=tr -Dtests.timezone=Africa/Lagos -Dtests.asserts=true -Dtests.file.encoding=US-ASCII
>   [junit4] ERROR   26.3s J0 | TestSQLHandler.doTest <<<
>   [junit4]    > Throwable #1: java.io.IOException: --> https://127.0.0.1:37214/collection1:Failed to execute sqlQuery 'select str_s, count(*), sum(field_i), min(field_i), max(field_i), cast(avg(1.0 * field_i) as float) from collection1 where text='XXXX' group by str_s order by sum(field_i) asc limit 2' against JDBC connection 'jdbc:calcitesolr:'.
>   [junit4]    > Error while executing SQL "select str_s, count(*), sum(field_i), min(field_i), max(field_i), cast(avg(1.0 * field_i) as float) from collection1 where text='XXXX' group by str_s order by sum(field_i) asc limit 2": From line 1, column 39 to line 1, column 50: No match found for function signature min(<NUMERIC>)
>   [junit4]    > 	at __randomizedtesting.SeedInfo.seed([F875A6E80D435C44:5F311E4C60F84FFD]:0)
>   [junit4]    > 	at org.apache.solr.client.solrj.io.stream.SolrStream.read(SolrStream.java:235)
>   [junit4]    > 	at org.apache.solr.handler.TestSQLHandler.getTuples(TestSQLHandler.java:2325)
>   [junit4]    > 	at org.apache.solr.handler.TestSQLHandler.testBasicGrouping(TestSQLHandler.java:651)
>   [junit4]    > 	at org.apache.solr.handler.TestSQLHandler.doTest(TestSQLHandler.java:77)
>   [junit4]    > 	at org.apache.solr.BaseDistributedSearchTestCase$ShardsRepeatRule$ShardsFixedStatement.callStatement(BaseDistributedSearchTestCase.java:985)
>   [junit4]    > 	at org.apache.solr.BaseDistributedSearchTestCase$ShardsRepeatRule$ShardsStatement.evaluate(BaseDistributedSearchTestCase.java:960)
> [...]
>   [junit4]   2> NOTE: test params are: codec=Asserting(Lucene70): {n_l1=PostingsFormat(name=LuceneFixedGap), multiDefault=BlockTreeOrds(blocksize=128), Field_i=BlockTreeOrds(blocksize=128), intDefault=PostingsFormat(name=LuceneFixedGap), n_dt1=BlockTreeOrds(blocksize=128), n_td1=BlockTreeOrds(blocksize=128), Str_s=Lucene50(blocksize=128), n_d1=PostingsFormat(name=LuceneFixedGap), field_i=BlockTreeOrds(blocksize=128), str_s=Lucene50(blocksize=128), n_f1=BlockTreeOrds(blocksize=128), n_ti1=FST50, rnd_b=FST50, n_tl1=BlockTreeOrds(blocksize=128), _version_=PostingsFormat(name=LuceneFixedGap), n_tf1=PostingsFormat(name=LuceneFixedGap), n_tdt1=PostingsFormat(name=LuceneFixedGap), id=FST50, text=Lucene50(blocksize=128), Text_t=PostingsFormat(name=LuceneFixedGap), timestamp=PostingsFormat(name=LuceneFixedGap)}, docValues:{_version_=DocValuesFormat(name=Lucene70), multiDefault=DocValuesFormat(name=Asserting), Field_i=DocValuesFormat(name=Asserting), intDefault=DocValuesFormat(name=Lucene70), id=DocValuesFormat(name=Memory), Str_s=DocValuesFormat(name=Direct), field_i=DocValuesFormat(name=Asserting), str_s=DocValuesFormat(name=Direct), n_f1=DocValuesFormat(name=Asserting)}, maxPointsInLeafNode=197, maxMBSortInHeap=6.686785692870154, sim=RandomSimilarity(queryNorm=false): {}, locale=tr, timezone=Africa/Lagos
>   [junit4]   2> NOTE: Linux 4.4.0-53-generic i386/Oracle Corporation 1.8.0_121 (32-bit)/cpus=12,threads=1,free=50683592,total=254599168
> {noformat}
> and it contains the Calcite message {{No match found for function signature min(<NUMERIC>)}}.



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