| 3500 | // |
| 3501 | |
| 3502 | static gpre_nod* post_fields( gpre_nod* node, map* to_map) |
| 3503 | { |
| 3504 | assert_IS_NOD(node); |
| 3505 | |
| 3506 | switch (node->nod_type) |
| 3507 | { |
| 3508 | // Removed during fix to BUG_8021 - this would post a literal to |
| 3509 | // the map record for each literal used in an expression - which |
| 3510 | // would result in unneccesary data movement as the literal is more |
| 3511 | // easily experssed in the assignment portion of the mapping select |
| 3512 | // operation. |
| 3513 | // case nod_literal: |
| 3514 | // 1995-Jul-10 David Schnepper |
| 3515 | |
| 3516 | case nod_field: |
| 3517 | case nod_agg_max: |
| 3518 | case nod_agg_min: |
| 3519 | case nod_agg_average: |
| 3520 | case nod_agg_total: |
| 3521 | case nod_agg_count: |
| 3522 | case nod_map_ref: |
| 3523 | return post_map(node, to_map); |
| 3524 | |
| 3525 | case nod_udf: |
| 3526 | case nod_gen_id: |
| 3527 | node->nod_arg[0] = post_fields(node->nod_arg[0], to_map); |
| 3528 | break; |
| 3529 | |
| 3530 | case nod_list: |
| 3531 | case nod_upcase: |
| 3532 | case nod_lowcase: |
| 3533 | case nod_concatenate: |
| 3534 | case nod_cast: |
| 3535 | case nod_plus: |
| 3536 | case nod_minus: |
| 3537 | case nod_times: |
| 3538 | case nod_divide: |
| 3539 | case nod_negate: |
| 3540 | { |
| 3541 | gpre_nod** ptr = node->nod_arg; |
| 3542 | for (const gpre_nod* const* const end = ptr + node->nod_count; ptr < end; ptr++) |
| 3543 | { |
| 3544 | *ptr = post_fields(*ptr, to_map); |
| 3545 | } |
| 3546 | break; |
| 3547 | } |
| 3548 | // Begin date/time/timestamp support |
| 3549 | case nod_extract: |
| 3550 | node->nod_arg[1] = post_fields(node->nod_arg[1], to_map); |
| 3551 | break; |
| 3552 | // End date/time/timestamp support |
| 3553 | } |
| 3554 | |
| 3555 | return node; |
| 3556 | } |
| 3557 | |
| 3558 | |
| 3559 | //____________________________________________________________ |
no test coverage detected