Skip to content

[python] Introduce select for CLI table read#7377

Merged
JingsongLi merged 3 commits intoapache:masterfrom
JingsongLi:cli_select
Mar 9, 2026
Merged

[python] Introduce select for CLI table read#7377
JingsongLi merged 3 commits intoapache:masterfrom
JingsongLi:cli_select

Conversation

@JingsongLi
Copy link
Contributor

@JingsongLi JingsongLi commented Mar 9, 2026

Purpose

paimon table read mydb.users

Options:

  • --select, -s: Select specific columns to read (comma-separated)
  • --limit, -l: Maximum number of results to display (default: 100)

Examples:

# Read with limit
paimon table read mydb.users -l 50

# Read specific columns
paimon table read mydb.users -s id,name,age

# Combine select and limit
paimon table read mydb.users -s id,name -l 50

Tests

API and Format

Documentation

Generative AI tooling

GLM 5

self.assertIn('name', output.lower())
# Verify selected data is present
self.assertIn('Alice', output)
self.assertIn('Bob', output)
Copy link
Member

Choose a reason for hiding this comment

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

better to add some bad cases, such as the invalid column names are passed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point!

@plusplusjiajia
Copy link
Member

LGTM, +1

@JingsongLi JingsongLi merged commit c9cf264 into apache:master Mar 9, 2026
6 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.

2 participants