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

Add iceberg catalog read support #98

Open
wants to merge 28 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
1710ff9
Merge is done
ediril Jan 14, 2025
f3d5d87
Rename files uc -> ic
ediril Jan 15, 2025
1be2fa3
Started renaming classes
ediril Jan 15, 2025
63ef6e0
FInished renaming
ediril Jan 15, 2025
e6f671a
Delete duplicate
ediril Jan 18, 2025
46a9946
Lazy load metadata for tables
ediril Jan 21, 2025
26d9f1b
Extract precision and scale
ediril Jan 21, 2025
645e83c
Get rid of is_loaded
ediril Jan 21, 2025
3a63af6
Finish implementing create/drop schema
ediril Jan 22, 2025
f24fc3a
Reorg classes for clarity
ediril Jan 23, 2025
56e4c76
Minor fixes
ediril Jan 23, 2025
aee6c1d
Rename classes for clarity
ediril Jan 23, 2025
dc0ebb3
Complete table create & drop
ediril Jan 24, 2025
f3007ae
fixes so it can work with local testing information
Tmonster Jan 29, 2025
22bcffe
add tests
Tmonster Jan 29, 2025
dfb95f9
PR comments #1
Tmonster Jan 30, 2025
bffe013
remove dead code
Tmonster Jan 30, 2025
92046e3
renaming files and classes
Tmonster Jan 30, 2025
49c8fba
fix include errors
Tmonster Jan 30, 2025
bb4cb29
also check delete and insert statements
Tmonster Jan 30, 2025
40dd36c
fix formatting
Tmonster Jan 30, 2025
a8c7fe6
also rename ic_catalog.cpp to icr_catalog.cpp
Tmonster Jan 30, 2025
43daceb
change ic to irc
Tmonster Feb 3, 2025
c288e88
rename ICRCatalog to IRCatalog
Tmonster Feb 4, 2025
bc57d82
remove check for 'file://'.
Tmonster Feb 4, 2025
b2259f0
remove check for is internal table
Tmonster Feb 4, 2025
1fa5bd8
more renaming ICR to IRC and remove UC references
Tmonster Feb 5, 2025
07ef8dc
modify test so it reads from correct files
Tmonster Feb 5, 2025
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
6 changes: 6 additions & 0 deletions .github/workflows/Rest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,9 @@ jobs:
working-directory: scripts/
run: |
./start-rest-catalog.sh

- name: Test With rest catalog
env:
ICEBERG_SERVER_AVAILABLE: 1
run: |
make test_release
20 changes: 17 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,24 @@
set(EXTENSION_SOURCES
src/iceberg_extension.cpp
src/iceberg_functions.cpp
src/catalog_api.cpp
src/catalog_utils.cpp
src/common/utils.cpp
src/common/schema.cpp
src/common/iceberg.cpp
src/iceberg_functions/iceberg_snapshots.cpp
src/iceberg_functions/iceberg_scan.cpp
src/iceberg_functions/iceberg_metadata.cpp)
src/iceberg_functions/iceberg_metadata.cpp
src/storage/irc_catalog.cpp
src/storage/irc_catalog_set.cpp
src/storage/irc_clear_cache.cpp
src/storage/irc_schema_entry.cpp
src/storage/irc_schema_set.cpp
src/storage/irc_table_entry.cpp
src/storage/irc_table_set.cpp
src/storage/irc_transaction.cpp
src/storage/irc_transaction_manager.cpp
)

add_library(${EXTENSION_NAME} STATIC ${EXTENSION_SOURCES})

Expand Down Expand Up @@ -73,10 +85,12 @@
Snappy::snappy
ZLIB::ZLIB)

find_package(CURL REQUIRED)

# Link dependencies into extension
target_link_libraries(${EXTENSION_NAME} PUBLIC optimized avro_static_release
target_link_libraries(${EXTENSION_NAME} PUBLIC optimized avro_static_release CURL::libcurl
debug avro_static_debug)
target_link_libraries(${TARGET_NAME}_loadable_extension optimized
target_link_libraries(${TARGET_NAME}_loadable_extension optimized CURL::libcurl
avro_static_release debug avro_static_debug)

install(
Expand Down
7 changes: 7 additions & 0 deletions scripts/provision.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,3 +151,10 @@
(CAST('2023-03-12' AS date), 12, 'l');
"""
)

spark.sql(
"""
Delete from default.table_mor_deletes
where number > 3 and number < 10;
"""
)
2 changes: 1 addition & 1 deletion scripts/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pyspark==3.4.1
pyspark==3.5.0
Loading
Loading