Skip to content

[SQL] Add the value of the property 'skip_unused_columns' for the table to the generated Rust code#5958

Merged
ryzhyk merged 3 commits intomainfrom
issue5957
Apr 2, 2026
Merged

[SQL] Add the value of the property 'skip_unused_columns' for the table to the generated Rust code#5958
ryzhyk merged 3 commits intomainfrom
issue5957

Conversation

@mihaibudiu
Copy link
Copy Markdown
Contributor

This was part of 'properties', which were skipped in the generated Rust code.

Fixes #5957

@mihaibudiu mihaibudiu requested a review from ryzhyk March 31, 2026 01:08
Copy link
Copy Markdown

@mythical-fred mythical-fred left a comment

Choose a reason for hiding this comment

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

LGTM

package org.dbsp.sqlCompiler.compiler.backend.rust;

import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.jsonFormatVisitors.JsonObjectFormatVisitor;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nit: JsonObjectFormatVisitor is imported but never used — remove this line.

@mihaibudiu
Copy link
Copy Markdown
Contributor Author

This is the only changed output:

        catalog.register_input_zset::<_, struct_56fcdfe91806f665>(s0.clone(), handle_s0.clone(), r#"{"name":"t","case_sensitive":false,"fields":[{"name":"used","case_sensitive":false,"columntype":{"nullable":true,"type":"INTEGER"},"unused":false},{"name":"unused","case_sensitive":false,"columntype":{"nullable":true,"type":"INTEGER"},"unused":false}],"materialized":false,"foreign_keys":[],"skip_unused_columns":true}"#);

…le to the generated Rust code

Signed-off-by: Mihai Budiu <[email protected]>
We have test coverage for connector-level skip_unused_columns. This commit adds
a test that checks that this attribute can also be picked up from a table-level
property. It uses the TPCH test, adding the attribute to one of the columns and
checking that the column ends up with NULL values in that column.

Signed-off-by: Leonid Ryzhyk <[email protected]>
@ryzhyk
Copy link
Copy Markdown
Contributor

ryzhyk commented Apr 2, 2026

I added a test

@ryzhyk ryzhyk enabled auto-merge April 2, 2026 01:13
Signed-off-by: feldera-bot <[email protected]>
@ryzhyk ryzhyk added this pull request to the merge queue Apr 2, 2026
Merged via the queue into main with commit 6651574 Apr 2, 2026
1 check passed
@ryzhyk ryzhyk deleted the issue5957 branch April 2, 2026 03:15
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.

[sql] skip_unused_columns attribute is dropped

4 participants