Skip to content

Add documentation for 'format' table function#42779

Merged
Avogar merged 8 commits intoClickHouse:masterfrom
Avogar:add-format-func-doc
Nov 21, 2022
Merged

Add documentation for 'format' table function#42779
Avogar merged 8 commits intoClickHouse:masterfrom
Avogar:add-format-func-doc

Conversation

@Avogar
Copy link
Copy Markdown
Member

@Avogar Avogar commented Oct 28, 2022

Changelog category (leave one):

  • Documentation (changelog entry is not required)

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):

Add documentation for 'format' table function

Information about CI checks: https://clickhouse.com/docs/en/development/continuous-integration/

@robot-ch-test-poll1 robot-ch-test-poll1 added the pr-documentation Documentation PRs for the specific code PR label Oct 28, 2022
@davenger
Copy link
Copy Markdown
Member

davenger commented Oct 28, 2022

Shouldn't this file name be 'format.md' with '.' instead of ','?
docs/zh/sql-reference/table-functions/format,md

@Avogar
Copy link
Copy Markdown
Member Author

Avogar commented Oct 28, 2022

Shouldn't this file name be 'format.md' with '.' instead of ','?

That's a typo, thanks for noticing

**Parameters**

- `format_name` — The [format](../../interfaces/formats.md#formats) of the data.
- `data` — String literal containing data in specified format
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do we support column as well as input?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Table functions cannot get columns from other tables.
Maybe you meant constant expressions?

Looks like yes:

milovidov-desktop :) SELECT * FROM format(LineAsString, 'Hello' || 'World')

┌─line───────┐
│ HelloWorld │
└────────────┘

1 row in set. Elapsed: 0.001 sec.

@alexey-milovidov alexey-milovidov self-assigned this Oct 29, 2022
@alexey-milovidov
Copy link
Copy Markdown
Member

Maybe it's a burden and we'd better do it once with a script, but... let's also copy the docs into the Documenation object in Factory.

@Avogar Avogar merged commit 406c502 into ClickHouse:master Nov 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-documentation Documentation PRs for the specific code PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants