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

Fix scalar_functions.md for CI #13340

Merged
merged 2 commits into from
Nov 10, 2024
Merged

Fix scalar_functions.md for CI #13340

merged 2 commits into from
Nov 10, 2024

Conversation

goldmedal
Copy link
Contributor

@goldmedal goldmedal commented Nov 10, 2024

Which issue does this PR close?

Closes #.

Rationale for this change

I'm not sure why #13324 changed the format of the code scope in scalar_functions.md but it causes the CI for checking the md file to fail.

Rust / check configs.md and ***_functions.md is up-to-date (pull_request) 

I found 2 PRs have been impacted:

What changes are included in this PR?

Reformat scalar_functions.md

Are these changes tested?

Checked by CI

Are there any user-facing changes?

no

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Nov 10, 2024
@goldmedal goldmedal marked this pull request as ready for review November 10, 2024 11:06
@Weijun-H
Copy link
Member

After some investigation, we can fix this issue through this modification.

.with_sql_example(
r#"```sql
-- Using map function
SELECT MAP('type', 'test');
----
{type: test}
SELECT MAP(['POST', 'HEAD', 'PATCH'], [41, 33, null]);
----
{POST: 41, HEAD: 33, PATCH: }
SELECT MAP([[1,2], [3,4]], ['a', 'b']);
----
{[1, 2]: a, [3, 4]: b}
SELECT MAP { 'a': 1, 'b': 2 };
----
{a: 1, b: 2}
-- Using make_map function
SELECT MAKE_MAP(['POST', 'HEAD'], [41, 33]);
----
{POST: 41, HEAD: 33}
SELECT MAKE_MAP(['key1', 'key2'], ['value1', null]);
----
{key1: value1, key2: }
```"#
)

                    .with_sql_example(
r#"
```sql
-- Using map function
SELECT MAP('type', 'test');
----
{type: test}

SELECT MAP(['POST', 'HEAD', 'PATCH'], [41, 33, null]);
----
{POST: 41, HEAD: 33, PATCH: }

SELECT MAP([[1,2], [3,4]], ['a', 'b']);
----
{[1, 2]: a, [3, 4]: b}

SELECT MAP { 'a': 1, 'b': 2 };
----
{a: 1, b: 2}

-- Using make_map function
SELECT MAKE_MAP(['POST', 'HEAD'], [41, 33]);
----
{POST: 41, HEAD: 33}

SELECT MAKE_MAP(['key1', 'key2'], ['value1', null]);
----
{key1: value1, key2: }
```"#,
                    )

@tlm365
Copy link
Contributor

tlm365 commented Nov 10, 2024

After some investigation, we can fix this issue through this modification.

I also prefer this, it makes the sql example more consistent (no start with tab/spaces)

@github-actions github-actions bot removed the documentation Improvements or additions to documentation label Nov 10, 2024
@goldmedal
Copy link
Contributor Author

Thanks, @Weijun-H and @tlm365. It makes sense to me 👍

@jonahgao jonahgao merged commit 7ebd993 into apache:main Nov 10, 2024
25 checks passed
@jonahgao
Copy link
Member

Merged to get CI green

@goldmedal goldmedal deleted the bugfix/doc-ci branch November 11, 2024 01:37
jayzhan211 pushed a commit to jayzhan211/datafusion that referenced this pull request Nov 12, 2024
* fix format of document ci

* remove the indent of mpa example
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.

4 participants