mattcasters commented on issue #2931:
URL: https://github.com/apache/hop/issues/2931#issuecomment-5015513789
## Expanded integer notation (implementation overview)
Addressing the UX pain of typing large counts (e.g. one hundred million) in
dialogs like Generate Rows and Parquet Output.
### Format support
New opt-in parsers in `Const` (existing `toInt` / `toLong` stay strict):
| Form | Examples | Result |
|------|----------|--------|
| Grouping | `100,000,000`, `100.000.000`, `100_000_000`, `100 000 000` |
100000000 |
| Suffixes | `100k`, `100m`, `1g`, `1b` | ×10³ / 10⁶ / 10⁹ |
| Fractional + suffix | `1.5m`, `1,5m` | 1500000 |
| Scientific | `1e8`, `1E8`, `1x10^8`, `10^8` | 100000000 |
API: `Const.expandIntegerString()`, `toLongExpanded()`, `toIntExpanded()`.
Variables (`${...}`) are still resolved first, then expanded.
### GUI indicator
On `TextVar` fields that accept this notation, a small **`#`** icon appears
next to the existing **`$`** (variable) marker. Hovering `#` shows a tooltip
with the allowed formats.
### Where it is enabled (runtime + dialog where applicable)
**Row / limit counts**
- Generate Rows (row limit; also Beam Generate Rows handler)
- Table Input
- Clone Rows
- Cube Input, XML Input Stream (limit + rows to skip), SAS Input, Avro File
Input, Salesforce Input
- File Metadata
- Dialogs that parse a row limit on OK: Text File Input, Excel Input, JSON
Input / Normalize, YAML Input, Property Input, Get File Names, Get Subfolders,
Load File Input, Tika, LDAP Input, Dynamic SQL Row, Database Join, Get XML
Data, Google Analytics
**Sizes / buffers / splits**
- Sort Rows (sort size)
- Parquet Output (file split size, row group / data / dictionary page sizes)
- CSV Input (buffer size)
- MySQL / MonetDB / Snowflake / CrateDB / Oracle bulk loaders
(bulk/buffer/split/commit/bind/read/max-errors as applicable)
**Commit / batch / group sizes**
- Table Output, Insert/Update, Update, Delete, Synchronize After Merge
(commit size)
- Kafka Consumer (batch size)
- Neo4j Cypher / Cypher Builder / Graph Output / Neo4j Output (batch size)
- Azure Event Hubs listen/write (batch / prefetch)
- Reservoir Sampling (sample size)
- Pipeline Executor & Workflow Executor (group size)
**Engines (config parse)**
- Beam Flink max bundle size
- Beam Spark max records per batch / bundle size
### Notes
- **Opt-in only** — ports, field lengths, timeouts, XML result counters,
etc. still use strict `toInt`/`toLong`.
- Plain `Text` widgets (not `TextVar`) accept the notation on save where
parsing was updated, but do not show the `#` badge until converted to `TextVar`.
- Branch: `eil-friction` on
https://github.com/mattcasters/hop/tree/eil-friction (commit includes unit
tests for `Const` + transform IT green).
Happy to open a PR against `apache/hop` main when ready.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]