Skip to content

Typecasting Operator - #929

Merged
zuozhiw merged 24 commits into
masterfrom
bihaox_typecasting
Jan 9, 2021
Merged

zuozhiw merged 24 commits into
masterfrom
bihaox_typecasting

Conversation

@bihaox

@bihaox bihaox commented Dec 11, 2020

Copy link
Copy Markdown
Contributor

#869 will be the process

@bihaox
bihaox requested a review from zuozhiw December 11, 2020 23:11
@MysteriousChallenger

Copy link
Copy Markdown
Contributor

@bihaox bihaox changed the title Bihaox typecasting Typecasting Operator Dec 18, 2020

@zuozhiw zuozhiw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@bihaox looks very good, I made some changes on the frontend component. I left some comments, please take a look. Especially on the operator, can we make it retain the original attribute order?

println("e", e)
(e._1.operatorID, JavaConverters.asScalaBuffer(e._2.getAttributes()).toList)
})
println("schemaPropagationResult", schemaPropagationResult)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

remove all println

// run this if you want to check the json schema generated for an operator descriptor
// replace the argument with the class of your operator descriptor
println(generateOperatorJsonSchema(classOf[LocalCsvFileScanOpDesc]).toPrettyString)
println(generateOperatorJsonSchema(classOf[LinearRegressionOpDesc]).toPrettyString)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

revert this change

}
);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

revert this change

private workflowModificationEnabled = true;
private enableModificationStream = new BehaviorSubject<boolean>(true);


Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

revert these changes

import { Observable } from 'rxjs/Observable';
import { OperatorPredicate, OperatorLink, OperatorPort, Breakpoint, Point } from '../../../types/workflow-common.interface';
import { isEqual } from 'lodash';
import { SchemaAttribute } from '../../dynamic-schema/schema-propagation/schema-propagation.service';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

revert this change

public Schema getOutputSchema(Schema[] schemas) {
Preconditions.checkArgument(schemas.length == 1);
if (this.resultType!=null && this.attribute!=null){
switch (this.resultType) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can we retain the original order of attributes?


if (type == String.class) {
switch (resultType) {
case STRING:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can we retain the original order of attributes?

@zuozhiw
zuozhiw merged commit 0dc14e8 into master Jan 9, 2021
@zuozhiw
zuozhiw deleted the bihaox_typecasting branch January 9, 2021 00:13
yangzhang75 pushed a commit to yangzhang75/texera that referenced this pull request Jun 22, 2026
apache#869

Authored-by: Bihao Xu <[email protected]>
Co-authored-by: Zuozhi Wang <[email protected]>
renovate-bot pushed a commit to renovate-bot/apache-_-texera that referenced this pull request Nov 3, 2026
…os in LICENSE (apache#9261)

### What changes were proposed in this PR?

Three operator icons came from sources whose licences are incompatible
with an Apache release, so they can't be covered by `DISCLAIMER-WIP` and
must be replaced before RC1 (apache#8984). This PR replaces them the same way
as apache#9220, and fixes two smaller items from the same audit.

| File | Was | Now | Licence |
|---|---|---|---|
| `SankeyDiagram.png` | Adobe Stock asset (per its embedded metadata) |
IBM Carbon
[`sankey-diagram--alt`](https://cdn.jsdelivr.net/npm/@carbon/[email protected]/svg/32/sankey-diagram--alt.svg)
(`@carbon/icons` 11.91.0) | Apache-2.0 |
| `DumbbellPlot.png` | Freepik icon (apache#2149) | Project-made: drawn
dumbbell plot (lines with an open start and a filled end dot) | — |
| `TypeCasting.png` | Noun Project icon, author never recorded (apache#929) |
IBM Carbon
[`transform--binary`](https://cdn.jsdelivr.net/npm/@carbon/[email protected]/svg/32/transform--binary.svg)
(`@carbon/icons` 11.91.0) | Apache-2.0 |
| `SklearnDummyClassifier.png`, `SklearnTrainingDummyClassifier.png`
(new) | No icon: the existing `SklearnDummy*.png` files match no
operator type, so these operators showed a broken image | Project-made:
typographic "Dummy" in [Aileron](https://dotcolon.net/fonts/aileron)
(CC0 1.0), like the "P(A)" and "PA" icons in apache#9220 | — |

<img width="770" height="890" alt="image"
src="https://github.com/user-attachments/assets/08f63fa1-10ce-4702-9aeb-70246f67b22d"
/>

**LICENSE.** The two Carbon icons are added to the existing Carbon
operator-icon entry in `LICENSE` and `frontend/LICENSE-binary`;
project-made icons get no entry. The PNGs are 256×256 and record their
source, licence and copyright in PNG text metadata (`exiftool -Comment
<file>`), as in apache#9220.

**Apache Arrow and AsterixDB logos.** `ArrowSource.png` and
`AsterixDBSource.png` are byte-identical to the official logos in
[`apache/arrow-site`](https://github.com/apache/arrow-site/blob/229e92ede438bb6e13417eda141551c242cff334/img/arrow-logo_hex_black-txt_white-bg.png)
and
[`apache/asterixdb-site`](https://github.com/apache/asterixdb-site/blob/00f9bf22dd19e8645315fb2b139527a575dae9c1/img/asterixdb_tm.png)
(same git blob hash). This adds an entry for them with a trademark note.
It records their provenance for the audit; strictly, [bundled ASF works
need no LICENSE
entry](https://infra.apache.org/licensing-howto.html#bundle-asf-product),
so I'm happy to drop it if reviewers prefer.

### Any related issues, documentation, discussions?

Part of apache#8984 (follows apache#9220). Related: apache#8800, apache#2149, apache#929.

The icons that no operator uses (including `SklearnDummy*.png`,
`HdfsFileScan.png` and `src/favicon.ico`) are left for a separate PR,
pending the decision on apache#8984.

Backport: the five icon files are identical on `release/v1.3`, and both
dummy-classifier operators exist there. `LICENSE` has one trivial
conflict on `release/v1.3` (it has no ORCID entry next to the new
block), so the backport may need to be done by hand.

### How was this PR tested?

Asset and LICENSE change only, no code change.

- Previewed every icon at the 35 px size the workflow canvas draws them
at (see the before/after image).
- Checked that the third-party files are listed in both `LICENSE` and
`frontend/LICENSE-binary` and the project-made ones are not.
- Checked the PNG notices: `exiftool -s -Comment
frontend/src/assets/operator_images/{SankeyDiagram,DumbbellPlot,TypeCasting,SklearnDummyClassifier}.png`.
- Checked the Arrow and AsterixDB logos against the upstream files: `git
hash-object` matches the blobs in `apache/arrow-site` and
`apache/asterixdb-site`.
- License header check, as in `check-header.yml`: `license-eye -c
.licenserc.yaml header check` reports 0 invalid files.

### Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (claude-opus-5-5)

No image-generation model was used. Claude Code was used to search the
icon sets, render the SVGs to PNG, draw the project-made icons from
simple shapes and text, and write the LICENSE entries; every icon was
chosen by the author.
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.

3 participants