Skip to content

Conversation

@Subham-KRLX
Copy link
Contributor

@Subham-KRLX Subham-KRLX commented Nov 21, 2025

Did you read the Contributor Guide?
Yes, I have read the Contributor Rules and Contributor Development Guide
No, I haven't read it.
Is this PR related to a ticket?
Yes, and the PR name follows the format [SEDONA-XXX] my subject.
Yes, and the PR name follows the format [GH-2511] my subject. Closes #2511
No:
this is a documentation update. The PR name follows the format [DOCS] my subject
this is a CI update. The PR name follows the format [CI] my subject
What changes were proposed in this PR?
This PR adds a
to_sedonadb()
method to the SedonaSpark DataFrame. This method facilitates the conversion of a SedonaSpark DataFrame to a SedonaDB DataFrame, enabling users to leverage SedonaDB's capabilities for further spatial analysis and visualization (e.g., with lonboard).

The method:

Checks if sedona.db is installed and raises an informative ImportError if not.
Accepts an optional
connection
object. If not provided, it creates a new connection using sedona.db.connect().
Uses
dataframe_to_arrow()
to convert the data before creating the SedonaDB DataFrame.
How was this patch tested?
Added a new unit test file
python/tests/test_to_sedonadb.py
.
The tests use unittest.mock to simulate sedona.db (since it might not be present in the build environment) and verify that
connect()
and create_data_frame() are called correctly with the expected arguments.
Verified both cases: providing an existing connection and letting the method create a new one.
Did this PR include necessary documentation updates?
Yes, I am adding a new API. I am using the current SNAPSHOT version number in vX.Y.Z format.
Yes, I have updated the documentation.
No, this PR does not affect any public API so no need to change the documentation.

Implements Material theme palette toggle with three modes:
- Automatic mode (follows system preference)
- Light mode (default scheme)
- Dark mode (slate scheme)

Users can now toggle between themes using the icon in the header.
All modes preserve the existing deep orange primary and green accent colors.

Closes apache#2444
@Subham-KRLX
Copy link
Contributor Author

@jiayuasu please check this out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add to_sedonadb() method

1 participant