Skip to content

Conversation

@maropu
Copy link
Member

@maropu maropu commented Nov 13, 2019

What changes were proposed in this pull request?

SPARK-28885(#26107) has supported the ANSI store assignment rules and stopped running some ported PgSQL regression tests that violate the rules. To re-activate these tests, this pr is to modify them for passing tests with the rules.

Why are the changes needed?

To make the test coverage better.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Existing tests.

@SparkQA
Copy link

SparkQA commented Nov 13, 2019

Test build #113669 has finished for PR 26492 at commit bab3711.

  • This patch fails due to an unknown error code, -9.
  • This patch merges cleanly.
  • This patch adds no public classes.

@maropu
Copy link
Member Author

maropu commented Nov 13, 2019

retest this please

@maropu
Copy link
Member Author

maropu commented Nov 13, 2019

Thanks for your quick check, @MaxGekk ! cc: @dongjoon-hyun @gengliangwang

@SparkQA
Copy link

SparkQA commented Nov 13, 2019

Test build #113682 has finished for PR 26492 at commit bab3711.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

0 seconds
3 hours 4 minutes 5 seconds
41393 hours 19 minutes 20 seconds
953 hours 32 minutes 1 seconds
Copy link
Member Author

Choose a reason for hiding this comment

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

This diff is related to the recent change: #26401

Copy link
Member

Choose a reason for hiding this comment

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

Thank you for updating, @maropu .

INSERT INTO fract_only VALUES (5, '0.99994');
-- INSERT INTO fract_only VALUES (3, '1.0' as decimal(4,4)); -- should fail
INSERT INTO fract_only VALUES (4, cast('-0.9999' as decimal(4,4)));
INSERT INTO fract_only VALUES (5, cast('0.99994' as decimal(4,4)));
Copy link
Member

Choose a reason for hiding this comment

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

So, this is converting CASTING DURING INSERTING into CASTING WITH CAST syntax.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ur... my fault.. I'll update later.

Copy link
Member

Choose a reason for hiding this comment

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

Oh, it was just a comment to clarify. I think it's okay for now AS-IS since we don't support the original query in any way.

Copy link
Member Author

Choose a reason for hiding this comment

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

But, the original queries throw unsupported exceptions now, so most of queries in this file become invalid in Spark. In the last commit, I changed these string literals into floating-point literals for depending on INSERT assignment casts. Which do you think is better, as-is or the last commit?

INSERT INTO TIMESTAMP_TBL VALUES ('now');
-- PostgreSQL implicitly casts string literals to data with timestamp types, but
-- Spark does not support that kind of implicit casts.
INSERT INTO TIMESTAMP_TBL VALUES timestamp(('now'));
Copy link
Member

@dongjoon-hyun dongjoon-hyun Nov 13, 2019

Choose a reason for hiding this comment

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

It seems that you wanted the following.

- INSERT INTO TIMESTAMP_TBL VALUES timestamp(('now'));
+ INSERT INTO TIMESTAMP_TBL VALUES timestamp('now');

Or,

INSERT INTO TIMESTAMP_TBL VALUES (timestamp('now'));

Copy link
Member Author

Choose a reason for hiding this comment

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

oh, ok.

@dongjoon-hyun dongjoon-hyun changed the title [SPARK-28885][SQL][FOLLOW-UP] Remove the ported PgSQL regression tests from the blacklist of SQLQueryTestSuite [SPARK-28885][SQL][FOLLOW-UP] Re-enable the ported PgSQL regression tests of SQLQueryTestSuite Nov 13, 2019
@SparkQA
Copy link

SparkQA commented Nov 14, 2019

Test build #113751 has finished for PR 26492 at commit a4636ec.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@gengliangwang
Copy link
Member

@maropu Thanks for reenabling the test cases!

@dongjoon-hyun
Copy link
Member

ThriftServerQueryTestSuite reuses the queries. It seems that we need to regenerate them too, @maropu . (Also, cc @wangyum ).

-- PostgreSQL implicitly casts string literals to data with timestamp types, but
-- Spark does not support that kind of implicit casts.
INSERT INTO TIMESTAMP_TBL VALUES timestamp(('now'));
INSERT INTO TIMESTAMP_TBL VALUES (timestamp('now'));
Copy link
Member

Choose a reason for hiding this comment

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

Did we regenerate timestamp.sql.out?

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh... I got it.


-- !query 1
INSERT INTO TIMESTAMP_TBL VALUES ('now')
INSERT INTO TIMESTAMP_TBL VALUES timestamp(('now'))
Copy link
Member

Choose a reason for hiding this comment

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

I mean this one~

@SparkQA
Copy link

SparkQA commented Nov 14, 2019

Test build #113759 has finished for PR 26492 at commit 202988b.

  • This patch fails due to an unknown error code, -9.
  • This patch merges cleanly.
  • This patch adds no public classes.

@gengliangwang
Copy link
Member

retest this please.

@SparkQA
Copy link

SparkQA commented Nov 14, 2019

Test build #113766 has finished for PR 26492 at commit 202988b.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@maropu
Copy link
Member Author

maropu commented Nov 15, 2019

retest this please

@SparkQA
Copy link

SparkQA commented Nov 15, 2019

Test build #113823 has finished for PR 26492 at commit 202988b.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@maropu
Copy link
Member Author

maropu commented Nov 20, 2019

retest this please

@SparkQA
Copy link

SparkQA commented Nov 20, 2019

Test build #114124 has finished for PR 26492 at commit 202988b.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@maropu
Copy link
Member Author

maropu commented Nov 20, 2019

Ur, it seems I need to update the golden file again..

@maropu maropu force-pushed the SPARK-28885-FOLLOWUP branch from 202988b to 7c06f0d Compare November 20, 2019 08:50
@SparkQA
Copy link

SparkQA commented Nov 20, 2019

Test build #114154 has finished for PR 26492 at commit 7c06f0d.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

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

+1, LGTM. Merged to master.

@maropu
Copy link
Member Author

maropu commented Nov 21, 2019

Thanks for taking care of it, guys! @dongjoon-hyun @gengliangwang @MaxGekk

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants