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

Parth Chandra commented on DRILL-3229:
--------------------------------------

Nice doc. I have a couple of quick questions - 
In the list writer, when the map() method is called, I didn't quite follow the 
reason for tracking the current field name. What is it needed for? 
The Type promotion proposal is excellent. But with type promotion we will 
update the underlying writer to a UnionWriter the moment a type change occurs. 
Is it possible for us to to have a hierarchy of promotable types and we promote 
to a higher Scalar type (e.g. Int gets promoted to a Varchar) as a first step 
and Union if we encounter more than one type change or a change to a complex 
type. I'm OK if we think this is too complex to implement.
How will Screen handle a Union type? In general, a user level tool (sqlline 
included) will not know how to handle this. Can we have screen return a varchar 
representation of the Union type? During data exploration the user will then 
see there are type changes and can then use the type introspection and cast 
methods appropriately. 
What about metadata only queries ( i.e select * ... limit 0)? What type would 
the user application get?
For Function Evaluation my preference is to have code generation rather than 
have UDFs that take a union parameter.
For case statements - If a case statment can output a Union type, the end user 
will presumably have to resolve the different types using type introspection 
and an outer case statement. Actually I don't have enough idea about end user 
use cases to choose which is more desirable. Should we leave it as choice #2 
and see what users ask for?
Jacques had mentioned that you have an idea for introducing a Untyped null 
type. How would that fit in with this design?


> Create a new EmbeddedVector
> ---------------------------
>
>                 Key: DRILL-3229
>                 URL: https://issues.apache.org/jira/browse/DRILL-3229
>             Project: Apache Drill
>          Issue Type: Sub-task
>          Components: Execution - Codegen, Execution - Data Types, Execution - 
> Relational Operators, Functions - Drill
>            Reporter: Jacques Nadeau
>            Assignee: Steven Phillips
>             Fix For: Future
>
>
> Embedded Vector will leverage a binary encoding for holding information about 
> type for each individual field.



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

Reply via email to