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

Condionally limit total rows in COPY FROM #3889

Closed
waynexia opened this issue May 9, 2024 · 0 comments · Fixed by #3910
Closed

Condionally limit total rows in COPY FROM #3889

waynexia opened this issue May 9, 2024 · 0 comments · Fixed by #3910

Comments

@waynexia
Copy link
Member

waynexia commented May 9, 2024

What problem does the new feature solve?

Follow up of #3819

After #3819, a COPY FROM can only copy a hardcoded number of rows, and terminate the COPY FROM task without any hint.

What does the feature do?

Change the limit behavior to

  • do not limit by default
  • make the limit rows configurable

As for the way to config it, we come up with two possible approaches:

  • Add a LIMIT segment in COPY FROM statement, like
COPY [<db>.]<table_name>
FROM { '<path>/[<filename>]' }
[ [ WITH ]
 (
   [ FORMAT =  { parquet } ]
   [ PATTERN = '<regex_pattern>' ]
 )
]
[LIMIT NUM]
  • Add an option for it:
COPY [<db>.]<table_name>
FROM { '<path>/[<filename>]' }
[ [ WITH ]
 (
   [ FORMAT =  { parquet } ]
   [ PATTERN = '<regex_pattern>' ]
   [ LIMIT = NUM ]
 )
]

We would personally prefer the first way as it is more natural to write.

Implementation challenges

No response

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 a pull request may close this issue.

1 participant