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

BigInt Documentation #17556

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

BigInt Documentation #17556

wants to merge 2 commits into from

Conversation

d10c
Copy link
Contributor

@d10c d10c commented Sep 24, 2024

This PR introduces public-facing documentation around the experimental QlBuiltins::BigInt type.

Commits

  • Fix trailing whitespace in docs: applies the .rst formatter to fix whitespace. For this reason, reviewing commit-by-commit is recommended.
  • Initial BigInt documentation: Basic docs.

Questions

  • Any change requests from reviewers?
  • Is a change note necessary?

@d10c d10c requested a review from alexet September 25, 2024 11:29
@d10c d10c marked this pull request as ready for review September 25, 2024 11:29
@d10c d10c requested a review from a team as a code owner September 25, 2024 11:29
Copy link
Contributor

@jbj jbj left a comment

Choose a reason for hiding this comment

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

This is an initial review just for cosmetics.

string provenance
);

An extensible predicate is a CodeQL predicate with the following restrictions:

- It uses the ``extensible`` keyword.
- It has no body.
- All predicate parameters have primitive types.
- All predicate parameters have type `string`, `int`, `float`, `boolean`, or `date`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- All predicate parameters have type `string`, `int`, `float`, `boolean`, or `date`.
- All predicate parameters have type ``string``, ``int``, ``float``, ``boolean``, or ``date``.


The other built-in operations are:

* comparisons between :code:`BigInt`s: :code:`=`, :code:`!=`, :code:`<`, :code:`<=`, :code:`>`, :code:`>=`,
Copy link
Contributor

Choose a reason for hiding this comment

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

GitHub's built-in RST renderer gets the quoting wrong in :code:`BigInt`s. I don't know if you'll see the same in our rendered documentation. I'm sure there's a way to preview it, but I don't know how.

This type is not available in the CodeQL CLI by default, but you can enable it by passing the ``--allow-experimental=bigint``
option to the CodeQL CLI. Consequently, queries are currently restricted from returning BigInts as results.

Unlike :code:`int` and :code:`float`, there is no automatic conversion between :code:`BigInt` and other numeric types.
Copy link
Contributor

Choose a reason for hiding this comment

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

Why use :code: here but double backticks above?

* bitwise operations: :code:`.bitAnd(BigInt)`, :code:`.bitOr(BigInt)`,
:code:`.bitXor(BigInt)`, :code:`.bitShiftLeft(int)`, :code:`.bitShiftRightSigned(int)`,
:code:`.bitNot()`,
* aggregates: :code:`min`, :code:`max`, (:code:`strict`):code:`sum`, (:code:`strict`):code:`count`, :code:`avg`,
Copy link
Contributor

Choose a reason for hiding this comment

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

The rendering is also wrong around the (:code:`strict`) notation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants