Is your feature request related to a problem?
- Do we need so much numeric
ExprCoreTypes?
- -//- datetime
ExprCoreTypes?
What solution would you like?
Why not to leave only LONG and DOUBLE or LONG/INT and FLOAT/DOUBLE?
I propose to get rid of BYTE and SHORT types, map byte and short opensearch types to INT. Thus we can reduce amount of math/comparison functions registered and simplify widening rule processing. Further removing of INT and FLOAT and using only LONG and DOUBLE would increase memory usage (for storing those values only!), but increase performance.
BYTE of even BIT/BOOL uses same amount of memory in Java (SQL/JDBC) or even in C (ODBC)(unless you use pragma pack which reduces performance). Refs: one, two.
$ java -Djdk.module.illegalAccess=deny -jar jol-cli.jar internals java.lang.Byte | grep 'Instance size'
Instance size: 16 bytes
$ java -Djdk.module.illegalAccess=deny -jar jol-cli.jar internals java.lang.Integer | grep 'Instance size'
Instance size: 16 bytes
$ java -Djdk.module.illegalAccess=deny -jar jol-cli.jar internals java.lang.Long | grep 'Instance size'
Instance size: 24 byte
Also having both DATETIME and TIMESTAMP ExprCoreTypes is a bit confusing - they contain the same information. Both types don't store time zone information.
What alternatives have you considered?
N/A
Do you have any additional context?
N/A
Is your feature request related to a problem?
ExprCoreTypes?ExprCoreTypes?What solution would you like?
Why not to leave only
LONGandDOUBLEorLONG/INTandFLOAT/DOUBLE?I propose to get rid of
BYTEandSHORTtypes, mapbyteandshortopensearch types toINT. Thus we can reduce amount of math/comparison functions registered and simplify widening rule processing. Further removing ofINTandFLOATand using onlyLONGandDOUBLEwould increase memory usage (for storing those values only!), but increase performance.BYTEof evenBIT/BOOLuses same amount of memory in Java (SQL/JDBC) or even in C (ODBC)(unless you usepragma packwhich reduces performance). Refs: one, two.Also having both
DATETIMEandTIMESTAMPExprCoreTypes is a bit confusing - they contain the same information. Both types don't store time zone information.What alternatives have you considered?
N/A
Do you have any additional context?
N/A