Skip to content

[CALCITE-7667] Improve string-literal encoding in pushdown translators (follow-up) - #5203

Open
rubenada wants to merge 2 commits into
apache:mainfrom
rubenada:CALCITE-7667_followup
Open

[CALCITE-7667] Improve string-literal encoding in pushdown translators (follow-up)#5203
rubenada wants to merge 2 commits into
apache:mainfrom
rubenada:CALCITE-7667_followup

Conversation

@rubenada

Copy link
Copy Markdown
Contributor

Jira Link

CALCITE-7667

Changes Proposed

The original patch for this ticket (fbfdf89) considered that PigLatin escapes a single quote by doubling it (as SQL does); however this is incorrect, it is escaped by using backslash (PigLatin uses backslash as escape character, see https://pig.apache.org/docs/r0.16.0/cont.html).

The current follow-up patch corrects this, and adjusts the corresponding tests.

@mihaibudiu

Copy link
Copy Markdown
Contributor

I reviewed the other PR, and I asked whether results were validated.
I think it's too expensive to expect to run real validators for all possible formats Calcite can produce, so we have to rely on developers manually validating the results.

@mihaibudiu mihaibudiu 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.

This approval is conditional on the promise that these results were indeed validated mechanically using a Pig installation.

@rubenada

Copy link
Copy Markdown
Contributor Author

My bad @mihaibudiu , I thought that PigAdapterTest.java was doing more than it actually does. Let me check manually...

@rubenada

Copy link
Copy Markdown
Contributor Author

@mihaibudiu I have verified locally with pig, and I confirm the new escape syntax is the correct one.
Sorry about the wrong initial patch.

@mihaibudiu

Copy link
Copy Markdown
Contributor

I would comment on each validated test about the fact it's been checked against Pig. Then this question won't surface again.

@rubenada rubenada added the LGTM-will-merge-soon Overall PR looks OK. Only minor things left. label Aug 21, 2026
@sonarqubecloud

Copy link
Copy Markdown

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

Labels

LGTM-will-merge-soon Overall PR looks OK. Only minor things left.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants