Repository navigation
Conversation
linrrzqqq
force-pushed
the
file-type-docs
branch
from
October 19, 2026 15:21
d6694dd to
aff1367
Compare
yiguolei
reviewed
Oct 20, 2026
| - FILE is available in query expressions. FILE columns cannot be declared in internal tables or external catalogs, including FILE nested in containers. | ||
| - Whole FILE values and containers containing FILE cannot be used for comparison, sorting, hashing, grouping, DISTINCT, or MAP keys. Extract an ordinary scalar field for these operations. | ||
| - FILE supports explicit conversion to and from STRUCT, JSON, and VARIANT. There is no implicit conversion between FILE and these types; use CAST. See [FILE Type Conversion](../conversion/file-conversion.md). | ||
| - FILE arguments, return values, and aggregate intermediate types are unsupported in UDFs, including nested FILE. |
yiguolei
reviewed
Oct 20, 2026
| Use an explicit CAST to construct FILE from a six-field STRUCT, JSON, or VARIANT value. Fields whose values are NULL must still be included. This conversion does not access remote storage. | ||
|
|
||
| ```sql | ||
| SELECT CAST(NAMED_STRUCT( |
Contributor
There was a problem hiding this comment.
我们要支持cast 这个方式吗?还是说我们支持一些函数,比如底下这个to_file 这样的额就行了?
yiguolei
reviewed
Oct 20, 2026
|
|
||
| ### Construct from metadata | ||
|
|
||
| Use an explicit CAST to construct FILE from a six-field STRUCT, JSON, or VARIANT value. Fields whose values are NULL must still be included. This conversion does not access remote storage. |
Contributor
There was a problem hiding this comment.
我们cast from json 不是很稳
如果要支持cast,我们就支持cast from struct ,其他的感觉不要支持了
yiguolei
reviewed
Oct 20, 2026
| Use an explicit CAST to construct FILE from a six-field STRUCT, JSON, or VARIANT value. Fields whose values are NULL must still be included. This conversion does not access remote storage. | ||
|
|
||
| ```sql | ||
| SELECT CAST(NAMED_STRUCT( |
Contributor
There was a problem hiding this comment.
我们还需要提供一个函数,通过一个json 转FILE
yiguolei
reviewed
Oct 20, 2026
|
|
||
| ## Element Access | ||
|
|
||
| Read a field with `ELEMENT_AT(f, 'field_name')` or the equivalent bracket syntax `f['field_name']`. The field name must be a non-NULL constant string and is case-insensitive. Unknown field names, dynamic selectors, and numeric indexes produce errors. Accessing a NULL FILE or a NULL field returns NULL. |
Contributor
There was a problem hiding this comment.
我有一个问题啊,FILE 里面不同的属性类型可能不一样,你现在都用element at,咋区分的?
yiguolei
reviewed
Oct 20, 2026
| ```sql | ||
| SELECT * | ||
| FROM LIST_FILE( | ||
| "resource" = "file_test_s3_resource", |
yiguolei
reviewed
Oct 20, 2026
| Non-recursive: list files in the current directory only. | ||
|
|
||
| ```sql | ||
| SELECT * |
yiguolei
reviewed
Oct 20, 2026
| SELECT * | ||
| FROM LIST_FILE( | ||
| "resource" = "file_test_s3_resource", | ||
| "uri" = "s3://linrrzqqq/doris-file-type-test/", |
Contributor
There was a problem hiding this comment.
如果有一个额目录,我们是把目录显示成0,还是直接忽略了?
yiguolei
reviewed
Oct 20, 2026
| JSON 对象须恰好包含 uri、offset、size、content_type、checksum、inline 六个小写 key。offset 和 size 接受 BIGINT 范围的 JSON 整数或 null;inline 接受标准、带 padding 的 Base64 字符串或 null,空字符串表示空字节序列。 | ||
|
|
||
| ```sql | ||
| SELECT CAST(JSON_PARSE( |
Contributor
There was a problem hiding this comment.
这里的cast 容易翻车,比如这个json 假如不符合要求,我们是报错,还是返回null,就会有那种严格模式的引入。
struct 是确定的。所以我建议不要写这个cast from json or variant了
yiguolei
reviewed
Oct 20, 2026
| +------------------------------------------------------------------------------------------------------------------+ | ||
| ``` | ||
|
|
||
| ### TO JSON |
Restore JSON conversion pages to their pre-FILE contents and document FILE casts through STRUCT. Describe TO_JSON(FILE), including all six fields, Base64 inline data, and NULL handling, with executable examples. Synchronize current and 4.x documentation in English and Chinese. Validation: compile all 16 changed MDX pages; check internal links and locale mirrors; execute three documentation SQL examples against Doris.
Describe path, size and nullable FILE results, default recursive listing, and immediate directories with zero size and NULL FILE values. Synchronize current and 4.x documentation in English and Chinese, including FILE and TO_FILE references. Validation: 12 MDX pages, internal links and locale/version synchronization; three SQL examples verified against real MinIO storage.
Document FL_GET_BINARY, FILE metadata access, and explicit STRUCT to FILE conversion, including nested values and NULL handling. Update the English and Chinese current and 4.x documentation and function navigation. Validation: Compiled all eight translated pages as MDX, checked 15 relative links, and ran git diff --check.
yiguolei
approved these changes
Oct 23, 2026
linrrzqqq
had a problem deploying
to
Production
October 23, 2026 06:35 — with
GitHub Actions
Failure
This branch had an error being deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Versions
Languages
Docs Checklist