Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/build_linux_arm64_wheels-gh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ jobs:
- name: Run libchdb stub in examples dir
run: |
bash -x ./examples/runStub.sh
bash -x ./examples/runArrowTest.sh
- name: Check ccache statistics
run: |
ccache -s
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build_linux_x86_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ jobs:
- name: Run libchdb stub in examples dir
run: |
bash -x ./examples/runStub.sh
bash -x ./examples/runArrowTest.sh
- name: Check ccache statistics
run: |
ccache -s
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/build_macos_arm64_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,19 @@ jobs:
name: Build Universal Wheel (macOS ARM64)
runs-on: macos-13-xlarge
steps:
- name: Check machine architecture
run: |
echo "=== Machine Architecture Information ==="
echo "Machine type: $(uname -m)"
echo "Architecture: $(arch)"
echo "System info: $(uname -a)"
echo "Hardware info:"
system_profiler SPHardwareDataType | grep "Chip\|Processor"
if sysctl -n hw.optional.arm64 2>/dev/null | grep -q "1"; then
echo "This is an ARM64 (Apple Silicon) machine"
else
echo "This is an x86_64 (Intel) machine"
fi
- name: Setup pyenv
run: |
curl https://pyenv.run | bash
Expand Down Expand Up @@ -200,6 +213,7 @@ jobs:
- name: Run libchdb stub in examples dir
run: |
bash -x ./examples/runStub.sh
bash -x ./examples/runArrowTest.sh
# - name: Keep killall ccache and wait for ccache to finish
# if: always()
# run: |
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/build_macos_x86_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,19 @@ jobs:
name: Build Universal Wheel (macOS x86_64)
runs-on: macos-14-large
steps:
- name: Check machine architecture
run: |
echo "=== Machine Architecture Information ==="
echo "Machine type: $(uname -m)"
echo "Architecture: $(arch)"
echo "System info: $(uname -a)"
echo "Hardware info:"
system_profiler SPHardwareDataType | grep "Chip\|Processor"
if sysctl -n hw.optional.arm64 2>/dev/null | grep -q "1"; then
echo "This is an ARM64 (Apple Silicon) machine"
else
echo "This is an x86_64 (Intel) machine"
fi
- name: Setup pyenv
run: |
curl https://pyenv.run | bash
Expand Down Expand Up @@ -199,6 +212,7 @@ jobs:
- name: Run libchdb stub in examples dir
run: |
bash -x ./examples/runStub.sh
bash -x ./examples/runArrowTest.sh
- name: Keep killall ccache and wait for ccache to finish
if: always()
run: |
Expand Down
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -416,11 +416,7 @@ chDB automatically converts Python dictionary objects to ClickHouse JSON types f
```
- Columns are converted to `String` if sampling finds non-dictionary values.

2. **Arrow Table**
- `struct` type columns are automatically mapped to JSON columns.
- Nested structures preserve type information.

3. **chdb.PyReader**
2. **chdb.PyReader**
- Implement custom schema mapping in `get_schema()`:
```python
def get_schema(self):
Expand Down
4 changes: 3 additions & 1 deletion chdb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@ def to_arrowTable(res):
raise ImportError("Failed to import pyarrow or pandas") from None
if len(res) == 0:
return pa.Table.from_batches([], schema=pa.schema([]))
return pa.RecordBatchFileReader(res.bytes()).read_all()

memview = res.get_memview()
return pa.RecordBatchFileReader(memview.view()).read_all()


# return pandas dataframe
Expand Down
4 changes: 3 additions & 1 deletion chdb/state/sqlitelike.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ def to_arrowTable(res):
raise ImportError("Failed to import pyarrow or pandas") from None
if len(res) == 0:
return pa.Table.from_batches([], schema=pa.schema([]))
return pa.RecordBatchFileReader(res.bytes()).read_all()

memview = res.get_memview()
return pa.RecordBatchFileReader(memview.view()).read_all()


# return pandas dataframe
Expand Down
Loading
Loading