Skip to content

feat(rust/sedona-functions): Add emoji shorthand for common ST_ functions#748

Open
paleolimbot wants to merge 3 commits intoapache:mainfrom
paleolimbot:st-emoji
Open

feat(rust/sedona-functions): Add emoji shorthand for common ST_ functions#748
paleolimbot wants to merge 3 commits intoapache:mainfrom
paleolimbot:st-emoji

Conversation

@paleolimbot
Copy link
Copy Markdown
Member

@paleolimbot paleolimbot commented Apr 1, 2026

As part of our ongoing attempt to innovate on spatial SQL, this PR adds emoji shorthand for most functions which (1) improve expressiveness, (2) helps more SQL fit on one line and (3) reduces the number of bytes required for large SQL queries (important for AI generation).

The notable change is the addition of the custom Dialect that relaxes the strict requirement on characters permitted in an identifier sequence, which is a standalone improvement as it also allows other non-ASCII characters in function names as well.

# pip install "apache-sedona[db]"
import sedona.db

sd = sedona.db.connect()
sd.options.interactive = True

# Creators
sd.sql("""
SELECT
    ST_📍(0, 1) AS pt,
    ST_⏱️(0, 1, 2) AS ptm,
    ST_📝('MULTIPOINT Z (0 0 10, 1 1 12)') AS mpt
""").to_view("ex")

# Transformers
sd.sql("SELECT ST_💩(mpt) FROM ex")

# Bounds
sd.sql("""
SELECT
    ST_⬅️(mpt),
    ST_⬇️(mpt),
    ST_➡️(mpt),
    ST_⬆️(mpt),
    ST_🏝️(mpt),
    ST_🏔️(mpt),
    ST_✉️(mpt)
FROM ex
""")

# Affine transform wrappers
sd.sql("""
SELECT
    ST_🚚(mpt, 2, 3),
    ST_🌀(mpt, 45),
    ST_⚖️(mpt, 0.5, 0.25),
    ST_🪞(mpt)
FROM ex
""")

Current summary of proposed syntax:

Function Emoji Function Emoji
st_dump 💩 st_reverse 🔙
st_x st_isempty 🕳️
st_y 🤷 st_isclosed 🔒
st_z 💤 st_iscollection 🗂️
st_m Ⓜ️ st_interiorringn 💍
st_xmin ⬅️ st_translate 🚚
st_xmax ➡️ st_numgeometries 🔢
st_ymin ⬇️ st_geometrytype 🔍
st_ymax ⬆️ st_geometryn 🎰
st_zmin 🏝️ st_scale ⚖️
st_zmax 🏔️ st_flipcoordinates 🪞
st_mmin st_makeline 📏
st_mmax st_pointn 👆
st_geomfromwkt 📝 st_envelope ✉️
st_geogfromwkt 🌏 st_dimension 📐
st_geomfromewkt 📜 st_azimuth 🧭
st_geomfromwkb 📥 st_astext 📖
st_geomfromwkbunchecked 🤞 st_asbinary 💾
st_geogfromwkb 🌐 st_asewkb 📦
st_geomfromewkb 📨 st_affine 🎭
st_point 📍 st_rotate 🌀
st_geogpoint 🌍 st_rotatex 🎡
st_pointz ⛰️ st_rotatey 🎠
st_pointm ⏱️ st_points
st_pointzm 🗻 st_npoints #️⃣
st_force2d 2️⃣ st_hasz 🧗
st_force3d 3️⃣ st_hasm
st_force3dm 🧊 st_zmflag 🚩
st_force4d 4️⃣ st_startpoint 🏁
st_srid 🆔 st_endpoint 🔚
st_crs 🎯 st_setsrid 🏷️
st_setcrs 📌

@github-actions github-actions bot requested a review from zhangfengcdt April 1, 2026 18:29
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.

1 participant