Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Physical type #1549

Merged
merged 1 commit into from
May 19, 2023
Merged

Physical type #1549

merged 1 commit into from
May 19, 2023

Conversation

acquamarin
Copy link
Collaborator

@acquamarin acquamarin commented May 17, 2023

1. Physical datatType VS Logical dataType

Physical Data Types: Represents the actual representations of data in memory or on disk. Two difference logical dataTypes may have the same physical dataType. (E.g. The internal representation of INT32 and DATE is INT32)

Logical Data Types: Represents how the data is perceived and used in queries. Logical data types help determine what operations are valid for a piece of data and how those operations should behave.

2. Todo:

Refactor storage code to use physical dataType instead of logical dataType.

@codecov
Copy link

codecov bot commented May 17, 2023

Codecov Report

Patch coverage: 90.01% and no project coverage change.

Comparison is base (e49d980) 91.91% compared to head (d202b89) 91.92%.

❗ Current head d202b89 differs from pull request most recent head 7959699. Consider uploading reports for the commit 7959699 to get more accurate results

Additional details and impacted files
@@           Coverage Diff            @@
##           master    #1549    +/-   ##
========================================
  Coverage   91.91%   91.92%            
========================================
  Files         693      696     +3     
  Lines       24809    24958   +149     
========================================
+ Hits        22804    22942   +138     
- Misses       2005     2016    +11     
Impacted Files Coverage Δ
src/common/file_utils.cpp 74.68% <ø> (+3.79%) ⬆️
src/common/in_mem_overflow_buffer_utils.cpp 25.92% <0.00%> (+0.92%) ⬆️
src/expression_evaluator/reference_evaluator.cpp 100.00% <ø> (ø)
src/function/vector_boolean_operations.cpp 64.70% <ø> (ø)
src/include/binder/expression/literal_expression.h 100.00% <ø> (ø)
src/include/catalog/catalog.h 100.00% <ø> (ø)
src/include/common/arrow/arrow_row_batch.h 100.00% <ø> (ø)
src/include/common/in_mem_overflow_buffer_utils.h 100.00% <ø> (ø)
src/include/common/ser_deser.h 100.00% <ø> (ø)
src/include/common/string_utils.h 100.00% <ø> (ø)
... and 154 more

... and 30 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@andyfengHKU andyfengHKU left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have general questions about when to use physical type and how many getDataTypeSize we should maintain. Let's discuss together @acquamarin @ray6080

src/include/common/types/types.h Show resolved Hide resolved
src/include/common/types/types.h Outdated Show resolved Hide resolved
src/include/common/types/types.h Show resolved Hide resolved
src/common/types/types.cpp Outdated Show resolved Hide resolved
src/include/common/types/types.h Show resolved Hide resolved
src/common/type_utils.cpp Outdated Show resolved Hide resolved
src/common/types/ku_list.cpp Show resolved Hide resolved
src/common/vector/value_vector_utils.cpp Show resolved Hide resolved
src/function/built_in_aggregate_functions.cpp Show resolved Hide resolved
src/processor/operator/order_by/order_by_key_encoder.cpp Outdated Show resolved Hide resolved
src/include/common/types/types.h Outdated Show resolved Hide resolved
src/include/common/types/types.h Outdated Show resolved Hide resolved
src/common/arrow/arrow_row_batch.cpp Show resolved Hide resolved
src/common/in_mem_overflow_buffer_utils.cpp Outdated Show resolved Hide resolved
src/common/in_mem_overflow_buffer_utils.cpp Outdated Show resolved Hide resolved
@acquamarin acquamarin merged commit 4aae989 into master May 19, 2023
7 checks passed
@acquamarin acquamarin deleted the physical-type branch May 19, 2023 02:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants