morningman commented on PR #46130:
URL: https://github.com/apache/doris/pull/46130#issuecomment-2564723977

   This pull request primarily focuses on enhancing the `OrcReader` class to 
support special column names in transactional Hive tables. The changes include 
modifying various methods to handle column name transformations and adding new 
test cases to verify the functionality.
   
   Key changes include:
   
   ### Enhancements to `OrcReader` for special column names:
   
   * Modified `_init_orc_cols` and `_init_select_types` methods to handle 
special column names by adding `pre` and `recursion` parameters. 
(`be/src/vec/exec/format/orc/vorc_reader.cpp`, 
[[1]](diffhunk://#diff-97945196187497c82dd245460b397955be0ebb9caeb75267a72c2bff2d545425L405-R421)
 
[[2]](diffhunk://#diff-97945196187497c82dd245460b397955be0ebb9caeb75267a72c2bff2d545425L1168-R1210)
   * Updated `_make_orc_literal`, `_check_slot_can_push_down`, and other 
predicate-building methods to use transformed column names if they exist in 
`_table_col_to_file_col`. (`be/src/vec/exec/format/orc/vorc_reader.cpp`, 
[[1]](diffhunk://#diff-97945196187497c82dd245460b397955be0ebb9caeb75267a72c2bff2d545425L572-R583)
 
[[2]](diffhunk://#diff-97945196187497c82dd245460b397955be0ebb9caeb75267a72c2bff2d545425L649-R663)
 
[[3]](diffhunk://#diff-97945196187497c82dd245460b397955be0ebb9caeb75267a72c2bff2d545425L748-R766)
 
[[4]](diffhunk://#diff-97945196187497c82dd245460b397955be0ebb9caeb75267a72c2bff2d545425L762-R785)
 
[[5]](diffhunk://#diff-97945196187497c82dd245460b397955be0ebb9caeb75267a72c2bff2d545425L776-R803)
 
[[6]](diffhunk://#diff-97945196187497c82dd245460b397955be0ebb9caeb75267a72c2bff2d545425R823-R830)
 
[[7]](diffhunk://#diff-97945196187497c82dd245460b397955be0ebb9caeb75267a72c2bff2d545425L810-R846)
   * Adjusted `_fill_batch_vec` method to handle special column names during 
batch processing. (`be/src/vec/exec/format/orc/vorc_reader.cpp`, 
[be/src/vec/exec/format/orc/vorc_reader.cppL2071-R2120](diffhunk://#diff-97945196187497c82dd245460b397955be0ebb9caeb75267a72c2bff2d545425L2071-R2120))
   
   ### Support for transactional Hive reader:
   
   * Added `_table_col_to_file_col` mapping in `TransactionalHiveReader` to 
translate table column names to file column names. 
(`be/src/vec/exec/format/table/transactional_hive_reader.cpp`, 
[[1]](diffhunk://#diff-da97116ea1a2c246c30f47ecf61d461399b684263aa699ba9978194de84f1daaL65-R70)
 
[[2]](diffhunk://#diff-da97116ea1a2c246c30f47ecf61d461399b684263aa699ba9978194de84f1daaR80-R106)
 
[[3]](diffhunk://#diff-e36f80977f9c77228dd97c780cad394b906e4fc2be2953ecbfa6f78fef2d8af9R122)
   
   ### Test cases:
   
   * Added new test cases in `run25.hql` and `test_transactional_hive.out` to 
verify the handling of special column names in transactional Hive tables. 
(`docker/thirdparties/docker-compose/hive/scripts/create_preinstalled_scripts/run25.hql`,
 
[[1]](diffhunk://#diff-4ae227689f92d2c2681686928e2ed3df0a04400862abaffd8c06da35da7f1c3eR44-R61)
 `regression-test/data/external_table_p0/hive/test_transactional_hive.out`, 
[[2]](diffhunk://#diff-0767cb637b50fc59a5eab536f955143c58f61c8faa8d6902f5c6d3a06149334eR79-R189)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to