Skip to content
This repository has been archived by the owner on Jun 7, 2021. It is now read-only.

[TRAFODION-2921] Add Syntax and Examples of *UPSERT USING LOAD* for *LOAD Statement* for *Trafodion SQL Reference Manual* #1408

Closed
wants to merge 1 commit into from

Conversation

liuyu000
Copy link
Contributor

No description provided.

@Traf-Jenkins
Copy link

Check Test Started: https://jenkins.esgyn.com/job/Check-PR-master/2375/

@Traf-Jenkins
Copy link

Copy link
Contributor

@selvaganesang selvaganesang left a comment

Choose a reason for hiding this comment

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

I couldn't find the grammar in the parser of the code to support upsert using load as a clause in LOAD command. Also, in the example you are using
UPSERT using LOAD command and not the LOAD command. These are two different types of SQL command. If you want to document UPSERT USING LOAD, add this syntax to UPSERT command as UPSERT [USING LOAD] ...

@sureshsubbiah
Copy link
Contributor

I too would prefer that we do not document this feature. I am considering removing it. I am so sorry that effort was spent in documenting it.

The syntax for this statement is present in the parser. As present in code one could make a case that LOAD section is an appropriate place to document it. The feature grew out of a requirement that UPSERT USING LOAD has no transactional protection in case of failure, while LOAD has protection against failure using snapshot mechanism. With this feature one can use the LOAD framework in code, to do UPSERT USING LOAD, and thereby use snapshot for protection against failure.

I would like to deprecate this syntax because

  1. It is rather confusing. It is not clear what exactly it is, LOAD, UPSERT or UPSERT USING LOAD
  2. UPSERT USING LOAD is typically used for performance reasons. With the overhead of using the utility LOAD framework and creating snapshots, the performance benefit is lost except for the largest upserts.

@liuyu000
Copy link
Contributor Author

@selvaganesang @sureshsubbiah
Sorry I read your comments just now, thank you for your reviews and detailed comments :)
I've moved the example of UPSERT USING LOAD to UPSERT Statement and created a PR for it (Click Here).
I'll close this PR.

@liuyu000 liuyu000 closed this Jan 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
4 participants