drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vitalii Diravka <vitalii.dira...@gmail.com>
Subject Precedence of List and Map
Date Wed, 01 Jun 2016 16:24:40 GMT
Hi all!

I need to add List and Map data types into "precedenceMap" in the
"ResolverTypePrecedence" class.
And I am interested in precedence value of these data types.
What are your thoughts about it?


You can see all current precedence map below.


> precedenceMap = new HashMap<MinorType, Integer>();
> precedenceMap.put(MinorType.NULL, i += 2);       // NULL is legal to
> implicitly be promoted to any other type
> precedenceMap.put(MinorType.FIXEDBINARY, i += 2); // Fixed-length is
> promoted to var length
> precedenceMap.put(MinorType.VARBINARY, i += 2);
> precedenceMap.put(MinorType.FIXEDCHAR, i += 2);
> precedenceMap.put(MinorType.VARCHAR, i += 2);
> precedenceMap.put(MinorType.FIXED16CHAR, i += 2);
> precedenceMap.put(MinorType.VAR16CHAR, i += 2);
> precedenceMap.put(MinorType.BIT, i += 2);
> precedenceMap.put(MinorType.TINYINT, i += 2);   //type with few bytes is
> promoted to type with more bytes ==> no data loss.
> precedenceMap.put(MinorType.UINT1, i += 2);     //signed is legal to
> implicitly be promoted to unsigned.
> precedenceMap.put(MinorType.SMALLINT, i += 2);
> precedenceMap.put(MinorType.UINT2, i += 2);
> precedenceMap.put(MinorType.INT, i += 2);
> precedenceMap.put(MinorType.UINT4, i += 2);
> precedenceMap.put(MinorType.BIGINT, i += 2);
> precedenceMap.put(MinorType.UINT8, i += 2);
> precedenceMap.put(MinorType.MONEY, i += 2);
> precedenceMap.put(MinorType.FLOAT4, i += 2);
> precedenceMap.put(MinorType.DECIMAL9, i += 2);
> precedenceMap.put(MinorType.DECIMAL18, i += 2);
> precedenceMap.put(MinorType.DECIMAL28DENSE, i += 2);
> precedenceMap.put(MinorType.DECIMAL28SPARSE, i += 2);
> precedenceMap.put(MinorType.DECIMAL38DENSE, i += 2);
> precedenceMap.put(MinorType.DECIMAL38SPARSE, i += 2);
> precedenceMap.put(MinorType.FLOAT8, i += 2);
> precedenceMap.put(MinorType.DATE, i += 2);
> precedenceMap.put(MinorType.TIMESTAMP, i += 2);
> precedenceMap.put(MinorType.TIMETZ, i += 2);
> precedenceMap.put(MinorType.TIMESTAMPTZ, i += 2);
> precedenceMap.put(MinorType.TIME, i += 2);
> precedenceMap.put(MinorType.INTERVALDAY, i+= 2);
> precedenceMap.put(MinorType.INTERVALYEAR, i+= 2);
> precedenceMap.put(MinorType.INTERVAL, i+= 2);
> precedenceMap.put(MinorType.UNION, i += 2);



Kind regards
Vitalii

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message