select count(<colname>) query works fine for me - it returns exact number
of rows close to 3 million.

The way I am executing queries is - I am doing a putty session to the drill
node, firing the query and getting the result printed on the putty console.

on removing extract headers from the tsv and then firing select * query,
the query completed on the console but it printed close to 2 million rows -
i feel that the entire process of printing such high number of rows is
giving me inconsistent results.

Thoughts ?

Regards,
Projjwal



On Thu, Mar 16, 2017 at 12:04 AM, Khurram Faraaz <[email protected]> wrote:

> Three million rows is too many rows, for sqlline to print.
>
> Try doing a COUNT(*) and see if that query returns the correct count on
> that table.
>
>
> Thanks,
>
> Khurram
>
> ________________________________
> From: PROJJWAL SAHA <[email protected]>
> Sent: Wednesday, March 15, 2017 7:41:00 PM
> To: [email protected]
> Subject: Display of query result using command line
>
> All,
>
> I am using drillconf from command line to display a query result like
> select * from xxx
> having 3 million rows. The screen display scrolls fast to display the
> result, however, it stops after some time with this exception -
>
> java.lang.NegativeArraySizeException
> at
> org.apache.drill.exec.vector.VarCharVector$Accessor.get(
> VarCharVector.java:440)
> at
> org.apache.drill.exec.vector.accessor.VarCharAccessor.
> getBytes(VarCharAccessor.java:128)
> at
> org.apache.drill.exec.vector.accessor.VarCharAccessor.
> getString(VarCharAccessor.java:149)
> at
> org.apache.drill.exec.vector.accessor.BoundCheckingAccessor.getString(
> BoundCheckingAccessor.java:124)
> at
> org.apache.drill.jdbc.impl.TypeConvertingSqlAccessor.getString(
> TypeConvertingSqlAccessor.java:649)
> at
> org.apache.drill.jdbc.impl.AvaticaDrillSqlAccessor.getString(
> AvaticaDrillSqlAccessor.java:94)
> at org.apache.calcite.avatica.AvaticaSite.get(AvaticaSite.java:352)
> at
> org.apache.drill.jdbc.impl.DrillResultSetImpl.getObject(
> DrillResultSetImpl.java:434)
> at sqlline.Rows$Row.<init>(Rows.java:157)
> at sqlline.IncrementalRows.hasNext(IncrementalRows.java:63)
> at
> sqlline.TableOutputFormat$ResizingRowsProvider.next(
> TableOutputFormat.java:87)
> at sqlline.TableOutputFormat.print(TableOutputFormat.java:118)
> at sqlline.SqlLine.print(SqlLine.java:1593)
> at sqlline.Commands.execute(Commands.java:852)
> at sqlline.Commands.sql(Commands.java:751)
> at sqlline.SqlLine.dispatch(SqlLine.java:746)
> at sqlline.SqlLine.begin(SqlLine.java:621)
> at sqlline.SqlLine.start(SqlLine.java:375)
> at sqlline.SqlLine.main(SqlLine.java:268)
>
>
> The query shows completed in the profile.
>
> Any reason/suggestions on this ?
>
>
> Regards,
>
> Projjwal
>

Reply via email to