Skip to content

Conversation

@prudhvi
Copy link
Collaborator

@prudhvi prudhvi commented Dec 4, 2025

Fixes
#1
#2

- Fix staging to use NonGeneratedColumns instead of Columns when inserting
  Generated columns cannot be explicitly inserted, they are computed automatically
- Add TestStageRunnerWithGeneratedColumns to test staging tables with VIRTUAL and STORED generated columns
- Add TestArchiveRunnerWithGeneratedColumns to test archiving to table with generated columns
- Add TestArchiveRunnerWithGeneratedColumns_ParquetFile to test archiving to parquet with generated columns
- Fix float64Val in parquet writer to handle DECIMAL values returned as []byte from MySQL
@prudhvi prudhvi force-pushed the prudhvi.spirit-bump branch from f560424 to 3946e0c Compare December 5, 2025 01:26
@prudhvi prudhvi changed the title WIP ~ Prudhvi.spirit bump Prudhvi.spirit bump Dec 5, 2025
b.chunker, err = table.NewChunker(sconfig.SrcTbl, sconfig.ChunkDuration, sconfig.Logger)
// Use slog.Default() for the chunker since spirit now uses slog.Logger
// Pass SrcTbl as both old and new table since we're archiving from the same table
b.chunker, err = table.NewChunker(sconfig.SrcTbl, sconfig.SrcTbl, sconfig.ChunkDuration, slog.Default())
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @morgo I am forced to pass a non nil table for destination here as the OpenAtWaterMark() for optimisticChunker assumes that the destination table is not nil. As this is is archive phase (in which we copy all the rows from staged table without where clause, it uses optmistic chunker). I am not sure what the right thing to do here

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have the same problem in move table operations. The API expects two tables because it uses this to calculate a column intersection -- but that doesn't make sense for all use cases.

I think what you have is fine for now. I might change the API in future to have something clearer for non-transforming cases.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool thanks, i see the that the highwater mark is mainly used in replication client by KeyAboveHighWatermark and polt doesn't use that method, so should be safe.

@prudhvi prudhvi merged commit 00bc13a into main Dec 5, 2025
11 checks passed
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.

4 participants