← Back to team overview

maria-developers team mailing list archive

Re: dc2ace70f1b: Syntax with MIGRATE keyword

 

Hi, Aleksey!

On Sep 01, Aleksey Midenkov wrote:
> > >
> > > +move_out_partition:
> > > +        MIGRATE_SYM PARTITION_SYM
> > > +        | MIGRATE_SYM OUT_SYM PARTITION_SYM
> >
> > Where does this OUT_SYM came out from?
> > It doesn't add any values, it doesn't make the syntax more natural.
> > Why did you add it?
> 
> I think that helps to make syntax more natural if we do MIGRATE
> PARTITION in both directions.
> If it is written MIGRATE OUT or MIGRATE IN that is easier to
> understand what's going on. FROM/TO in the end is not helping much
> because it is harder to notice. Partition specification presence or
> absence: not so explicit to understand quickly.

It incorrect English. And it's a noise word that adds no value and
doesn't make anything easier to understand.

  MIGRATE PARTITION x TO TABLE y

is correct and unambigous although not a very traditional use of the
word "migrate". MIGRATE OUT PARTITION x TO TABLE y is just wrong.

> > > +        ;
> > > +
> > > +to_table:
> > > +        TO_SYM TABLE_SYM
> > > +        | TO_SYM
> >
> > Let's keep the TABLE_SYM. Saying
> >
> >    MIGRATE PARTITION p1 TO p2
> >
> > is very vague, the syntax should explicitly say that it migrates a
> > PARTITION to a TABLE. The statement mentions many different types of
> > objects, if should be clear about what object type every identifier
> > refers to.
> 
> That is a shortcut for easier typing and that is precious for
> command-line work! If some names can make misunderstanding one can
> always write
> 
> MIGRATE PARTITION p1 TO TABLE p2
> 
> Please do not restrict user freedom to choose between verbosity and
> brevity. I guess you have a preference for perl over python (and the
> democracy over dictatorship).

I do. But it's SQL, not perl. SQL is very verbose even when it isn't
really justified. And here is is justified, so let's keep the syntax
unambigous.

Regards,
Sergei
VP of MariaDB Server Engineering
and security@xxxxxxxxxxx


Follow ups

References