Hey Paul,

You could use the typeof() function for this purpose. It takes a single
parameter - the column name.

For example:
> select typeof(c_current_cdemo_sk) from customer limit 1;
+---------+
| EXPR$0  |
+---------+
| BIGINT  |
+---------+
1 row selected (0.472 seconds)


On Wed, Apr 25, 2018 at 9:23 PM Paul Rogers <par0...@yahoo.com.invalid>
wrote:

> Hi All,
> Anyone know if there is a non-code way to display the data types of
> columns returned from a Drill query? Sqlline appears to only show the
> column names and values. The same is true of the Drill web console.
> The EXPLAIN PLAN FOR ... command shows the query plan, but not type (which
> are only known at run time.) Is there a statement, system table or some
> other trick to display column types in, say, Sqlline?
> In the past, I've gotten the types by using unit test style code. But,
> that is not to handy for use as an example for non-developers...
> Thanks,
> - Paul
>
>

Reply via email to