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

Support marking columns as system columns via Field's metadata #14362

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
use trait
adriangb committed Jan 31, 2025
commit 251b6b9466c0783aa1f50d132798d2364d25e597
13 changes: 2 additions & 11 deletions datafusion/core/tests/sql/select.rs
Original file line number Diff line number Diff line change
@@ -15,8 +15,6 @@
// specific language governing permissions and limitations
// under the License.

use std::collections::HashMap;

use super::*;
use datafusion_common::ScalarValue;

@@ -366,15 +364,8 @@ async fn test_select_system_column() {
.with_schema(Arc::new(Schema::new(vec![
Field::new("id", DataType::UInt8, true),
Field::new("bank_account", DataType::UInt64, true),
Field::new("_rowid", DataType::UInt32, true).with_metadata(
HashMap::from_iter([(
"datafusion.system_column".to_string(),
"true".to_string(),
)]),
),
Field::new("_file", DataType::Utf8, true).with_metadata(HashMap::from_iter(
[("datafusion.system_column".to_string(), "true".to_string())],
)),
Field::new("_rowid", DataType::UInt32, true).as_system_column(),
Field::new("_file", DataType::Utf8, true).as_system_column(),
])))
.unwrap();