[
https://issues.apache.org/jira/browse/HIVE-13685?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gopal V updated HIVE-13685:
---------------------------
Description:
{code}
@Override
public void evaluate(VectorizedRowBatch batch) {
...
switch (inputTypes[0]) {
...
case STRING:
case CHAR:
case VARCHAR:
try {
baseDate = formatter.parse(new String(stringValue, "UTF-8"));
break;
{code}
This is parsing the constant scalar for every evaluate() call.
Parsing the constant in the initialize op will save thousands of expensive
calls into Calendar operations.
was:
{code}
@Override
public void evaluate(VectorizedRowBatch batch) {
...
switch (inputTypes[0]) {
...
case STRING:
case CHAR:
case VARCHAR:
try {
baseDate = formatter.parse(new String(stringValue, "UTF-8"));
break;
{code}
This is parsing the constant scalar for every evaluate() call.
> Vectorization: Date*ColScalar parses the scalar in every loop
> -------------------------------------------------------------
>
> Key: HIVE-13685
> URL: https://issues.apache.org/jira/browse/HIVE-13685
> Project: Hive
> Issue Type: Improvement
> Components: Vectorization
> Affects Versions: 2.1.0
> Reporter: Gopal V
> Attachments: HIVE-13685.WIP.patch
>
>
> {code}
> @Override
> public void evaluate(VectorizedRowBatch batch) {
> ...
> switch (inputTypes[0]) {
> ...
> case STRING:
> case CHAR:
> case VARCHAR:
> try {
> baseDate = formatter.parse(new String(stringValue, "UTF-8"));
> break;
> {code}
> This is parsing the constant scalar for every evaluate() call.
> Parsing the constant in the initialize op will save thousands of expensive
> calls into Calendar operations.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)