Skip to content

Commit 50ded92

Browse files
authored
feat: decimal support (#114)
1 parent 996b251 commit 50ded92

21 files changed

+1139
-45
lines changed

c-questdb-client

Submodule c-questdb-client updated 58 files

ci/cibuildwheel.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ stages:
127127
inputs: {pathtoPublish: 'wheelhouse'}
128128

129129
- job: macos_x64
130-
pool: {vmImage: 'macOS-13'}
130+
pool: {vmImage: 'macOS-14'}
131131
timeoutInMinutes: 90
132132
steps:
133133
- task: UsePythonVersion@0

ci/run_tests_pipeline.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,28 +36,28 @@ stages:
3636
submodules: true
3737
- task: UsePythonVersion@0
3838
inputs:
39-
versionSpec: '3.12'
39+
versionSpec: "3.12"
4040
- script: |
4141
python3 --version
4242
python3 -m pip install cython
4343
displayName: "Install cython"
4444
- script: python3 ci/pip_install_deps.py
4545
displayName: "Install pandas latest"
4646
condition: eq(variables.pandasVersion, '')
47-
- script: python3 ci/pip_install_deps.py --pandas-version==$(pandasVersion)
47+
- script: python3 ci/pip_install_deps.py --pandas-version==$(pandasVersion)
4848
displayName: "Install pandas older"
4949
condition: ne(variables.pandasVersion, '')
5050
- script: python3 proj.py build
5151
displayName: "Build"
5252
- script: |
5353
git clone --depth 1 https://github.com/questdb/questdb.git
54-
displayName: git clone questdb
54+
displayName: git clone questdb master
5555
condition: eq(variables.vsQuestDbMaster, true)
5656
- task: Maven@3
57-
displayName: "Compile QuestDB"
57+
displayName: "Compile QuestDB master"
5858
inputs:
59-
mavenPOMFile: 'questdb/pom.xml'
60-
jdkVersionOption: '1.17'
59+
mavenPOMFile: "questdb/pom.xml"
60+
jdkVersionOption: "1.17"
6161
options: "-DskipTests -Pbuild-web-console"
6262
condition: eq(variables.vsQuestDbMaster, true)
6363
- script: python3 proj.py test 1
@@ -68,7 +68,7 @@ stages:
6868
displayName: "Test vs master"
6969
env:
7070
JAVA_HOME: $(JAVA_HOME_17_X64)
71-
QDB_REPO_PATH: './questdb'
71+
QDB_REPO_PATH: "./questdb"
7272
condition: eq(variables.vsQuestDbMaster, true)
7373
- job: TestsAgainstVariousNumpyVersion1x
7474
pool:
@@ -82,7 +82,7 @@ stages:
8282
submodules: true
8383
- task: UsePythonVersion@0
8484
inputs:
85-
versionSpec: '3.9'
85+
versionSpec: "3.9"
8686
- script: |
8787
python3 --version
8888
python3 -m pip install uv
@@ -106,7 +106,7 @@ stages:
106106
submodules: true
107107
- task: UsePythonVersion@0
108108
inputs:
109-
versionSpec: '3.11'
109+
versionSpec: "3.11"
110110
- script: |
111111
python3 --version
112112
python3 -m pip install uv

rpyutils/Cargo.lock

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rpyutils/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@ crate-type = ["staticlib"]
1010

1111
[dev-dependencies]
1212
rand = "0.9.1"
13+
14+
[dependencies]
15+
i256 = "0.2.3"

rpyutils/include/rpyutils.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,17 @@ uint32_t qdb_active_senders_track_established(int* warn); // bint* warn
112112

113113
void qdb_active_senders_track_closed(uint32_t slot);
114114

115+
/**
116+
* Converts an mpdecimal limb array to its big-endian two's complement bytes.
117+
*/
118+
bool qdb_mpd_to_bigendian(const size_t *limbs,
119+
size_t limbs_len,
120+
size_t radix,
121+
uint32_t exp,
122+
bool negative,
123+
uint8_t *out,
124+
size_t *out_size);
125+
115126
#ifdef __cplusplus
116127
} // extern "C"
117128
#endif // __cplusplus

rpyutils/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,5 @@
2323
******************************************************************************/
2424

2525
mod active_senders;
26+
mod mpd_to_bigendian;
2627
mod pystr_to_utf8;

0 commit comments

Comments
 (0)