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

Julian Hyde commented on CALCITE-4966:
--------------------------------------

I agree, it's a bug. But if someone were to fix it by making a class public 
that doesn't have a test, they would be introducing a new bug. So the fix needs 
to include a test for the now-public class.

By the way, the class was 'leaked' for a good reason - we didn't want to have 
an identical class in the file adapter and the example CSV adapter.

> In class CsvEnumerator, the inner class RowConverter should be public
> ---------------------------------------------------------------------
>
>                 Key: CALCITE-4966
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4966
>             Project: Calcite
>          Issue Type: Bug
>          Components: file-adapter
>            Reporter: Ioan Eugen Stan
>            Priority: Minor
>              Labels: pull-request-available
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> Hello,
> I believe class org.apache.calcite.adapter.file.CsvEnumerator.RowConverter 
> should be public instead of package private since it's exposed in the public 
> api via 
> public constructor:
> {code:java}
> public CsvEnumerator(Source source, AtomicBoolean cancelFlag, boolean stream,
>     @Nullable String @Nullable [] filterValues, RowConverter<E> rowConverter) 
> { {code}
> public static method:
> {code:java}
> public static RowConverter<@Nullable Object[]> arrayConverter(
>     List<RelDataType> fieldTypes, List<Integer> fields, boolean stream) {
>   return new ArrayRowConverter(fieldTypes, fields, stream);
> } {code}
>  
> Patch is trivial, add "public" in front :)
> {code:java}
> public abstract static class RowConverter<E> { {code}
> Would love to get this into 1.29.0 - so I can make a surprise for Calcite :D 



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to