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

Improve bitpacking skip performance + better testing of FetchRow #10295

Merged
merged 10 commits into from
Jan 23, 2024
Prev Previous commit
Merge branch 'main' into bp-bug
  • Loading branch information
samansmink committed Jan 22, 2024
commit d86a6445514b68cff8cd2b5787c3653c5ee8bbeb
46 changes: 12 additions & 34 deletions scripts/run_tests_one_by_one.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,19 @@
import os
import time

no_exit = False
profile = False
assertions = True
force_storage_flag = ''

for i in range(len(sys.argv)):
if sys.argv[i] == '--no-exit':
no_exit = True
del sys.argv[i]
i -= 1
elif sys.argv[i] == '--profile':
profile = True
del sys.argv[i]
i -= 1
elif sys.argv[i] == '--no-assertions':
assertions = False
del sys.argv[i]
i -= 1
elif sys.argv[i] == '--force-storage':
force_storage_flag = '--force-storage'
del sys.argv[i]
i -= 1

if len(sys.argv) < 2:
print(
"Expected usage: python3 scripts/run_tests_one_by_one.py build/debug/test/unittest [--no-exit] [--profile] [--no-assertions] [--force-storage]"
)
exit(1)
unittest_program = sys.argv[1]
extra_args = []
if len(sys.argv) > 2:
extra_args = [sys.argv[2]]
import argparse

parser = argparse.ArgumentParser(description='Run tests one by one with optional flags.')
parser.add_argument('unittest_program', help='Path to the unittest program')
parser.add_argument('--no-exit', action='store_true', help='Do not exit after running tests')
parser.add_argument('--profile', action='store_true', help='Enable profiling')
parser.add_argument('--no-assertions', action='store_false', help='Disable assertions')
parser.add_argument('--time_execution', action='store_true', help='Measure and print the execution time of each test')

args, extra_args = parser.parse_known_args()

if force_storage_flag != '':
extra_args.append(force_storage_flag)
if not args.unittest_program:
parser.error('Path to unittest program is required')

# Access the arguments
unittest_program = args.unittest_program
Expand Down
3 changes: 2 additions & 1 deletion src/storage/compression/bitpacking.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,8 @@ unique_ptr<SegmentScanState> BitpackingInitScan(ColumnSegment &segment) {
template <class T, class T_S = typename MakeSigned<T>::type>
void BitpackingScanPartial(ColumnSegment &segment, ColumnScanState &state, idx_t scan_count, Vector &result,
idx_t result_offset) {
auto &scan_state = static_cast<BitpackingScanState<T> &>(*state.scan_state);
auto &scan_state = state.scan_state->Cast<BitpackingScanState<T>>();

T *result_data = FlatVector::GetData<T>(result);
result.SetVectorType(VectorType::FLAT_VECTOR);

Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.